Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-08-18 Thread Radim Krčmář
2017-08-18 14:37+0200, Paolo Bonzini: > On 18/08/2017 14:36, Radim Krčmář wrote: > >>> + gpa = vcpu->arch.gpa_val; > >>> + ret = vcpu_is_mmio_gpa(vcpu, addr, gpa, write); > >>> + } else { > >>> + ret = vcpu_mmio_gva_to_gpa(vcpu, addr, , exception, write); > >>> } > >>>

Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-08-18 Thread Radim Krčmář
2017-08-18 14:37+0200, Paolo Bonzini: > On 18/08/2017 14:36, Radim Krčmář wrote: > >>> + gpa = vcpu->arch.gpa_val; > >>> + ret = vcpu_is_mmio_gpa(vcpu, addr, gpa, write); > >>> + } else { > >>> + ret = vcpu_mmio_gva_to_gpa(vcpu, addr, , exception, write); > >>> } > >>>

Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-08-18 Thread Paolo Bonzini
On 18/08/2017 14:36, Radim Krčmář wrote: >>> + gpa = vcpu->arch.gpa_val; >>> + ret = vcpu_is_mmio_gpa(vcpu, addr, gpa, write); >>> + } else { >>> + ret = vcpu_mmio_gva_to_gpa(vcpu, addr, , exception, write); >>> } >>> >>> - ret = vcpu_mmio_gva_to_gpa(vcpu,

Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-08-18 Thread Paolo Bonzini
On 18/08/2017 14:36, Radim Krčmář wrote: >>> + gpa = vcpu->arch.gpa_val; >>> + ret = vcpu_is_mmio_gpa(vcpu, addr, gpa, write); >>> + } else { >>> + ret = vcpu_mmio_gva_to_gpa(vcpu, addr, , exception, write); >>> } >>> >>> - ret = vcpu_mmio_gva_to_gpa(vcpu,

Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-08-18 Thread Radim Krčmář
2017-08-18 09:57+0200, David Hildenbrand: > > > +++ b/arch/x86/kvm/x86.c > > @@ -4657,25 +4657,18 @@ static int emulator_read_write_onepage(unsigned > > long addr, void *val, > > */ > > if (vcpu->arch.gpa_available && > > emulator_can_use_gpa(ctxt) && > > -

Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-08-18 Thread Radim Krčmář
2017-08-18 09:57+0200, David Hildenbrand: > > > +++ b/arch/x86/kvm/x86.c > > @@ -4657,25 +4657,18 @@ static int emulator_read_write_onepage(unsigned > > long addr, void *val, > > */ > > if (vcpu->arch.gpa_available && > > emulator_can_use_gpa(ctxt) && > > -

Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-08-18 Thread David Hildenbrand
> +++ b/arch/x86/kvm/x86.c > @@ -4657,25 +4657,18 @@ static int emulator_read_write_onepage(unsigned long > addr, void *val, >*/ > if (vcpu->arch.gpa_available && > emulator_can_use_gpa(ctxt) && > - vcpu_is_mmio_gpa(vcpu, addr, exception->address, write) && > -

Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-08-18 Thread David Hildenbrand
> +++ b/arch/x86/kvm/x86.c > @@ -4657,25 +4657,18 @@ static int emulator_read_write_onepage(unsigned long > addr, void *val, >*/ > if (vcpu->arch.gpa_available && > emulator_can_use_gpa(ctxt) && > - vcpu_is_mmio_gpa(vcpu, addr, exception->address, write) && > -

Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-08-17 Thread David Hildenbrand
On 11.08.2017 18:52, Paolo Bonzini wrote: > From: Brijesh Singh > > When a guest causes a page fault which requires emulation, the > vcpu->arch.gpa_available flag is set to indicate that cr2 contains a > valid GPA. > > Currently, emulator_read_write_onepage() makes use of

Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-08-17 Thread David Hildenbrand
On 11.08.2017 18:52, Paolo Bonzini wrote: > From: Brijesh Singh > > When a guest causes a page fault which requires emulation, the > vcpu->arch.gpa_available flag is set to indicate that cr2 contains a > valid GPA. > > Currently, emulator_read_write_onepage() makes use of gpa_available flag >

Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-08-12 Thread Wanpeng Li
2017-08-12 0:52 GMT+08:00 Paolo Bonzini : > From: Brijesh Singh > > When a guest causes a page fault which requires emulation, the > vcpu->arch.gpa_available flag is set to indicate that cr2 contains a > valid GPA. > > Currently,

Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-08-12 Thread Wanpeng Li
2017-08-12 0:52 GMT+08:00 Paolo Bonzini : > From: Brijesh Singh > > When a guest causes a page fault which requires emulation, the > vcpu->arch.gpa_available flag is set to indicate that cr2 contains a > valid GPA. > > Currently, emulator_read_write_onepage() makes use of gpa_available flag > to