From: "Jan Beulich" <jbeulich@novell.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] enable port accesses with (almost) full register context
Date: Tue, 12 Sep 2006 10:03:08 +0100 [thread overview]
Message-ID: <450693EC.76E4.0078.0@novell.com> (raw)
In-Reply-To: <C12C25FF.14F8%Keir.Fraser@cl.cam.ac.uk>
>>> Keir Fraser <Keir.Fraser@cl.cam.ac.uk> 12.09.06 09:53 >>>
>On 12/9/06 8:15 am, "Jan Beulich" <jbeulich@novell.com> wrote:
>
>> That is because of the self modifying code that needs proper MP
>> synchronization. I know it's looking ugly, but I considered this the most
>> reasonable approach.
>
>Why is more synchonisation needed for emulation of these SMI port accesses
>than you'd have for direct execution? I.e., if the accesses were executed
>natively on an SMP system there'd be none of the extra synchronisation you
>added happening. The instructions would be directly executed.
Again, I'm using self-modifying code there (to store the port number, as I
can't reliably use %dx for it if the original instruction happened to be one
with immediate operand, and %edx/%rdx happens to carry relevant data
for the SMI handler), which is what needs synchronization.
>> I considered that too, but rejected it because of opening these ports to
>> vm86 mode then, too (as I/O instructions are *not* susceptible to iopl there,
>> they only depend on the bitmap).
>
>I/O bitmap always overrides IOPL, in every execution mode. Why is vm86 mode
>a particular concern? I was thinking that dom0 would switch on the direct
You're right, of course - all modes are relevant here.
>bitmap access only for the process(es) that requested it. We wouldn't want
>direct access to be available to every process in dom0.
True. With that I agree installing the bitmap in the TSS would allow solving
the problem, too. Still I think the necessary overhead (you'd need to copy
the bitmap and keep it sync-ed, or make it read-only, for the direct access
to not be abusable) would be larger than using the special access method.
>Not that I'm certain direct access is better than 'special emulation'. But
>I'm not applying the existing patch unless I understand exactly why it needs
>to do everything that it does. I'm in no rush -- supporting some piece of HP
>closed-source management software isn't top priority for us, I'd say.
Which I can easily understand; nevertheless I seem to recall that we had
talked about the issue when it was first brought up (at least 3 months back),
and you seemed in agreement that the nature of the problem warrants a fix.
Jan
next prev parent reply other threads:[~2006-09-12 9:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-11 16:12 [PATCH] enable port accesses with (almost) full register context Jan Beulich
2006-09-11 16:19 ` Keir Fraser
2006-09-12 7:15 ` Jan Beulich
2006-09-12 7:53 ` Keir Fraser
2006-09-12 9:03 ` Jan Beulich [this message]
2006-09-12 9:50 ` Keir Fraser
2006-09-12 10:32 ` Jan Beulich
2006-09-12 11:28 ` Keir Fraser
2006-09-13 9:46 ` Jan Beulich
2006-09-13 12:10 ` Keir Fraser
2006-09-18 10:40 ` Jan Beulich
2006-09-18 11:05 ` Keir Fraser
2006-09-18 11:36 ` Jan Beulich
2006-09-18 12:22 ` Keir Fraser
2006-09-18 14:10 ` Jan Beulich
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=450693EC.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--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 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.