Mark Hyper-V hypercall and vapic assist pages as dirty
cover Mark Hyper-V hypercall and vapic assist pages as dirty
Vadim Rozenfeld (2):
mark hyper-v hypercall page as dirty
mark hyper-v vapic assist page as dirty
arch/x86/kvm/x86.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.1.4
PATCH 1/2 mark hyper-v hypercall page as dirty
Signed-off-by Vadim Rozenfeld <[email protected]>
--- arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/kvm/x86.c +1 -0
@@ -1840,6 +1840,7 @@ static int set_msr_hyperv_pw(struct kvm_vcpu *vcpu, u32 msr, u64 data)if (__copy_to_user ((void __user *)addr, instructions,4 ))return 1 ; kvm->arch.hv_hypercall = data; +mark_page_dirty (kvm, gfn);break ; }case HV_X64_MSR_REFERENCE_TSC : {
Signature · 1 line
1.8.1.4
PATCH 2/2 mark hyper-v vapic assist page as dirty
In reply to Vadim RozenfeldSigned-off-by Vadim Rozenfeld <[email protected]>
--- arch/x86/kvm/x86.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/x86/kvm/x86.c +4 -2
@@ -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 :
Signature · 1 line
1.8.1.4
Quoted 9 lines · Vadim Rozenfeld
Vadim Rozenfeld (2):
mark hyper-v hypercall page as dirty
mark hyper-v vapic assist page as dirtyarch/x86/kvm/x86.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)Signature · 1 line
1.8.1.4
Reviewed-by Marcelo Tosatti <[email protected]>
Il 23/01/2014 18:08, Marcelo Tosatti ha scritto:
Quoted 5 lines · Vadim Rozenfeld
Quoted 4 lines
Vadim Rozenfeld (2):
mark hyper-v hypercall page as dirty
mark hyper-v vapic assist page as dirty
Quoted 9 lines
Quoted 5 lines
arch/x86/kvm/x86.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)--
1.8.1.4Reviewed-by Marcelo Tosatti <[email protected]>
Applied to queue, thanks Vadim and Marcelo!
Paolo