Re: [PATCH 1/1] x86/microcode: Check for offline CPUs before checking for microcode update

2021-03-20 Thread Raj, Ashok
On Sat, Mar 20, 2021 at 03:55:46PM +0100, Borislav Petkov wrote: [snip] > > microcode : 0x30 > > microcode : 0xde > > microcode : 0x30 > > microcode : 0xde > > Yeah, I'm looking at that check_online_cpus() thing and wondering why we > even need that: > > 0. So you have CPUs 1 and 3 offline. > 1.

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-17 Thread Raj, Ashok
On Wed, Mar 17, 2021 at 08:09:52PM +0100, Lukas Wunner wrote: > On Wed, Mar 17, 2021 at 10:45:21AM -0700, Dan Williams wrote: > > Ah, ok, we're missing a flush of the hotplug event handler after the > > link is up to make sure the hotplug handler does not see the Link Up. > > I'm not immediately

Re: [PATCH 2/5] iommu/vt-d: Remove WO permissions on second-level paging entries

2021-03-08 Thread Raj, Ashok
Hi Joerg On Mon, Mar 08, 2021 at 09:58:26AM +0800, Lu Baolu wrote: > Hi Joerg, > > On 3/4/21 8:26 PM, Joerg Roedel wrote: > >On Thu, Feb 25, 2021 at 02:26:51PM +0800, Lu Baolu wrote: > >>When the first level page table is used for IOVA translation, it only > >>supports Read-Only and Read-Write

Re: [PATCH 2/3] iommu/vt-d: Parse SATC reporting structure

2021-02-02 Thread Raj, Ashok
On Tue, Feb 02, 2021 at 12:40:56PM +0800, Lu Baolu wrote: > From: Yian Chen > > Software should parse every SATC table and all devices in the tables > reported by the BIOS and keep the information in kernel list for further > SATC policy deployment. > The last part seems bit vague? Are you

Re: [PATCH 1/3] iommu/vt-d: Add new enum value and structure for SATC

2021-02-02 Thread Raj, Ashok
On Tue, Feb 02, 2021 at 12:40:55PM +0800, Lu Baolu wrote: > From: Yian Chen > > Starting from Intel Platform VT-d v3.2, BIOS may provide new remapping > structure SATC for SOC integrated devices, according to section 8.8 of > Intel VT-d architecture specification v3.2. The SATC structure reports

Re: [Patch v2 1/1] PCI: pciehp: Add support for handling MRL events

2020-12-03 Thread Raj, Ashok
Hi Lukas and Bjorn On Sun, Nov 22, 2020 at 10:08:52AM +0100, Lukas Wunner wrote: > > @@ -275,6 +302,13 @@ void pciehp_handle_presence_or_link_change(struct > > controller *ctrl, u32 events) > > if (link_active) > > ctrl_info(ctrl, "Slot(%s): Link Up\n", > >

Re: [Patch v2 1/1] PCI: pciehp: Add support for handling MRL events

2020-11-25 Thread Raj, Ashok
Hi Lukas On Sun, Nov 22, 2020 at 10:08:52AM +0100, Lukas Wunner wrote: > On Sat, Nov 21, 2020 at 05:42:03PM -0800, Ashok Raj wrote: > > --- a/drivers/pci/hotplug/pciehp_ctrl.c > > +++ b/drivers/pci/hotplug/pciehp_ctrl.c > > void pciehp_handle_presence_or_link_change(struct controller *ctrl, u32

Re: [PATCH 1/1] pci: pciehp: Handle MRL interrupts to enable slot for hotplug.

2020-11-21 Thread Raj, Ashok
On Sat, Nov 21, 2020 at 12:10:50PM +0100, Lukas Wunner wrote: > > > > > + /* > > > > +* If ATTN is present and MRL is triggered > > > > +* ignore the Presence Change Event. > > > > +*/ > > > > + if (ATTN_BUTTN(ctrl) && (events & PCI_EXP_SLTSTA_MRLSC)) > > > > +

Re: [PATCH 1/1] pci: pciehp: Handle MRL interrupts to enable slot for hotplug.

2020-11-19 Thread Raj, Ashok
On Thu, Nov 19, 2020 at 04:27:41PM -0600, Bjorn Helgaas wrote: > Hi Ashok, > > When you update this patch, can you run "git log --oneline > drivers/pci/hotplug/pciehp*" and make yours match? It is a severe > character defect of mine, but seeing subject lines that are obviously :-) > different

Re: [PATCH 1/1] pci: pciehp: Handle MRL interrupts to enable slot for hotplug.

2020-11-19 Thread Raj, Ashok
On Thu, Nov 19, 2020 at 08:51:20AM +0100, Lukas Wunner wrote: > Hi Ashok, > > my sincere apologies for the delay. No worries.. > > On Fri, Sep 25, 2020 at 04:01:38PM -0700, Ashok Raj wrote: > > When Mechanical Retention Lock (MRL) is present, Linux doesn't process > > those change events. > >

Re: [PATCH][v2] x86/microcode/intel: check cpu stepping and processor flag before saving microcode

2020-11-16 Thread Raj, Ashok
Hi Boris On Mon, Nov 16, 2020 at 01:27:35PM +0100, Borislav Petkov wrote: > ( drop stable@ from Cc because this is not how fixes get added to stable@ ) Stable is still left below. with #v4.10+ Do you want to keep this? Also do you want him to resend or you have that covered? > > On Fri, Nov

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-15 Thread Raj, Ashok
On Sun, Nov 15, 2020 at 11:11:27PM +0100, Thomas Gleixner wrote: > On Sun, Nov 15 2020 at 11:31, Ashok Raj wrote: > > On Sun, Nov 15, 2020 at 12:26:22PM +0100, Thomas Gleixner wrote: > >> > opt-in by device or kernel? The way we are planning to support this is: > >> > > >> > Device support for IMS

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-15 Thread Raj, Ashok
On Sun, Nov 15, 2020 at 12:26:22PM +0100, Thomas Gleixner wrote: > On Sat, Nov 14 2020 at 13:18, Ashok Raj wrote: > > On Sat, Nov 14, 2020 at 10:34:30AM +, Christoph Hellwig wrote: > >> On Thu, Nov 12, 2020 at 11:42:46PM +0100, Thomas Gleixner wrote: > >> Which is why I really think we need

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-14 Thread Raj, Ashok
On Sat, Nov 14, 2020 at 10:34:30AM +, Christoph Hellwig wrote: > On Thu, Nov 12, 2020 at 11:42:46PM +0100, Thomas Gleixner wrote: > > DMI vendor name is pretty good final check when the bit is 0. The > > strings I'm aware of are: > > > > QEMU, Bochs, KVM, Xen, VMware, VMW, VMware Inc.,

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-13 Thread Raj, Ashok
On Fri, Nov 13, 2020 at 08:12:39AM -0800, Luck, Tony wrote: > > Of course is this not only an x86 problem. Every architecture which > > supports virtualization has the same issue. ARM(64) has no way to tell > > for sure whether the machine runs bare metal either. No idea about the > > other

Re: [PATCH][RFC] x86/microcode/intel: check cpu stepping and processor flag before saving microcode

2020-11-12 Thread Raj, Ashok
t; > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=208535 > Fixes: 06b8534cb728 ("x86/microcode: Rework microcode loading") > Suggested-by: "Raj, Ashok" > Cc: Borislav Petkov > Cc: Len Brown > Cc: "Rafael J. Wysocki" > Cc: "Raj, Ashok"

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-11 Thread Raj, Ashok
On Wed, Nov 11, 2020 at 11:27:28PM +0100, Thomas Gleixner wrote: > On Wed, Nov 11 2020 at 08:09, Ashok Raj wrote: > >> > We'd also need a way for an OS running on bare metal to *know* that > >> > it's on bare metal and can just compose MSI messages for itself. Since > >> > we do expect bare metal

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-11 Thread Raj, Ashok
On Wed, Nov 11, 2020 at 03:41:59PM +, Christoph Hellwig wrote: > On Sun, Nov 08, 2020 at 07:36:34PM +, David Woodhouse wrote: > > So it does look like we're going to need a hypercall interface to > > compose an MSI message on behalf of the guest, for IMS to use. In fact > > PCI devices

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-10 Thread Raj, Ashok
Hi David I did't follow the support for 32768 CPUs in guest without IR support. Can you tell me how that is done? On Sun, Nov 08, 2020 at 03:25:57PM -0800, Ashok Raj wrote: > On Sun, Nov 08, 2020 at 06:34:55PM +, David Woodhouse wrote: > > > > > > When we do interrupt remapping support in

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-10 Thread Raj, Ashok
Thomas, With all these interrupt message storms ;-), I'm missing how to move towards an end goal. On Tue, Nov 10, 2020 at 11:27:29AM +0100, Thomas Gleixner wrote: > Ashok, > > On Mon, Nov 09 2020 at 21:14, Ashok Raj wrote: > > On Mon, Nov 09, 2020 at 11:42:29PM +0100, Thomas Gleixner wrote: >

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-09 Thread Raj, Ashok
Hi Thomas, On Mon, Nov 09, 2020 at 11:42:29PM +0100, Thomas Gleixner wrote: > On Mon, Nov 09 2020 at 13:30, Jason Gunthorpe wrote: > > > > The relavance of PASID is this: > > > >> Again, trap emulate does not work for IMS when the IMS store is software > >> managed guest memory and not part of

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-09 Thread Raj, Ashok
On Mon, Nov 09, 2020 at 01:30:34PM -0400, Jason Gunthorpe wrote: > > > Again, trap emulate does not work for IMS when the IMS store is software > > managed guest memory and not part of the device. And that's the whole > > reason why we are discussing this. > > With PASID tagged interrupts and a

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-09 Thread Raj, Ashok
On Mon, Nov 09, 2020 at 03:08:17PM +0100, Thomas Gleixner wrote: > On Mon, Nov 09 2020 at 12:14, Thomas Gleixner wrote: > > On Sun, Nov 08 2020 at 15:58, Ashok Raj wrote: > >> On Sun, Nov 08, 2020 at 07:47:24PM +0100, Thomas Gleixner wrote: > >> But for SIOV devices there is no PASID filtering at

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-08 Thread Raj, Ashok
Hi Jason On Sun, Nov 08, 2020 at 07:41:42PM -0400, Jason Gunthorpe wrote: > On Sun, Nov 08, 2020 at 10:11:24AM -0800, Raj, Ashok wrote: > > > > On (kvm) virtualization the addr/data pair the IRQ domain hands out > > > doesn't work. It is some fake thing. > > >

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-08 Thread Raj, Ashok
Hi Thomas, [-] Jing, She isn't working at Intel anymore. Now this is getting compiled as a book :-).. Thanks a ton! One question on the hypercall case that isn't immediately clear to me. On Sun, Nov 08, 2020 at 07:47:24PM +0100, Thomas Gleixner wrote: > > > Now if we look at the

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-08 Thread Raj, Ashok
Hi Jason, On Sun, Nov 08, 2020 at 07:23:41PM -0400, Jason Gunthorpe wrote: > > IDXD is worring about case #4, I think, but I didn't follow in that > whole discussion about the IMS table layout if they PASID tag the IMS > MemWr or not?? Ashok can you clarify? > The PASID in the interrupt store

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-08 Thread Raj, Ashok
On Sun, Nov 08, 2020 at 06:34:55PM +, David Woodhouse wrote: > > > > When we do interrupt remapping support in guest which would be required > > if we support x2apic in guest, I think this is something we should look > > into more > > carefully to make this work. > > No, interrupt

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-08 Thread Raj, Ashok
Hi Jason Thanks, its now clear what you had mentioned earlier. I had couple questions/clarifications below. Thanks for working through this. On Fri, Nov 06, 2020 at 08:12:07PM -0400, Jason Gunthorpe wrote: > On Fri, Nov 06, 2020 at 03:47:00PM -0800, Dan Williams wrote: > > > Also feel free to

Re: [PATCH v4 06/17] PCI: add SIOV and IMS capability detection

2020-11-06 Thread Raj, Ashok
Hi Jason On Fri, Nov 06, 2020 at 09:14:15AM -0400, Jason Gunthorpe wrote: > On Fri, Nov 06, 2020 at 09:48:34AM +, Tian, Kevin wrote: > > > The interrupt controller is responsible to create an addr/data pair > > > for an interrupt message. It sets the message format and ensures it > > > routes

Re: [PATCH v4 00/17] Add VFIO mediated device support and DEV-MSI support for the idxd driver

2020-11-02 Thread Raj, Ashok
Hi Jason On Mon, Nov 02, 2020 at 09:20:36AM -0400, Jason Gunthorpe wrote: > > of IDXD for guest drivers. These look and feel like IDXD, not another > > device > > interface. In that sense if we move PF/VF mailboxes as > > separate drivers i thought it feels a bit odd. > > You need this split

Re: [PATCH v4 00/17] Add VFIO mediated device support and DEV-MSI support for the idxd driver

2020-10-31 Thread Raj, Ashok
Hi Thomas, On Sat, Oct 31, 2020 at 03:50:43AM +0100, Thomas Gleixner wrote: > Ashok, > > < skip a lot of non-sensical arguments> Ouch!.. Didn't mean to awaken you like this :-).. apologies.. profusely! > > Just because there is historical precendence which does not care about > the

Re: [PATCH v4 00/17] Add VFIO mediated device support and DEV-MSI support for the idxd driver

2020-10-30 Thread Raj, Ashok
On Fri, Oct 30, 2020 at 04:30:45PM -0300, Jason Gunthorpe wrote: > On Fri, Oct 30, 2020 at 12:23:25PM -0700, Raj, Ashok wrote: > > On Fri, Oct 30, 2020 at 04:17:06PM -0300, Jason Gunthorpe wrote: > > > On Fri, Oct 30, 2020 at 12:13:48PM -0700, Dave Jiang wrote: > > > &

Re: [PATCH v4 00/17] Add VFIO mediated device support and DEV-MSI support for the idxd driver

2020-10-30 Thread Raj, Ashok
On Fri, Oct 30, 2020 at 04:17:06PM -0300, Jason Gunthorpe wrote: > On Fri, Oct 30, 2020 at 12:13:48PM -0700, Dave Jiang wrote: > > > > > > On 10/30/2020 11:58 AM, Jason Gunthorpe wrote: > > > On Fri, Oct 30, 2020 at 11:50:47AM -0700, Dave Jiang wrote: > > > >

Re: [RFC PATCH 0/2] iommu: Avoid unnecessary PRI queue flushes

2020-10-19 Thread Raj, Ashok
Hi Jean On Mon, Oct 19, 2020 at 04:08:24PM +0200, Jean-Philippe Brucker wrote: > On Sat, Oct 17, 2020 at 04:25:25AM -0700, Raj, Ashok wrote: > > > For devices that *don't* use a stop marker, the PCIe spec says (10.4.1.2): > > > > > > To stop [using a PASID] witho

Re: [RFC PATCH 0/2] iommu: Avoid unnecessary PRI queue flushes

2020-10-17 Thread Raj, Ashok
Hi Jean On Fri, Oct 16, 2020 at 09:59:23AM +0200, Jean-Philippe Brucker wrote: > On Thu, Oct 15, 2020 at 11:22:11AM -0700, Raj, Ashok wrote: > > Hi Jean > > > > + Baolu who is looking into this. > > > > > > On Thu, Oct 15, 2020 at 11:00:27AM +0200,

Re: [PATCH 1/1] pci: pciehp: Handle MRL interrupts to enable slot for hotplug.

2020-10-16 Thread Raj, Ashok
Hi Bjorn On Fri, Sep 25, 2020 at 04:01:38PM -0700, Ashok Raj wrote: > When Mechanical Retention Lock (MRL) is present, Linux doesn't process > those change events. > > The following changes need to be enabled when MRL is present. > > 1. Subscribe to MRL change events in SlotControl. > 2. When

Re: [RFC PATCH 0/2] iommu: Avoid unnecessary PRI queue flushes

2020-10-15 Thread Raj, Ashok
Hi Jean + Baolu who is looking into this. On Thu, Oct 15, 2020 at 11:00:27AM +0200, Jean-Philippe Brucker wrote: > Add a parameter to iommu_sva_unbind_device() that tells the IOMMU driver > whether the PRI queue needs flushing. When looking at the PCIe spec > again I noticed that most of the

Re: [PATCH v5 1/2] PCI/ERR: Call pci_bus_reset() before calling ->slot_reset() callback

2020-10-13 Thread Raj, Ashok
On Tue, Oct 13, 2020 at 04:45:01PM -0700, Kuppuswamy Sathyanarayanan wrote: > Currently if report_error_detected() or report_mmio_enabled() > functions requests PCI_ERS_RESULT_NEED_RESET, current > pcie_do_recovery() implementation does not do the requested > explicit device reset, but instead

Re: [PATCH v4 1/2] PCI/ERR: Call pci_bus_reset() before calling ->slot_reset() callback

