[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 06/15] x86/emul: Rework emulator event injection
At 09:33 -0700 on 23 Nov (1479893609), Jan Beulich wrote: > >>> On 23.11.16 at 17:19, <tim@xxxxxxx> wrote: > > Hi, > > > > At 15:38 +0000 on 23 Nov (1479915529), Andrew Cooper wrote: > >> The emulator needs to gain an understanding of interrupts and exceptions > >> generated by its actions. > >> > >> Move hvm_emulate_ctxt.{exn_pending,trap} into struct x86_emulate_ctxt so > > they > >> are visible to the emulator. This removes the need for the > >> inject_{hw,sw}_interrupt() hooks, which are dropped and replaced with > >> x86_emul_{hw_exception,software_event}() instead. > >> > >> The shadow pagetable and PV uses of x86_emulate() previously failed with > >> X86EMUL_UNHANDLEABLE due to the lack of inject_*() hooks, but this > >> behaviour > >> has subtly changed. Adjust the return value checking to cause a pending > > event > >> to fall back into the previous codepath. > >> > >> No overall functional change. > > > > AIUI this does have a change in the shadow callers in the case where > > the emulated instruction would inject an event. Previously we would > > have failed the emulation, perhaps unshadowed something, and returned > > to the guest to retry. > > > > Now the emulator records the event in the context struct, updates the > > register state and returns success, so we'll return on the *next* > > instruction. I think that's OK, though. > > Not exactly - instead of success, X86EMUL_EXCEPTION is being > returned, which would suppress register updates. Oh right. In that case AFAICS neither invocation of x86_emulate() in shadow/multi.c needs any adjustment. Tim. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |