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

Re: [PATCH v3 25/39] xen/riscv: add guest store emulation for trapped MMIO accesses



> Extend the guest page fault handler with store emulation to support MMIO
> write accesses.
> 
> Like emulate_load(), emulate_store() obtains the trapped instruction with
> insn_fetch_faulted(), which also deals with a fault taken while re-reading
> it, and decodes it with decode_ldst_insn(). As with the load path, the
> access is completed synchronously through do_mmio().
> 
> At the moment only virtual interrupt controller (vINTC) traps are expected
> to occur, since it is currently the only backend registered with the MMIO
> handler dispatch, so in practice the store is emulated via the vINTC
> backend.
Nit: the wording is unclear because "emulated via the vINTC backend" sounds
like the vINTC does the decoding, I'd suggest:
```
    At the moment the only MMIO handler registered is the vAPLIC one, so in
    practice every trapped guest store ends up in vaplic_mmio_ops' write
    handler.
```
Instead of that, everything LGTM, so:
Reviewed-by: Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>

Thanks!

-- 
Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>



 


Rackspace

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