From: Marcelo Tosatti <mtosatti@redhat.com>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Gleb Natapov <gleb@redhat.com>,
LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH v2 0/5] KVM: x86: improve reexecute_instruction
Date: Thu, 13 Dec 2012 20:54:08 -0200 [thread overview]
Message-ID: <20121213225408.GB11385@amt.cnet> (raw)
In-Reply-To: <50C8E3A3.4050106@linux.vnet.ibm.com>
On Thu, Dec 13, 2012 at 04:05:55AM +0800, Xiao Guangrong wrote:
> On 12/12/2012 07:36 AM, Marcelo Tosatti wrote:
> > On Mon, Dec 10, 2012 at 05:11:35PM +0800, Xiao Guangrong wrote:
> >> Changelog:
> >> There are some changes from Marcelo and Gleb's review, thank you all!
> >> - access indirect_shadow_pages in the protection of mmu-lock
> >> - fix the issue when unhandleable instruction access on large page
> >> - add a new test case for large page
> >>
> >> The current reexecute_instruction can not well detect the failed instruction
> >> emulation. It allows guest to retry all the instructions except it accesses
> >> on error pfn.
> >>
> >> For example, these cases can not be detected:
> >> - for tdp used
> >> currently, it refused to retry all instructions. If nested npt is used, the
> >> emulation may be caused by shadow page, it can be fixed by unshadow the
> >> shadow page.
> >>
> >> - for shadow mmu
> >> some cases are nested-write-protect, for example, if the page we want to
> >> write is used as PDE but it chains to itself. Under this case, we should
> >> stop the emulation and report the case to userspace.
> >>
> >> There are two test cases based on kvm-unit-test can trigger a infinite loop on
> >> current code (ept = 0), after this patchset, it can report the error to Qemu.
> >>
> >> Subject: [PATCH] access test: test unhandleable instruction
> >>
> >> Test the instruction which can not be handled by kvm
> >>
> >> Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
> >
> > Please submit the test for inclusion. There should be some way to make
> > it fail..
>
> Yes.
>
> But it is not easy. If the test cases run normally, kvm will report a error to Qemu
> then Qemu will exit the vcpu thread after dumping the vcpu state.
>
> We need to do something to let guest can be aware that the error report is triggered.
> I guess we can add a option in Qemu, say '-notify-guest' and allow Qemu to inject #GP
> to guest with a special ERROR_CODE if error is reported.
>
> > program a timer interrupt and #GP?
>
> Could you please explain the detail?
Before the instruction which writes continuously to the pagetable, arm
say lapic timer. #GP on the interrupt handler and test with failure.
next prev parent reply other threads:[~2012-12-13 23:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 9:11 Xiao Guangrong
2012-12-10 9:12 ` [PATCH v2 1/5] KVM: MMU: move adjusting pte access for softmmu to FNAME(page_fault) Xiao Guangrong
2012-12-11 23:47 ` Marcelo Tosatti
2012-12-12 18:53 ` Xiao Guangrong
2012-12-10 9:13 ` [PATCH v2 2/5] KVM: MMU: adjust page size early if gfn used as page table Xiao Guangrong
2012-12-12 0:57 ` Marcelo Tosatti
2012-12-12 19:23 ` Xiao Guangrong
2012-12-13 22:37 ` Marcelo Tosatti
2012-12-10 9:13 ` [PATCH v2 3/5] KVM: x86: clean up reexecute_instruction Xiao Guangrong
2012-12-10 9:14 ` [PATCH v2 4/5] KVM: x86: let reexecute_instruction work for tdp Xiao Guangrong
2012-12-10 9:14 ` [PATCH v2 5/5] KVM: x86: improve reexecute_instruction Xiao Guangrong
2012-12-12 1:09 ` Marcelo Tosatti
2012-12-12 19:29 ` Xiao Guangrong
2012-12-13 23:02 ` Marcelo Tosatti
2012-12-14 3:40 ` Xiao Guangrong
2012-12-11 23:36 ` [PATCH v2 0/5] " Marcelo Tosatti
2012-12-12 20:05 ` Xiao Guangrong
2012-12-13 22:54 ` Marcelo Tosatti [this message]
2012-12-14 4:50 ` Xiao Guangrong
2012-12-15 1:05 ` Marcelo Tosatti
2012-12-23 11:46 ` Gleb Natapov
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=20121213225408.GB11385@amt.cnet \
--to=mtosatti@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®