aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/arm_gicv3_its_common.c
diff options
context:
space:
mode:
authorShashi Mallela <shashi.mallela@linaro.org>2021-09-13 16:07:23 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-09-13 16:07:54 +0100
commit18f6290a6a95b2b16ab061bfd92274f6ba2a821b (patch)
tree78564bebfccde4b64c7750de1b0bee34303a6018 /hw/intc/arm_gicv3_its_common.c
parent3b8a4733d1dfb3dd7cbf32fa031b092e28eedd0f (diff)
downloadqemu-18f6290a6a95b2b16ab061bfd92274f6ba2a821b.zip
qemu-18f6290a6a95b2b16ab061bfd92274f6ba2a821b.tar.gz
qemu-18f6290a6a95b2b16ab061bfd92274f6ba2a821b.tar.bz2
hw/intc: GICv3 ITS initial framework
Added register definitions relevant to ITS,implemented overall ITS device framework with stubs for ITS control and translater regions read/write,extended ITS common to handle mmio init between existing kvm device and newer qemu device. Signed-off-by: Shashi Mallela <shashi.mallela@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Auger <eric.auger@redhat.com> Tested-by: Neil Armstrong <narmstrong@baylibre.com> Message-id: 20210910143951.92242-2-shashi.mallela@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/intc/arm_gicv3_its_common.c')
-rw-r--r--hw/intc/arm_gicv3_its_common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/intc/arm_gicv3_its_common.c b/hw/intc/arm_gicv3_its_common.c
index 66c4c6a..7d7f388 100644
--- a/hw/intc/arm_gicv3_its_common.c
+++ b/hw/intc/arm_gicv3_its_common.c
@@ -50,6 +50,8 @@ static int gicv3_its_post_load(void *opaque, int version_id)
static const VMStateDescription vmstate_its = {
.name = "arm_gicv3_its",
+ .version_id = 1,
+ .minimum_version_id = 1,
.pre_save = gicv3_its_pre_save,
.post_load = gicv3_its_post_load,
.priority = MIG_PRI_GICV3_ITS,
@@ -99,14 +101,15 @@ static const MemoryRegionOps gicv3_its_trans_ops = {
.endianness = DEVICE_NATIVE_ENDIAN,
};
-void gicv3_its_init_mmio(GICv3ITSState *s, const MemoryRegionOps *ops)
+void gicv3_its_init_mmio(GICv3ITSState *s, const MemoryRegionOps *ops,
+ const MemoryRegionOps *tops)
{
SysBusDevice *sbd = SYS_BUS_DEVICE(s);
memory_region_init_io(&s->iomem_its_cntrl, OBJECT(s), ops, s,
"control", ITS_CONTROL_SIZE);
memory_region_init_io(&s->iomem_its_translation, OBJECT(s),
- &gicv3_its_trans_ops, s,
+ tops ? tops : &gicv3_its_trans_ops, s,
"translation", ITS_TRANS_SIZE);
/* Our two regions are always adjacent, therefore we now combine them