From: Marcelo Tosatti <mtosatti@redhat.com>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: kvm-devel <kvm@vger.kernel.org>, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: KVM: MMU: handle invalid root_hpa at __direct_map
Date: Fri, 20 Dec 2013 10:59:09 -0200 [thread overview]
Message-ID: <20131220125908.GA3996@amt.cnet> (raw)
In-Reply-To: <52B40A96.7070809@linux.vnet.ibm.com>
On Fri, Dec 20, 2013 at 05:15:02PM +0800, Xiao Guangrong wrote:
> 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.
try_async_pf can be called from within the page fault handler.
next prev parent reply other threads:[~2013-12-20 12:59 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
2013-12-20 12:59 ` Marcelo Tosatti [this message]
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=20131220125908.GA3996@amt.cnet \
--to=mtosatti@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=xiaoguangrong@linux.vnet.ibm.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