From: Jamie Lokier <jamie@shareable.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC][PATCH] x86: Optional segment type and limit checks - v2
Date: Mon, 14 Jul 2008 11:55:31 +0100 [thread overview]
Message-ID: <20080714105531.GB2381@shareable.org> (raw)
In-Reply-To: <487B2BC8.9050804@siemens.com>
Jan Kiszka wrote:
> This is the second version of my segment type and register check. It
> reduces the impact on the translator code significantly, and it also
> fixes a bug of the "size" helper variant in the previous version.
>
> The idea of this patch is to generate calls to a check helper only in
> case the user requested this support via "-seg-checks". This feature
> remains off by default as most x86 OSes do not care about protection via
> segmentation anymore (and it was even removed from 64-bit modes by the
> CPU vendors). Moreover, checking the segment type and limit on every
> memory access is nothing that makes QEMU faster, so you will only want
> this if you are looking for very accurate emulation.
>
> On Fabrice's request I tried to find the conditions which allow enabling
> -seg-checks by default but kicking it out most of the time during code
> translation. That works for 64-bit mode, of course, but I still see no
> clear indication for the case that 32-bit guests are not interested in
> type checking specifically. If you see one, let me know.
Some 32-bit guests effectively disable segment range calculations
checks by setting the maximum limit and zero offset. Apparently, this
is faster on some real CPUs too.
Could type checking be done at translation time, including the segment
types in the translation cache key?
For guests like older Linux, with zero base and non-maximum limit in
user mode, could limit checking be done by the MMU TLB instead?
-- Jamie
next prev parent reply other threads:[~2008-07-14 10:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-09 12:12 [Qemu-devel] [RFC][PATCH] x86: Optional segment type and limit checks Jan Kiszka
2008-07-14 10:34 ` [Qemu-devel] [RFC][PATCH] x86: Optional segment type and limit checks - v2 Jan Kiszka
2008-07-14 10:55 ` Jamie Lokier [this message]
2008-07-14 11:11 ` Paul Brook
2008-07-14 14:02 ` Jamie Lokier
2008-07-14 17:50 ` Kevin O'Connor
2008-07-14 18:51 ` Jamie Lokier
2008-07-15 15:48 ` [Qemu-devel] " Jan Kiszka
2008-07-15 16:12 ` Jamie Lokier
2008-07-16 1:20 ` Kevin O'Connor
2008-07-16 2:43 ` Kevin O'Connor
2008-07-14 11:05 ` [Qemu-devel] " Daniel P. Berrange
2008-07-15 15:43 ` [Qemu-devel] " Jan Kiszka
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=20080714105531.GB2381@shareable.org \
--to=jamie@shareable.org \
--cc=qemu-devel@nongnu.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 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).