Skip to content

Commit 79962a5

Browse files
Shanker DonthineniMarc Zyngier
authored andcommitted
KVM: arm/arm64: Fix bug in advertising KVM_CAP_MSI_DEVID capability
Commit 0e4e82f ("KVM: arm64: vgic-its: Enable ITS emulation as a virtual MSI controller") tried to advertise KVM_CAP_MSI_DEVID, but the code logic was not updating the dist->msis_require_devid field correctly. If hypervisor tool creates the ITS device after VGIC initialization then we don't advertise KVM_CAP_MSI_DEVID capability. Update the field msis_require_devid to true inside vgic_its_create() to fix the issue. Fixes: 0e4e82f ("vgic-its: Enable ITS emulation as a virtual MSI controller") Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
1 parent 5771a8c commit 79962a5

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

‎virt/kvm/arm/vgic/vgic-init.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,6 @@ int vgic_init(struct kvm *kvm)
285285
if (ret)
286286
goto out;
287287

288-
if (vgic_has_its(kvm))
289-
dist->msis_require_devid = true;
290-
291288
kvm_for_each_vcpu(i, vcpu, kvm)
292289
kvm_vgic_vcpu_enable(vcpu);
293290

‎virt/kvm/arm/vgic/vgic-its.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,7 @@ static int vgic_its_create(struct kvm_device *dev, u32 type)
15981598
INIT_LIST_HEAD(&its->device_list);
15991599
INIT_LIST_HEAD(&its->collection_list);
16001600

1601+
dev->kvm->arch.vgic.msis_require_devid = true;
16011602
dev->kvm->arch.vgic.has_its = true;
16021603
its->enabled = false;
16031604
its->dev = dev;

0 commit comments

Comments
 (0)