[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v17 1/2] xen/arm: translate virtual PCI bus topology for guests
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
- Date: Wed, 19 Mar 2025 17:00:25 -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 (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=3bgh4E+ItHHg/+K4yT0RvVp7gaPJ1C6RvwzeLly09b8=; b=qLVS2JB3bAYwOYfqsITG2FP4owwVs+ahp1nq2J57BK2qlOE8p9Ehe73NPlu4kUcoCDH6pd/b/UXVJZgBZTdP6kd3X86DdhqGUzZVxek1GXLrNU6orz6hplzxMrSovWxbuCcgwsxJ5h770QL3VfLxNJ9lf4UNi/IRjSu5FNlWpgDtiaYsskU6Vh/FzDlyFXom6xGFBi0uTyu5MnnpeTAQAcAk2k19L4Zd5jp6wwi7BEKWvvGfEqjgNLXJG/uBSHFU2SMvV+gFotmWEeACHwF1xuY0MroxTRm/mhzqd0nYEdbExEjnBHjAF5ryHEXfKHsb7qdKG2YYFMqXJneBk9ZVfA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YSzIhfbSjc0CWAQUbiu1r8mB/fSpFSayqN/pItKeimVsI+7DzYKuF/pm0ww+FAAgwmNZuGKH9f0d/6S2KsZRFlF6MKFzsoWdrz5SjhqsjVQ9B1J02SNhCZcouoaa04XdPn/EEbvpDaN1m0kq6y2bPN43vgrzUUv7W/h5J7NV20hXL9Lj1miqsyGoj/bPJLhC6fj/h8kUEFXYiM9Dnn6Lq/BwCMjO9HLA4thRN8LoZgEWIX9hmE1SgIDx5G8R84E/rC68PRzFT2ImGLRbzW2SNNo3b5L4PVDSsxdoI0QYyka4f4/BhKvk2vYqFzBOV8ZtFUDD31pEXgYIxdl11ZFixw==
- Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Bertrand Marquis" <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jiqian Chen <Jiqian.Chen@xxxxxxx>, Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
- Delivery-date: Wed, 19 Mar 2025 21:00:48 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 3/11/25 16:13, Stewart Hildebrand wrote:
> diff --git a/xen/include/xen/vpci.h b/xen/include/xen/vpci.h
> index 807401b2eaa2..e355329913ef 100644
> --- a/xen/include/xen/vpci.h
> +++ b/xen/include/xen/vpci.h
> @@ -311,6 +311,18 @@ static inline int __must_check vpci_reset_device(struct
> pci_dev *pdev)
> return vpci_assign_device(pdev);
> }
>
> +#ifdef CONFIG_HAS_VPCI_GUEST_SUPPORT
> +bool vpci_translate_virtual_device(struct domain *d, pci_sbdf_t *sbdf);
> +#else
> +static inline bool vpci_translate_virtual_device(struct domain *d,
> + pci_sbdf_t *sbdf)
> +{
> + ASSERT_UNREACHABLE();
Unfortunately this leads to a warning in the vpci test suite:
In file included from emul.h:88,
from vpci.c:18:
vpci.h: In function ‘vpci_translate_virtual_device’:
vpci.h:317:5: warning: implicit declaration of function ‘ASSERT_UNREACHABLE’
[-Wimplicit-function-declaration]
317 | ASSERT_UNREACHABLE();
| ^~~~~~~~~~~~~~~~~~
... which can be fixed by doing:
--- a/tools/tests/vpci/emul.h
+++ b/tools/tests/vpci/emul.h
@@ -85,6 +85,10 @@ typedef union {
} pci_sbdf_t;
#define CONFIG_HAS_VPCI
+
+#define BUG() assert(0)
+#define ASSERT_UNREACHABLE() assert(0)
+
#include "vpci.h"
#define __hwdom_init
@@ -112,9 +116,6 @@ typedef union {
#define PCI_CFG_SPACE_EXP_SIZE 4096
-#define BUG() assert(0)
-#define ASSERT_UNREACHABLE() assert(0)
-
#endif
/*
I'll send v18...
|