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

Re: [Xen-devel] [PATCH v11 1/2] vmx: VT-d posted-interrupt core logic handling




> -----Original Message-----
> From: George Dunlap [mailto:george.dunlap@xxxxxxxxxx]
> Sent: Wednesday, February 10, 2016 8:25 PM
> To: Wu, Feng <feng.wu@xxxxxxxxx>; Jan Beulich <JBeulich@xxxxxxxx>
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>; Dario Faggioli
> <dario.faggioli@xxxxxxxxxx>; George Dunlap <george.dunlap@xxxxxxxxxxxxx>;
> Tian, Kevin <kevin.tian@xxxxxxxxx>; xen-devel@xxxxxxxxxxxxx; Keir Fraser
> <keir@xxxxxxx>
> Subject: Re: [PATCH v11 1/2] vmx: VT-d posted-interrupt core logic handling
> 
> On 02/02/16 04:48, Wu, Feng wrote:
> >>>>> --- a/xen/drivers/passthrough/vtd/iommu.c
> >>>>> +++ b/xen/drivers/passthrough/vtd/iommu.c
> >>>>> @@ -2293,6 +2293,8 @@ static int reassign_device_ownership(
> >>>>>          pdev->domain = target;
> >>>>>      }
> >>>>>
> >>>>> +    vmx_pi_hooks_reassign(source, target);
> >>>>> +
> >>>>>      return ret;
> >>>>>  }
> >>>>
> >>>> I think you need to clear source's hooks here, but target's need to
> >>>> get set ahead of the actual assignment.
> >>>
> >>> I think this is the place where the device is moved from
> >>> &source->arch.pdev_list to &target->arch.pdev_list, if that is the
> >>> case, we should clear source and set target here, right?
> >>
> >> No - target needs to be ready to deal with events from the device
> >> _before_ the device actually gets assigned to it.
> >
> > I still don't get your point. I still think this is the place where the 
> > device
> > is being got assigned. Or maybe you can share more info about the
> > place "_before_ the device actually gets assigned to it " ?
> 
> What happens if a device generates a PI interrupt *immediately* after
> domain_context_mapping(), but before calling vmx_pi_hooks_reassign()?

Sorry for the late response due to holiday.

Good question. But I don't think that can happen, since we only support
MSI/MSIx for PI, and MSI/MSIx is configured by guests after assign_device()
gets called.

Thanks,
Feng

> 
>  -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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