qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [RFC][PATCH] x86: Optional segment type and limit c


From: Kevin O'Connor
Subject: Re: [Qemu-devel] Re: [RFC][PATCH] x86: Optional segment type and limit checks - v2
Date: Tue, 15 Jul 2008 22:43:29 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Jul 15, 2008 at 09:20:39PM -0400, Kevin O'Connor wrote:
> Qemu already has an optimization (HF_ADDSEG_MASK) for the case where
> DS/ES/SS all have a zero base.  I was thinking that an optimization
> could noticeably reduce the cost of limit checks for the common case
> where DS/ES/SS all have a zero base and the same limit.  (I
> incorrectly stated CS/DS/SS above.)
> 
> Of course, it would require a lot of work, and it would be hard to
> verify that all the corner cases were handled.  So, I was more
> thinking out loud than proposing a solution.  :-)

Just "thinking out loud" further - a simpler optimization would be to
extend the existing HF_ADDSEG_MASK flag to the case where DS/ES/SS
have a base a zero, a limit of 0xffffffff, and are read/writable.
Then, one would only need to emit segment checks when one of the above
conditions are not met or an explicit segment override to another
segment is given.

This simpler optimization would miss some opportunities, but it would
be much easier.

-Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]