From: Andrew Cooper <andrew.cooper3@citrix.com>
To: xennn <openbg@abv.bg>, xen-devel@lists.xensource.com
Subject: Re: hvm trapping mechanism
Date: Mon, 23 Dec 2013 21:47:29 +0000 [thread overview]
Message-ID: <52B8AF71.6090508@citrix.com> (raw)
In-Reply-To: <1387832486915-5720529.post@n5.nabble.com>
On 23/12/2013 21:01, xennn wrote:
> Hi all,
>
> I would like to ask about hvm xen implementation. As far i understood the
> trapping-emulating flow is that:
>
> 1. when hvm virtual machine is started vmcs is setup and a vm_exit handler
> is registered at:
>
> __vmwrite(HOST_RIP, (unsigned long)vmx_asm_vmexit_handler);
>
> 2. the hypercall page is defined by hypercall api and that hypercall page
> contains the vmexit calls.
> 3. when guest os issues syscall an hypercall is perfomed by the hypercall
> page and vmexit operation is peformed
> 4. the vmx_vmexit_handler(struct cpu_user_regs *regs) (vmx.c) is invoked to
> emulate the hypercall.
>
> I would like to ask is this flow is right? Is there somethingimportant
> missing?
> I would like to ask how the vmx_vmexit_handler is invoked - may be on
> hardware level or there is some other party at the flow?
>
> best regerds
Technically, the hypercall page contains 'vmcall' instructions. There
is no such thing as a vmexit instruction. A vmexit is the action of the
processor moving from non-root mode into root mode because of an action
requiring the intervention of the hypervisor.
vmx_asm_vmexit_handler is the handler for all vmexits, the vast majority
of which are not from hypercalls. It includes may other things, such as
validity checks when the guest writes to control registers, or simply
that the real processor received an interrupt and that Xen should handle it.
~Andrew
next prev parent reply other threads:[~2013-12-23 21:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-23 21:01 hvm trapping mechanism xennn
2013-12-23 21:47 ` Andrew Cooper [this message]
2013-12-24 1:19 ` Liu, Jinsong
2013-12-24 14:09 ` xennn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52B8AF71.6090508@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=openbg@abv.bg \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.