mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 12:43:55 +08:00
KVM: VMX: Rename vcpu_vmx's "nmsrs" to "nr_uret_msrs"
Rename vcpu_vmx.nsmrs to vcpu_vmx.nr_uret_msrs to explicitly associate it with the guest_uret_msrs array. No functional change intended. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Message-Id: <20200923180409.32255-6-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
eb3db1b137
commit
fbc1800738
@ -615,7 +615,7 @@ static inline int __find_msr_index(struct vcpu_vmx *vmx, u32 msr)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < vmx->nmsrs; ++i)
|
for (i = 0; i < vmx->nr_uret_msrs; ++i)
|
||||||
if (vmx_msr_index[vmx->guest_uret_msrs[i].index] == msr)
|
if (vmx_msr_index[vmx->guest_uret_msrs[i].index] == msr)
|
||||||
return i;
|
return i;
|
||||||
return -1;
|
return -1;
|
||||||
@ -6726,7 +6726,7 @@ static int vmx_create_vcpu(struct kvm_vcpu *vcpu)
|
|||||||
for (i = 0; i < ARRAY_SIZE(vmx_msr_index); ++i) {
|
for (i = 0; i < ARRAY_SIZE(vmx_msr_index); ++i) {
|
||||||
u32 index = vmx_msr_index[i];
|
u32 index = vmx_msr_index[i];
|
||||||
u32 data_low, data_high;
|
u32 data_low, data_high;
|
||||||
int j = vmx->nmsrs;
|
int j = vmx->nr_uret_msrs;
|
||||||
|
|
||||||
if (rdmsr_safe(index, &data_low, &data_high) < 0)
|
if (rdmsr_safe(index, &data_low, &data_high) < 0)
|
||||||
continue;
|
continue;
|
||||||
@ -6748,7 +6748,7 @@ static int vmx_create_vcpu(struct kvm_vcpu *vcpu)
|
|||||||
vmx->guest_uret_msrs[j].mask = -1ull;
|
vmx->guest_uret_msrs[j].mask = -1ull;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
++vmx->nmsrs;
|
++vmx->nr_uret_msrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = alloc_loaded_vmcs(&vmx->vmcs01);
|
err = alloc_loaded_vmcs(&vmx->vmcs01);
|
||||||
|
@ -197,7 +197,7 @@ struct vcpu_vmx {
|
|||||||
ulong rflags;
|
ulong rflags;
|
||||||
|
|
||||||
struct vmx_uret_msr guest_uret_msrs[MAX_NR_USER_RETURN_MSRS];
|
struct vmx_uret_msr guest_uret_msrs[MAX_NR_USER_RETURN_MSRS];
|
||||||
int nmsrs;
|
int nr_uret_msrs;
|
||||||
int save_nmsrs;
|
int save_nmsrs;
|
||||||
bool guest_msrs_ready;
|
bool guest_msrs_ready;
|
||||||
#ifdef CONFIG_X86_64
|
#ifdef CONFIG_X86_64
|
||||||
|
Loading…
Reference in New Issue
Block a user