Hi, I am trying to passthru a PCI device to HVM. I think that I already successfully unbind the device in Dom0, by verifying like below: #xm pci-list-assignable-devices 0000:01:00.0 Then I put a line like below into HVM config file: pci = [''0000:01:00.0''] But creating the HVM failed, with below error: "Error: failed to assign device 01:00.0: maybe it has already been assigned to other domain, or maybe it doesn''t exist." The error message seems misleading, as there is no other VM is running (only Dom0). So how can I fix this problem? (I am using -unstable, CS 20145:8fc927798476) Thanks, J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Looks the hypercall XEN_DOMCTL_test_assign_device returns a mistake somehow? Can you please have a look at xen/arch/x86/domctrl.c: arch_do_domctl() and find out in "case XEN_DOMCTL_test_assign_device" what the return value is? When you see the "Error: failed to assign device...", in "xm dmesg", did you notice a message like "XEN_DOMCTL_test_assign_device: ... already assigned, or non-existent"? Thanks, -- Dexuan -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Jun Koi Sent: 2009?9?4? 14:09 To: xen-devel@lists.xensource.com Subject: [Xen-devel] Fail to passthru PCI device to HVM Hi, I am trying to passthru a PCI device to HVM. I think that I already successfully unbind the device in Dom0, by verifying like below: #xm pci-list-assignable-devices 0000:01:00.0 Then I put a line like below into HVM config file: pci = [''0000:01:00.0''] But creating the HVM failed, with below error: "Error: failed to assign device 01:00.0: maybe it has already been assigned to other domain, or maybe it doesn''t exist." The error message seems misleading, as there is no other VM is running (only Dom0). So how can I fix this problem? (I am using -unstable, CS 20145:8fc927798476) Thanks, J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, Sep 4, 2009 at 3:41 PM, Cui, Dexuan<dexuan.cui@intel.com> wrote:> Looks the hypercall XEN_DOMCTL_test_assign_device returns a mistake somehow? > > Can you please have a look at xen/arch/x86/domctrl.c: arch_do_domctl() and find out in "case XEN_DOMCTL_test_assign_device" what the return value is? > > When you see the "Error: failed to assign device...", in "xm dmesg", did you notice a message like > "XEN_DOMCTL_test_assign_device: ... already assigned, or non-existent"?A quick answer, yes. I have this in xm dmesg: "(XEN) domctl.c:672:d0 XEN_DOMCTL_test_assign_device: 1:0:0 already assigned, or non-existent" So what should I do to track this bug? Looking at xen/arch/x86/domctrl.c like you said above? Thanks, J> -----Original Message----- > From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Jun Koi > Sent: 2009?9?4? 14:09 > To: xen-devel@lists.xensource.com > Subject: [Xen-devel] Fail to passthru PCI device to HVM > > Hi, > > I am trying to passthru a PCI device to HVM. I think that I already > successfully unbind the device in Dom0, by verifying like below: > > #xm pci-list-assignable-devices > 0000:01:00.0 > > Then I put a line like below into HVM config file: > > pci = [''0000:01:00.0''] > > But creating the HVM failed, with below error: > > "Error: failed to assign device 01:00.0: maybe it has already been > assigned to other domain, or maybe it doesn''t exist." > > The error message seems misleading, as there is no other VM is running > (only Dom0). So how can I fix this problem? > > (I am using -unstable, CS 20145:8fc927798476) > > Thanks, > J > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Are you sure "xm list" only shows Domain-0 and there is not any other domain? Looks tt''s really weird. Can you reboot the the host and re-try to create your hvm domain with 01:00.0 assigned? Thanks, -- Dexuan -----Original Message----- From: Jun Koi [mailto:junkoi2004@gmail.com] Sent: 2009?9?4? 14:46 To: Cui, Dexuan Cc: xen-devel@lists.xensource.com Subject: Re: [Xen-devel] Fail to passthru PCI device to HVM On Fri, Sep 4, 2009 at 3:41 PM, Cui, Dexuan<dexuan.cui@intel.com> wrote:> Looks the hypercall XEN_DOMCTL_test_assign_device returns a mistake somehow? > > Can you please have a look at xen/arch/x86/domctrl.c: arch_do_domctl() and find out in "case XEN_DOMCTL_test_assign_device" what the return value is? > > When you see the "Error: failed to assign device...", in "xm dmesg", did you notice a message like > "XEN_DOMCTL_test_assign_device: ... already assigned, or non-existent"?A quick answer, yes. I have this in xm dmesg: "(XEN) domctl.c:672:d0 XEN_DOMCTL_test_assign_device: 1:0:0 already assigned, or non-existent" So what should I do to track this bug? Looking at xen/arch/x86/domctrl.c like you said above? Thanks, J> -----Original Message----- > From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Jun Koi > Sent: 2009?9?4? 14:09 > To: xen-devel@lists.xensource.com > Subject: [Xen-devel] Fail to passthru PCI device to HVM > > Hi, > > I am trying to passthru a PCI device to HVM. I think that I already > successfully unbind the device in Dom0, by verifying like below: > > #xm pci-list-assignable-devices > 0000:01:00.0 > > Then I put a line like below into HVM config file: > > pci = [''0000:01:00.0''] > > But creating the HVM failed, with below error: > > "Error: failed to assign device 01:00.0: maybe it has already been > assigned to other domain, or maybe it doesn''t exist." > > The error message seems misleading, as there is no other VM is running > (only Dom0). So how can I fix this problem? > > (I am using -unstable, CS 20145:8fc927798476) > > Thanks, > J > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, Sep 4, 2009 at 3:55 PM, Cui, Dexuan<dexuan.cui@intel.com> wrote:> Are you sure "xm list" only shows Domain-0 and there is not any other domain?Yes, I can confirm that.> Looks tt''s really weird. > Can you reboot the the host and re-try to create your hvm domain with 01:00.0 assigned?That didnt help. BTW: is that true that PCI passthru is only available with VT-d machine?? Thanks, J> > -----Original Message----- > From: Jun Koi [mailto:junkoi2004@gmail.com] > Sent: 2009?9?4? 14:46 > To: Cui, Dexuan > Cc: xen-devel@lists.xensource.com > Subject: Re: [Xen-devel] Fail to passthru PCI device to HVM > > On Fri, Sep 4, 2009 at 3:41 PM, Cui, Dexuan<dexuan.cui@intel.com> wrote: >> Looks the hypercall XEN_DOMCTL_test_assign_device returns a mistake somehow? >> >> Can you please have a look at xen/arch/x86/domctrl.c: arch_do_domctl() and find out in "case XEN_DOMCTL_test_assign_device" what the return value is? >> >> When you see the "Error: failed to assign device...", in "xm dmesg", did you notice a message like >> "XEN_DOMCTL_test_assign_device: ... already assigned, or non-existent"? > > A quick answer, yes. I have this in xm dmesg: > > "(XEN) domctl.c:672:d0 XEN_DOMCTL_test_assign_device: 1:0:0 already > assigned, or non-existent" > > So what should I do to track this bug? Looking at > xen/arch/x86/domctrl.c like you said above? > > > Thanks, > J > > > > >> -----Original Message----- >> From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Jun Koi >> Sent: 2009?9?4? 14:09 >> To: xen-devel@lists.xensource.com >> Subject: [Xen-devel] Fail to passthru PCI device to HVM >> >> Hi, >> >> I am trying to passthru a PCI device to HVM. I think that I already >> successfully unbind the device in Dom0, by verifying like below: >> >> #xm pci-list-assignable-devices >> 0000:01:00.0 >> >> Then I put a line like below into HVM config file: >> >> pci = [''0000:01:00.0''] >> >> But creating the HVM failed, with below error: >> >> "Error: failed to assign device 01:00.0: maybe it has already been >> assigned to other domain, or maybe it doesn''t exist." >> >> The error message seems misleading, as there is no other VM is running >> (only Dom0). So how can I fix this problem? >> >> (I am using -unstable, CS 20145:8fc927798476) >> >> Thanks, >> J >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
To assign device to HVM guest, you should need an IOMMU-capable system like a VT-d capable machine. What device is 01:00.0? Is it a special device like SR/IOV VF? I guess you have to figure out why the device 01:00.0 is not discovered in scan_pci_devices(). Thanks, -- Dexuan -----Original Message----- From: Jun Koi [mailto:junkoi2004@gmail.com] Sent: 2009?9?4? 15:00 To: Cui, Dexuan Cc: xen-devel@lists.xensource.com Subject: Re: [Xen-devel] Fail to passthru PCI device to HVM On Fri, Sep 4, 2009 at 3:55 PM, Cui, Dexuan<dexuan.cui@intel.com> wrote:> Are you sure "xm list" only shows Domain-0 and there is not any other domain?Yes, I can confirm that.> Looks it''s really weird. > Can you reboot the the host and re-try to create your hvm domain with 01:00.0 assigned?That didnt help. BTW: is that true that PCI passthru is only available with VT-d machine?? Thanks, J> > -----Original Message----- > From: Jun Koi [mailto:junkoi2004@gmail.com] > Sent: 2009?9?4? 14:46 > To: Cui, Dexuan > Cc: xen-devel@lists.xensource.com > Subject: Re: [Xen-devel] Fail to passthru PCI device to HVM > > On Fri, Sep 4, 2009 at 3:41 PM, Cui, Dexuan<dexuan.cui@intel.com> wrote: >> Looks the hypercall XEN_DOMCTL_test_assign_device returns a mistake somehow? >> >> Can you please have a look at xen/arch/x86/domctrl.c: arch_do_domctl() and find out in "case XEN_DOMCTL_test_assign_device" what the return value is? >> >> When you see the "Error: failed to assign device...", in "xm dmesg", did you notice a message like >> "XEN_DOMCTL_test_assign_device: ... already assigned, or non-existent"? > > A quick answer, yes. I have this in xm dmesg: > > "(XEN) domctl.c:672:d0 XEN_DOMCTL_test_assign_device: 1:0:0 already > assigned, or non-existent" > > So what should I do to track this bug? Looking at > xen/arch/x86/domctrl.c like you said above? > > > Thanks, > J > > > > >> -----Original Message----- >> From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Jun Koi >> Sent: 2009?9?4? 14:09 >> To: xen-devel@lists.xensource.com >> Subject: [Xen-devel] Fail to passthru PCI device to HVM >> >> Hi, >> >> I am trying to passthru a PCI device to HVM. I think that I already >> successfully unbind the device in Dom0, by verifying like below: >> >> #xm pci-list-assignable-devices >> 0000:01:00.0 >> >> Then I put a line like below into HVM config file: >> >> pci = [''0000:01:00.0''] >> >> But creating the HVM failed, with below error: >> >> "Error: failed to assign device 01:00.0: maybe it has already been >> assigned to other domain, or maybe it doesn''t exist." >> >> The error message seems misleading, as there is no other VM is running >> (only Dom0). So how can I fix this problem? >> >> (I am using -unstable, CS 20145:8fc927798476) >> >> Thanks, >> J >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel