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@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Andrew Cooper committed 2026-01-22 13:05:39 +00:00
1 parent 1952fc2156
commit 6382bda1ea
2 files changed
+6 -6

No files matched your search

+4
View File
@@ -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);
+2 -6
View File
@@ -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 {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.