Skip to content

Commit 52882b9

Browse files
aikbonzini
authored andcommitted
KVM: PPC: Make KVM_CAP_IRQFD_RESAMPLE platform dependent
When introduced, IRQFD resampling worked on POWER8 with XICS. However KVM on POWER9 has never implemented it - the compatibility mode code ("XICS-on-XIVE") misses the kvm_notify_acked_irq() call and the native XIVE mode does not handle INTx in KVM at all. This moved the capability support advertising to platforms and stops advertising it on XIVE, i.e. POWER9 and later. Signed-off-by: Alexey Kardashevskiy <[email protected]> Acked-by: Anup Patel <[email protected]> Acked-by: Nicholas Piggin <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 85b475a commit 52882b9

File tree

5 files changed

+9
-1
lines changed

5 files changed

+9
-1
lines changed

arch/arm64/kvm/arm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
220220
case KVM_CAP_VCPU_ATTRIBUTES:
221221
case KVM_CAP_PTP_KVM:
222222
case KVM_CAP_ARM_SYSTEM_SUSPEND:
223+
case KVM_CAP_IRQFD_RESAMPLE:
223224
r = 1;
224225
break;
225226
case KVM_CAP_SET_GUEST_DEBUG2:

arch/powerpc/kvm/powerpc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,12 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
576576
break;
577577
#endif
578578

579+
#ifdef CONFIG_HAVE_KVM_IRQFD
580+
case KVM_CAP_IRQFD_RESAMPLE:
581+
r = !xive_enabled();
582+
break;
583+
#endif
584+
579585
case KVM_CAP_PPC_ALLOC_HTAB:
580586
r = hv_enabled;
581587
break;

arch/s390/kvm/kvm-s390.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
573573
case KVM_CAP_S390_VCPU_RESETS:
574574
case KVM_CAP_SET_GUEST_DEBUG:
575575
case KVM_CAP_S390_DIAG318:
576+
case KVM_CAP_IRQFD_RESAMPLE:
576577
r = 1;
577578
break;
578579
case KVM_CAP_SET_GUEST_DEBUG2:

arch/x86/kvm/x86.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4432,6 +4432,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
44324432
case KVM_CAP_VAPIC:
44334433
case KVM_CAP_ENABLE_CAP:
44344434
case KVM_CAP_VM_DISABLE_NX_HUGE_PAGES:
4435+
case KVM_CAP_IRQFD_RESAMPLE:
44354436
r = 1;
44364437
break;
44374438
case KVM_CAP_EXIT_HYPERCALL:

virt/kvm/kvm_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4479,7 +4479,6 @@ static long kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg)
44794479
#endif
44804480
#ifdef CONFIG_HAVE_KVM_IRQFD
44814481
case KVM_CAP_IRQFD:
4482-
case KVM_CAP_IRQFD_RESAMPLE:
44834482
#endif
44844483
case KVM_CAP_IOEVENTFD_ANY_LENGTH:
44854484
case KVM_CAP_CHECK_EXTENSION_VM:

0 commit comments

Comments
 (0)