diff options
author | Vadim Rozenfeld <vrozenfe@redhat.com> | 2014-01-23 18:12:53 +1100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-01-24 16:51:15 +0100 |
commit | b3af1e889ec4909f6b48dabd19a311d9c9f8d58e (patch) | |
tree | 7817262c9300d08bc95b74be396288e91518de52 /arch/x86/kvm | |
parent | b94b64c9a79a322802f13f44e9690a7b6a22710e (diff) | |
download | linux-b3af1e889ec4909f6b48dabd19a311d9c9f8d58e.tar.bz2 |
KVM: x86: mark hyper-v vapic assist page as dirty
Signed-off-by: Vadim Rozenfeld <vrozenfe@redhat.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/x86.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0fa9c84e36cb..dc11b4f98577 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1869,19 +1869,21 @@ static int set_msr_hyperv(struct kvm_vcpu *vcpu, u32 msr, u64 data) { switch (msr) { case HV_X64_MSR_APIC_ASSIST_PAGE: { + u64 gfn; unsigned long addr; if (!(data & HV_X64_MSR_APIC_ASSIST_PAGE_ENABLE)) { vcpu->arch.hv_vapic = data; break; } - addr = gfn_to_hva(vcpu->kvm, data >> - HV_X64_MSR_APIC_ASSIST_PAGE_ADDRESS_SHIFT); + gfn = data >> HV_X64_MSR_APIC_ASSIST_PAGE_ADDRESS_SHIFT; + addr = gfn_to_hva(vcpu->kvm, gfn); if (kvm_is_error_hva(addr)) return 1; if (__clear_user((void __user *)addr, PAGE_SIZE)) return 1; vcpu->arch.hv_vapic = data; + mark_page_dirty(vcpu->kvm, gfn); break; } case HV_X64_MSR_EOI: |