From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
"Xiao Guangrong" <guangrong.xiao@linux.intel.com>,
"Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [PATCH] kvm: vmx: Use the hardware provided GPA instead of page walk
Date: Tue, 7 Feb 2017 18:21:56 +0100 [thread overview]
Message-ID: <d9d851d3-f0cd-e102-4fd8-25e715904b8e@redhat.com> (raw)
In-Reply-To: <1485542088-18610-1-git-send-email-pbonzini@redhat.com>
On 27/01/2017 19:34, Paolo Bonzini wrote:
> As in the SVM patch, the guest physical address is passed by
> VMX to x86_emulate_instruction already, so mark the GPA as available
> in vcpu->arch.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> arch/x86/kvm/vmx.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 7c3e42623090..0828b02b5af2 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -6382,6 +6382,7 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu)
> EPT_VIOLATION_EXECUTABLE))
> ? PFERR_PRESENT_MASK : 0;
>
> + vcpu->arch.gpa_available = true;
> vcpu->arch.exit_qualification = exit_qualification;
>
> return kvm_mmu_page_fault(vcpu, gpa, error_code, NULL, 0);
> @@ -6399,6 +6400,7 @@ static int handle_ept_misconfig(struct kvm_vcpu *vcpu)
> }
>
> ret = handle_mmio_page_fault(vcpu, gpa, true);
> + vcpu->arch.gpa_available = true;
> if (likely(ret == RET_MMIO_PF_EMULATE))
> return x86_emulate_instruction(vcpu, gpa, 0, NULL, 0) ==
> EMULATE_DONE;
> @@ -8517,6 +8519,7 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu)
> u32 vectoring_info = vmx->idt_vectoring_info;
>
> trace_kvm_exit(exit_reason, vcpu, KVM_ISA_VMX);
> + vcpu->arch.gpa_available = false;
>
> /*
> * Flush logged GPAs PML buffer, this will make dirty_bitmap more
>
Ping?
Paolo
next prev parent reply other threads:[~2017-02-07 17:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 18:34 Paolo Bonzini
2017-02-07 17:21 ` Paolo Bonzini [this message]
2017-02-07 20:52 ` Radim Krčmář
2017-02-08 8:16 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d9d851d3-f0cd-e102-4fd8-25e715904b8e@redhat.com \
--to=pbonzini@redhat.com \
--cc=guangrong.xiao@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rkrcmar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®