|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v3 4/6] 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>
---
v3: Move code condition to top-level function scope. Eliminate a later
conditional in exchange.
--- a/xen/drivers/vpci/header.c
+++ b/xen/drivers/vpci/header.c
@@ -829,6 +829,9 @@ static int vpci_init_ext_capability_list
{
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
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;
}
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |