All of lore.kernel.org
 help / color / mirror / Atom feed
* idtr
@ 2006-12-19 14:37 Travis Johnson
  2006-12-19 14:43 ` idtr Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Travis Johnson @ 2006-12-19 14:37 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 846 bytes --]

Question:
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.

[-- Attachment #1.2: Type: text/html, Size: 936 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

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

* Re: idtr
  2006-12-19 14:37 idtr Travis Johnson
@ 2006-12-19 14:43 ` Keir Fraser
  0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2006-12-19 14:43 UTC (permalink / raw)
  To: Travis Johnson, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1465 bytes --]

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@gmail.com> 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.



[-- Attachment #1.2: Type: text/html, Size: 1922 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

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

end of thread, other threads:[~2006-12-19 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-19 14:37 idtr Travis Johnson
2006-12-19 14:43 ` idtr Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.