2020-10-12 Thread Raj, Ashok
On Sun, Oct 11, 2020 at 10:03:40PM -0700, sathyanarayanan.nkuppusw...@gmail.com wrote: > From: Kuppuswamy Sathyanarayanan > > Currently if report_error_detected() or report_mmio_enabled() > functions requests PCI_ERS_RESULT_NEED_RESET, current > pcie_do_recovery() implementation does not do the

Re: [PATCH v3 11/18] dmaengine: idxd: ims setup for the vdcm

2020-10-09 Thread Raj, Ashok
On Fri, Oct 09, 2020 at 10:12:18AM -0300, Jason Gunthorpe wrote: > On Fri, Oct 09, 2020 at 06:02:09AM -0700, Raj, Ashok wrote: > > On Fri, Oct 09, 2020 at 09:49:45AM -0300, Jason Gunthorpe wrote: > > > On Fri, Oct 09, 2020 at 05:43:07AM -0700, Raj, Ashok wrote: > > > &

Re: [PATCH v3 11/18] dmaengine: idxd: ims setup for the vdcm

2020-10-09 Thread Raj, Ashok
On Fri, Oct 09, 2020 at 09:49:45AM -0300, Jason Gunthorpe wrote: > On Fri, Oct 09, 2020 at 05:43:07AM -0700, Raj, Ashok wrote: > > On Fri, Oct 09, 2020 at 08:57:37AM -0300, Jason Gunthorpe wrote: > > > On Thu, Oct 08, 2020 at 06:22:31PM -0700, Raj, Ashok wrote: > > >

Re: [PATCH v3 11/18] dmaengine: idxd: ims setup for the vdcm

2020-10-09 Thread Raj, Ashok
On Fri, Oct 09, 2020 at 08:57:37AM -0300, Jason Gunthorpe wrote: > On Thu, Oct 08, 2020 at 06:22:31PM -0700, Raj, Ashok wrote: > > > Not randomly put there Jason :-).. There is a good reason for it. > > Sure the PASID value being associated with the IRQ make sense, but > co

Re: [PATCH v1 1/1] PCI/ERR: don't clobber status after reset_link()

2020-10-08 Thread Raj, Ashok
On Fri, Oct 09, 2020 at 03:52:51AM +0100, Hedi Berriche wrote: > Commit 6d2c89441571 ("PCI/ERR: Update error status after reset_link()") > changed pcie_do_recovery() so that status is updated with the return > value from reset_link(); this was to fix the problem where we would > wrongly report

Re: [PATCH v3 11/18] dmaengine: idxd: ims setup for the vdcm

2020-10-08 Thread Raj, Ashok
Hi Jason On Thu, Oct 08, 2020 at 08:32:10PM -0300, Jason Gunthorpe wrote: > On Fri, Oct 09, 2020 at 01:17:38AM +0200, Thomas Gleixner wrote: > > Dave, > > > > On Thu, Oct 08 2020 at 09:51, Dave Jiang wrote: > > > On 10/8/2020 12:39 AM, Thomas Gleixner wrote: > > >> On Wed, Oct 07 2020 at 14:54,

Re: [PATCH v7 0/5] Fix DPC hotplug race and enhance error handling

2020-10-03 Thread Raj, Ashok
Hi Ethan On Sat, Oct 03, 2020 at 03:55:09AM -0400, Ethan Zhao wrote: > Hi,folks, > > This simple patch set fixed some serious security issues found when DPC > error injection and NVMe SSD hotplug brute force test were doing -- race > condition between DPC handler and pciehp, AER interrupt

Re: [PATCH v3 05/18] dmaengine: idxd: add IMS support in base driver

2020-09-30 Thread Raj, Ashok
Hi Thomas, On Wed, Sep 30, 2020 at 11:57:22PM +0200, Thomas Gleixner wrote: > On Wed, Sep 30 2020 at 14:49, Ashok Raj wrote: > >> It is the weirdest thing, IMHO. Intel defined a dvsec cap in their > >> SIOV cookbook, but as far as I can see it serves no purpose at > >> all. > >> > >> Last time I

Re: [PATCH v3 05/18] dmaengine: idxd: add IMS support in base driver

2020-09-30 Thread Raj, Ashok
Hi Jason On Wed, Sep 30, 2020 at 03:51:03PM -0300, Jason Gunthorpe wrote: > On Wed, Sep 30, 2020 at 08:47:00PM +0200, Thomas Gleixner wrote: > > > > + pci_read_config_dword(pdev, SIOVCAP(dvsec), ); > > > + if ((val32 & 0x1) && idxd->hw.gen_cap.max_ims_mult) { > > > + idxd->ims_size =

Re: [PATCH v8 3/9] Documentation/x86: Add documentation for SVA (Shared Virtual Addressing)

2020-09-17 Thread Raj, Ashok
Hi Boris, On Thu, Sep 17, 2020 at 09:53:38AM +0200, Borislav Petkov wrote: > On Tue, Sep 15, 2020 at 09:30:07AM -0700, Fenghua Yu wrote: > > +Background > > +== > > + > > +Shared Virtual Addressing (SVA) allows the processor and device to use the > > +same virtual addresses avoiding the

Re: [PATCH v8 3/9] Documentation/x86: Add documentation for SVA (Shared Virtual Addressing)

2020-09-17 Thread Raj, Ashok
Thanks Boris. multiple "again" makes it funny again :-) On Thu, Sep 17, 2020 at 07:18:49PM +0200, Borislav Petkov wrote: > On Thu, Sep 17, 2020 at 07:56:09AM -0700, Raj, Ashok wrote: > > Just tweaked it a bit: > > > > "When ATS lookup fails for a vi

Re: [PATCH] intel-iommu: don't disable ATS for device without page aligned request

2020-09-09 Thread Raj, Ashok
Hi Jason On Wed, Sep 09, 2020 at 04:34:32PM +0800, Jason Wang wrote: > Commit 61363c1474b1 ("iommu/vt-d: Enable ATS only if the device uses > page aligned address.") disables ATS for device that can do unaligned > page request. Did you take a look at the PCI specification? Page Aligned Request

Re: [patch V2 00/46] x86, PCI, XEN, genirq ...: Prepare for device MSI

2020-09-03 Thread Raj, Ashok
Hi Thomas, Thanks a ton for jumping in helping on straightening it for IMS!!! On Wed, Aug 26, 2020 at 01:16:28PM +0200, Thomas Gleixner wrote: > This is the second version of providing a base to support device MSI (non > PCI based) and on top of that support for IMS (Interrupt Message Storm)

Re: [PATCH v2] x86/hotplug: Silence APIC only after all irq's are migrated

2020-08-25 Thread Raj, Ashok
Hi Thomas, On Wed, Aug 26, 2020 at 02:40:45AM +0200, Thomas Gleixner wrote: > Ashok, > > On Thu, Aug 20 2020 at 17:42, Ashok Raj wrote: > > When offlining CPUs, fixup_irqs() migrates all interrupts away from the > > outgoing CPU to an online CPU. It's always possible the device sent an > >

Re: [PATCH v2] x86/hotplug: Silence APIC only after all irq's are migrated

2020-08-23 Thread Raj, Ashok
Hi Thomas, I was wondering if you got a chance to take a look at this fix? I had some mail issues recently and they showed up at lore after 2 days. I wasn't sure if you got the original mail, or maybe it didn't make it. If you had a different way to fix it, we can try those out. On Thu, Aug

Re: [PATCH] x86/hotplug: Silence APIC only after all irq's are migrated

2020-08-20 Thread Raj, Ashok
On Thu, Aug 20, 2020 at 11:21:24AM -0700, Evan Green wrote: > > > > > > I'm slightly unclear about whether interrupts are disabled at the core > > > by this point or not. I followed native_cpu_disable() up to > > > __cpu_disable(), up to take_cpu_down(). This is passed into a call to > > >

Re: [PATCH] x86/hotplug: Silence APIC only after all irq's are migrated

2020-08-17 Thread Raj, Ashok
Hi Evan Some details below, On Mon, Aug 17, 2020 at 11:12:17AM -0700, Evan Green wrote: > Hi Ashok, > Thank you, Srikanth, and Sukumar for some very impressive debugging here. > > On Fri, Aug 14, 2020 at 2:38 PM Ashok Raj wrote: > > > > When offlining CPU's, fixup_irqs() migrates all

Re: [PATCH] x86/hotplug: Silence APIC only after all irq's are migrated

2020-08-15 Thread Raj, Ashok
Hi Randy, On Fri, Aug 14, 2020 at 04:25:32PM -0700, Randy Dunlap wrote: > On 8/14/20 2:38 PM, Ashok Raj wrote: > > When offlining CPU's, fixup_irqs() migrates all interrupts away from the > > CPUs, Thanks for catching these. I'll fix all these suggested changes in my next rev

Re: [PATCH] x86/hotplug: Silence APIC only after all irq's are migrated

2020-08-15 Thread Raj, Ashok
Hi Randy For some unknown reason my previous response said its taiting to be delivered. On Fri, Aug 14, 2020 at 04:25:32PM -0700, Randy Dunlap wrote: > On 8/14/20 2:38 PM, Ashok Raj wrote: > > When offlining CPU's, fixup_irqs() migrates all interrupts away from the > > CPUs,

Re: [PATCH v6 12/12] x86/traps: Fix up invalid PASID

2020-08-03 Thread Raj, Ashok
On Mon, Aug 03, 2020 at 08:12:18AM -0700, Andy Lutomirski wrote: > On Mon, Aug 3, 2020 at 8:03 AM Dave Hansen wrote: > > > > On 7/31/20 4:34 PM, Andy Lutomirski wrote: > > >> Thomas suggested to provide a reason for the #GP caused by executing > > >> ENQCMD > > >> without a valid PASID value

Re: [PATCH v3 1/1] PCI/ATS: Check PRI supported on the PF device when SRIOV is enabled

2020-07-28 Thread Raj, Ashok
Hi Sasha On Mon, Jul 27, 2020 at 09:24:35PM +, Sasha Levin wrote: > Hi > > [This is an automated email] > > This commit has been processed because it contains a "Fixes:" tag > fixing commit: b16d0cb9e2fc ("iommu/vt-d: Always enable PASID/PRI PCI > capabilities before ATS"). > > The bot

Re: [PATCH] PCI/ATS: PASID and PRI are only enumerated in PF devices.

2020-07-23 Thread Raj, Ashok
Hi Bjorn On Tue, Jul 21, 2020 at 09:54:01AM -0500, Bjorn Helgaas wrote: > On Mon, Jul 20, 2020 at 09:43:00AM -0700, Ashok Raj wrote: > > PASID and PRI capabilities are only enumerated in PF devices. VF devices > > do not enumerate these capabilites. IOMMU drivers also need to enumerate > > them

Re: [PATCH v4 4/4] PCI/ACS: Enable PCI_ACS_TB for untrusted/external-facing devices

2020-07-10 Thread Raj, Ashok
Hi Bjorn On Fri, Jul 10, 2020 at 03:29:22PM -0500, Bjorn Helgaas wrote: > On Tue, Jul 07, 2020 at 03:46:04PM -0700, Rajat Jain wrote: > > When enabling ACS, enable translation blocking for external facing ports > > and untrusted devices. > > > > Signed-off-by: Rajat Jain > > --- > > v4: Add

Re: [PATCH 3/4] pci: acs: Enable PCI_ACS_TB for untrusted/external-facing devices

2020-06-19 Thread Raj, Ashok
Hi Rajat On Mon, Jun 15, 2020 at 06:17:41PM -0700, Rajat Jain wrote: > When enabling ACS, currently the bit "translation blocking" was > not getting changed at all. Set it to disable translation blocking Maybe you meant "enable translation blocking" ? Keep the commit log simple: When enabling

Re: [PATCH 4/4] pci: export untrusted attribute in sysfs

2020-06-18 Thread Raj, Ashok
Hi Greg, On Thu, Jun 18, 2020 at 06:02:12PM +0200, Greg Kroah-Hartman wrote: > On Thu, Jun 18, 2020 at 08:03:49AM -0700, Rajat Jain wrote: > > Hello, > > > > On Thu, Jun 18, 2020 at 2:14 AM Andy Shevchenko > > wrote: > > > > > > On Thu, Jun 18, 2020 at 11:36 AM Greg Kroah-Hartman > > > wrote:

Re: [PATCH v2 00/15] vfio: expose virtual Shared Virtual Addressing to VMs

2020-06-16 Thread Raj, Ashok
On Tue, Jun 16, 2020 at 04:49:28PM +0100, Stefan Hajnoczi wrote: > On Tue, Jun 16, 2020 at 02:26:38AM +, Tian, Kevin wrote: > > > From: Stefan Hajnoczi > > > Sent: Monday, June 15, 2020 6:02 PM > > > > > > On Thu, Jun 11, 2020 at 05:15:19AM -0700, Liu Yi L wrote: > > > > Shared Virtual

Re: [PATCH v2 12/12] x86/traps: Fix up invalid PASID

2020-06-15 Thread Raj, Ashok
On Mon, Jun 15, 2020 at 06:03:57PM +0200, Peter Zijlstra wrote: > > I don't get why you need a rdmsr here, or why not having one would > require a TIF flag. Is that because this MSR is XSAVE/XRSTOR managed? > > > > > +*/ > > > > + rdmsrl(MSR_IA32_PASID, pasid_msr); > > > > +

Re: [PATCH v3] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-02 Thread Raj, Ashok
On Tue, Jun 02, 2020 at 04:26:02PM -0700, Rajat Jain wrote: > Currently, an external malicious PCI device can masquerade the VID:PID > of faulty gfx devices, and thus apply iommu quirks to effectively > disable the IOMMU restrictions for itself. > > Thus we need to ensure that the device we are

Re: [PATCH] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-02 Thread Raj, Ashok
On Tue, Jun 02, 2020 at 06:43:00PM +, Rajat Jain wrote: > Hi MIka, > > Thanks for taking a look. > > On Tue, Jun 2, 2020 at 2:50 AM Mika Westerberg > wrote: > > > > On Mon, Jun 01, 2020 at 10:45:17PM -0700, Rajat Jain wrote: > > > Currently, an external malicious PCI device can masquerade

Re: [PATCH v2] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-02 Thread Raj, Ashok
Hi Rajat On Tue, Jun 02, 2020 at 11:41:33AM -0700, Rajat Jain wrote: > Currently, an external malicious PCI device can masquerade the VID:PID > of faulty gfx devices, and thus apply iommu quirks to effectively > disable the IOMMU restrictions for itself. > > Thus we need to ensure that the

Re: [PATCH] PCI: Relax ACS requirement for Intel RCiEP devices.

2020-06-01 Thread Raj, Ashok
On Mon, Jun 01, 2020 at 04:25:19PM -0500, Bjorn Helgaas wrote: > On Thu, May 28, 2020 at 01:57:42PM -0700, Ashok Raj wrote: > > All Intel platforms guarantee that all root complex implementations > > must send transactions up to IOMMU for address translations. Hence for > > RCiEP devices that are

Re: [PATCH] PCI: Relax ACS requirement for Intel RCiEP devices.

2020-05-28 Thread Raj, Ashok
On Thu, May 28, 2020 at 03:38:26PM -0600, Alex Williamson wrote: > On Thu, 28 May 2020 13:57:42 -0700 > Ashok Raj wrote: > > > All Intel platforms guarantee that all root complex implementations > > must send transactions up to IOMMU for address translations. Hence for > > RCiEP devices that are

Re: [PATCH] iommu: Relax ACS requirement for Intel RCiEP devices.

2020-05-28 Thread Raj, Ashok
Hi Alex On Tue, May 26, 2020 at 05:07:15PM -0600, Alex Williamson wrote: > > --- > > drivers/iommu/iommu.c | 13 - > > 1 file changed, 12 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c > > index 2b471419e26c..31b595dfedde 100644 > >

Re: [PATCH] iommu: Relax ACS requirement for RCiEP devices.

2020-05-26 Thread Raj, Ashok
On Tue, May 26, 2020 at 12:26:54PM -0600, Alex Williamson wrote: > > > > > > I don't think the language in the spec is anything sufficient to handle > > > RCiEP uniquely. We've previously rejected kernel command line opt-outs > > > for ACS, and the extent to which those patches still float

Re: [PATCH] iommu: Relax ACS requirement for RCiEP devices.

2020-05-26 Thread Raj, Ashok
Hi Alex, I was able to find better language in the IOMMU spec that gaurantees the behavior we need. See below. On Tue, May 05, 2020 at 09:34:14AM -0600, Alex Williamson wrote: > On Tue, 5 May 2020 07:56:06 -0700 > "Raj, Ashok" wrote: > > > On Tue, May 05, 2020

Re: (a design open) RE: [PATCH v1 6/8] vfio/type1: Bind guest page tables to host

2020-05-15 Thread Raj, Ashok
evin > > > -Original Message- > > From: Liu, Yi L > > Sent: Sunday, March 22, 2020 8:32 PM > > To: alex.william...@redhat.com; eric.au...@redhat.com > > Cc: Tian, Kevin ; jacob.jun@linux.intel.com; > > j...@8bytes.org; Raj, Ashok ; Liu, Yi L > >

