[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 0/2] vPCI capabilities filtering
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
- Date: Wed, 16 Aug 2023 14:50:27 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org 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
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=4PGoDvADY51VGKbLwJxx6+/FCUwpSHNVGhsNWRTkaIE=; b=Ac6jht2p1HzyAYWsk5zvED+9vIF42B58lOoLpoC7LxyqzwCw+6IaTBSL3oNXlaO8rYASNdTulozk+z2vC6zLbqkDkOamKFaYrXYfVNpJAEAGF7yN1bW72HjfkhYQO3YQtM/Prh8JJ5bJInTOtH9w6RmweD6n+9U6Athnxb0W6oCPPrIt4G1O6wD37BNaW3P1U05/y6Z54x6E4sSZjNKag8n+9zwAeTcpIu9c1v8NNKyIKgtJfOkSwKeYevdGdcoUiJjfuS8nxpzEZ5dvLWJxCNC7SQou/4PLNM16+3tB0NJHehjPIlNmzho9s/uNGOUVDSmEzNVSJPs9rYuzeKp7yA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aOKtxMNJCn38JdKW2M6F/rNBMRmczEXA/xR/SHtG/nBfICwPi/FUEDz3E/Ex78WICMhfrAN0rVuVdodTx9u3z3GBmnzPpdpNgXS/MjTUlEbxuzMWqDpoLtf/FGlBRCYk28+mRnNwMHtplmVEscrp5Ogxyh3QI9DOQKDyDOnIV74eXEosoi8Hj21EzRMDn8rEG5XD1xlxNAXa2QhrpiIw6aKp94HCQGX/espj9n+y+9vjbg52BcKEnlpYD3ag4ILqGFrqrURr6OwG2rBdO8549LKZUJtMsWoXXVqBz3lrMeXGUMhUUOM/z7yskPfddWviT3fl+UhC8fbAD043z6OxJg==
- Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Wed, 16 Aug 2023 18:51:21 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
This small series enables vPCI to filter which PCI capabilities we expose to a
domU. This series adds vPCI register handlers within
xen/drivers/vpci/header.c:init_bars(), along with some supporting functions.
Note there are minor rebase conflicts with the in-progress vPCI series [1].
These conflicts fall into the category of functions and code being added
adjacent to one another, so are easily resolved. I did not identify any
dependency on the vPCI locking work, and the two series deal with different
aspects of emulating the PCI header.
Future work may involve adding handlers for more registers in the vPCI header,
such as STATUS, VID/DID, etc. Future work may also involve exposing additional
capabilities to the guest for broader device/driver support.
v1->v2:
* squash helper functions into the patch where they are used to avoid transient
dead code situation
* add new RFC patch, possibly throwaway, to get an idea of what it would look
like to get rid of the (void *)(uintptr_t) cast by introducing a new memory
allocation
[1] https://lists.xenproject.org/archives/html/xen-devel/2023-07/msg01281.html
Stewart Hildebrand (2):
xen/vpci: header: filter PCI capabilities
[RFC] xen/vpci: header: avoid cast for value passed to vpci_read_val
xen/drivers/pci/pci.c | 18 +++++-----
xen/drivers/vpci/header.c | 73 +++++++++++++++++++++++++++++++++++++++
xen/drivers/vpci/vpci.c | 18 ++++++++++
xen/include/xen/pci.h | 3 +-
xen/include/xen/vpci.h | 8 +++++
5 files changed, 110 insertions(+), 10 deletions(-)
base-commit: d0eabe3eaf0db5b78843095a2918d50961e99e96
--
2.41.0
|