|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] vPCI: really no ext-caps without extended config space
commit 873c3db6d2ea6d03a4f61b36d5a285514eac302a
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Feb 2 09:08:17 2026 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Feb 2 10:20:54 2026 +0100
vPCI: really no ext-caps without extended config space
For DomU-s, whether to emulate accesses to the first 32 bits of extended
config space as read-as-zero or read-as-all-ones depends on whether a
device actually has extended config space. If it doesn't, read-as-zero
isn't correct; not getting this right may confuse functions like Linux
6.19-rc's pci_ext_cfg_is_aliased().
For Dom0 this then simply allows dropping a later conditional.
Fixes: a845b50c12f3 ("vpci/header: Emulate extended capability list for
dom0")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/drivers/vpci/header.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c
index aae663bbf5..739a5f610e 100644
--- a/xen/drivers/vpci/header.c
+++ b/xen/drivers/vpci/header.c
@@ -829,6 +829,9 @@ static int vpci_init_ext_capability_list(const struct
pci_dev *pdev)
{
unsigned int pos = PCI_CFG_SPACE_SIZE;
+ if ( !pdev->ext_cfg )
+ return 0;
+
if ( !is_hardware_domain(pdev->domain) )
/* Extended capabilities read as zero, write ignore for DomU */
return vpci_add_register(pdev->vpci, vpci_read_val, NULL,
@@ -841,10 +844,9 @@ static int vpci_init_ext_capability_list(const struct
pci_dev *pdev)
if ( header == 0xffffffffU )
{
- if ( pos != PCI_CFG_SPACE_SIZE )
- printk(XENLOG_WARNING
- "%pd %pp: broken extended cap list, offset %#x\n",
- pdev->domain, &pdev->sbdf, pos);
+ printk(XENLOG_WARNING
+ "%pd %pp: broken extended cap list, offset %#x\n",
+ pdev->domain, &pdev->sbdf, pos);
return 0;
}
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |