[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Future x86 emulator direction



On 13/12/16 12:55, Jan Beulich wrote:
>>>> On 13.12.16 at 13:00, <andrew.cooper3@xxxxxxxxxx> wrote:
>> During the most recent Cambridge Hackathon (April 2016), there was a
>> suggestion made (sorry - I don't recall from whom) to feed the the
>> SVM/VMX intercept information into a slightly more general emulate
>> framework, rather than to try to implement common functionality in 3
>> separate locations.
> I don't recall such a suggestion, so can you perhaps share a few
> more of the details?

It was an offhand comment over coffee.

> Is this to basically invoke the insn emulator
> here (once suitable extended)? If so, I think we may want to
> approach this the other direction - first make the emulator
> complete enough to be usable here, and only then funnel those
> code paths into it.

Perhaps I didn't describe it very well.

Think of it a bit more like introducing a new action emulator (name
definitely subject to improvement), which implements things such as
wrmsr, cpuid, pagewalk, task_switch, etc.

The vmexit helpers, given decode assistance from hardware, can directly
call action->task_switch().  If insufficient information is available
(e.g. LMSW on AMD), the helpers invoke the instruction emulator to work
out what to do, and the instruction emulator would invoke the action
emulator as part of its execute phase.

Wherever possible, the action emulator should be guest-neutral, and
ideally the single point of implementation of non-architectural actions
such as "the vm_event subsystem is interested in this."

> And to be honest, on the road towards
> completion of the emulator I think the SVM/VMX insns are pretty
> close to the end of the priority list.

I'd expect them to show up frequently during introspection, although
maybe I am wrong.  Razvan: Any thoughts?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.