From: Marcelo Tosatti <mtosatti@redhat.com>
To: "Nadav Har'El" <nyh@math.technion.ac.il>
Cc: Avi Kivity <avi@redhat.com>,
kvm@vger.kernel.org, Dave Allan <dallan@redhat.com>,
Federico Simoncelli <fsimonce@redhat.com>,
Abel Gordon <abelg@il.ibm.com>
Subject: Re: [PATCH 1/2] nVMX: Add KVM_REQ_IMMEDIATE_EXIT
Date: Mon, 26 Sep 2011 08:02:23 -0300 [thread overview]
Message-ID: <20110926110223.GA5169@amt.cnet> (raw)
In-Reply-To: <20110925081306.GA20035@fermat.math.technion.ac.il>
On Sun, Sep 25, 2011 at 11:13:06AM +0300, Nadav Har'El wrote:
> On Fri, Sep 23, 2011, Marcelo Tosatti wrote about "Re: [PATCH 1/2] nVMX: Add KVM_REQ_IMMEDIATE_EXIT":
> > On Thu, Sep 22, 2011 at 01:52:56PM +0300, Nadav Har'El wrote:
> > > This patch adds a new vcpu->requests bit, KVM_REQ_IMMEDIATE_EXIT.
> > > This bit requests that when next entering the guest, we should run it only
> > > for as little as possible, and exit again.
> > >
> > > We use this new option in nested VMX: When L1 launches L2, but L0 wishes L1
> >...
> > > @@ -5647,6 +5648,8 @@ static int vcpu_enter_guest(struct kvm_v
> > > }
> > > if (kvm_check_request(KVM_REQ_STEAL_UPDATE, vcpu))
> > > record_steal_time(vcpu);
> > > + req_immediate_exit =
> > > + kvm_check_request(KVM_REQ_IMMEDIATE_EXIT, vcpu);
> >...
> > The immediate exit information can be lost if entry decides to bail out.
> > You can do
> >
> > req_immediate_exit = kvm_check_request(KVM_REQ_IMMEDIATE_EXIT)
> > after preempt_disable()
> > and then transfer back the bit in the bail out case in
> > if (vcpu->mode == EXITING_GUEST_MODE || vcpu->requests
>
> Thanks.
>
> But thinking about this a bit, it seems to me that in my case *losing* this
> bit on a canceled entry is the correct thing to do, as turning on this bit was
> decided in the injection phase (in enable_irq_window()), and next time, if
> the reason to turn on this bit still exists (i.e., L0 has something to inject
> to L1, but L2 needs to run), we will turn it on again.
Correct, the loss is irrelevant.
next prev parent reply other threads:[~2011-09-26 11:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-22 10:52 [PATCH 0/2] nVMX injection corrections Nadav Har'El
2011-09-22 10:52 ` [PATCH 1/2] nVMX: Add KVM_REQ_IMMEDIATE_EXIT Nadav Har'El
2011-09-23 12:36 ` Marcelo Tosatti
2011-09-25 8:13 ` Nadav Har'El
2011-09-26 11:02 ` Marcelo Tosatti [this message]
2011-09-22 10:53 ` [PATCH 2/2] nVMX: Fix warning-causing idt-vectoring-info behavior Nadav Har'El
2011-09-26 17:01 ` [PATCH 0/2] nVMX injection corrections Avi Kivity
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=20110926110223.GA5169@amt.cnet \
--to=mtosatti@redhat.com \
--cc=abelg@il.ibm.com \
--cc=avi@redhat.com \
--cc=dallan@redhat.com \
--cc=fsimonce@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=nyh@math.technion.ac.il \
/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