[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/2] xen/vpci: allow unaligned accesses by the hardware domain
- To: Roger Pau Monne <roger@xxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
- Date: Mon, 10 Aug 2026 17:41:40 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.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=eycNA89dKo9QWALjfwVpOmoCniYD7R5v+ovAdxRCMFU=; b=FwZ56anSXG4WUDD0EEJo0H2+KgxjfZXd/QpyVNz6JCK/8ArR5DRL1ctvtBwkKJihW9rsMz604Ae3DYwacH058AChQATVVly57aotmmX1LJKlnlhrL+I9EfLVWgyvoaz1WBVmAAh8pdy04HIRt/QiXhvAMXw+xTMsg6UHp6w2Og3eJ1aE8NPuzVy5lhqcAfMJxNXFa5eIKkRjK1IHntD/P7fwRCML3mcEICa+yBi9Grx7mA909epBXxCa/vM/ss4fSnEsr+yAOODfOmoLlLMp7ZdXh5YhVsNqEp35m1rAgVxmhZyBwRaIboMuDTpTT6tMFEyGJABKGjGNIfN/9Y3WuA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jOeRiICe3BP3G+FrsYmqCglQP6oUN+t03VhmnVtkiuGhojVrOktgPumNCUyHT/u4XVJV+JSY4fQ8/I7LHCgPL6Koj4H3VEa617THlF3I53CTZZX3QkBMChBWNUqHRmPuKJ8bM9lyOjJh24Zua2Cfvyu63mKEL4ZWPE9zNrAFJbYAcHkahdgY9FyW39JGnVTGnJmKcEtWWDhYJsdt8p5vlCb9l/ACKMXuqbF7bhHq2Gt3ZuGwTY5V5JuMLqTrIEFEXh9h/yCrplRcQwqlhJM/wcW/eAmZQBiCgSK43RXrdaBIocXecHN0ObXq5ZDv10Q48Xg0HL7ssZthl0hXwTXJMQ==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>
- Delivery-date: Mon, 10 Aug 2026 15:41:54 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 8/6/26 17:26, Roger Pau Monne wrote:
> It's possible for domains to generate unaligned PCI config space accesses
> when using ECAM, and hence vPCI should support those at least for the
> hardware domain. Such unaligned accesses to the PCI config space have been
> reported to come from ACPI logic.
>
> Relax the checking in vpci_access_allowed() to allow such accesses for the
> hardware domain, and fix the handling in pci_conf_{read,write}{16,32}() to
> fulfill them using MMCFG.
>
> MMCFG regions are identity exposed to the hardware domain, and hence such
> unaligned accesses can only come as a result of the host having MMCFG in the
> first place, as otherwise MMCFG won't be exposed to the hardware domain
> either.
>
> Note that vpci_ecam_{read,write}() already refuse accesses that cross a
> device boundary unconditionally.
>
> Reported-by: Jason Andryuk <jason.andryuk@xxxxxxx>
> Signed-off-by: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
Reviewed-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
|