Skip to contentSkip to conversation

exception handler caused by context switching and setting trap flag

DISCUSSION lijiandm 2 participants 3 messages Oct 29, 2008 5 messages not in the archive

lore
Share & tools
lore

lijiandm

author
#0 lore raw

hello:
I have two trivial question.
In dom0,which exception handler is used to handle VMexit caused by context switching in domU? If I want to replace the handler ,what should I do?
Thanks.
JianLi

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

HVM guest's VMexit is handled by Xen itself (see xen/arch/x86/hvm/vmx/entry.S: vmx_asm_vmexit_handler if you're using an Intel VT-capable host) , not Dom0 (a PV guest) at all.

vcpu context switch itself doesn't cause VMexit.

-- Paul S.

Quoted 9 lines · lijiandm

hello:
I have two trivial question.
In dom0,which exception handler is used to handle VMexit caused
by context switching in domU?
If I want to replace the handler ,what should I do?
Thanks.
JianLi

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

You're welcome. BTW, in the case of EPT/NPT, HVM guest's writng to CR3 would not incur VMexit or something.
-- Paul S.
2008/10/29 lijiandm <[email protected]>

Quoted 5 lines

Thank you very very very much!!!

Quoted 55 lines

在2008-10-29,"Paul Samon" <[email protected]> 写道:

(Here we don't consider EPT)
When HVM guest (for Intel, namely VMX guest) tried to write_to_cr3, a VMexit will occur (search for EXIT_REASON_CR_ACCESS in Xen code)

2008/10/29 lijiandm <[email protected]>

Quoted 47 lines

Yes,I mean change the context in CR3,process switched in and out by OS. In another word,I want to capture the behavior caused by the MOV to CR3.

Thanks,wait for your reply.

Quoted 1 line · 在2008-10-29,"Paul Samon" <[email protected]> 写道:

the exception handler used to handle the context switch in HVM guest

What context switch? process context switch?
On Xen, the process context switch inside HVM guest functions in exactly the same way as it does on bare metal.

2008/10/29 lijiandm <[email protected]>

Quoted 32 lines

Yes, I use an Intel VT-capable host.
But my problem is I want to find out the exception handler used to
handle the context switch in HVM guest.Is there such a exception handler? And if I want to replace it ,what should I do?
Thanks.
JianLi.

在2008-10-29,"Paul Samon" <[email protected]> 写道:

HVM guest's VMexit is handled by Xen itself (see
xen/arch/x86/hvm/vmx/entry.S: vmx_asm_vmexit_handler if you're using an Intel VT-capable host) , not Dom0 (a PV guest) at all.

vcpu context switch itself doesn't cause VMexit.

-- Paul S.

Quoted 9 lines · lijiandm

hello:
I have two trivial question.
In dom0,which exception handler is used to handle VMexit caused
by context switching in domU?
If I want to replace the handler ,what should I do?
Thanks.
JianLi

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel