@@ -115,11 +115,11 @@ struct vgic_dist {
unsigned int nr_spis;
/* base addresses in guest physical address space: */
- paddr_t vgic_dist_base; /* distributor */
+ paddr_t dbase; /* distributor */
union
{
/* either a GICv2 CPU interface */
- paddr_t vgic_cpu_base;
+ paddr_t cbase;
/* or a number of GICv3 redistributor regions */
struct
{
@@ -188,12 +188,12 @@ struct vgic_cpu {
static inline paddr_t vgic_cpu_base(const struct vgic_dist *vgic)
{
- return vgic->vgic_cpu_base;
+ return vgic->cbase;
}
static inline paddr_t vgic_dist_base(const struct vgic_dist *vgic)
{
- return vgic->vgic_dist_base;
+ return vgic->dbase;
}
#endif /* __ASM_ARM_NEW_VGIC_H */
@@ -112,8 +112,8 @@ int domain_vgic_register(struct domain *d, int *mmio_count)
BUG();
}
- d->arch.vgic.vgic_dist_base = VGIC_ADDR_UNDEF;
- d->arch.vgic.vgic_cpu_base = VGIC_ADDR_UNDEF;
+ d->arch.vgic.dbase = VGIC_ADDR_UNDEF;
+ d->arch.vgic.cbase = VGIC_ADDR_UNDEF;
d->arch.vgic.vgic_redist_base = VGIC_ADDR_UNDEF;
return 0;
@@ -272,7 +272,7 @@ int vgic_v2_map_resources(struct domain *d)
*/
if ( is_hardware_domain(d) )
{
- d->arch.vgic.vgic_dist_base = gic_v2_hw_data.dbase;
+ d->arch.vgic.dbase = gic_v2_hw_data.dbase;
/*
* For the hardware domain, we always map the whole HW CPU
* interface region in order to match the device tree (the "reg"
@@ -280,13 +280,13 @@ int vgic_v2_map_resources(struct domain *d)
* Note that we assume the size of the CPU interface is always
* aligned to PAGE_SIZE.
*/
- d->arch.vgic.vgic_cpu_base = gic_v2_hw_data.cbase;
+ d->arch.vgic.cbase = gic_v2_hw_data.cbase;
csize = gic_v2_hw_data.csize;
vbase = gic_v2_hw_data.vbase;
}
else if ( is_domain_direct_mapped(d) )
{
- d->arch.vgic.vgic_dist_base = gic_v2_hw_data.dbase;
+ d->arch.vgic.dbase = gic_v2_hw_data.dbase;
/*
* For all the direct-mapped domain other than the hardware domain,
* we only map a 8kB CPU interface but we make sure it is at a location
@@ -296,13 +296,13 @@ int vgic_v2_map_resources(struct domain *d)
* address when the GIC is aliased to get a 8kB contiguous
* region.
*/
- d->arch.vgic.vgic_cpu_base = gic_v2_hw_data.cbase;
+ d->arch.vgic.cbase = gic_v2_hw_data.cbase;
csize = GUEST_GICC_SIZE;
vbase = gic_v2_hw_data.vbase + gic_v2_hw_data.aliased_offset;
}
else
{
- d->arch.vgic.vgic_dist_base = GUEST_GICD_BASE;
+ d->arch.vgic.dbase = GUEST_GICD_BASE;
/*
* The CPU interface exposed to the guest is always 8kB. We may
* need to add an offset to the virtual CPU interface base
@@ -310,14 +310,13 @@ int vgic_v2_map_resources(struct domain *d)
* region.
*/
BUILD_BUG_ON(GUEST_GICC_SIZE != SZ_8K);
- d->arch.vgic.vgic_cpu_base = GUEST_GICC_BASE;
+ d->arch.vgic.cbase = GUEST_GICC_BASE;
csize = GUEST_GICC_SIZE;
vbase = gic_v2_hw_data.vbase + gic_v2_hw_data.aliased_offset;
}
- ret = vgic_register_dist_iodev(d, gaddr_to_gfn(dist->vgic_dist_base),
- VGIC_V2);
+ ret = vgic_register_dist_iodev(d, gaddr_to_gfn(dist->dbase), VGIC_V2);
if ( ret )
{
gdprintk(XENLOG_ERR, "Unable to register VGIC MMIO regions\n");
@@ -328,7 +327,7 @@ int vgic_v2_map_resources(struct domain *d)
* Map the gic virtual cpu interface in the gic cpu interface
* region of the guest.
*/
- ret = map_mmio_regions(d, gaddr_to_gfn(d->arch.vgic.vgic_cpu_base),
+ ret = map_mmio_regions(d, gaddr_to_gfn(d->arch.vgic.cbase),
csize / PAGE_SIZE, maddr_to_mfn(vbase));
if ( ret )
{