[PATCH v1 8/8] arm/pci: enable vpci for hwdom when pci-scan is enabled

Mykyta Poturai posted 8 patches 1 week, 3 days ago
[PATCH v1 8/8] arm/pci: enable vpci for hwdom when pci-scan is enabled
Posted by Mykyta Poturai 1 week, 3 days ago
With pci-scan implemented it is now possible to use vpci for hardware
domains. Update has_vpci to reflrect this change.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
---
 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 af3e168374..dbe3347cea 100644
--- a/xen/arch/arm/include/asm/domain.h
+++ b/xen/arch/arm/include/asm/domain.h
@@ -305,8 +305,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_hardware_domain(d) && hwdom_uses_vpci())
 
 struct arch_vcpu_io {
     struct instr_details dabt_instr; /* when the instruction is decoded */
-- 
2.34.1
Re: [PATCH v1 8/8] arm/pci: enable vpci for hwdom when pci-scan is enabled
Posted by Yann Sionneau 1 week, 3 days ago
On 9/24/25 10:01, Mykyta Poturai wrote:
> With pci-scan implemented it is now possible to use vpci for hardware
> domains. Update has_vpci to reflrect this change.

Small typo in commit message "reflect".

> 
> Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
> ---
>   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 af3e168374..dbe3347cea 100644
> --- a/xen/arch/arm/include/asm/domain.h
> +++ b/xen/arch/arm/include/asm/domain.h
> @@ -305,8 +305,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_hardware_domain(d) && hwdom_uses_vpci())
>   
>   struct arch_vcpu_io {
>       struct instr_details dabt_instr; /* when the instruction is decoded */


-- 


--
Yann Sionneau | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech