Skip to content

Commit b0996ae

Browse files
fishilicobonzini
authored andcommitted
KVM: x86: remove data variable from kvm_get_msr_common
Commit 609e36d ("KVM: x86: pass host_initiated to functions that read MSRs") modified kvm_get_msr_common function to use msr_info->data instead of data but missed one occurrence. Replace it and remove the unused local variable. Fixes: 609e36d ("KVM: x86: pass host_initiated to functions that read MSRs") Signed-off-by: Nicolas Iooss <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 431dae7 commit b0996ae

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arch/x86/kvm/x86.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2379,8 +2379,6 @@ static int get_msr_hyperv(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
23792379

23802380
int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
23812381
{
2382-
u64 data;
2383-
23842382
switch (msr_info->index) {
23852383
case MSR_IA32_PLATFORM_ID:
23862384
case MSR_IA32_EBL_CR_POWERON:
@@ -2453,7 +2451,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
24532451
/* TSC increment by tick */
24542452
msr_info->data = 1000ULL;
24552453
/* CPU multiplier */
2456-
data |= (((uint64_t)4ULL) << 40);
2454+
msr_info->data |= (((uint64_t)4ULL) << 40);
24572455
break;
24582456
case MSR_EFER:
24592457
msr_info->data = vcpu->arch.efer;

0 commit comments

Comments
 (0)