[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 11/11] xen/arm: Process pending vPCI map/unmap operations
+ Paul (retaining full context for this reason) On 23.09.2021 14:54, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx> > > 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. > Run the corresponding vPCI code while switching a vCPU. > > Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx> > > --- > Since v1: > - Moved the check for pending vpci work from the common IOREQ code > to hvm_do_resume on x86 While perhaps obvious for Arm folks, I'd like to see the reason for this spelled out in the description. > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -549,6 +549,12 @@ void hvm_do_resume(struct vcpu *v) > if ( !vcpu_ioreq_handle_completion(v) ) > return; > > + if ( has_vpci(v->domain) && vpci_process_pending(v) ) > + { > + raise_softirq(SCHEDULE_SOFTIRQ); > + return; > + } Note that you're altering behavior here: Originally this was done ... > @@ -212,19 +210,12 @@ static bool wait_for_io(struct ioreq_vcpu *sv, ioreq_t > *p) > > bool vcpu_ioreq_handle_completion(struct vcpu *v) > { > - struct domain *d = v->domain; > struct vcpu_io *vio = &v->io; > struct ioreq_server *s; > struct ioreq_vcpu *sv; > enum vio_completion completion; > bool res = true; > > - if ( has_vpci(d) && vpci_process_pending(v) ) > - { > - raise_softirq(SCHEDULE_SOFTIRQ); > - return false; > - } ... first thing. And I think it wants (perhaps even needs) to remain that way; otherwise you'll need to explain why not, and why the change is correct / safe. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |