public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* A small fix
@ 2007-06-26  3:00 Willow Schlanger
       [not found] ` <46808139.8040008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Willow Schlanger @ 2007-06-26  3:00 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi, in vmx_vcpu_setup() is this code:

	vmcs_writel(GUEST_IDTR_BASE, 0);
	vmcs_write32(GUEST_IDTR_LIMIT, 0xffff);

But if you use SIDT on a real processor, after boot-up, you will see the 
real-mode base is in fact 0, but the limit is 0x3ff. That is, in fact, 
the base an limit you are supposed to use when you switch back to real 
mode from protected mode.

So 0xffff should be changed to 0x03ff in the lines above.


Please write back with any comments...
Willow Schlanger

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A small fix
       [not found] ` <46808139.8040008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2007-06-27 21:36   ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2007-06-27 21:36 UTC (permalink / raw)
  To: Willow Schlanger; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Willow Schlanger wrote:
> Hi, in vmx_vcpu_setup() is this code:
>
> 	vmcs_writel(GUEST_IDTR_BASE, 0);
> 	vmcs_write32(GUEST_IDTR_LIMIT, 0xffff);
>
> But if you use SIDT on a real processor, after boot-up, you will see the 
> real-mode base is in fact 0, but the limit is 0x3ff. That is, in fact, 
> the base an limit you are supposed to use when you switch back to real 
> mode from protected mode.
>
> So 0xffff should be changed to 0x03ff in the lines above.
>
>   

Makes sense.  Care to prepare (and test!) a patch?


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-27 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-26  3:00 A small fix Willow Schlanger
     [not found] ` <46808139.8040008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2007-06-27 21:36   ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox