@@ -174,7 +174,7 @@ int nsvm_vcpu_reset(struct vcpu *v)
svm->ns_exception_intercepts = 0;
svm->ns_general1_intercepts = 0;
svm->ns_general2_intercepts = 0;
- svm->ns_lbr_control.bytes = 0;
+ svm->ns_virt_ext.bytes = 0;
svm->ns_hap_enabled = 0;
svm->ns_vmcb_guestcr3 = 0;
@@ -521,12 +521,12 @@ static int nsvm_vmcb_prepare4vmrun(struct vcpu *v, struct cpu_user_regs *regs)
/* Pending Interrupts */
n2vmcb->eventinj = ns_vmcb->eventinj;
- /* LBR virtualization */
+ /* LBR and other virtualization */
if (!vcleanbit_set(lbr)) {
- svm->ns_lbr_control = ns_vmcb->lbr_control;
+ svm->ns_virt_ext = ns_vmcb->virt_ext;
}
- n2vmcb->lbr_control.bytes =
- n1vmcb->lbr_control.bytes | ns_vmcb->lbr_control.bytes;
+ n2vmcb->virt_ext.bytes =
+ n1vmcb->virt_ext.bytes | ns_vmcb->virt_ext.bytes;
/* NextRIP - only evaluated on #VMEXIT. */
@@ -1997,7 +1997,7 @@ static int svm_msr_write_intercept(unsigned int msr, uint64_t msr_content)
vmcb_set_debugctlmsr(vmcb, msr_content);
if ( !msr_content || !cpu_has_svm_lbrv )
break;
- vmcb->lbr_control.fields.enable = 1;
+ vmcb->virt_ext.fields.lbr_enable = 1;
svm_disable_intercept_for_msr(v, MSR_IA32_DEBUGCTLMSR);
svm_disable_intercept_for_msr(v, MSR_IA32_LASTBRANCHFROMIP);
svm_disable_intercept_for_msr(v, MSR_IA32_LASTBRANCHTOIP);
@@ -46,8 +46,8 @@ struct nestedsvm {
uint32_t ns_general1_intercepts;
uint32_t ns_general2_intercepts;
- /* Cached real lbr of the l2 guest */
- lbrctrl_t ns_lbr_control;
+ /* Cached real lbr and other virtual extentions of the l2 guest */
+ virt_ext_t ns_virt_ext;
/* Cached real MSR permission bitmaps of the l2 guest */
unsigned long *ns_cached_msrpm;
@@ -358,9 +358,9 @@ typedef union
u64 bytes;
struct
{
- u64 enable:1;
+ u64 lbr_enable:1;
} fields;
-} lbrctrl_t;
+} virt_ext_t;
typedef union
{
@@ -427,7 +427,7 @@ struct vmcb_struct {
u64 res08[2];
eventinj_t eventinj; /* offset 0xA8 */
u64 _h_cr3; /* offset 0xB0 - cleanbit 4 */
- lbrctrl_t lbr_control; /* offset 0xB8 */
+ virt_ext_t virt_ext; /* offset 0xB8 */
vmcbcleanbits_t cleanbits; /* offset 0xC0 */
u32 res09; /* offset 0xC4 */
u64 nextrip; /* offset 0xC8 */