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

Re: [PATCH] xen/pciback: Make missing GSI non-fatal


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Thu, 27 Feb 2025 10:19:53 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=9nMM1yqvMNfokV5I8KePf2SbPLDoME1nwtdBMKk5wmY=; b=PieLisN/NNDvcRDyiaI0R0/ycosfX+9PM0GUooX2Jej/Cu1TBgTGg0N3BeHM2LFsbVWDhQBgTJT+jlXUWCKIAKGoMJK+5sf8FKaFsBItq67GqQb+CPBdwjGWDdMr+4htpEEzqXfJ9Xxy+wMqdo0cdMltugT4PQc+eOxr4lain9RC9foYC67D80Egfju/ZigDhqNVyzib8Z7rhJGaBODomxjluxLNl/kB4cxxN0wj7zD30mwN2ghLpn7hUG8TeVa7sP3O/aCiZL6+bV4kT9HcheT4F3+gyGDx3Sc0aLITzjf1KwIGuqezq5u88e2lcMJCgMoSwdWzAJ//ct/4TtVBzg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qk8QpzXceadSdA7o0cGWhnRaGArfecSppharQRXTHWTxm2dzUdGadpzRUHMYCxBzKVIelMJhnlJoNPWUcoiylYJ1FlTx6iZblwcnf7vlSUujYUBQzPsWs9/YWS6jmyBg/TvCbXK7PVm3JhNwzS66vx9pH3b+SjWTyeU1dkQDTGgBexba78MQWX3wDtJHlg0n2jXMT/laWlOgUYAUyewmiJFG1UXycfokORATebsCTvg+C9n6dHoRQFWyvUQY9S1MWPfH4DU+s8aDc6+MXssTMTyRMheUEas8lU1r7ZRINujJ3DDbQHqJAn7046g6v9bkiKvlnryylidhXMkmG2v8oQ==
  • Cc: <stable@xxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Jiqian Chen <Jiqian.Chen@xxxxxxx>, Huang Rui <ray.huang@xxxxxxx>
  • Delivery-date: Thu, 27 Feb 2025 15:32:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-02-27 03:23, Jan Beulich wrote:
On 26.02.2025 21:01, Jason Andryuk wrote:

--- a/drivers/xen/acpi.c
+++ b/drivers/xen/acpi.c
@@ -101,7 +101,7 @@ int xen_acpi_get_gsi_info(struct pci_dev *dev,
pin = dev->pin;
        if (!pin)
-               return -EINVAL;
+               return -ENOENT;
entry = acpi_pci_irq_lookup(dev, pin);
        if (entry) {

While I can understand this change, ...

@@ -116,7 +116,7 @@ int xen_acpi_get_gsi_info(struct pci_dev *dev,
                gsi = -1;
if (gsi < 0)
-               return -EINVAL;
+               return -ENOENT;
*gsi_out = gsi;
        *trigger_out = trigger;

... I'd expect this needs to keep using an error code other than ENOENT.
Aiui this path means the device has a pin-based interrupt, just that it's
not configured correctly. In which case we'd better not allow the device
to be handed to a guest. Unless there's logic in place (somewhere) to
make sure it then would get to see a device without pin-based interrupt.

This is actually the case that fails for me.

05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
        Interrupt: pin A routed to IRQ -2147483648

Interrupt Pin is 0x01, and Interrupt Line is 0xff

I'll have to check the existing code to see what it does.

Also, thanks for catching the commit message typos.

Regards,
Jason



 


Rackspace

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