From: Gleb Natapov <gleb@redhat.com>
To: "Dong, Eddie" <eddie.dong@intel.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>, Avi Kivity <avi@redhat.com>
Subject: Re: Implement generic double fault generation mechanism
Date: Fri, 8 May 2009 21:44:17 +0300 [thread overview]
Message-ID: <20090508184417.GA27255@redhat.com> (raw)
In-Reply-To: <9832F13BD22FB94A829F798DA4A8280501A81A8F2B@pdsmsx503.ccr.corp.intel.com>
On Fri, May 08, 2009 at 11:00:51PM +0800, Dong, Eddie wrote:
> Gleb Natapov wrote:
> > On Fri, May 08, 2009 at 06:46:14PM +0800, Dong, Eddie wrote:
> >> Dong, Eddie wrote:
> >>> ction will be re-executed.
> >>>>>
> >>>>> Do you want it to be covered for now? For exception, it is easy
> >>>>> but for IRQ, it needs to be pushed back.
> >>>>>
> >>>> Yes I want it to be covered now otherwise any serial exception
> >>>> generates flood of "Exception happens serially" messages. This
> >>>> function does not handle IRQ so no problem there.
> >>>
> >>> But we soon will let this function cove IRQ as well per SDM.
> >>> Why not do that a little bit later?
> >>>
> >>> BTW, this issue exist in original code as well.
> >>>
> >>> Eddie
> >>
> >> Actually this is already addressed in current patch too: Just keep
> >> the former exception. If you mean the prink should be removed, I am
> >> fine.
> > Keeping the former exception is not the right thing to do. It can't be
> > delivered because delivering it cause another exception and handler
> > that may fix the situation is not called since you drop last
> > exception and keep re-injecting the one that can't be handled.
> >
> >> BTW, this case doesn't happen in reality.
> >>
> > Then why do you write all this code then? :) I can easily write test
>
> I am fixing the potential #DF bug existing in current code which only handle
> PF on PF.
> For those sequential exception, it is WARN_ON in current code.
>
Can your describe real life scenario that needs this fix? I am all for
fixing code and be as close as possible to SDM, but if you do it do it right.
> > case that will do that (actually I did) and if not handled properly it
> > just loops taking 100% cpu trying to reinject exception that cannot be
> > handled.
>
> Are u sure current code is dead loop in WARN_ON with your test code?
Yes.
> I don't see it will never happen and thus why printk it, but shouldn't exist
I have the code that triggers this path. Good enough for me.
> in current guest that KVM can support.
>
> See original kvm_queue_exception in case you ignored the code.
>
There is not point referring to current code. Current code does not
handle serial exceptions properly. So fix it in your patch otherwise I
propose to use my patch that fixes current code
(http://patchwork.kernel.org/patch/21829/).
> void kvm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr)
> {
> WARN_ON(vcpu->arch.exception.pending);
> vcpu->arch.exception.pending = true;
> vcpu->arch.exception.has_error_code = false;
> vcpu->arch.exception.nr = nr;
> }
>
> Any comments from Avi?
>
> Thx, eddie
>
--
Gleb.
next prev parent reply other threads:[~2009-05-08 18:44 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-30 7:24 Implement generic double fault generation mechanism Dong, Eddie
2009-05-03 10:53 ` Gleb Natapov
2009-05-08 8:27 ` Dong, Eddie
2009-05-08 9:53 ` Gleb Natapov
2009-05-08 10:39 ` Dong, Eddie
2009-05-08 10:46 ` Dong, Eddie
2009-05-08 12:23 ` Gleb Natapov
2009-05-08 15:00 ` Dong, Eddie
2009-05-08 18:44 ` Gleb Natapov [this message]
2009-05-11 1:04 ` Dong, Eddie
2009-05-11 6:02 ` Gleb Natapov
2009-05-12 5:35 ` Dong, Eddie
2009-05-12 7:01 ` Gleb Natapov
2009-05-12 15:06 ` Enable IRQ windows after exception injection if there are pending virq Dong, Eddie
2009-05-12 15:27 ` Gleb Natapov
2009-05-13 7:45 ` Dong, Eddie
2009-05-13 10:29 ` Gleb Natapov
2009-05-13 14:05 ` Implement generic double fault generation mechanism Dong, Eddie
2009-05-11 6:17 ` Avi Kivity
2009-05-12 7:38 ` event injection MACROs Dong, Eddie
2009-05-12 8:49 ` Gleb Natapov
2009-05-13 9:49 ` Avi Kivity
2009-05-13 14:20 ` Dong, Eddie
2009-05-14 9:27 ` Avi Kivity
2009-05-14 13:43 ` Dong, Eddie
2009-05-14 14:16 ` Gleb Natapov
2009-05-14 14:34 ` Dong, Eddie
2009-05-14 15:44 ` Gleb Natapov
2009-05-15 7:57 ` Dong, Eddie
2009-05-17 9:44 ` Gleb Natapov
2009-05-08 12:16 ` Implement generic double fault generation mechanism Gleb Natapov
2009-05-08 8:19 ` Dong, Eddie
2009-05-08 8:28 ` 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=20090508184417.GA27255@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=eddie.dong@intel.com \
--cc=kvm@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.