vt-d: Print messages when:
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 4 Dec 2007 10:29:00 +0000 (10:29 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 4 Dec 2007 10:29:00 +0000 (10:29 +0000)
 - vt-d has been enabled by xen
 - user attempts assign a PCI device that has already been assigned to another hvm guest

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
xen/arch/x86/domctl.c
xen/arch/x86/hvm/vmx/vtd/dmar.c

index 03a0e1e57d0584d18dab94721d6f94f3f233b0cc..09633cba14ada71d5eed4e8d2b982164c5704a42 100644 (file)
@@ -546,7 +546,12 @@ long arch_do_domctl(
         devfn = (domctl->u.assign_device.machine_bdf >> 8) & 0xff;
 
         if ( device_assigned(bus, devfn) )
+        {
+            gdprintk(XENLOG_ERR, "XEN_DOMCTL_assign_device: "
+                     "%x:%x:%x already assigned\n",
+                     bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); 
             break;
+        }
 
         ret = assign_device(d, bus, devfn);
         gdprintk(XENLOG_INFO, "XEN_DOMCTL_assign_device: bdf = %x:%x:%x\n",
index 1d11cd960ed7d53c46643de5f904ade80d814ca3..49aa994a49d712ef4446b657b3bd401bfbf4451a 100644 (file)
@@ -553,5 +553,7 @@ int acpi_dmar_init(void)
         return -ENODEV;
     }
 
+    printk("Intel VT-d has been enabled\n");
+
     return 0;
 }