[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 2/6] vpci: fix deferral of long operations



>>> On 20.11.18 at 17:01, <roger.pau@xxxxxxxxxx> wrote:
> Current logic to handle long running operations is flawed because it
> doesn't prevent the guest vcpu from running. Fix this by raising a
> scheduler softirq when preemption is required, so that the do_softirq
> call in the guest entry path performs a rescheduling. Also move the
> call to vpci_process_pending into handle_hvm_io_completion, together
> with the IOREQ code that handles pending IO instructions.
> 
> Note that a scheduler softirq is also raised when the long running
> operation is queued in order to prevent the guest vcpu from resuming
> execution.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
with one remark:

> --- a/xen/drivers/vpci/header.c
> +++ b/xen/drivers/vpci/header.c
> @@ -184,6 +184,11 @@ static void defer_map(struct domain *d, struct pci_dev 
> *pdev,
>      curr->vpci.mem = mem;
>      curr->vpci.cmd = cmd;
>      curr->vpci.rom_only = rom_only;
> +    /*
> +     * Raise a scheduler softirq in order to prevent the guest from resuming
> +     * execution with pending mapping operations.

..., to trigger the invocation of vpci_process_pending().

If you don't mind I can add this (or something similar if you
dislike this wording) while committing.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.