|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/svm: Adjust VMCB comments
commit 6382bda1ea4fc161352518826bdb28d0aef6b19c
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Wed Jan 21 17:38:31 2026 +0000
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Jan 22 13:05:39 2026 +0000
x86/svm: Adjust VMCB comments
The Intercept comments provide no value whatsoever. For the VMCB, label the
Control area and State Save area, which are the names given by the APM.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/hvm/svm/vmcb.c | 4 ++++
xen/arch/x86/hvm/svm/vmcb.h | 8 ++------
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c
index cbee10d046..72173c8fdd 100644
--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -430,9 +430,13 @@ static void __init __maybe_unused build_assertions(void)
/* Build-time check of the VMCB layout. */
BUILD_BUG_ON(sizeof(vmcb) != PAGE_SIZE);
+
+ /* Control area */
BUILD_BUG_ON(offsetof(typeof(vmcb), _pause_filter_thresh) != 0x03c);
BUILD_BUG_ON(offsetof(typeof(vmcb), _vintr) != 0x060);
BUILD_BUG_ON(offsetof(typeof(vmcb), event_inj) != 0x0a8);
+
+ /* State Save area */
BUILD_BUG_ON(offsetof(typeof(vmcb), es) != 0x400);
BUILD_BUG_ON(offsetof(typeof(vmcb), _cpl) != 0x4cb);
BUILD_BUG_ON(offsetof(typeof(vmcb), _cr4) != 0x548);
diff --git a/xen/arch/x86/hvm/svm/vmcb.h b/xen/arch/x86/hvm/svm/vmcb.h
index ba554a9644..c64386e7ef 100644
--- a/xen/arch/x86/hvm/svm/vmcb.h
+++ b/xen/arch/x86/hvm/svm/vmcb.h
@@ -8,7 +8,6 @@
struct vcpu;
-/* general 1 intercepts */
enum GenericIntercept1bits
{
GENERAL1_INTERCEPT_INTR = 1 << 0,
@@ -45,7 +44,6 @@ enum GenericIntercept1bits
GENERAL1_INTERCEPT_SHUTDOWN_EVT = 1u << 31
};
-/* general 2 intercepts */
enum GenericIntercept2bits
{
GENERAL2_INTERCEPT_VMRUN = 1 << 0,
@@ -65,8 +63,6 @@ enum GenericIntercept2bits
GENERAL2_INTERCEPT_RDPRU = 1 << 14,
};
-
-/* control register intercepts */
enum CRInterceptBits
{
CR_INTERCEPT_CR0_READ = 1 << 0,
@@ -103,8 +99,6 @@ enum CRInterceptBits
CR_INTERCEPT_CR15_WRITE = 1u << 31,
};
-
-/* debug register intercepts */
enum DRInterceptBits
{
DR_INTERCEPT_DR0_READ = 1 << 0,
@@ -400,6 +394,7 @@ typedef union
#define MSRPM_SIZE (8 * 1024)
struct vmcb_struct {
+ /* Control area */
u32 _cr_intercepts; /* offset 0x00 - cleanbit 0 */
u32 _dr_intercepts; /* offset 0x04 - cleanbit 0 */
u32 _exception_intercepts; /* offset 0x08 - cleanbit 0 */
@@ -491,6 +486,7 @@ struct vmcb_struct {
u8 guest_ins[15]; /* offset 0xD1 */
u64 res10a[100]; /* offset 0xE0 pad to save area */
+ /* State Save area */
union {
struct segment_register sreg[6];
struct {
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |