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

Re: [PATCH v1 5/5] vpci: allow 32-bit BAR writes with memory decoding enabled


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Wed, 11 Jun 2025 16:22:16 -0400
  • 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=x6goV5ciT4iqY09inpQbk3d2BuCrQk7keUKwVFCw0Gw=; b=L0MVjxfFnjblEg3mR621lq2i7W+URi2mGKxnSL1Fd3FBtWimNKagkRqtgoMju+XSM5mcVXJIJMMBZk1LWeBcWSV3X7mBCjveRsIkmjDdZvZ7XbIPdKKA+Zw/894D292B1y9ufq0B2pGXwx7j6IZ4U7f/n+BM23W9EcKcBE0Dudnddov4pN57TAhVsqdp2pvH32WrfW0XcDoY6C7zXbNU/zAybFhNhhPiW6ENs7YJh+ZdskQ4WkeMVQS77XINsMnE0P7h7m9Eq4uh70VuTUXTKo6Af0hepQMQXGush0lzLByHyAoHxMVle+6vgw7LSdIbP2q4HjVimnqrYw/ea1hqvA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IsTGn6PF2vs35LhqbQvkrQHuCC60o35NmnhwFaC0nHmzeqjmz4s78AHnUwugDjyVwrHbsZQjiIkGUHHIPP8AZb3pFkOgU38eN6ujYe4bMC4iF8N7LtbLjybJjALEHsaN0rdCENljOkIg89rEVsUft/V2RUeHOyJwD3Tr+P5pWmWa+5OfXa7aNfiSL3PN0axx3QexmSU7cpyb+cBvUF+fuypaVmyRnUsdBY342ec77jEg1Q2j0RdyWxdCTlDBKE2e2gqSGKTAyl3LBb/ia6GqqWbQWbTXN+KuB5tuCMkX7kSjuLby35blARlQDj0JLsb/EMR9/uBbEGXWkUwO5+QzOg==
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 11 Jun 2025 20:22:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 6/5/25 06:41, Jan Beulich wrote:
> On 31.05.2025 14:54, Stewart Hildebrand wrote:
>> Currently, Xen vPCI refuses BAR writes if the BAR is mapped in p2m. If
>> firmware initializes a 32-bit BAR to a bad address, Linux may try to
>> write a new address to the BAR without disabling memory decoding. Since
>> Xen refuses such writes, the BAR (and thus PCI device) will be
>> non-functional.
> 
> Doing this for 32-bit BARs only, with not even an outline what to do about
> the same issue with 64-bit ones, seems like it won't buy us very much.

It buys us quite a lot: it means the difference between booting vs.
booting with degraded functionality or not booting at all with PVH dom0
on some platforms with certain PCI devices plugged in.

The plan for 64-bit BARs for now is to continue to refuse the write(s)
when the 64-bit BAR is mapped to avoid mapping half-updated BARs in p2m.

I'll add something to this effect to the commit message.

Also see https://gitlab.com/xen-project/xen/-/issues/197



 


Rackspace

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