kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: wanpeng.li@hotmail.com, rkrcmar@redhat.com
Subject: Re: [PATCH 1/3] KVM: x86: simplify ept_misconfig
Date: Thu, 17 Aug 2017 09:43:28 +0200	[thread overview]
Message-ID: <267de3db-ae95-948f-7ea7-05e2b01b8e66@redhat.com> (raw)
In-Reply-To: <1502470352-19447-2-git-send-email-pbonzini@redhat.com>

On 11.08.2017 18:52, Paolo Bonzini wrote:
> Calling handle_mmio_page_fault() has been unnecessary since commit
> e9ee956e311d ("KVM: x86: MMU: Move handle_mmio_page_fault() call to
> kvm_mmu_page_fault()", 2016-02-22)
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  arch/x86/kvm/vmx.c | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index df8d2f127508..45fb0ea78ee8 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -6410,17 +6410,10 @@ static int handle_ept_misconfig(struct kvm_vcpu *vcpu)
>  		return kvm_skip_emulated_instruction(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;
> -
> -	if (unlikely(ret == RET_MMIO_PF_INVALID))
> -		return kvm_mmu_page_fault(vcpu, gpa, 0, NULL, 0);
> -
> -	if (unlikely(ret == RET_MMIO_PF_RETRY))
> -		return 1;
> +	ret = kvm_mmu_page_fault(vcpu, gpa, PFERR_RSVD_MASK, NULL, 0);
> +	if (ret >= 0)
> +		return ret;
>  
>  	/* It is the real ept misconfig */
>  	WARN_ON(1);
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 

Thanks,

David

  parent reply	other threads:[~2017-08-17  7:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-11 16:52 [PATCH 0/3] KVM: MMU: pending MMU and nEPT patches Paolo Bonzini
2017-08-11 16:52 ` [PATCH 1/3] KVM: x86: simplify ept_misconfig Paolo Bonzini
2017-08-12 23:31   ` Wanpeng Li
2017-08-17  7:43   ` David Hildenbrand [this message]
2017-08-17  8:06   ` David Hildenbrand
2017-08-11 16:52 ` [PATCH 2/3] KVM: x86: Avoid guest page table walk when gpa_available is set Paolo Bonzini
2017-08-12 23:32   ` Wanpeng Li
2017-08-17  7:58   ` David Hildenbrand
2017-08-11 16:52 ` [PATCH 3/3] KVM: x86: fix use of L1 MMIO areas in nested guests Paolo Bonzini
2017-08-13  0:11   ` Wanpeng Li
2017-08-17  8:11   ` David Hildenbrand
  -- strict thread matches above, loose matches on Subject: below --
2017-08-17 16:36 [PATCH v2 0/3] KVM: MMU: pending MMU and nEPT patches Paolo Bonzini
2017-08-17 16:36 ` [PATCH 1/3] KVM: x86: simplify ept_misconfig Paolo Bonzini
2017-08-18  7:51   ` David Hildenbrand

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=267de3db-ae95-948f-7ea7-05e2b01b8e66@redhat.com \
    --to=david@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=wanpeng.li@hotmail.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;
as well as URLs for NNTP newsgroup(s).