[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxl: suppress device assignment to HVM guest when there is no IOMMU
On Tue, Jul 2, 2013 at 3:27 AM, Zhang, Yang Z <yang.z.zhang@xxxxxxxxx> wrote: > George Dunlap wrote on 2013-07-01: >> On Mon, Jul 1, 2013 at 2:45 PM, George Dunlap >> <George.Dunlap@xxxxxxxxxxxxx> wrote: >>> On Mon, Jul 1, 2013 at 2:08 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote: >>>> This in effect copies similar logic from xend: While there's no way to >>>> check whether a device is assigned to a particular guest, >>>> XEN_DOMCTL_test_assign_device at least allows checking whether an >>>> IOMMU is there and whether a device has been assign to _some_ guest. >>>> For the time being, this should be enough to cover for the missing >>>> error checking/recovery in other parts of libxl's device assignment >>>> paths. >>>> >>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> >>> >>> Something isn't quite right about this patch: >>> >>> # xl create h0 >>> Parsing config from h0 >>> xc: info: VIRTUAL MEMORY ARRANGEMENT: >>> Loader: 0000000000100000->000000000019ee28 Modules: >>> 0000000000000000->0000000000000000 TOTAL: >>> 0000000000000000->00000001ff800000 ENTRY ADDRESS: 0000000000100608 >>> xc: info: PHYSICAL MEMORY ALLOCATION: 4KB PAGES: 0x0000000000000200 >>> 2MB PAGES: 0x00000000000007fb 1GB PAGES: 0x0000000000000004 >>> libxl: error: libxl_pci.c:1046:libxl__device_pci_add: PCI device >>> 0000:07:00.0 cannot be assigned - no IOMMU? >>> Daemon running with PID 3468 >>> # xl pci-list h0 >>> Vdev Device >>> 00.0 0000:07:00.0 >>> # xl pci-assignable-list >>> # >>> >>> In other words, the xenstore stuff is still happening. > Still got confused. If no IOMMU, why there will have device assignable? But I > think there may no good way to solve it since pci-assignalbe-list don't need > IOMMU's intercept. Perhaps we should show whether IOMMU is enabled with 'xl > pci-assignable-list ' to let user know more earlier. Remember that PV guests can be assigned a device even without an IOMMU (although it's less safe). Expected behavior: # xl pci-assignable-add 07:00.0 # xl pci-assignable-list 07:00.0 # xl pci-attach hvm-domain 07:00.0 [error] # xl pci-assignable-list 07:00.0 # xl pci-attach pv-domain 07:00.0 [works] Actual behavior: # xl pci-assignable-add 07:00.0 # xl pci-assignable-list 07:00.0 # xl pci-attach hvm-domain 07:00.0 [error] # xl pci-assignable-list [nothing!] # xl pci-attach pv-domain 07:00.0 Error: 07:00.0 not assignable! In other words, even with this patch we are still going through some of the motions of assigning the device. If the device assignment fails, *nothing* should be done; and the device should still be available to be assigned to someone else. Instead, it is partially assigned, and after the failure is not available to be assigned to another guest. But this is good enough for now. -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |