On Wed, 28 Nov 2018 at 03:50, Peng Hao <peng.h...@zte.com.cn> wrote: > > Add pvpanic new type "TYPE_PVPANIC_MMIO" > > Signed-off-by: Peng Hao <peng.h...@zte.com.cn> > --- > hw/misc/pvpanic.c | 50 > +++++++++++++++++++++++++++++++++++++++++++---- > include/hw/misc/pvpanic.h | 1 + > 2 files changed, 47 insertions(+), 4 deletions(-) >
> +static void pvpanic_mmio_initfn(Object *obj) > +{ > + PVPanicMMIOState *s = PVPANIC_MMIO_DEVICE(obj); > + SysBusDevice *sbd = SYS_BUS_DEVICE(obj); > + > + memory_region_init_io(&s->mr, OBJECT(s), &pvpanic_ops, s, > + TYPE_PVPANIC_MMIO, 2); Why did you choose to make the memory region 2 bytes wide? The ISA i/o port interface seems to be a 1 byte wide one. Otherwise Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM