[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E959C4978C3B6342920538CF579893F002546B0D@SHSMSX104.ccr.corp.intel.com>
Date: Fri, 22 May 2015 01:02:42 +0000
From: "Wu, Feng" <feng.wu@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: "joro@...tes.org" <joro@...tes.org>,
"dwmw2@...radead.org" <dwmw2@...radead.org>,
"jiang.liu@...ux.intel.com" <jiang.liu@...ux.intel.com>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Wu, Feng" <feng.wu@...el.com>
Subject: RE: [v6 3/8] iommu, x86: Implement irq_set_vcpu_affinity for
intel_ir_chip
> -----Original Message-----
> From: Thomas Gleixner [mailto:tglx@...utronix.de]
> Sent: Thursday, May 21, 2015 6:48 PM
> To: Wu, Feng
> Cc: joro@...tes.org; dwmw2@...radead.org; jiang.liu@...ux.intel.com;
> iommu@...ts.linux-foundation.org; linux-kernel@...r.kernel.org
> Subject: Re: [v6 3/8] iommu, x86: Implement irq_set_vcpu_affinity for
> intel_ir_chip
>
> On Thu, 21 May 2015, Feng Wu wrote:
> > +static int intel_ir_set_vcpu_affinity(struct irq_data *data, void *vcpu_info)
> > +{
> > + struct intel_ir_data *ir_data = data->chip_data;
> > + struct irte *irte_pi = &ir_data->irte_pi_entry;
> > + struct vcpu_data *vcpu_pi_info;
> > +
> > + /* stop posting interrupts, back to remapping mode */
> > + if (!vcpu_info)
> > + modify_irte(&ir_data->irq_2_iommu, &ir_data->irte_entry);
> > + else {
>
> We add braces to both branches if one requires it.
>
> > + vcpu_pi_info = (struct vcpu_data *)vcpu_info;
> > + memcpy(irte_pi, &ir_data->irte_entry, sizeof(struct irte));
>
> This lacks a comment WHY you copy irte_entry to irte_pi_entry and WHY
> we have two seperate entries stored in ir_data.
"ir_data->irte_entry" saves the remapped format of IRTE, as you can see
from patch [4/8], it being a cached irte is still updated when setting the
affinity even when we are in posted mode. So this make it possible to switch
back to remapped mode from posted mode, we can just set "ir_data->irte_entry"
to hardware for that purpose. I will add the comments, thanks for the suggestion!
BTW, do you have any other comments/suggestions about this series?
Any comments are appreciated!
Thanks,
Feng
>
> Thanks,
>
> tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists