kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Mark Hyper-V hypercall and vapic assist pages as dirty
@ 2014-01-23  7:12 Vadim Rozenfeld
  2014-01-23  7:12 ` [PATCH 1/2] mark hyper-v hypercall page " Vadim Rozenfeld
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vadim Rozenfeld @ 2014-01-23  7:12 UTC (permalink / raw)
  To: kvm; +Cc: pbonzini, mtosatti, Vadim Rozenfeld

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(-)

-- 
1.8.1.4


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

* [PATCH 1/2] mark hyper-v hypercall page as dirty
  2014-01-23  7:12 [PATCH 0/2] Mark Hyper-V hypercall and vapic assist pages as dirty Vadim Rozenfeld
@ 2014-01-23  7:12 ` Vadim Rozenfeld
  2014-01-23  7:12 ` [PATCH 2/2] mark hyper-v vapic assist " Vadim Rozenfeld
  2014-01-23 17:08 ` [PATCH 0/2] Mark Hyper-V hypercall and vapic assist pages " Marcelo Tosatti
  2 siblings, 0 replies; 5+ messages in thread
From: Vadim Rozenfeld @ 2014-01-23  7:12 UTC (permalink / raw)
  To: kvm; +Cc: pbonzini, mtosatti, Vadim Rozenfeld

Signed-off-by: Vadim Rozenfeld <vrozenfe@redhat.com>
---
 arch/x86/kvm/x86.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 59b95b1..e8599ed 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -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: {
-- 
1.8.1.4


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

* [PATCH 2/2] mark hyper-v vapic assist page as dirty
  2014-01-23  7:12 [PATCH 0/2] Mark Hyper-V hypercall and vapic assist pages as dirty Vadim Rozenfeld
  2014-01-23  7:12 ` [PATCH 1/2] mark hyper-v hypercall page " Vadim Rozenfeld
@ 2014-01-23  7:12 ` Vadim Rozenfeld
  2014-01-23 17:08 ` [PATCH 0/2] Mark Hyper-V hypercall and vapic assist pages " Marcelo Tosatti
  2 siblings, 0 replies; 5+ messages in thread
From: Vadim Rozenfeld @ 2014-01-23  7:12 UTC (permalink / raw)
  To: kvm; +Cc: pbonzini, mtosatti, Vadim Rozenfeld

Signed-off-by: Vadim Rozenfeld <vrozenfe@redhat.com>
---
 arch/x86/kvm/x86.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index e8599ed..cd8a41f 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:
-- 
1.8.1.4


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

* Re: [PATCH 0/2] Mark Hyper-V hypercall and vapic assist pages as dirty
  2014-01-23  7:12 [PATCH 0/2] Mark Hyper-V hypercall and vapic assist pages as dirty Vadim Rozenfeld
  2014-01-23  7:12 ` [PATCH 1/2] mark hyper-v hypercall page " Vadim Rozenfeld
  2014-01-23  7:12 ` [PATCH 2/2] mark hyper-v vapic assist " Vadim Rozenfeld
@ 2014-01-23 17:08 ` Marcelo Tosatti
  2014-01-23 18:01   ` Paolo Bonzini
  2 siblings, 1 reply; 5+ messages in thread
From: Marcelo Tosatti @ 2014-01-23 17:08 UTC (permalink / raw)
  To: Vadim Rozenfeld; +Cc: kvm, pbonzini

On Thu, Jan 23, 2014 at 06:12:51PM +1100, Vadim Rozenfeld wrote:
> 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(-)
> 
> -- 
> 1.8.1.4


Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>


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

* Re: [PATCH 0/2] Mark Hyper-V hypercall and vapic assist pages as dirty
  2014-01-23 17:08 ` [PATCH 0/2] Mark Hyper-V hypercall and vapic assist pages " Marcelo Tosatti
@ 2014-01-23 18:01   ` Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2014-01-23 18:01 UTC (permalink / raw)
  To: Marcelo Tosatti, Vadim Rozenfeld; +Cc: kvm

Il 23/01/2014 18:08, Marcelo Tosatti ha scritto:
> On Thu, Jan 23, 2014 at 06:12:51PM +1100, Vadim Rozenfeld wrote:
>> 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(-)
>>
>> --
>> 1.8.1.4
>
>
> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
>

Applied to queue, thanks Vadim and Marcelo!

Paolo

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

end of thread, other threads:[~2014-01-23 18:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-23  7:12 [PATCH 0/2] Mark Hyper-V hypercall and vapic assist pages as dirty Vadim Rozenfeld
2014-01-23  7:12 ` [PATCH 1/2] mark hyper-v hypercall page " Vadim Rozenfeld
2014-01-23  7:12 ` [PATCH 2/2] mark hyper-v vapic assist " Vadim Rozenfeld
2014-01-23 17:08 ` [PATCH 0/2] Mark Hyper-V hypercall and vapic assist pages " Marcelo Tosatti
2014-01-23 18:01   ` 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).