* [PATCH] KVM: x86: remove data variable from kvm_get_msr_common
@ 2015-06-29 10:39 Nicolas Iooss
2015-07-01 13:37 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Iooss @ 2015-06-29 10:39 UTC (permalink / raw)
To: Gleb Natapov, Paolo Bonzini; +Cc: kvm, linux-kernel, Nicolas Iooss
Commit 609e36d372ad ("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: 609e36d372ad ("KVM: x86: pass host_initiated to functions that
read MSRs")
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
---
arch/x86/kvm/x86.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index ac165c2fb8e5..bbaf44e8f0d3 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2379,8 +2379,6 @@ static int get_msr_hyperv(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
{
- u64 data;
-
switch (msr_info->index) {
case MSR_IA32_PLATFORM_ID:
case MSR_IA32_EBL_CR_POWERON:
@@ -2453,7 +2451,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
/* TSC increment by tick */
msr_info->data = 1000ULL;
/* CPU multiplier */
- data |= (((uint64_t)4ULL) << 40);
+ msr_info->data |= (((uint64_t)4ULL) << 40);
break;
case MSR_EFER:
msr_info->data = vcpu->arch.efer;
--
2.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: x86: remove data variable from kvm_get_msr_common
2015-06-29 10:39 [PATCH] KVM: x86: remove data variable from kvm_get_msr_common Nicolas Iooss
@ 2015-07-01 13:37 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2015-07-01 13:37 UTC (permalink / raw)
To: Nicolas Iooss, Gleb Natapov; +Cc: kvm, linux-kernel
On 29/06/2015 12:39, Nicolas Iooss wrote:
> Commit 609e36d372ad ("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: 609e36d372ad ("KVM: x86: pass host_initiated to functions that
> read MSRs")
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> ---
> arch/x86/kvm/x86.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index ac165c2fb8e5..bbaf44e8f0d3 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -2379,8 +2379,6 @@ static int get_msr_hyperv(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
>
> int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
> {
> - u64 data;
> -
> switch (msr_info->index) {
> case MSR_IA32_PLATFORM_ID:
> case MSR_IA32_EBL_CR_POWERON:
> @@ -2453,7 +2451,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
> /* TSC increment by tick */
> msr_info->data = 1000ULL;
> /* CPU multiplier */
> - data |= (((uint64_t)4ULL) << 40);
> + msr_info->data |= (((uint64_t)4ULL) << 40);
> break;
> case MSR_EFER:
> msr_info->data = vcpu->arch.efer;
>
Applied, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-01 13:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-29 10:39 [PATCH] KVM: x86: remove data variable from kvm_get_msr_common Nicolas Iooss
2015-07-01 13:37 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).