From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: Questions regarding XEN subsystems.. Date: Fri, 23 Oct 2015 18:25:39 +0100 Message-ID: <562A6D93.4030402@citrix.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7451478052905752077==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Mike , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============7451478052905752077== Content-Type: multipart/alternative; boundary="------------060108090305000807080706" --------------060108090305000807080706 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit On 23/10/15 18:16, Mike wrote: > Hello, > > I'm doing some reviewing of XEN source code. Does x86_emulate() (from > x86_emulate.c) execute on every guest, or is this whenever a machine > doesn't have hardware assisted virtualization? By default, guests do not have instructions emulated. They run on the real hardware. There are situations which occur, (as a side effect of virtualisation), when it traps into Xen. e.g. updating pagetables while shadow paging is in use, a write hitting an MMIO page emulated by Qemu, etc. In such circumstances, the instruction which faulted must be emulated so Xen can work out what the guest did, and apply the appropriate action. e.g. update the pagetable as requested or forward an io request to qemu. Especially for the SIMD instructions, x86_emulate() is not capable of providing a software alternative to an instruction not supported by the hardware. ~Andrew --------------060108090305000807080706 Content-Type: text/html; charset="windows-1252" Content-Length: 1649 Content-Transfer-Encoding: quoted-printable
On 23/10/15 18:16, Mike wrote:
Hello,

I'm doing some reviewing of XEN source code.=A0 Does x86_emulate() (from x86_emulate.c) execute on every guest, or is this whenever a machine doesn't have hardware assisted virtualization=3F

By default, guests do not have instructions emulated.=A0 They run on the real hardware.

There are situations which occur, (as a side effect of virtualisation), when it traps into Xen.=A0 e.g. updating pagetables while shadow paging is in use, a write hitting an MMIO page emulated by Qemu, etc.

In such circumstances, the instruction which faulted must be emulated so Xen can work out what the guest did, and apply the appropriate action.=A0 e.g. update the pagetable as requested or forward an io request to qemu.

Especially for the SIMD instructions, x86_emulate() is not capable of providing a software alternative to an instruction not supported by the hardware.

~Andrew --------------060108090305000807080706-- --===============7451478052905752077== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============7451478052905752077==--