On Thu, Oct 20, 2022, Maxim Levitsky wrote: > This is first step of separating SVM code to a library > > Signed-off-by: Maxim Levitsky <mlevitsk@xxxxxxxxxx> > --- > lib/x86/svm.h | 364 ++++++++++++++++++++++++++++++++++++++++++++++++++ > x86/svm.h | 359 +------------------------------------------------ > 2 files changed, 365 insertions(+), 358 deletions(-) > create mode 100644 lib/x86/svm.h > ... > +enum { > + VMCB_CLEAN_INTERCEPTS = 1, /* Intercept vectors, TSC offset, pause filter count */ Indentation is too deep. > + VMCB_CLEAN_PERM_MAP = 2, /* IOPM Base and MSRPM Base */ > + VMCB_CLEAN_ASID = 4, /* ASID */ > + VMCB_CLEAN_INTR = 8, /* int_ctl, int_vector */ > + VMCB_CLEAN_NPT = 16, /* npt_en, nCR3, gPAT */ > + VMCB_CLEAN_CR = 32, /* CR0, CR3, CR4, EFER */ > + VMCB_CLEAN_DR = 64, /* DR6, DR7 */ > + VMCB_CLEAN_DT = 128, /* GDT, IDT */ > + VMCB_CLEAN_SEG = 256, /* CS, DS, SS, ES, CPL */ > + VMCB_CLEAN_CR2 = 512, /* CR2 only */ > + VMCB_CLEAN_LBR = 1024, /* DBGCTL, BR_FROM, BR_TO, LAST_EX_FROM, LAST_EX_TO */ > + VMCB_CLEAN_AVIC = 2048, /* APIC_BAR, APIC_BACKING_PAGE, > + PHYSICAL_TABLE pointer, LOGICAL_TABLE pointer */ > + VMCB_CLEAN_ALL = 4095, > +};