diff mbox

kvm: get_msr support for HV_X64_MSR_APIC_ASSIST_PAGE

Message ID 1311287890-22124-1-git-send-email-mikew@google.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mike Waychison July 21, 2011, 10:38 p.m. UTC
"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(-)

Comments

Marcelo Tosatti July 22, 2011, 5:52 p.m. UTC | #1
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.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;