[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E959C4978C3B6342920538CF579893F002389312@SHSMSX104.ccr.corp.intel.com>
Date: Thu, 29 Jan 2015 07:55:24 +0000
From: "Wu, Feng" <feng.wu@...el.com>
To: David Woodhouse <dwmw2@...radead.org>
CC: "tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
"gleb@...nel.org" <gleb@...nel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"joro@...tes.org" <joro@...tes.org>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"jiang.liu@...ux.intel.com" <jiang.liu@...ux.intel.com>,
"eric.auger@...aro.org" <eric.auger@...aro.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"Wu, Feng" <feng.wu@...el.com>
Subject: RE: [v3 04/26] iommu, x86: Implement irq_set_vcpu_affinity for
intel_ir_chip
> -----Original Message-----
> From: David Woodhouse [mailto:dwmw2@...radead.org]
> Sent: Wednesday, January 28, 2015 11:27 PM
> To: Wu, Feng
> Cc: tglx@...utronix.de; mingo@...hat.com; hpa@...or.com; x86@...nel.org;
> gleb@...nel.org; pbonzini@...hat.com; joro@...tes.org;
> alex.williamson@...hat.com; jiang.liu@...ux.intel.com; eric.auger@...aro.org;
> linux-kernel@...r.kernel.org; iommu@...ts.linux-foundation.org;
> kvm@...r.kernel.org
> Subject: Re: [v3 04/26] iommu, x86: Implement irq_set_vcpu_affinity for
> intel_ir_chip
>
> On Fri, 2014-12-12 at 23:14 +0800, Feng Wu wrote:
> > Implement irq_set_vcpu_affinity for intel_ir_chip.
> >
> > Signed-off-by: Feng Wu <feng.wu@...el.com>
> > Reviewed-by: Jiang Liu <jiang.liu@...ux.intel.com>
>
> Acked-by: David.Woodhouse <David.Woodhouse@...el.com> assuming a
> suitable answer to...
>
> > + vcpu_pi_info = (struct vcpu_data *)vcpu_info;
> > + memcpy(irte_pi, &ir_data->irte_entry, sizeof(struct irte));
> > +
> > + irte_pi->urg = 0;
> > + irte_pi->vector = vcpu_pi_info->vector;
> > + irte_pi->pda_l = (vcpu_pi_info->pi_desc_addr >>
> > + (32 - PDA_LOW_BIT)) & ~(-1UL << PDA_LOW_BIT);
> > + irte_pi->pda_h = (vcpu_pi_info->pi_desc_addr >> 32) &
> > + ~(-1UL << PDA_HIGH_BIT);
> > +
> > + irte_pi->__reserved_1 = 0;
> > + irte_pi->__reserved_2 = 0;
> > + irte_pi->__reserved_3 = 0;
> > + irte_pi->__reserved_4 = 0;
>
> .... do we need a barrier here before we set this bit?
Thanks a lot for your Ack, David!
I cannot find a reason why we need a barrier here, since 'irte_pi' is only a local
variant here, the real operation to program hardware occurs in modify_irte(), in
which spin lock is acquired, this means the there is an implicit barrier there.
Thanks,
Feng
>
> > + irte_pi->pst = 1;
> > +
> > + modify_irte(&ir_data->irq_2_iommu, (struct irte *)irte_pi);
>
>
> --
> dwmw2
Powered by blists - more mailing lists