Author: sephe
Date: Wed Oct 19 07:03:54 2016
New Revision: 307610
URL: https://svnweb.freebsd.org/changeset/base/307610

Log:
  MFC 306481
  
      x86/ioapic: Fix destination cpu for Hyper-V
  
      On Hyper-V:
      - Stick to the first cpu for all I/O APIC pins.
      - And don't allow destination cpu changes.
  
      Reviewed by:    jhb
      Sponsored by:   Microsoft
      Differential Revision:  https://reviews.freebsd.org/D7949

Modified:
  stable/11/sys/x86/x86/io_apic.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/x86/x86/io_apic.c
==============================================================================
--- stable/11/sys/x86/x86/io_apic.c     Wed Oct 19 06:59:45 2016        
(r307609)
+++ stable/11/sys/x86/x86/io_apic.c     Wed Oct 19 07:03:54 2016        
(r307610)
@@ -412,6 +412,18 @@ ioapic_assign_cpu(struct intsrc *isrc, u
        u_int old_id;
 
        /*
+        * On Hyper-V:
+        * - Stick to the first cpu for all I/O APIC pins.
+        * - And don't allow destination cpu changes.
+        */
+       if (vm_guest == VM_GUEST_HV) {
+               if (intpin->io_vector)
+                       return (EINVAL);
+               else
+                       apic_id = 0;
+       }
+
+       /*
         * keep 1st core as the destination for NMI
         */
        if (intpin->io_irq == IRQ_NMI)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to