On 18.11.2025 14:36, Mykyta Poturai wrote:
> From: Stefano Stabellini <[email protected]>
> 
> With Dom0 now being able to use a virtual bridge we need a way to
> distinguish Dom0 using HW bridghe from Dom0 using virtual bridge.
> Introduce a new macro has_vpci_bridge that would determine if a domain
> should be treated as using HW bridge (only Dom0 with pci-scan disabled)
> or as using a virtual one (all DomUs and Dom0 with pci-scan enabled)

Where does the connection of "pci-scan {en,dis}abled" with "kind of bridges
in use" come from? There is a connection for what you're trying to achieve
right now, but this doesn't want setting in stone now, to avoid making it
harder to decouple the two again later.

> --- a/xen/drivers/vpci/header.c
> +++ b/xen/drivers/vpci/header.c
> @@ -230,7 +230,7 @@ bool vpci_process_pending(struct vcpu *v)
>  
>              read_unlock(&v->domain->pci_lock);
>  
> -            if ( !is_hardware_domain(v->domain) )
> +            if ( has_vpci_bridge(v->domain) )
>                  domain_crash(v->domain);

At this example (applies more or less similarly elsewhere as well, and needs
answering separately for every instance), and effectively re-iterating a
point made previously: Why is it the kind of bridges that are used which
determines whether to call domain_crash() here?

Jan

Reply via email to