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

[PATCH v1 2/2] xen/arm: Make has_vpci depend on CONFIG_HAS_VPCI


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Tue, 20 Jun 2023 11:29:21 -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=eG/NAeIcLSXOojnAynZKH1cfX+YLxTjSKfYEa0GZua8=; b=DQiL3LL8zYJW1nUo26nBaxCa3DaOK7a58wJr/uUoRWNX6Xb37QxlI2iooTo4FRFHXwxxdov2YaJtxWVJGuZXjAmQYYwmomo6Pcxkpl9HKK1mqGjCT1EaEvrE0dNTKBtuGtuuSDWT/jAMQt81HGr5egU4BxhBmURSDC5wTmzvFsYhwjOOgUADYy8eyor9A88UYIBlEOqxqq8wm8AG3AQANWjvmi2U1NK7zKACkeTt2SwUVGxUMah8dtMJmG4EsdXYadRU3P5lK+ti8IVnwau6lgx1uuUAlOH8n4SsSShbDrqq/ruwOJbHBQDaeTdshGruR+BeQXlfqibJp+cSdNwGdg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jrOe7Zu8Mz4y8cpDQq1xBIjsdFy9YrZcJuCKUcX5/nAjn8jUS5z62NlyCsmSwHssgZd8JiJf7FU+KLo79ZmfpghHq4iMLPRCmGLSHrLkwd/vWJhEzzCn+HYBygU8fBMICZph60sjTnwz4MZ7yTH78+rUmojFl9sh8BIRdw+efEmJ14XUQpxKZyH1sEskdW7DabC6XGG0R08Mv75yx9UA8oYgJzgRpLlErceHNZncTXGVhvnwMiRP7WjB5QAdug6GwNCXUspy8ArCQ008+Vl+f/w4BC2K6jEuDTgypLrVWw/GUebEHoNBKydAUuF8lteRmBVQ2VzOkGj1u0+6FBOSCQ==
  • Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Bertrand Marquis" <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Artem Mygaiev <artem_mygaiev@xxxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Delivery-date: Tue, 20 Jun 2023 15:30:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>

VPCI is disabled on ARM. Make it depend on CONFIG_HAS_VPCI to test the PCI
passthrough support.

While here, remove the comment on the preceding line.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
---
There are two downstreams [1] [2] that have independently made a version this
change, each with different Signed-off-by's. I simply picked one at random for
the Author: field, and added both Signed-off-by lines. Please let me know if
there are any objections.

downstream->v1:
* change to IS_ENABLED(CONFIG_HAS_VPCI) instead of hardcoded to true
* remove the comment on the preceding line

[1] 
https://gitlab.com/xen-project/people/bmarquis/xen-arm-poc/-/commit/27be1729ce8128dbe37275ce7946b2fbd2e5a382
[2] 
https://github.com/xen-troops/xen/commit/bf12185e6fb2e31db0d8e6ea9ccd8a02abadec17
---
 xen/arch/arm/include/asm/domain.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/arch/arm/include/asm/domain.h 
b/xen/arch/arm/include/asm/domain.h
index 99e798ffff68..6e016b00bae1 100644
--- a/xen/arch/arm/include/asm/domain.h
+++ b/xen/arch/arm/include/asm/domain.h
@@ -298,8 +298,7 @@ static inline void arch_vcpu_block(struct vcpu *v) {}
 
 #define arch_vm_assist_valid_mask(d) (1UL << VMASST_TYPE_runstate_update_flag)
 
-/* vPCI is not available on Arm */
-#define has_vpci(d)    ({ (void)(d); false; })
+#define has_vpci(d)    ({ (void)(d); IS_ENABLED(CONFIG_HAS_VPCI); })
 
 struct arch_vcpu_io {
     struct instr_details dabt_instr; /* when the instruction is decoded */
-- 
2.41.0




 


Rackspace

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