]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/i386/kvm/apic.c
target/i386: Support up to 32768 CPUs without IRQ remapping
[mirror_qemu.git] / hw / i386 / kvm / apic.c
index dd29906061ce1a8149d7d14b8854bd87f241c265..b226b674e808b803f2534ab516d45181b3fa6036 100644 (file)
@@ -183,6 +183,13 @@ static void kvm_send_msi(MSIMessage *msg)
 {
     int ret;
 
+    /*
+     * The message has already passed through interrupt remapping if enabled,
+     * but the legacy extended destination ID in low bits still needs to be
+     * handled.
+     */
+    msg->address = kvm_swizzle_msi_ext_dest_id(msg->address);
+
     ret = kvm_irqchip_send_msi(kvm_state, *msg);
     if (ret < 0) {
         fprintf(stderr, "KVM: injection failed, MSI lost (%s)\n",