2018-02-22 23:01:24 +01:00
|
|
|
From 631811d80a534654f23009e86cf9b9b942d53a48 Mon Sep 17 00:00:00 2001
|
2018-02-08 20:55:31 +01:00
|
|
|
From: Brijesh Singh <brijesh.singh@amd.com>
|
2018-02-22 23:01:24 +01:00
|
|
|
Date: Thu, 15 Feb 2018 09:03:19 -0600
|
2018-02-08 20:55:31 +01:00
|
|
|
Subject: [PATCH] memattrs: add debug attribute
|
|
|
|
|
|
|
|
Extend the MemTxAttrs to include 'debug' flag. The flag can be used as
|
|
|
|
general indicator that operation was triggered by the debugger.
|
|
|
|
|
|
|
|
Later in the patch series we set the debug=1 when issuing a memory access
|
|
|
|
from the gdbstub or HMP commands. This patch is prerequisite to support
|
|
|
|
debugging the encrypted guest. If we see request with debug=1 then we
|
|
|
|
will need to use encryption APIs to access the guest memory.
|
|
|
|
|
|
|
|
Cc: Alistair Francis <alistair.francis@xilinx.com>
|
|
|
|
Cc: Peter Maydell <peter.maydell@linaro.org>
|
2018-02-22 23:01:24 +01:00
|
|
|
Cc: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
|
2018-02-08 20:55:31 +01:00
|
|
|
Cc: Richard Henderson <richard.henderson@linaro.org>
|
|
|
|
Cc: Paolo Bonzini <pbonzini@redhat.com>
|
2018-02-22 23:01:24 +01:00
|
|
|
Reviewed-by: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
|
2018-02-08 20:55:31 +01:00
|
|
|
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
|
|
|
|
[BR: FATE#322124]
|
|
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
|
|
|
---
|
|
|
|
include/exec/memattrs.h | 2 ++
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h
|
|
|
|
index d4a1642098..08099e4f7e 100644
|
|
|
|
--- a/include/exec/memattrs.h
|
|
|
|
+++ b/include/exec/memattrs.h
|
|
|
|
@@ -37,6 +37,8 @@ typedef struct MemTxAttrs {
|
|
|
|
unsigned int user:1;
|
|
|
|
/* Requester ID (for MSI for example) */
|
|
|
|
unsigned int requester_id:16;
|
|
|
|
+ /* Memory access request from the debugger */
|
|
|
|
+ unsigned int debug:1;
|
|
|
|
} MemTxAttrs;
|
|
|
|
|
|
|
|
/* Bus masters which don't specify any attributes will get this,
|