[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v11 1/6] passthrough: don't migrate pirq when it is delivered through VT-d PI
>>> On 31.03.17 at 01:10, <chao.gao@xxxxxxxxx> wrote: > On Fri, Mar 31, 2017 at 01:28:02PM +0800, Tian, Kevin wrote: >>> From: Chao Gao >>> Sent: Wednesday, March 29, 2017 1:12 PM >>> --- a/xen/arch/x86/hvm/hvm.c >>> +++ b/xen/arch/x86/hvm/hvm.c >>> @@ -438,6 +438,9 @@ static int hvm_migrate_pirq(struct domain *d, struct >>> hvm_pirq_dpci *pirq_dpci, >>> struct vcpu *v = arg; >>> >>> if ( (pirq_dpci->flags & HVM_IRQ_DPCI_MACH_MSI) && >>> + (pirq_dpci->flags & HVM_IRQ_DPCI_GUEST_MSI) && >>> + /* Needn't migrate pirq if this pirq is delivered to guest >>> directly.*/ >>> + (!pirq_dpci->gmsi.posted) && >>> (pirq_dpci->gmsi.dest_vcpu_id == v->vcpu_id) ) >> >>simply looking at above change it's more than what you intend to change. >>Previously even w/o GUEST_MSI flag will fall into that path, but now >>you limit it to only GUEST_MSI and irq remapping (i.e. changed the >>behavior for both posted case and w/o GUEST_MSI case). I haven't looked >>whether MACH_MASI always set with GUEST_MSI, but my gut-feeling >>looks not correct here. > > Yes. It's a problem. I think the original code may be wrong for it acquires > gmsi.dest_vcpu_id without checking 'flags' of pirq_dpci. Do we need to migrate > pirq when its type is GUEST_PCI? It probably would be nice, but we don't know where to migrate it to: The names in "pirq_dpci->gmsi.dest_vcpu_id" should make this pretty clear, I would think. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |