Re: [PATCH v6 6/7] xen/arm: process pending vPCI map/unmap operations

2021-11-17 Thread Julien Grall

Hi Oleksandr,

On 05/11/2021 06:33, Oleksandr Andrushchenko wrote:

From: Oleksandr Andrushchenko 

vPCI may map and unmap PCI device memory (BARs) being passed through which
may take a lot of time. For this those operations may be deferred to be
performed later, so that they can be safely preempted.

Currently this deferred processing is happening in common IOREQ code
which doesn't seem to be the right place for x86 and is even more
doubtful because IOREQ may not be enabled for Arm at all.
So, for Arm the pending vPCI work may have no chance to be executed
if the processing is left as is in the common IOREQ code only.
For that reason make vPCI processing happen in arch specific code.

Please be aware that there are a few outstanding TODOs affecting this
code path, see xen/drivers/vpci/header.c:map_range and
xen/drivers/vpci/header.c:vpci_process_pending.

Signed-off-by: Oleksandr Andrushchenko 


Reviewed-by: Julien Grall 

Cheers,

--
Julien Grall



Re: [PATCH v6 6/7] xen/arm: process pending vPCI map/unmap operations

2021-11-05 Thread Jan Beulich
On 05.11.2021 07:33, Oleksandr Andrushchenko wrote:
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -546,6 +546,12 @@ void hvm_do_resume(struct vcpu *v)
>  
>  pt_restore_timer(v);
>  
> +if ( has_vpci(v->domain) && vpci_process_pending(v) )
> +{
> +raise_softirq(SCHEDULE_SOFTIRQ);
> +return;
> +}
> +
>  if ( !vcpu_ioreq_handle_completion(v) )
>  return;
>  

For this part of the change:
Acked-by: Jan Beulich 

Jan