public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
To: Marcelo Tosatti <mtosatti@redhat.com>, kvm-devel <kvm@vger.kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: KVM: MMU: handle invalid root_hpa at __direct_map
Date: Fri, 20 Dec 2013 17:15:02 +0800	[thread overview]
Message-ID: <52B40A96.7070809@linux.vnet.ibm.com> (raw)
In-Reply-To: <20131219172850.GA22588@amt.cnet>

On 12/20/2013 01:28 AM, Marcelo Tosatti wrote:
> 
> It is possible for __direct_map to be called on invalid root_hpa
> (-1), two examples:
> 
> 1) try_async_pf -> can_do_async_pf
>     -> vmx_interrupt_allowed -> nested_vmx_vmexit
> 2) vmx_handle_exit -> vmx_interrupt_allowed -> nested_vmx_vmexit
> 
> Then to load_vmcs12_host_state and kvm_mmu_reset_context.
> 
> Check for this possibility, let fault exception be regenerated.
> 
> BZ: https://bugzilla.redhat.com/show_bug.cgi?id=924916
> 

Nice catch, Marcelo!

Isn't it better to do kvm_mmu_reload() before calling page_fault handler?
Then a #PF can be avoided.


  reply	other threads:[~2013-12-20  9:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 17:28 KVM: MMU: handle invalid root_hpa at __direct_map Marcelo Tosatti
2013-12-20  9:15 ` Xiao Guangrong [this message]
2013-12-20 12:59   ` Marcelo Tosatti
2013-12-20 18:22 ` Paolo Bonzini
     [not found] <CADs-y4TpXQ0zvg4p-_fkKkMDbEiho89hzhkSAYMEVAxbp63XzQ@mail.gmail.com>
2013-12-22 14:56 ` Marcelo Tosatti
2013-12-27 19:43   ` Marcelo Tosatti
2014-01-16 23:17     ` Rom Freiman
2014-01-17 21:39       ` Marcelo Tosatti

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=52B40A96.7070809@linux.vnet.ibm.com \
    --to=xiaoguangrong@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@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