Re: MSI interrupt for xhci still lost on 5.6-rc6 after cpu hotplug

2020-05-11 Thread Raj, Ashok
Hi Thomas, On Fri, May 08, 2020 at 06:49:15PM +0200, Thomas Gleixner wrote: > Ashok, > > "Raj, Ashok" writes: > > With legacy MSI we can have these races and kernel is trying to do the > > song and dance, but we see this happening even when IR is turned on. &

Re: [PATCH RFC] Microcode late loading feature identification

2020-05-11 Thread Raj, Ashok
Hi Mihai Thanks for an attempt to find a fix. To solve this for real there are several other factors to consider and I'm afraid its not as simple as you have articulated here. There are lots of practical limitations that prevent us from solving this completely. But we haven't given up :-) In

Re: [PATCH RFC 00/15] Add VFIO mediated device support and IMS support for the idxd driver.

2020-05-08 Thread Raj, Ashok
Hi Jason On Fri, May 08, 2020 at 08:16:10PM -0300, Jason Gunthorpe wrote: > On Fri, May 08, 2020 at 01:47:10PM -0700, Raj, Ashok wrote: > > > Even when uaccel was under development, one of the options > > was to use VFIO as the transport, goal was the same i.e to keep > >

Re: [PATCH RFC 00/15] Add VFIO mediated device support and IMS support for the idxd driver.

2020-05-08 Thread Raj, Ashok
Hi Jason In general your idea of moving pure emulation code to user space is a good strategy. On Wed, Apr 29, 2020 at 02:42:20AM -0700, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Monday, April 27, 2020 9:22 PM > > > > On Mon, Apr 27, 2020 at 07:19:39AM -0600, Alex Williamson

Re: MSI interrupt for xhci still lost on 5.6-rc6 after cpu hotplug

2020-05-08 Thread Raj, Ashok
Hi Thomas, On Fri, May 08, 2020 at 01:04:29PM +0200, Thomas Gleixner wrote: > Ashok, > > "Raj, Ashok" writes: > >> But as this last one is the migration thread, aka stomp machine, I > >> assume this is a hotplug operation. Which means the CPU cannot handle

Re: MSI interrupt for xhci still lost on 5.6-rc6 after cpu hotplug

