From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [BUG] XEN 4.3.3 - segfault in xl create for HVM with PCI passthrough Date: Wed, 5 Nov 2014 12:47:21 +0000 Message-ID: <1415191641.15317.12.camel@citrix.com> References: <544EB843.9060503@web2web.at> <1414493998.10206.3.camel@citrix.com> <544FB8C4.9000102@web2web.at> <1414512266.10974.5.camel@citrix.com> <54503440.3050302@web2web.at> <5452C43C.6050800@web2web.at> <5458ED27.8060502@web2web.at> <1415115868.11486.49.camel@citrix.com> <5458FB49.4040801@web2web.at> <1415118690.11486.53.camel@citrix.com> <54590D4D.90300@web2web.at> <1415180713.11486.61.camel@citrix.com> <545A118B.7040309@web2web.at> <1415191140.15317.11.camel@citrix.com> <545A1BFC.5090505@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <545A1BFC.5090505@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Atom2 , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2014-11-05 at 12:45 +0000, Andrew Cooper wrote: > On 05/11/14 12:39, Ian Campbell wrote: > > On Wed, 2014-11-05 at 13:01 +0100, Atom2 wrote: > > > > Thanks for all that, sadly it's not giving me any clues what is going > > wrong :-/ > > > >> To me, it looks as if something is broken with the PCI passthrough stuff > >> and that has started with 4.3.3. Strangely however, valgrind seems to > >> work around that issue insofar that no segfault happens. Is there any > >> explanation of the different behaviour between native execution of xl > >> and starting xl under valgrind's control? > > Valgrind has it's own memory allocator etc, but it's supposed to catch > > errors, not hide them. I think even 3.10.0 is missing support for some > > hypercalls which are being used by passthrough, which is why we are > > continuing to see different behaviours. > > > > I think we are reaching the point of diminishing returns with vagrind. > > It probably is worth rerunning with "-v --leak-check=full", but after > > that we'd be looking at adding valgrind patches for the new hypercalls, > > which I don't think will be worthwhile (although I intend to write the > > patches anyway). > > > > So unless "-v --leak-check=full" tells me something (which I'm doubtful > > of at this stage) I think we're back to bisecting the changes since > > 4.3.1, sorry. > > The lack valgrind support for XEN_DOMCTL_test_assign is causing PCI > Passthrough to fail. > > This is where "libxl: error: libxl_pci.c:1045:libxl__device_pci_add: PCI > device 0000:0a:0b.0 cannot be assigned - no IOMMU?" comes from. > > While I do have 10 patches I really should get around to upstreaming > into valgrind, the passthrough hypercalls are not amongst them. Fixing > XEN_DOMCTL_test_assign is only the first step. I've just written (but not tested) that one. Ian.