From: Bjorn Helgaas <helgaas@kernel.org>
To: Frediano Ziglio <frediano.ziglio@cloud.com>
Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, Juergen Gross <jgross@suse.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH] xen: Add support for XenServer 6.1 platform device
Date: Tue, 25 Feb 2025 11:50:44 -0600 [thread overview]
Message-ID: <20250225175044.GA511149@bhelgaas> (raw)
In-Reply-To: <20250225140400.23992-1-frediano.ziglio@cloud.com>
On Tue, Feb 25, 2025 at 02:03:53PM +0000, Frediano Ziglio wrote:
> On XenServer on Windows machine a platform device with ID 2 instead of
> 1 is used.
> This device is mainly identical to device 1 but due to some Windows
> update behaviour it was decided to use a device with a different ID.
> This causes compatibility issues with Linux which expects, if Xen
> is detected, to find a Xen platform device (5853:0001) otherwise code
> will crash due to some missing initialization (specifically grant
> tables).
> The device 2 is presented by Xapi adding device specification to
> Qemu command line.
Add blank lines between paragraphs.
A crash seems unfortunate. And it sounds like a user mistake, e.g., a
typo in the Qemu device specification, could also cause a crash?
If the crash is distinctive, a hint here like a dmesg line or two
might help users.
> Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
> ---
> drivers/xen/platform-pci.c | 2 ++
> include/linux/pci_ids.h | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
> index 544d3f9010b9..9cefc7d6bcba 100644
> --- a/drivers/xen/platform-pci.c
> +++ b/drivers/xen/platform-pci.c
> @@ -174,6 +174,8 @@ static int platform_pci_probe(struct pci_dev *pdev,
> static const struct pci_device_id platform_pci_tbl[] = {
> {PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM,
> PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
> + {PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM_XS61,
> + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
> {0,}
> };
>
> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
> index 1a2594a38199..e4791fd97ee0 100644
> --- a/include/linux/pci_ids.h
> +++ b/include/linux/pci_ids.h
> @@ -3241,6 +3241,7 @@
>
> #define PCI_VENDOR_ID_XEN 0x5853
> #define PCI_DEVICE_ID_XEN_PLATFORM 0x0001
> +#define PCI_DEVICE_ID_XEN_PLATFORM_XS61 0x0002
If this is the only place PCI_DEVICE_ID_XEN_PLATFORM_XS61 is used, we
would put this in platform-pci.c, per the pci_ids.h comment:
* Do not add new entries to this file unless the definitions
* are shared between multiple drivers.
> #define PCI_VENDOR_ID_OCZ 0x1b85
>
> --
> 2.48.1
>
next prev parent reply other threads:[~2025-02-25 17:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 14:03 [PATCH] xen: Add support for XenServer 6.1 platform device Frediano Ziglio
2025-02-25 17:50 ` Bjorn Helgaas [this message]
2025-02-27 14:50 ` [PATCH v2] " Frediano Ziglio
2025-02-27 15:29 ` Jürgen Groß
2025-02-27 15:41 ` Andrew Cooper
2025-02-28 12:12 ` Frediano Ziglio
2025-02-28 12:37 ` Roger Pau Monné
2025-03-07 11:14 ` Frediano Ziglio
2025-03-14 7:43 ` Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250225175044.GA511149@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=frediano.ziglio@cloud.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=oleksandr_tyshchenko@epam.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.