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

Re: [Xen-devel] idtr


  • To: Travis Johnson <travis.jo@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxxxxxxxx>
  • Date: Tue, 19 Dec 2006 14:43:42 +0000
  • Delivery-date: Tue, 19 Dec 2006 06:43:36 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AccjfBPkUnTEhI9vEduUXAAX8io7RQ==
  • Thread-topic: [Xen-devel] idtr

The trap array in the vcpu structure is a virtual IDT for paravirtualised guests. It is not used for HVM guests. Xen does not actually care about the IDT of HVM guests at all — both AMDV and VT fully virtualise exception and interrupt delivery. All Xen has to do is say it wants an exception or interrupt injected into the guest, and the processor will do the rest. So actually the IDT base address etc is contained within AMDV’s VMCB or VT’s VMCS, and Xen never needs to fetch it or itself.

 -- Keir


On 19/12/06 14:37, "Travis Johnson" <travis.jo@xxxxxxxxx> wrote:

When a guest domain does a "lidt" (the x86 instruction) to update the pointer to the IDT where does this information get stored inside Xen (assuming it does). I know Xen can interject interrupts into a domain and that the "guest_vcpu_context" struct contains an array that represents the virtual IDT but how does the virtual IDT relate to the actual IDT the guest OS uses and is pointed to by it's idtr. It seems logical to me that the idtr must be stored inside the vcpu at some point somewhere since I can run a "sidt" and get what seems like a reasonable address (from the guest's point of view). I've also used "lidt"'s without crashing the system so Xen handles the update correctly.

I'm using HVM(VMX) guests on 64bit Xen (3.0.3 - the stable tarball from xensource). The guests run FC6.

Thanks. This list is always a good read.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.