Thread (86 messages) 86 messages, 6 authors, 2021-07-05

Re: [PATCH Part1 RFC v3 05/22] x86/sev: Add support for hypervisor feature VMGEXIT

From: Brijesh Singh <hidden>
Date: 2021-06-07 14:58:39
Also in: kvm, linux-coco, linux-efi, linux-mm, lkml, platform-driver-x86

On 6/7/21 9:19 AM, Borislav Petkov wrote:
On Wed, Jun 02, 2021 at 09:03:59AM -0500, Brijesh Singh wrote:
quoted
diff --git a/arch/x86/kernel/sev-shared.c b/arch/x86/kernel/sev-shared.c
index 70f181f20d92..94957c5bdb51 100644
--- a/arch/x86/kernel/sev-shared.c
+++ b/arch/x86/kernel/sev-shared.c
I'm guessing this is in sev-shared.c because it is going to be used by
both stages?
Yes,  the function is used by both the stages.

quoted
@@ -20,6 +20,7 @@
  * out when the .bss section is later cleared.
  */
 static u16 ghcb_version __section(".data");
State what this is:

/* Bitmap of SEV features supported by the hypervisor */
Noted.

quoted
+static u64 hv_features __section(".data");
Also, I'm assuming that bitmap remains immutable during the guest
lifetime so you can do:

static u64 hv_features __ro_after_init;

instead, which will do:

static u64 hv_features __attribute__((__section__(".data..ro_after_init")));

and it'll be in the data section and then also marked read-only after
init, after mark_rodata_ro() more specifically.
Yes, it should be immutable. I will set the ro_after_init section to
mark it read-only. thanks

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help