From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: idtr Date: Tue, 19 Dec 2006 14:43:42 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1366648846==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Travis Johnson , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --===============1366648846== Content-type: multipart/alternative; boundary="B_3249384222_8548150" > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3249384222_8548150 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable 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 =8B 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=B9s VMCB or VT=B9s VMCS, and Xen never needs to fetch it or itself. -- Keir On 19/12/06 14:37, "Travis Johnson" wrote: > When a guest domain does a "lidt" (the x86 instruction) to update the poi= nter > 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 a= nd is > pointed to by it's idtr. It seems logical to me that the idtr must be sto= red > 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 al= so > used "lidt"'s without crashing the system so Xen handles the update corre= ctly. >=20 > I'm using HVM(VMX) guests on 64bit Xen (3.0.3 - the stable tarball from > xensource). The guests run FC6. >=20 > Thanks. This list is always a good read. --B_3249384222_8548150 Content-type: text/html; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Re: [Xen-devel] idtr The t= rap 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 in= terrupt delivery. All Xen has to do is say it wants an exception or interrup= t injected into the guest, and the processor will do the rest. So actually t= he 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@gmail.com> w= rote:

When a guest domain does a "lidt" (the x86 in= struction) to update the pointer to the IDT where does this information get = stored inside Xen (assuming it does). I know Xen can interject interrupts in= to a domain and that the "guest_vcpu_context" struct contains an a= rray 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 lo= gical to me that the idtr must be stored inside the vcpu at some point somew= here 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 xen= source). The guests run FC6.

Thanks. This list is always a good read.

--B_3249384222_8548150-- --===============1366648846== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1366648846==--