2020-05-07 Thread Raj, Ashok
Hi Thomas We did a bit more tracing and it looks like the IRR check is actually not happening on the right cpu. See below. On Tue, May 05, 2020 at 11:47:26PM +0200, Thomas Gleixner wrote: > > > > msi_set_affinit () > > { > > > > unlock_vector_lock(); > > > > /* > >

Re: MSI interrupt for xhci still lost on 5.6-rc6 after cpu hotplug

2020-05-05 Thread Raj, Ashok
On Tue, May 05, 2020 at 09:36:04PM +0200, Thomas Gleixner wrote: > Ashok, > > > > Now the second question with Interrupt Remapping Support: > > > > intel_ir_set_affinity->intel_ir_reconfigure_irte()-> modify_irte() > > > > The flush of Interrupt Entry Cache (IEC) should ensure, if any interrupts

Re: [PATCH] iommu: Relax ACS requirement for RCiEP devices.

2020-05-05 Thread Raj, Ashok
On Tue, May 05, 2020 at 08:05:14AM -0600, Alex Williamson wrote: > On Mon, 4 May 2020 23:11:07 -0700 > "Raj, Ashok" wrote: > > > Hi Alex > > > > + Joerg, accidently missed in the Cc. > > > > On Mon, May 04, 2020 at 11:19:36PM -0600, Alex Wil

Re: [PATCH] iommu: Relax ACS requirement for RCiEP devices.

2020-05-05 Thread Raj, Ashok
Hi Alex + Joerg, accidently missed in the Cc. On Mon, May 04, 2020 at 11:19:36PM -0600, Alex Williamson wrote: > On Mon, 4 May 2020 21:42:16 -0700 > Ashok Raj wrote: > > > PCIe Spec recommends we can relax ACS requirement for RCIEP devices. > > > > PCIe 5.0 Specification. > > 6.12 Access

Re: MSI interrupt for xhci still lost on 5.6-rc6 after cpu hotplug

2020-05-01 Thread Raj, Ashok
Hi Thomas Just started looking into it to get some idea about what could be going on. I had some questions, that would be helpful to clarify. On Tue, Mar 24, 2020 at 08:03:44PM +0100, Thomas Gleixner wrote: > Evan Green writes: > > On Mon, Mar 23, 2020 at 5:24 PM Thomas Gleixner wrote: > >>

Re: [PATCH v6 03/10] iommu/vt-d: Replace Intel specific PASID allocator with IOASID

2019-10-22 Thread Raj, Ashok
On Tue, Oct 22, 2019 at 04:53:16PM -0700, Jacob Pan wrote: > Make use of generic IOASID code to manage PASID allocation, > free, and lookup. Replace Intel specific code. > > Signed-off-by: Jacob Pan > --- > drivers/iommu/intel-iommu.c | 12 ++-- > drivers/iommu/intel-pasid.c | 36

Re: [PATCH v7 7/7] PCI: Skip Enhanced Allocation (EA) initialization for VF device

2019-10-03 Thread Raj, Ashok
On Thu, Oct 03, 2019 at 01:57:47PM -0500, Bjorn Helgaas wrote: > On Thu, Oct 03, 2019 at 10:21:24AM -0700, Kuppuswamy Sathyanarayanan wrote: > > Hi Bjorn, > > > > On 8/28/19 3:14 PM, sathyanarayanan.kuppusw...@linux.intel.com wrote: > > > From: Kuppuswamy Sathyanarayanan > > > > > > > > > As

Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged

2019-09-17 Thread Raj, Ashok
Hi Thomas, On Tue, Sep 17, 2019 at 08:37:10AM +0200, Thomas Gleixner wrote: > > microode updates should be of 3 types. > > > > - Only loadable from BIOS (Only via FIT tables) > > - Suitable for early load (things that take cpuid bits for e.g.) > > - Suitable for late-load. (Where no cpuid bits

Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged

2019-09-16 Thread Raj, Ashok
On Mon, Sep 16, 2019 at 12:36:11PM +0200, Thomas Gleixner wrote: > > On Fri, 6 Sep 2019, Raj, Ashok wrote: > > > On Fri, Sep 06, 2019 at 11:16:00PM +0200, Thomas Gleixner wrote: > > > > Now #1 is actually a sensible and feasible solution which can be pulled > >

Re: [RFC V1 0/7] Add support for a new IMS interrupt mechanism

2019-09-13 Thread Raj, Ashok
On Fri, Sep 13, 2019 at 07:50:50PM +, Jason Gunthorpe wrote: > On Thu, Sep 12, 2019 at 06:32:01PM -0700, Megha Dey wrote: > > > This series is a basic patchset to get the ball rolling and receive some > > inital comments. As per my discussion with Marc Zyngier and Thomas Gleixner > > at the

Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged

2019-09-06 Thread Raj, Ashok
On Fri, Sep 06, 2019 at 11:16:00PM +0200, Thomas Gleixner wrote: > > So if we want to do late microcode loading in a sane way then there are > only a few options and none of them exist today: > > 1) Micro-code contains a description of CPUID bits which are going to be > exposed after the

Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged

2019-09-06 Thread Raj, Ashok
Hi Thomas, On Fri, Sep 06, 2019 at 02:51:17PM +0200, Thomas Gleixner wrote: > Raj, > > On Thu, 5 Sep 2019, Raj, Ashok wrote: > > On Thu, Sep 05, 2019 at 11:22:31PM +0200, Thomas Gleixner wrote: > > > That's all nice, but what it the general use case for this o

Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged

2019-09-05 Thread Raj, Ashok
Hi Thomas, On Thu, Sep 05, 2019 at 11:22:31PM +0200, Thomas Gleixner wrote: > Raj, > > On Thu, 5 Sep 2019, Raj, Ashok wrote: > > On Thu, Sep 05, 2019 at 09:20:29AM +0200, Borislav Petkov wrote: > > > On Wed, Sep 04, 2019 at 05:21:32PM -0700, Raj, Ashok wrote: > >

Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged

2019-09-05 Thread Raj, Ashok
On Thu, Sep 05, 2019 at 09:49:50PM +0200, Borislav Petkov wrote: > On Thu, Sep 05, 2019 at 12:40:44PM -0700, Raj, Ashok wrote: > > The original description said to load a new microcode file, the content > > could have changed, but revision in the header hasn't increased. > >

Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged

2019-09-05 Thread Raj, Ashok
Hi Boris On Thu, Sep 05, 2019 at 09:20:29AM +0200, Borislav Petkov wrote: > On Wed, Sep 04, 2019 at 05:21:32PM -0700, Raj, Ashok wrote: > > But echo 2 > reload would allow reading a microcode file from > > /lib/firmware/intel-ucode/ even if the revision hasn't changed right

Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged

2019-09-04 Thread Raj, Ashok
On Thu, Sep 05, 2019 at 12:12:29AM +0200, Boris Petkov wrote: > On September 5, 2019 12:06:54 AM GMT+02:00, Boris Ostrovsky > wrote: > >Why do we need to taint kernel here? We are not making any changes. > > Because this is not a normal operation we want users to do. This is only for > testing

Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged

2019-08-29 Thread Raj, Ashok
On Thu, Aug 29, 2019 at 08:09:42AM +0200, Borislav Petkov wrote: > On Wed, Aug 28, 2019 at 10:33:22PM -0700, Ashok Raj wrote: > > During microcode development, its often required to test different versions > > of microcode. Intel microcode loader enforces loading only if the revision > > is > >

Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged

2019-08-28 Thread Raj, Ashok
Hi Boris, sorry i added the wrong message id in the commit log. https://lore.kernel.org/r/20190824085300.gb16...@zn.tnic/ On Wed, Aug 28, 2019 at 10:33:22PM -0700, Ashok Raj wrote: > During microcode development, its often required to test different versions > of microcode. Intel microcode

Re: [PATCH 1/2] x86/microcode: Update late microcode in parallel

2019-08-28 Thread Raj, Ashok
On Wed, Aug 28, 2019 at 09:13:31PM +0200, Borislav Petkov wrote: > On Tue, Aug 27, 2019 at 05:56:30PM -0700, Raj, Ashok wrote: > > > "Cloud customers have expressed discontent as services disappear for > > > a prolonged time. The restriction is that only one core

Re: [PATCH 1/2] x86/microcode: Update late microcode in parallel

2019-08-27 Thread Raj, Ashok
On Tue, Aug 27, 2019 at 02:25:01PM +0200, Borislav Petkov wrote: > On Mon, Aug 26, 2019 at 01:23:39PM -0700, Raj, Ashok wrote: > > > Cloud customers have expressed discontent as services disappear for a > > > prolonged time. The restriction is that only one core goes through t

Re: [PATCH 1/2] x86/microcode: Update late microcode in parallel

2019-08-26 Thread Raj, Ashok
On Mon, Aug 26, 2019 at 08:53:05AM -0400, Boris Ostrovsky wrote: > On 8/24/19 4:53 AM, Borislav Petkov wrote: > > > > +wait_for_siblings: > > + if (__wait_for_cpus(_cpus_out, NSEC_PER_SEC)) > > + panic("Timeout during microcode update!\n"); > > + > > /* > > -* Increase the

  1   2   3   >