From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTPkY-0008Hv-CA for qemu-devel@nongnu.org; Sat, 30 Jul 2016 04:36:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTPkW-000126-8B for qemu-devel@nongnu.org; Sat, 30 Jul 2016 04:36:01 -0400 Received: from mail-ua0-x231.google.com ([2607:f8b0:400c:c08::231]:32953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTPkW-000122-3T for qemu-devel@nongnu.org; Sat, 30 Jul 2016 04:36:00 -0400 Received: by mail-ua0-x231.google.com with SMTP id k90so76739015uak.0 for ; Sat, 30 Jul 2016 01:36:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20160727125243.GB6285@stefanha-x1.localdomain> From: Stefan Hajnoczi Date: Sat, 30 Jul 2016 09:35:58 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] From virtio_kick until VM-exit? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Charls D. Chap" Cc: qemu-devel On Fri, Jul 29, 2016 at 9:00 PM, Charls D. Chap wrote: Please use Reply-All when responding to a mailing list thread. This keeps the mailing list (qemu-devel@nongnu.org) in the CC list so your replies are sent to the mailing list too. This way the discussion stays public on the mailing list and others can participate. > I've read again and again the code. Please let me ask you one last question. > > the question is, where is the VMEXIT and VMENTRY code. > > > If i have this, i can answer the following that bother me: > 1) > What is a VMEXIT, what mechanism? is it an interrupt? Same for VMENTRY > Where does the VMENTRY return? In an interrupt handler? > > 2) > Which are the parameters of vmetry and vmexit > does each vcpu has a specific VPID or does it change in every RESUME > > 3) > What is a hypercall? A pair of VMEXIT-VMENTRY? or is it oneway (does it ever > return?) Or there are many types of hypercalls > > 4) > When we do vmexit, Is it another context? I am mean, does the stack changes? > What is the guest stack? Each vcpu has one stack? Please look at the Intel Software Developer's Manuals and read about VMX instructions: https://www-ssl.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html Once you have an overview you'll understand the semantics and be able to grep for the relevant code in the kvm kernel module. Stefan