struct vgic_io_device dev = {
.regions = vgic_v2_cpu_registers,
.nr_regions = ARRAY_SIZE(vgic_v2_cpu_registers),
+ .iodev_type = IODEV_CPUIF,
};
return vgic_uaccess(vcpu, &dev, is_write, offset, val);
struct vgic_io_device dev = {
.regions = vgic_v2_dist_registers,
.nr_regions = ARRAY_SIZE(vgic_v2_dist_registers),
+ .iodev_type = IODEV_DIST,
};
return vgic_uaccess(vcpu, &dev, is_write, offset, val);
switch (iodev->iodev_type) {
case IODEV_CPUIF:
- return 1;
+ data = region->read(vcpu, addr, len);
+ break;
case IODEV_DIST:
data = region->read(vcpu, addr, len);
break;
switch (iodev->iodev_type) {
case IODEV_CPUIF:
+ region->write(vcpu, addr, len, data);
break;
case IODEV_DIST:
region->write(vcpu, addr, len, data);