public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: get_msr support for HV_X64_MSR_APIC_ASSIST_PAGE
@ 2011-07-21 22:38 Mike Waychison
  2011-07-22 17:52 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Waychison @ 2011-07-21 22:38 UTC (permalink / raw)
  To: Cory Maccarrone, Andy Thornton, Miche Baker-Harvey, Avi Kivity,
	Marcelo Tosatti
  Cc: x86, kvm, linux-kernel, Mike Waychison

"get" support for the HV_X64_MSR_APIC_ASSIST_PAGE msr was missing, even
though it is explicitly enumerated as something the vmm should save in
msrs_to_save and reported to userland via the KVM_GET_MSR_INDEX_LIST
ioctl.

Add "get" support for HV_X64_MSR_APIC_ASSIST_PAGE.  We simply return the
guest visible value of this register, which seems to be correct as a set
on the register is validated for us already.

Signed-off-by: Mike Waychison <mikew@google.com>
---
 arch/x86/kvm/x86.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 77c9d86..15148ef 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1748,6 +1748,8 @@ static int get_msr_hyperv(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
 		return kvm_hv_vapic_msr_read(vcpu, APIC_ICR, pdata);
 	case HV_X64_MSR_TPR:
 		return kvm_hv_vapic_msr_read(vcpu, APIC_TASKPRI, pdata);
+	case HV_X64_MSR_APIC_ASSIST_PAGE:
+		return vcpu->arch.hv_vapic;
 	default:
 		pr_unimpl(vcpu, "Hyper-V unhandled rdmsr: 0x%x\n", msr);
 		return 1;
-- 
1.7.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm: get_msr support for HV_X64_MSR_APIC_ASSIST_PAGE
  2011-07-21 22:38 [PATCH] kvm: get_msr support for HV_X64_MSR_APIC_ASSIST_PAGE Mike Waychison
@ 2011-07-22 17:52 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2011-07-22 17:52 UTC (permalink / raw)
  To: Mike Waychison
  Cc: Cory Maccarrone, Andy Thornton, Miche Baker-Harvey, Avi Kivity,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, kvm,
	linux-kernel

On Thu, Jul 21, 2011 at 03:38:10PM -0700, Mike Waychison wrote:
> "get" support for the HV_X64_MSR_APIC_ASSIST_PAGE msr was missing, even
> though it is explicitly enumerated as something the vmm should save in
> msrs_to_save and reported to userland via the KVM_GET_MSR_INDEX_LIST
> ioctl.
> 
> Add "get" support for HV_X64_MSR_APIC_ASSIST_PAGE.  We simply return the
> guest visible value of this register, which seems to be correct as a set
> on the register is validated for us already.
> 
> Signed-off-by: Mike Waychison <mikew@google.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-22 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-21 22:38 [PATCH] kvm: get_msr support for HV_X64_MSR_APIC_ASSIST_PAGE Mike Waychison
2011-07-22 17:52 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox