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

Re: [PATCH v2 4/4] vPCI/DomU: really no ext-caps without extended config space


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 29 Jan 2026 10:19:52 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • 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=Kuq4aZiaC0t9DHvOVIS3UuCmeuJl50jBYc3g9swdMco=; b=d56MwXJnWkT0cJou8y7es2+j7SUDauC+PBovqYGA8pOaiG+A6g82qgWROfpBOSo4y52fSuenjU4JHvoNJjRCUZ6wk+IDdi6jr2zLzzAM6rRo/+vdydbNBju8IOzZIj67LY3w5Bc5Tl06z0I6/46aJVCylpIDmr5/HwU++bpad8vYJU+OnS71ORzUclCcM2Zqawi6ve45QvcRoUWtuGNvQFjPeqtqSvm9xoKo8VwRFHYc1mcA7wEmgDiuAJtf67YIb77Zh9/2YXFVTilAEwiE4sXKUvsQ1VslHUSjtxySvEOMX8VJ8OT2nDXbcS5sfMkZtkkVUIeociN0mRVZrE8+XA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rHbdT3uxoQLhuqBipXQAS1VXMYdrb5vcrFPXzsIZ+XCjKlbTzvBWteqAwcf7DibQ/tWXXvD4cGS7HmPjoLuyHWq1DfNXpmsXhLETW/aqgOlEwTx0EItWljk63FV4eNmGCefTYYPW+X4ckvlkQcko0ynxJWrsyFwrj2rWZoew6TIcqz8hhCOGVvPh3btszy6t/uRkJ8WN7R3LKcuM9ZHNS5bd2UIMNbuwLzuzgQ/Z4QnU7VvZE6rR4yEdLfyU25ukuCu0lu0LPttoIgLirvGKAAR8xsWqZh+h3GHDGWdNQ0M8DhCNCvcebIcJycoZnqIfcnCa0MrZ46ILVwJSTL8g2A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Delivery-date: Thu, 29 Jan 2026 09:20:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Jan 19, 2026 at 03:48:01PM +0100, Jan Beulich wrote:
> 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().
> 
> Fixes: a845b50c12f3 ("vpci/header: Emulate extended capability list for dom0")
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> --- a/xen/drivers/vpci/header.c
> +++ b/xen/drivers/vpci/header.c
> @@ -830,9 +830,14 @@ static int vpci_init_ext_capability_list
>      unsigned int pos = PCI_CFG_SPACE_SIZE;
>  
>      if ( !is_hardware_domain(pdev->domain) )
> +    {
> +        if ( !pdev->ext_cfg )
> +            return 0;

Don't you want to possibly put this as a top-level check, so if
there's no extended config space we avoid doing the PCI_CFG_SPACE_SIZE
read for dom0 also?

Thanks, Roger.



 


Rackspace

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