All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stewart Hildebrand <stewart.hildebrand@amd.com>
To: <xen-devel@lists.xenproject.org>
Cc: "Oleksandr Andrushchenko" <oleksandr_andrushchenko@epam.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Oleksandr Tyshchenko" <oleksandr_tyshchenko@epam.com>,
	"Artem Mygaiev" <artem_mygaiev@epam.com>,
	"Rahul Singh" <rahul.singh@arm.com>,
	"Stewart Hildebrand" <stewart.hildebrand@amd.com>
Subject: [PATCH v2 2/3] xen/arm: make has_vpci depend on CONFIG_HAS_VPCI
Date: Thu, 6 Jul 2023 21:47:49 -0400	[thread overview]
Message-ID: <20230707014754.51333-3-stewart.hildebrand@amd.com> (raw)
In-Reply-To: <20230707014754.51333-1-stewart.hildebrand@amd.com>

From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

VPCI is disabled on ARM. Make it depend on CONFIG_HAS_VPCI to test the PCI
passthrough support. Also make it depend on is_hardware_domain for now. The
is_hardware_domain check should be removed when vPCI is upstreamed.

While here, remove the comment on the preceding line.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Rahul Singh <rahul.singh@arm.com>
Signed-off-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
---
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.

v1->v2:
* add is_hardware_domain check. This will need to be removed after the vPCI
  series [3] is merged.

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
[3] https://lists.xenproject.org/archives/html/xen-devel/2023-06/msg00863.html
---
 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..1a13965a26b8 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) ({ IS_ENABLED(CONFIG_HAS_VPCI) && is_hardware_domain(d); })
 
 struct arch_vcpu_io {
     struct instr_details dabt_instr; /* when the instruction is decoded */
-- 
2.41.0



  parent reply	other threads:[~2023-07-07  1:49 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  1:47 [PATCH v2 0/3] Kconfig for PCI passthrough on ARM Stewart Hildebrand
2023-07-07  1:47 ` [PATCH v2 1/3] xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option Stewart Hildebrand
2023-07-07  6:55   ` Jan Beulich
2023-07-07  8:10     ` Julien Grall
2023-07-07  8:38   ` Julien Grall
2023-07-13 18:40   ` Julien Grall
2023-07-18 17:35     ` Stewart Hildebrand
2023-07-20  9:20       ` Julien Grall
2023-10-04 18:07         ` Stewart Hildebrand
2023-07-07  1:47 ` Stewart Hildebrand [this message]
2023-07-07  6:59   ` [PATCH v2 2/3] xen/arm: make has_vpci depend on CONFIG_HAS_VPCI Jan Beulich
2023-07-18 17:01     ` Stewart Hildebrand
2023-07-19  7:42       ` Jan Beulich
2023-07-07  8:55   ` Julien Grall
2023-10-09 19:11     ` Stewart Hildebrand
2023-07-07  1:47 ` [PATCH v2 3/3] [FUTURE] xen/arm: enable vPCI for domUs Stewart Hildebrand
2023-07-07  9:00   ` Julien Grall
2023-07-07 10:06     ` Roger Pau Monné
2023-07-07 10:33       ` Julien Grall
2023-07-07 10:47         ` Roger Pau Monné
2023-07-07 11:16           ` Julien Grall
2023-07-07 11:34             ` Roger Pau Monné
2023-07-07 12:09               ` Julien Grall
2023-07-07 13:13                 ` Roger Pau Monné
2023-07-07 13:27                   ` Julien Grall
2023-07-07 13:40                     ` Roger Pau Monné
2023-10-09 19:12     ` Stewart Hildebrand
2023-07-07 11:04   ` Rahul Singh
2023-07-21  4:54     ` Stewart Hildebrand
2023-07-21  8:41       ` Rahul Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230707014754.51333-3-stewart.hildebrand@amd.com \
    --to=stewart.hildebrand@amd.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=artem_mygaiev@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=julien@xen.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=rahul.singh@arm.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.