Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1714891

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

From Radim Krčmář <rkrcmar@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set
Date 2017-08-18 14:50 +0200
Message-ID <ufOSR-3M9-5@gated-at.bofh.it> (permalink)
References <ufvZU-7qv-15@gated-at.bofh.it> <ufvZU-7qv-13@gated-at.bofh.it> <ufKme-tm-3@gated-at.bofh.it> <ufOJc-3Ie-1@gated-at.bofh.it> <ufOJc-3Ie-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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, &gpa, exception, write);
> >>>  	}
> >>>  
> >>> -	ret = vcpu_mmio_gva_to_gpa(vcpu, addr, &gpa, exception, write);
> >>> -
> >>>  	if (ret < 0)
> >>>  		return X86EMUL_PROPAGATE_FAULT;
> >> just wondering if it makes sense to move this into the else branch (as
> >> it logically only belongs to vcpu_mmio_gva_to_gpa)
> >
> > It does, I took the liberty to change that.
> 
> It was on purpose, but it's okay either way. :)

Oh, sorry, I was thinking that vcpu_is_mmio_gpa() should return bool. :)

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set Paolo Bonzini <pbonzini@redhat.com> - 2017-08-17 18:40 +0200
  Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when  gpa_available is set David Hildenbrand <david@redhat.com> - 2017-08-18 10:00 +0200
    Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when  gpa_available is set Radim Krčmář <rkrcmar@redhat.com> - 2017-08-18 14:40 +0200
      Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when  gpa_available is set Paolo Bonzini <pbonzini@redhat.com> - 2017-08-18 14:40 +0200
        Re: [PATCH 2/3] KVM: x86: Avoid guest page table walk when  gpa_available is set Radim Krčmář <rkrcmar@redhat.com> - 2017-08-18 14:50 +0200

csiph-web