WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] Informatio required on VMEXit settings and process.

To: "aditya shevalkar" <aditya27783@xxxxxxxxxxx>, "xen devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Informatio required on VMEXit settings and process.
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Tue, 30 Jan 2007 14:06:06 +0100
Delivery-date: Tue, 30 Jan 2007 05:06:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <474814.82463.qm@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdEbN6cJFTlanexTNa9xatPHwCV7AAAHASg
Thread-topic: [Xen-devel] Informatio required on VMEXit settings and process.
 

> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> aditya shevalkar
> Sent: 30 January 2007 12:47
> To: xen devel
> Subject: [Xen-devel] Informatio required on VMEXit settings 
> and process.
> 
> Hi all,
> Please help me in understanding who update the VMEXIT_REASON 
> and VMEXIT_QUALIFICATION fields in the VMCS field i.e. Xen or 
> CPU and how when the VMExit occurs.And how the VMexit 
> occurs(porcess of vmexit).

The VMEXIT_REASON is set by the CPU when it sees a condition that
generates a vmexit (i.e. the guest is doing something that the
hypervisor/host has set to exit in "EXEC_CONTROLS"). The
VMEXIT_QUALIFICATION is likewise filled in with the relevant information
by the CPU (such as the address of a page-fault or the interrupt vector
on an interrupt exit). 

[I'm not an Intel expert, but seeing as the overall concept is almost
identical for AMD and Intel, the question can be answered in a way that
applies to both, with the slight difference that the AMD uses a VMCB and
different names for the fields. For example, exit_reason in Intel is
called exitcode in AMD's world, and exit_qualification is called
exitinfo{1,2} and exitintinfo]

> Also explain this process in case of page fault if possible.

Processor sees a memory access. The processor checks the page-tables,
and if the access is not allowed, the processor gives a vmexit to the
hypervisor. The hypervisor checks the exit_reason to see that it's a
page-fault, and determines if it's a "hypervisor" related page-fault
(such as a page-table update or a MMIO access to a virtual device) or a
"guest fault". For the former, the hypervisor will then perform the
relevant work to either update the page-table or to send MMIO operation
to QEMU. If it's not a hypervisor fault, it is by process of elimination
a guest-fault (for example a page-access that hits a page that is stored
in the swap or a write to a page that is shared with "copy-on-write" in
a forked process). Guest faults are forwarded to the guest by
"injection". 

A more concrete question would probably give you a more precise answer -
there are MANY pages in the manual on the subject, so it's pretty much a
waste of everyones time to rewrite it here... 

> Give the code reference if possible.

.../xen/arch/x86/hvm/svm/svm.c for AMD code. 
.../xen/arch/x86/hvm/vmx/vmx.c for Intel code. 

--
Mats

> 
> Thanks and Regards,
> Aditya Shevalkar.
> 
> 
>               
> __________________________________________________________
> Yahoo! India Answers: Share what you know. Learn something new
> http://in.answers.yahoo.com/
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
> 
> 
> 



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

<Prev in Thread] Current Thread [Next in Thread>