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

Re: [Xen-devel] [PATCH RFC V4 1/5] xen: Emulate with no writes



>>> On 05.08.14 at 17:16, <rcojocaru@xxxxxxxxxxxxxxx> wrote:
> So if I understand this code correctly, hvmemul_rep_ins() performs a few
> checks, and then calls hvmemul_do_pio(), which ends up calling
> hvmemul_do_io(), which seems to discard the write rather unceremoniously
> for weird-sized accesses. This would seem to roughly correspond to just
> returning X86EMUL_UNHANDLEABLE from hvmemul_rep_ins() for that special
> case (with no MMIO code executed).
> 
> Did I misunderstand something?

The main issue is that as long as these functions only act as a backend
to the x86 instruction emulator, "weird size accesses" just can't happen.
I.e. the respective check is just a guard against careless future code
additions. And for such bad cases it is of course appropriate to drop
the entire effect of the instruction - this is largely like a fault happing on
it. And quite different from your case - you want the instruction to
behave normally _except_ for the memory write as I understood so far
(albeit it still escapes me how in the end correct behavior can result).

Furthermore X86EMUL_UNHANDLEABLE generally results in a fault to be
injected into the guest, i.e. such paths aren't suitable for your purposes
iiuc.

Jan


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


 


Rackspace

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