From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Andi Kleen <ak@suse.de>
Cc: Virtualization Mailing List <virtualization@lists.osdl.org>,
Andrew Morton <akpm@linux-foundation.org>,
Xen-devel <xen-devel@lists.xensource.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] Re: [PATCH] xen: use iret directly where possible
Date: Mon, 04 Jun 2007 15:08:10 -0700 [thread overview]
Message-ID: <46648D4A.3070603@goop.org> (raw)
In-Reply-To: <200706042346.55049.ak@suse.de>
Andi Kleen wrote:
> Ah I assumed the hypervisor would just check IF in ring 1 too.
> It would certainly make this easier, but then the additional trap
> of setting it would be also somewhat expensive agreed.
>
Xen doesn't do that because, while it could track sti/cli (expensively),
iret and popf quietly ignore the IF state in ring 1, and so there's lots
of scope for interrupt state getting lost.
> I must say I still hate the patch; it has all the signs of something that
> will be very nasty to maintain later.
>
Well, the corresponding xen-unstable code has been a bit of a trial to
maintain. I made this as simple and self-contained as possible (with
very little non-locality) to try and keep it maintainable.
I agree its all a bit subtle, but in its favour:
1. It's internal to the implementation of the iret pvop, which does
have a fairly well-defined and stable interface (same as iret
instruction, essentially)
2. Comments!
3. Relatively simple implementation (only one register to deal with
in the slow-path handler, for example)
The annoying non-local thing is the test in the xen upcall handler, but
that's unavoidable.
J
prev parent reply other threads:[~2007-06-04 22:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-04 19:22 [PATCH] xen: use iret directly where possible Jeremy Fitzhardinge
2007-06-04 19:45 ` Andi Kleen
2007-06-04 20:33 ` Jeremy Fitzhardinge
2007-06-04 21:05 ` Andi Kleen
2007-06-04 21:28 ` Jeremy Fitzhardinge
2007-06-04 21:46 ` [Xen-devel] " Andi Kleen
2007-06-04 22:08 ` Jeremy Fitzhardinge [this message]
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=46648D4A.3070603@goop.org \
--to=jeremy@goop.org \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.osdl.org \
--cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).