]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
KVM: arm64: vgic-its: Add pointer to corresponding kvm_device
authorMarc Zyngier <marc.zyngier@arm.com>
Sun, 17 Jul 2016 20:35:07 +0000 (21:35 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 18 Jul 2016 17:15:18 +0000 (18:15 +0100)
Going from the ITS structure to the corresponding KVM structure
would be quite handy at times. The kvm_device pointer that is
passed at create time is quite convenient for this, so let's
keep a copy of it in the vgic_its structure.

This will be put to a good use in subsequent patches.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
include/kvm/arm_vgic.h
virt/kvm/arm/vgic/vgic-its.c

index 4e63a07b9001f5fa248a9e611d87c9100676e0ed..540da5149ba7f0a6662d550002fc47e618ce30f6 100644 (file)
@@ -138,6 +138,7 @@ struct vgic_its {
        bool                    enabled;
        bool                    initialized;
        struct vgic_io_device   iodev;
+       struct kvm_device       *dev;
 
        /* These registers correspond to GITS_BASER{0,1} */
        u64                     baser_device_table;
index d6f68e9c946dd80b7fd15dda35bd76220566737f..dcae567c522dc86c5c472bd5e639b1a142931c8f 100644 (file)
@@ -1368,6 +1368,7 @@ static int vgic_its_create(struct kvm_device *dev, u32 type)
        dev->kvm->arch.vgic.has_its = true;
        its->initialized = false;
        its->enabled = false;
+       its->dev = dev;
 
        its->baser_device_table = INITIAL_BASER_VALUE                   |
                ((u64)GITS_BASER_TYPE_DEVICE << GITS_BASER_TYPE_SHIFT);