[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

attaching device to PV guest broken by your rework of libxl's PCI handling?


  • To: Paul Durrant <paul@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 9 Dec 2021 13:17:25 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0wqGv5muiHpfan4IS8sY0yD+VfuN7Aoe8pGuQvcTvdQ=; b=iLDWTMzNxucrO6QQfictNAI6TWnQchq5kX9EDBMRa/61EyW2b9B6yMzAFIOsVGKCWDT79TzcvSmeRYalWoMpe12Tza9e6Y3k84xvGpdD8ViAkDf7pBaXs8RRON/DVvwGnjsbWCCElW0V9bTrrKG2bvCrHLcM9PqB43dKKBzkrQXqYiVB9ottW2oyyFuV4JwjH29/07e8Fqi6Le5rFIq1zabTcCFXhc3rRKo4F2p9s6fAbSRZdfhAhbqg5BOXILkyhfTjN8kmfyqCQ1OM5x01r9afw7VWw19AYpI3WGLQBWXOBdvhszIW3zY5+32Sb25kpoA3lfJYWgaHFM/ThH0aGA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jEtnkwv5dNISx9xKP91UMBWDIvPy5Uc9XoTjR7GDbq7EGIhIzRlYBzXAIYQaGTjmhlExf5S8ivX6hme1cnyUA3DJcJNcU3KNdYYfF2yUEbzxIhBn0q+X841jNkoo+XfoKirTOpKY5qLecc8a0y3g31zAXPrMXY6WjbC9EzuCJ/MuH+8P5fNIMMrmtLfX1m4EL34RGH20Ep/SdT2/tgK/MfmOFJU9YaybUoVa79nTwCncUgCrwJMHjXYqcKiIX0o6HtGYCpVp+3ZCSiZRD1zTpqijH4Xlf4HcD++z9uCcEElHog9ENEw3PNwyV4WyKkUBRlyPt2o7VLCSeu5gprjv2A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 09 Dec 2021 12:17:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Paul,

in 0fdb48ffe7a1 ("libxl: Make sure devices added by pci-attach are
reflected in the config") you've moved down the invocation of
libxl__create_pci_backend() from libxl__device_pci_add_xenstore().
In the PV case, soon after the original invocation place there is

    if (!starting && domtype == LIBXL_DOMAIN_TYPE_PV) {
        if (libxl__wait_for_backend(gc, be_path, GCSPRINTF("%d", 
XenbusStateConnected)) < 0)
            return ERROR_FAIL;
    }

Afaict the only way this wait could succeed is if the backend was
created up front. The lack thereof does, I think, explain a report
we've had:

vh015:~ # xl -vvv pci-attach sles-15-sp4-64-pv-def-net 63:11.4
libxl: debug: libxl_pci.c:1561:libxl_device_pci_add: Domain 18:ao 
0x55a517704170: create: how=(nil) callback=(nil) poller=0x55a517704210
libxl: debug: libxl_qmp.c:1921:libxl__ev_qmp_dispose:  ev 0x55a5177047e8
libxl: error: libxl_device.c:1393:libxl__wait_for_backend: Backend 
/local/domain/0/backend/pci/18/0 does not exist
libxl: error: libxl_pci.c:1779:device_pci_add_done: Domain 
18:libxl__device_pci_add failed for PCI device 0:63:11.4 (rc -3)
libxl: error: libxl_device.c:1420:device_addrm_aocomplete: unable to add device

Since I don't fully understand what that commit as a whole is
doing, and since the specific change in the sequence of operations
also isn't explained in the description (or at least not in a way
for me to recognize the connection), I'm afraid I can't see how a
possible solution to this could look like. The best guess I could
come up with so far is that the code quoted above may also need
moving down, but I can't tell at all whether doing this after the
various other intermediate steps wouldn't be too late. Your input
(or even better a patch) would be highly appreciated.

Thanks, Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.