Re: [PATCH 2/4] hwmon: Use subdir-ccflags-* to inherit debug flag

2021-02-05 Thread Bjorn Helgaas
ries. > > > > Suggested-by: Bjorn Helgaas > > Signed-off-by: Junhao He > > Signed-off-by: Yicong Yang > > What problem does this fix ? Maybe I am missing it, but I don't see > DEBUG being used in a subdirectory of drivers/hwmon. It's my fault for

Re: [PATCH] PCI: Rename d3_delay in the pci_dev struct to align with PCI specification

2020-09-29 Thread Bjorn Helgaas
On Thu, Jul 30, 2020 at 09:08:48PM +, Krzysztof WilczyƄski wrote: > Rename PCI-related variable "d3_delay" to "d3hot_delay" in the pci_dev > struct to better align with the PCI Firmware specification (see PCI > Firmware Specification, Revision 3.2, Section 4.6.9, p. 73). > > The pci_dev struct

Re: [PATCH] staging: atomisp: move null check to earlier point

2020-08-06 Thread Bjorn Helgaas
On Thu, Jul 30, 2020 at 11:45:45AM +0300, Dan Carpenter wrote: > On Wed, Jul 29, 2020 at 06:13:44PM +0300, Andy Shevchenko wrote: > > On Wed, Jul 29, 2020 at 5:00 PM Cengiz Can wrote: > > > > > > `find_gmin_subdev` function that returns a pointer to `struct > > > gmin_subdev` can return NULL. > >

Re: [PATCH v1 1/4] qlge/qlge_main.c: use genric power management

2020-06-29 Thread Bjorn Helgaas
Vaibhav: s/genric/generic/ in the subject On Tue, Jun 30, 2020 at 12:09:36AM +0800, kernel test robot wrote: > Hi Vaibhav, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on staging/staging-testing] > [also build test ERROR on v5.8-rc3 next-20200629] > [If your

Re: [PATCH v3 0/7] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-10-15 Thread Bjorn Helgaas
On Mon, Oct 14, 2019 at 06:00:09PM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Dexuan, the important thing here is the first patch, which is your [1], > which I modified by doing pci_restore_state() as well as setting to D0: > > pci_set_power_sta

[PATCH 7/7] PCI/MSI: Move power state check out of pci_msi_supported()

2019-10-14 Thread Bjorn Helgaas
From: Bjorn Helgaas 27e20603c54b ("PCI/MSI: Move D0 check into pci_msi_check_device()") moved the power state check into pci_msi_check_device(), which was subsequently renamed to pci_msi_supported(). This didn't change the behavior, since both callers checked the power stat

[PATCH 1/7] PCI/PM: Always return devices to D0 when thawing

2019-10-14 Thread Bjorn Helgaas
omment, add stable tag, commit log] Link: https://lore.kernel.org/r/ku1p153mb016637caead346f0aa8e3801bf...@ku1p153mb0166.apcp153.prod.outlook.com Signed-off-by: Dexuan Cui Signed-off-by: Bjorn Helgaas Cc: sta...@vger.kernel.org # v4.13+ --- drivers/pci/pci-driver.c | 17 +++-- 1 file

[PATCH 4/7] PCI/PM: Run resume fixups before disabling wakeup events

2019-10-14 Thread Bjorn Helgaas
From: Bjorn Helgaas pci_pm_resume() and pci_pm_restore() call pci_pm_default_resume(), which runs resume fixups before disabling wakeup events: static void pci_pm_default_resume(struct pci_dev *pci_dev) { pci_fixup_device(pci_fixup_resume, pci_dev); pci_enable_wake(pci_dev, PCI_D0

[PATCH 6/7] PCI/PM: Wrap long lines in documentation

2019-10-14 Thread Bjorn Helgaas
From: Bjorn Helgaas Documentation/power/pci.rst is wrapped to fit in 80 columns, but directory structure changes made a few lines longer. Wrap them so they all fit in 80 columns again. Signed-off-by: Bjorn Helgaas --- Documentation/power/pci.rst | 28 ++-- 1 file

[PATCH 5/7] PCI/PM: Make power management op coding style consistent

2019-10-14 Thread Bjorn Helgaas
From: Bjorn Helgaas Some of the power management ops use this style: struct device_driver *drv = dev->driver; if (drv && drv->pm && drv->pm->prepare(dev)) drv->pm->prepare(dev); while others use this: const struct dev_pm_ops *pm = dev->driver ? d

[PATCH 3/7] PCI/PM: Clear PCIe PME Status even for legacy power management

2019-10-14 Thread Bjorn Helgaas
From: Bjorn Helgaas Previously, pci_pm_resume_noirq() cleared the PME Status bit in the Root Status register only if the device had no driver or the driver did not implement legacy power management. It should clear PME Status regardless of what sort of power management the driver supports, so

[PATCH 2/7] PCI/PM: Correct pci_pm_thaw_noirq() documentation

2019-10-14 Thread Bjorn Helgaas
From: Bjorn Helgaas According to the documentation, pci_pm_thaw_noirq() did not put the device into the full-power state and restore its standard configuration registers. This is incorrect, so update the documentation to match the code. Signed-off-by: Bjorn Helgaas --- Documentation/power

[PATCH v3 0/7] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-10-14 Thread Bjorn Helgaas
From: Bjorn Helgaas Dexuan, the important thing here is the first patch, which is your [1], which I modified by doing pci_restore_state() as well as setting to D0: pci_set_power_state(pci_dev, PCI_D0); pci_restore_state(pci_dev); I'm proposing some more patches on top. None are rel

Re: [PATCH v2] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-10-08 Thread Bjorn Helgaas
On Tue, Oct 08, 2019 at 07:32:27PM +0200, Rafael J. Wysocki wrote: > On 10/7/2019 8:57 PM, Dexuan Cui wrote: > > > -Original Message- > > > From: Bjorn Helgaas > > > Sent: Monday, October 7, 2019 6:24 AM > > > To: Dexuan Cui > > > Cc: lore

Re: [PATCH v2] PCI: PM: Move to D0 before calling pci_legacy_resume_early()

2019-10-07 Thread Bjorn Helgaas
On Wed, Aug 14, 2019 at 01:06:55AM +, Dexuan Cui wrote: > > In pci_legacy_suspend_late(), the device state is moved to PCI_UNKNOWN. > > In pci_pm_thaw_noirq(), the state is supposed to be moved back to PCI_D0, > but the current code misses the pci_legacy_resume_early() path, so the > state re

Re: [PATCH RESEND v3 00/26] Add definition for the number of standard PCI BARs

2019-09-30 Thread Bjorn Helgaas
On Sat, Sep 28, 2019 at 02:40:26AM +0300, Denis Efremov wrote: > Code that iterates over all standard PCI BARs typically uses > PCI_STD_RESOURCE_END, but this is error-prone because it requires > "i <= PCI_STD_RESOURCE_END" rather than something like > "i < PCI_STD_NUM_BARS". We could add such a de

Re: [PATCH] PCI: PM: Also move to D0 before calling pci_legacy_resume_early()

2019-08-08 Thread Bjorn Helgaas
On Thu, Aug 08, 2019 at 06:46:51PM +, Dexuan Cui wrote: > > In pci_legacy_suspend_late(), the device state is moved to PCI_UNKNOWN. > In pci_pm_thaw_noirq(), the state is supposed to be moved back to PCI_D0, > but the current code misses the pci_legacy_resume_early() path, so the > state remai

Re: [PATCH v2] PCI: hv: Fix panic by calling hv_pci_remove_slots() earlier

2019-08-06 Thread Bjorn Helgaas
.@vger.kernel.org > --- > > Changes in v2: > Improved the changelog accordign to the discussion with Bjorn Helgaas: > https://lkml.org/lkml/2019/8/1/1173 > https://lkml.org/lkml/2019/8/2/1559 > > drivers/pci/controller/pci-hyperv.c | 2 +- > 1 file changed, 1 ins

Re: [PATCH] PCI: hv: Fix panic by calling hv_pci_remove_slots() earlier

2019-08-02 Thread Bjorn Helgaas
On Fri, Aug 02, 2019 at 08:31:26PM +, Dexuan Cui wrote: > > From: Bjorn Helgaas > > Sent: Friday, August 2, 2019 12:41 PM > > The subject line only describes the mechanical code change, which is > > obvious from the patch. It would be better if we could say something

Re: [PATCH] PCI: hv: Fix panic by calling hv_pci_remove_slots() earlier

2019-08-02 Thread Bjorn Helgaas
Hi Dexuan, The subject line only describes the mechanical code change, which is obvious from the patch. It would be better if we could say something about *why* we need this. On Fri, Aug 02, 2019 at 01:32:28AM +, Dexuan Cui wrote: > > When a slot is removed, the pci_dev must still exist. >

Re: [PATCH 3/3] PCI: hv: Use vPCI protocol version 1.2 for v4.9

2019-01-17 Thread Bjorn Helgaas
ff-by: Jork Loeser > Signed-off-by: Bjorn Helgaas I did not sign off on this; please remove. > Reviewed-by: K. Y. Srinivasan > Acked-by: K. Y. Srinivasan > Signed-off-by: Ajay Kaher > + * struct hv_msi_desc2 - 1.2 version of hv_msi_desc > + * @vector: IDT entry

Re: [PATCH 2/3] PCI: hv: Add vPCI version protocol negotiation

2019-01-17 Thread Bjorn Helgaas
On Fri, Jan 18, 2019 at 02:17:17AM +0530, Ajay Kaher wrote: > Hyper-V vPCI offers different protocol versions. Add the infra for > negotiating the one to use. > > Signed-off-by: Jork Loeser > Signed-off-by: Bjorn Helgaas I did not sign off on this, please remove. >

Re: [PATCH 1/3] PCI: hv: Allocate physically contiguous hypercall params buffer

2019-01-17 Thread Bjorn Helgaas
Reported-by: Haiyang Zhang > Signed-off-by: Long Li > Signed-off-by: Bjorn Helgaas I did not sign off on this; please remove this. Signed-off-by should only be added by the person mentioned. > Acked-by: K. Y. Srinivasan > Signed-off-by: Ajay Kaher > --- &

Re: [PATCH] PCI: hv: Fix a __local_bh_enable_ip warning in hv_compose_msi_msg()

2018-06-13 Thread Bjorn Helgaas
On Wed, Jun 13, 2018 at 08:32:13PM +, Dexuan Cui wrote: > > From: Dexuan Cui > > Sent: Wednesday, June 6, 2018 17:15 > > To: Haiyang Zhang ; Lorenzo Pieralisi > > ; Bjorn Helgaas ; > > linux-...@vger.kernel.org; KY Srinivasan ; Stephen > > Hemminger ; o.

Re: [PATCH v7] Revert "PCI: hv: Use device serial number as PCI domain"

2018-04-12 Thread Bjorn Helgaas
On Thu, Apr 12, 2018 at 10:17:42AM +0100, Lorenzo Pieralisi wrote: > On Thu, Apr 12, 2018 at 02:44:42AM +, Sridhar Pitchai wrote: > > When Linux runs as a guest VM in Hyper-V and Hyper-V adds the virtual PCI > > bus to the guest, Hyper-V always provides unique PCI domain. > > > > commit 4a9b09

Re: [PATCH v6] PCI: hv: Make sure the bus domain is really unique

2018-04-11 Thread Bjorn Helgaas
rial number as PCI domain") > Signed-off-by: Sridhar Pitchai > Cc: sta...@vger.kernel.org Regardless of what you do with the feedback above, Reviewed-by: Bjorn Helgaas Thanks a lot for persisting with this! > --- > Changes in v6: > * fix the commit comment. [Lorenzo Pieralisi

Re: [PATCH v5] PCI: hv: Make sure the bus domain is really unique

2018-03-30 Thread Bjorn Helgaas
3bdfc was flat-out buggy and should be reverted unconditionally. That would mean this patch should be applied to v4.11 and later stable kernels. But the changelog also says "only revert 4a9b0933bdfc if you have 0c195567a8f6". That would mean this patch should only be applied to v

Re: [PATCH v3]PCI: hv: fix PCI-BUS domainID corruption

2018-03-21 Thread Bjorn Helgaas
[I composed most of this before seeing Lorenzo's response, so sorry about the duplication. Maybe seeing things stated a different way will help :)] On Tue, Mar 20, 2018 at 11:00:36PM +, Sridhar Pitchai wrote: > Hi Lorenzo, >Transparent SRIOV is exposing the NIC directly to the kernel via

Re: [PATCH] PCI BUS domain ID corruption

2018-03-08 Thread Bjorn Helgaas
[+cc Lorenzo] On Thu, Mar 8, 2018 at 12:55 PM, Sridhar Pitchai wrote: > Hi, > > I would like to submit the following patch. This patch addresses the issue > when we try to add a VMBUS, the domain ID for the PCI bus is overwritten. Hi Sridhar, Thanks for the patch! This area is maintained by Lo

Re: PROBLEM: 4.15.0-rc3 APIC causes lockups on Core 2 Duo laptop

2017-12-28 Thread Bjorn Helgaas
On Thu, Dec 28, 2017 at 06:30:58PM -0500, Alexandru Chirvasitu wrote: > Attached, but heads up on this: when redirecting the output of lspci > -vvv to a text file as root I get > > pcilib: sysfs_read_vpd: read failed: Input/output error > > I can find bugs filed for various distros to this same e

Re: [PATCH] PCI: hv: use effective affinity mask

2017-11-10 Thread Bjorn Helgaas
L 7.3 > > Adrian Thanks, Adrian. I added this to the patch: Tested-by: Adrian Suhov > -Original Message- > From: Bjorn Helgaas [mailto:helg...@kernel.org] > Sent: Wednesday, November 8, 2017 3:08 AM > To: Dexuan Cui > Cc: Bjorn Helgaas ; linux-...@vger.kernel

Re: [PATCH] PCI: hv: use effective affinity mask

2017-11-07 Thread Bjorn Helgaas
On Wed, Nov 08, 2017 at 01:27:02AM +, Dexuan Cui wrote: > > From: Bjorn Helgaas [mailto:helg...@kernel.org] > > Sent: Tuesday, November 7, 2017 5:08 PM > > On Wed, Nov 01, 2017 at 08:30:53PM +, Dexuan Cui wrote: > > > > > > Please consider

Re: [PATCH] PCI: hv: use effective affinity mask

2017-11-07 Thread Bjorn Helgaas
On Wed, Nov 01, 2017 at 08:30:53PM +, Dexuan Cui wrote: > > The effective_affinity_mask is always set when an interrupt is assigned in > __assign_irq_vector() -> apic->cpu_mask_to_apicid(), e.g. for struct apic > apic_physflat: -> default_cpu_mask_to_apicid() -> > irq_data_update_effective_aff

Re: [PATCH] PCI: hv: use effective affinity mask

2017-11-07 Thread Bjorn Helgaas
On Wed, Nov 01, 2017 at 08:52:56PM +, Jake Oshins wrote: > > -Original Message- > > From: Dexuan Cui > > Sent: Wednesday, November 1, 2017 1:31 PM > > To: Bjorn Helgaas ; linux-...@vger.kernel.org; Jake > > Oshins ; KY Srinivasan ; >

Re: [patch 0/3] x86/PCI/MSI: Make sure that irq reservation mode works everywhere

2017-10-20 Thread Bjorn Helgaas
("x86/vector/msi: Switch to global reservation mode"), which I don't have, so I assume it's an x86 thing. So I guess you'll probably merge this via the same tree? Here's my ack for the PCI part: Acked-by: Bjorn Helgaas ___ dev

Re: [PATCH] pci: Fix a possible sleep-in-atomic bug in pci_set_power_state

2017-10-09 Thread Bjorn Helgaas
On Mon, Oct 09, 2017 at 12:15:17PM -0500, Bjorn Helgaas wrote: > [+cc Rafael, linux-pm] > > Hi Jia-Ju, > > On Mon, Oct 09, 2017 at 04:16:20PM +0800, Jia-Ju Bai wrote: > > The drivers vt6655 and gma500 call pci_set_power_state under a spinlock, > > which may sleep.

Re: [PATCH] pci: Fix a possible sleep-in-atomic bug in pci_set_power_state

2017-10-09 Thread Bjorn Helgaas
[+cc Rafael, linux-pm] Hi Jia-Ju, On Mon, Oct 09, 2017 at 04:16:20PM +0800, Jia-Ju Bai wrote: > The drivers vt6655 and gma500 call pci_set_power_state under a spinlock, > which may sleep. > The function call paths are: > gma_power_begin (acquire the spinlock) (drivers/gpu/drm/gma500/power.c) >

Re: [PATCH 08/15] PCI: make device_type const

2017-08-24 Thread Bjorn Helgaas
On Sat, Aug 19, 2017 at 01:52:19PM +0530, Bhumika Goyal wrote: > Make this const as it is only stored in the type field of a device > structure, which is const. > Done using Coccinelle. > > Signed-off-by: Bhumika Goyal Applied to pci/misc for v4.14, thanks! > --- > drivers/pci/endpoint/pci-epf

Re: [PATCH] hv: fix msi affinity when device requests all possible CPU's

2017-07-05 Thread Bjorn Helgaas
On Tue, Jul 04, 2017 at 02:59:42PM -0700, Stephen Hemminger wrote: > On Sun, 2 Jul 2017 16:38:19 -0500 > Bjorn Helgaas wrote: > > > On Wed, Jun 28, 2017 at 04:22:04PM -0700, Stephen Hemminger wrote: > > > When Intel 10G (ixgbevf) is passed to a Hyper-V guest with

Re: [PATCH] hv: fix msi affinity when device requests all possible CPU's

2017-07-02 Thread Bjorn Helgaas
On Wed, Jun 28, 2017 at 04:22:04PM -0700, Stephen Hemminger wrote: > When Intel 10G (ixgbevf) is passed to a Hyper-V guest with SR-IOV, > the driver requests affinity with all possible CPU's (0-239) even > those CPU's are not online (and will never be). Because of this the device > is unable to cor

Re: [PATCH] pci-hyperv: Use only 16 bit integer for PCI domain

2017-06-19 Thread Bjorn Helgaas
[+cc Christoph] On Wed, May 24, 2017 at 01:39:15PM -0700, Haiyang Zhang wrote: > From: Haiyang Zhang > > This patch uses the lower 16 bits of the serial number as PCI > domain, otherwise some drivers may not be able to handle it. > > Besides Nvidia drivers, we also found X.org, and DPDK handle

Re: [PATCH-v2 0/5] Hyper-V vPCI: use vPCI protocol version 1.2

2017-05-30 Thread Bjorn Helgaas
On Wed, May 24, 2017 at 01:41:23PM -0700, Jork Loeser wrote: > From: Jork Loeser > > Update the Hyper-V vPCI driver to use the Server-2016 version of the vPCI > protocol, fixing MSI creation and retargeting issues. > > Changes since v1: > - reduced spew in protocol negotiation (Dan Carpenter) >

Re: [PATCH-v2 0/5] Hyper-V vPCI: use vPCI protocol version 1.2

2017-05-30 Thread Bjorn Helgaas
On Wed, May 24, 2017 at 01:41:23PM -0700, Jork Loeser wrote: > From: Jork Loeser > > Update the Hyper-V vPCI driver to use the Server-2016 version of the vPCI > protocol, fixing MSI creation and retargeting issues. > > Changes since v1: > - reduced spew in protocol negotiation (Dan Carpenter) >

Re: [PATCH] pci-hyperv: Use only 16 bit integer for PCI domain

2017-04-20 Thread Bjorn Helgaas
On Thu, Apr 20, 2017 at 11:35 AM, Haiyang Zhang wrote: > From: Haiyang Zhang > > This patch uses the lower 16 bits of the serial number as PCI > domain, otherwise some drivers may not be able to handle it. Can you give any more details about this? Which drivers, for instance? Why do drivers ca

Re: [PATCH 17/29] drivers, pci: convert hv_pci_dev.refs from atomic_t to refcount_t

2017-04-18 Thread Bjorn Helgaas
On Tue, Apr 18, 2017 at 5:40 AM, Reshetova, Elena wrote: > > >> On Mon, 6 Mar 2017 15:38:29 -0600 >> Bjorn Helgaas wrote: >> >> > [+cc Hyper-V folks, -cc others] >> > >> > On Mon, Mar 06, 2017 at 04:21:04PM +0200, Elena Reshetova wrote: >

Re: [PATCH 0/2] pci-hyperv: Some miscellaneous fixes

2017-04-04 Thread Bjorn Helgaas
On Tue, Apr 04, 2017 at 07:54:33PM +, KY Srinivasan wrote: > > -Original Message- > > From: Bjorn Helgaas [mailto:helg...@kernel.org] > > Sent: Tuesday, April 4, 2017 12:04 PM > > To: KY Srinivasan > > Cc: linux-...@vger.kernel.org; linux-

Re: [PATCH 0/2] pci-hyperv: Some miscellaneous fixes

2017-04-04 Thread Bjorn Helgaas
On Fri, Mar 24, 2017 at 11:06:40AM -0700, k...@exchange.microsoft.com wrote: > From: K. Y. Srinivasan > > Some miscellaneous fixes. > > K. Y. Srinivasan (2): > pci-hyperv: Fix a bug in specifying CPU affinity > pci-hyperv: Fix an atomic bug > > drivers/pci/host/pci-hyperv.c | 13

Re: [PATCH 1/2 v5] pci-hyperv: properly handle pci bus remove

2017-03-24 Thread Bjorn Helgaas
On Thu, Mar 23, 2017 at 02:58:10PM -0700, Long Li wrote: > From: Long Li > > hv_pci_devices_present is called in hv_pci_remove when we remove a PCI > device from host (e.g. by disabling SRIOV on a device). In hv_pci_remove, > the bus is already removed before the call, so we don't need to rescan

Re: [PATCH 1/2 v4] pci-hyperv: properly handle pci bus remove

2017-03-16 Thread Bjorn Helgaas
On Tue, Feb 28, 2017 at 02:19:45AM +, Long Li wrote: > hv_pci_devices_present is called in hv_pci_remove when we remove a PCI > device from host (e.g. by disabling SRIOV on a device). In hv_pci_remove, > the bus is already removed before the call, so we don't need to rescan > the bus in the wo

Re: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init

2017-03-14 Thread Bjorn Helgaas
On Tue, Mar 14, 2017 at 11:50:50AM -0700, Jessica Frazelle wrote: > I can update the patch series, sorry haven't had much time to devote > to this the past few weeks, but will update in the next day. Thanks, Jessica! No problem, I know the feeling :) Bjorn ___

Re: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init

2017-03-07 Thread Bjorn Helgaas
On Thu, Feb 16, 2017 at 03:38:05PM +0100, Thomas Gleixner wrote: > On Thu, 16 Feb 2017, Bjorn Helgaas wrote: > > On Wed, Feb 15, 2017 at 10:16:32PM +0100, Thomas Gleixner wrote: > > > > > I think I suggested to Jiang to do that 'update with default functions' to

Re: [RFC PATCH v2 06/32] x86/pci: Use memremap when walking setup data

2017-03-06 Thread Bjorn Helgaas
On Fri, Mar 03, 2017 at 03:15:34PM -0600, Tom Lendacky wrote: > On 3/3/2017 2:42 PM, Bjorn Helgaas wrote: > >On Thu, Mar 02, 2017 at 10:13:10AM -0500, Brijesh Singh wrote: > >>From: Tom Lendacky > >> > >>The use of ioremap will force the setup data to be ma

Re: [PATCH 17/29] drivers, pci: convert hv_pci_dev.refs from atomic_t to refcount_t

2017-03-06 Thread Bjorn Helgaas
[+cc Hyper-V folks, -cc others] On Mon, Mar 06, 2017 at 04:21:04PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead t

Re: [RFC PATCH v2 06/32] x86/pci: Use memremap when walking setup data

2017-03-03 Thread Bjorn Helgaas
On Thu, Mar 02, 2017 at 10:13:10AM -0500, Brijesh Singh wrote: > From: Tom Lendacky > > The use of ioremap will force the setup data to be mapped decrypted even > though setup data is encrypted. Switch to using memremap which will be > able to perform the proper mapping. How should callers deci

Re: [RFC PATCH v2 00/32] x86: Secure Encrypted Virtualization (AMD)

2017-03-03 Thread Bjorn Helgaas
On Thu, Mar 02, 2017 at 10:12:01AM -0500, Brijesh Singh wrote: > This RFC series provides support for AMD's new Secure Encrypted Virtualization > (SEV) feature. This RFC is build upon Secure Memory Encryption (SME) RFCv4 > [1]. What kernel version is this series based on?

Re: [PATCH v1 0/3] PCI: Configure PCIe MPS settings

2017-02-24 Thread Bjorn Helgaas
On Fri, Feb 24, 2017 at 11:16:03AM +, Dexuan Cui wrote: > > From: devel [mailto:driverdev-devel..@...] On Behalf Of Bjorn Helgaas > > Sent: Saturday, February 11, 2017 06:00 > > ... > > On Wed, Feb 08, 2017 at 04:49:22PM -0600, Bjorn Helgaas wrote: > > > The PC

Re: [PATCH] pci-hyperv: Use device serial number as PCI domain

2017-02-17 Thread Bjorn Helgaas
On Mon, Feb 13, 2017 at 06:10:11PM +, Haiyang Zhang wrote: > > This allows PCI domain numbers starts with 1, and also unique > on the same VM. So names, such as VF NIC names, that include > domain number as part of the name, can be shorter than that > based on part of bus UUID previously. The

Re: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init

2017-02-16 Thread Bjorn Helgaas
On Wed, Feb 15, 2017 at 10:16:32PM +0100, Thomas Gleixner wrote: > I think I suggested to Jiang to do that 'update with default functions' to > > - avoid exporting the world and some more > > - have the flexibility to add new functions to the ops w/o updating a > gazillion of existing usage si

Re: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init

2017-02-15 Thread Bjorn Helgaas
[+cc Kees, Thomas, Marc] Hi Jess, Thanks for the patch! On Fri, Feb 10, 2017 at 05:37:56PM -0800, Jess Frazelle wrote: > Marked msi_domain_ops structs as __ro_after_init when called only during init. > This protects the data structure from accidental corruption. > > Suggested-by: Kees Cook > S

Re: [Resend PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2017-02-11 Thread Bjorn Helgaas
g/project/linux-pci/list/?submitter=69886&state=*&q=&archive=both&delegate= >> -Original Message- >> From: KY Srinivasan >> Sent: Friday, January 27, 2017 10:42 AM >> To: Long Li ; Haiyang Zhang >> ; Bjorn Helgaas >> Cc: de...@linuxdrive

Re: [PATCH v1 0/3] PCI: Configure PCIe MPS settings

2017-02-10 Thread Bjorn Helgaas
On Wed, Feb 08, 2017 at 04:49:22PM -0600, Bjorn Helgaas wrote: > [Some of you will get this twice because Gmail and I aren't getting along > today; sorry] > > The PCI core doesn't configure the PCIe MPS settings by itself. Each > host bridge driver has to call pcie_bu

Re: [PATCH v1 1/3] PCI: xilinx: Configure PCIe MPS settings

2017-02-10 Thread Bjorn Helgaas
On Wed, Feb 08, 2017 at 11:19:56PM -0800, Christoph Hellwig wrote: > On Wed, Feb 08, 2017 at 04:49:30PM -0600, Bjorn Helgaas wrote: > > + list_for_each_entry(child, &bus->children, node) > > + pcie_bus_configure_settings(child); > > This loop is duplicate

Re: [PATCH] PCI: hv: fix wslot_to_devfn()

2017-02-10 Thread Bjorn Helgaas
On Tue, Feb 07, 2017 at 09:00:10AM +, Dexuan Cui wrote: > The devfn of 00:02.0 is 0x10. > devfn_to_wslot(0x10) == 0x2, and wslot_to_devfn(0x2) should be 0x10, > while it's 0x2 in the current code. > > Due to this, hv_eject_device_work() -> pci_get_domain_bus_and_slot() > returns NULL and pci_s

[PATCH v1 2/3] PCI: versatile: Configure PCIe MPS settings

2017-02-08 Thread Bjorn Helgaas
From: Bjorn Helgaas Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: Jon Mason Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-versatile.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pci

[PATCH v1 3/3] PCI: xgene: Configure PCIe MPS settings

2017-02-08 Thread Bjorn Helgaas
From: Bjorn Helgaas Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: Jon Mason Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-xgene.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-xgene.c b

[PATCH v1 1/3] PCI: xilinx: Configure PCIe MPS settings

2017-02-08 Thread Bjorn Helgaas
From: Bjorn Helgaas Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: Jon Mason Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-xilinx.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-xilinx.c b

[PATCH v1 0/3] PCI: Configure PCIe MPS settings

2017-02-08 Thread Bjorn Helgaas
tern of calling pcie_bus_configure_settings(). So would it make sense to make a similar patch for HV? It looks easy to add it to create_root_hv_pci_bus(), but I don't know exactly what to do about pci_devices_present_work(). --- Bjorn Helgaas (3): PCI: xilinx: Configure PCIe MPS settings PCI: versa

[PATCH v1 3/3] PCI: xgene: Configure PCIe MPS settings

2017-02-08 Thread Bjorn Helgaas
Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: Jon Mason Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-xgene.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci

[PATCH v1 2/3] PCI: versatile: Configure PCIe MPS settings

2017-02-08 Thread Bjorn Helgaas
Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: Jon Mason Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-versatile.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-versatile.c b/drivers/pci/host

[PATCH v1 1/3] PCI: xilinx: Configure PCIe MPS settings

2017-02-08 Thread Bjorn Helgaas
Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: Jon Mason Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-xilinx.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie

[PATCH v1 0/3] PCI: Configure PCIe MPS settings

2017-02-08 Thread Bjorn Helgaas
add it to create_root_hv_pci_bus(), but I don't know exactly what to do about pci_devices_present_work(). --- Bjorn Helgaas (3): PCI: xilinx: Configure PCIe MPS settings PCI: versatile: Configure PCIe MPS settings PCI: xgene: Configure PCIe MPS settings drivers/pci/host/

Re: [PATCH] pci-hyperv: use kmalloc to allocate hypercall params buffer

2016-11-29 Thread Bjorn Helgaas
On Tue, Nov 08, 2016 at 02:04:38PM -0800, Long Li wrote: > From: Long Li > > hv_do_hypercall assumes that we pass a segment from a physically > continuous buffer. Buffer allocated on the stack may not work if > CONFIG_VMAP_STACK=y is set. > > Change to use kmalloc to allocate this buffer. > > T

Re: [PATCH] pci-hyperv: use kmalloc to allocate hypercall params buffer

2016-11-23 Thread Bjorn Helgaas
On Tue, Nov 08, 2016 at 02:04:38PM -0800, Long Li wrote: > From: Long Li > > hv_do_hypercall assumes that we pass a segment from a physically > continuous buffer. Buffer allocated on the stack may not work if > CONFIG_VMAP_STACK=y is set. > > Change to use kmalloc to allocate this buffer. > > T

Re: [PATCH 0/3] PCI: hv: clean-up and 2 fixes to the hot-remove case

2016-11-16 Thread Bjorn Helgaas
On Thu, Nov 10, 2016 at 07:16:22AM +, Dexuan Cui wrote: > PATCH 1 is just a clean-up. There should be no functional change. > > PATCH 2 and 3 are for device hot-remove case. > Currently the driver will stop working or even cause panic, if we do > hot add/remove quickly a few times. With the 2

Re: [PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2016-11-11 Thread Bjorn Helgaas
On Mon, Oct 03, 2016 at 11:42:47PM -0700, Long Li wrote: > From: Long Li > > hv_pci_devices_present is called in hv_pci_remove when we remove a PCI device > from host (e.g. by disabling SRIOV on a device). In hv_pci_remove, the bus is > already removed before the call, so we don't need to resca

Re: [PATCH] PCI: hv: Make unnecessarily global IRQ masking functions static

2016-10-31 Thread Bjorn Helgaas
On Mon, Oct 31, 2016 at 12:04:09PM +0100, Tobias Klauser wrote: > Make hv_irq_mask and hv_irq_unmask static as they are only used in > pci-hyperv.c > > This fixes a sparse warning. > > Signed-off-by: Tobias Klauser Applied with KY's ack to pci/host-hv for v4.10, thanks! > --- > drivers/pci/ho

Re: [PATCH 1/2 v2] pci-hyperv: properly handle pci bus remove

2016-09-27 Thread Bjorn Helgaas
On Wed, Sep 14, 2016 at 07:10:01PM -0700, Long Li wrote: > From: Long Li > > hv_pci_devices_present is called in hv_pci_remove when we remove a PCI device > from host (e.g. by disabling SRIOV on a device). In hv_pci_remove, the bus is > already removed before the call, so we don't need to resca

Re: [PATCH 0/5] PCI: hv: some minor bug fixes and cleanups

2016-09-06 Thread Bjorn Helgaas
On Tue, Aug 23, 2016 at 04:42:41AM +, Dexuan Cui wrote: > > 1. use zero-length array to make the code more readable. > 2. remove an unused struct member. > 3. small error handling improvement to some error cases. > > Dexuan Cui (5): > PCI: hv: use zero-length message in struct pci_packet >

Re: [PATCH 0/5] PCI: hv: some minor bug fixes and cleanups

2016-09-06 Thread Bjorn Helgaas
On Tue, Aug 23, 2016 at 04:42:41AM +, Dexuan Cui wrote: > > 1. use zero-length array to make the code more readable. > 2. remove an unused struct member. > 3. small error handling improvement to some error cases. > > Dexuan Cui (5): > PCI: hv: use zero-length message in struct pci_packet >

Re: [PATCH -next] PCI: hv: Use list_move_tail instead of list_del/list_add_tail

2016-08-22 Thread Bjorn Helgaas
On Thu, Jul 28, 2016 at 04:16:48PM +, Wei Yongjun wrote: > Using list_move_tail() instead of list_del() + list_add_tail(). > > Signed-off-by: Wei Yongjun Applied to pci/host-hv for v4.9, thanks! > --- > drivers/pci/host/pci-hyperv.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-)

Re: [PATCH] PCI: hv: Fix interrupt cleanup path

2016-07-25 Thread Bjorn Helgaas
On Tue, Jul 12, 2016 at 11:31:24AM -0400, Cathy Avery wrote: > SR-IOV disabled from the host causes a memory leak. > pci-hyperv usually first receives a PCI_EJECT notification > and then proceeds to delete the hpdev list entry in > hv_eject_device_work(). Later in hv_msi_free() since the > device i

Re: [PATCH 0/2] PCI: hv: fix a couple of issues in hv_pci_onchannelcallback()

2016-06-17 Thread Bjorn Helgaas
On Fri, Jun 10, 2016 at 06:53:36PM -0500, Bjorn Helgaas wrote: > On Mon, May 30, 2016 at 04:17:57PM +0200, Vitaly Kuznetsov wrote: > > kmemleak helped me to identify a memory leak in hv_pci_onchannelcallback() > > and while fixing it I stumbled upon an unrelated issue(s) there.

Re: [PATCH 0/2] PCI: hv: fix a couple of issues in hv_pci_onchannelcallback()

2016-06-10 Thread Bjorn Helgaas
On Mon, May 30, 2016 at 04:17:57PM +0200, Vitaly Kuznetsov wrote: > kmemleak helped me to identify a memory leak in hv_pci_onchannelcallback() > and while fixing it I stumbled upon an unrelated issue(s) there. > > Vitaly Kuznetsov (2): > PCI: hv: don't leak buffer in hv_pci_onchannelcallback() >

Re: [PATCH 0/2] PCI: hv: fix a couple of issues in hv_pci_onchannelcallback()

2016-06-10 Thread Bjorn Helgaas
On Fri, Jun 10, 2016 at 02:05:33PM +0200, Vitaly Kuznetsov wrote: > Vitaly Kuznetsov writes: > > > kmemleak helped me to identify a memory leak in hv_pci_onchannelcallback() > > and while fixing it I stumbled upon an unrelated issue(s) there. > > > > Vitaly Kuznetsov (2): > > PCI: hv: don't lea

Re: [PATCH [RFC]] PCI: hv: add explicit fencing to config space access

2016-05-04 Thread Bjorn Helgaas
On Tue, May 03, 2016 at 02:22:00PM +0200, Vitaly Kuznetsov wrote: > I'm trying to pass-through Broadcom BCM5720 NIC (Dell Device 1f5b) on Dell > R720 server. Everything works fine when target VM has only one CPU, but > SMP guests reboot when NIC driver is trying to access PCI config space > (with

Re: [PATCH] PCI: hv: report resources release after stopping the bus

2016-05-02 Thread Bjorn Helgaas
On Fri, Apr 29, 2016 at 11:39:10AM +0200, Vitaly Kuznetsov wrote: > Kernel hang is observed when pci-hyperv module is release with device > drivers still attached. E.g. when I do 'rmmod pci_hyperv' with BCM5720 > device pass-through-ed (tg3 module) I see the following: > > NMI watchdog: BUG: soft

Re: [PATCH v5 2/6] drivers:hv: Call vmbus_mmio_free() to reverse vmbus_mmio_allocate()

2016-04-21 Thread Bjorn Helgaas
elow, Acked-by: Bjorn Helgaas This is mostly non-PCI, so I assume somebody else will merge this series. > --- > drivers/hv/vmbus_drv.c | 15 +++ > drivers/pci/host/pci-hyperv.c | 14 +++--- > drivers/video/fbdev/hyperv_fb.c | 4 ++-- > include/linux/

Re: [PATCH v4 3/7] drivers:hv: Use new vmbus_mmio_free() from client drivers.

2016-04-05 Thread Bjorn Helgaas
gt; Signed-off-by: Jake Oshins I think this is the only change that touches PCI, so I assume this series will be merged by somebody else. Acked-by: Bjorn Helgaas > --- > drivers/pci/host/pci-hyperv.c | 14 +++--- > drivers/video/fbdev/hyperv_fb.c | 4 ++-- > 2 files cha

Re: [PATCH] PCI: Remove usage of pci_domain_nr when the PCI bus doesn't yet exist

2016-02-25 Thread Bjorn Helgaas
On Wed, Feb 24, 2016 at 06:56:36PM +, ja...@microsoft.com wrote: > From: Jake Oshins > > This patch fixes a race condition in this driver. Using the > function pci_domain_nr() only works if the PCI bus has already > been fully created. This patch just deletes one call site, > as it was in d

Re: [PATCH RESEND v3 0/3] PCI: hv: New paravirtual PCI front-end driver

2016-02-17 Thread Bjorn Helgaas
On Tue, Feb 16, 2016 at 09:56:20PM +, ja...@microsoft.com wrote: > From: Jake Oshins > > This version incorporates more feedback from Bjorn Helgaas. Most notably, > I removed some debugging code and I consistently used architectural > means for getting the PCI domain

Re: [PATCH RESEND v2 3/3] PCI: hv: New paravirtual PCI front-end for Hyper-V VMs

2016-02-16 Thread Bjorn Helgaas
On Tue, Feb 16, 2016 at 09:46:55PM +, Jake Oshins wrote: > > -Original Message- > > From: Bjorn Helgaas [mailto:helg...@kernel.org] > > Sent: Tuesday, February 16, 2016 8:46 AM > > To: Jake Oshins > > Cc: bhelg...@google.com; linux-...@vger.kernel.org;

Re: [PATCH RESEND v2 3/3] PCI: hv: New paravirtual PCI front-end for Hyper-V VMs

2016-02-16 Thread Bjorn Helgaas
Hi Jake, Looks good to me overall; I marked a few nits below. The only real question I have is about domain number allocation. See the note below. On Tue, Feb 09, 2016 at 07:24:28PM +, ja...@microsoft.com wrote: > From: Jake Oshins > > This patch introduces a new driver which exposes a ro

Re: [PATCH RESEND 3/3] PCI: hv: New paravirtual PCI front-end for Hyper-V VMs

2016-02-03 Thread Bjorn Helgaas
Hi Jake, On Tue, Feb 02, 2016 at 05:41:43PM +, ja...@microsoft.com wrote: > From: Jake Oshins > > This patch introduces a new driver which exposes a root PCI bus whenever a > PCI Express device is passed through to a guest VM under Hyper-V. The > device can be single- or multi-function. The

Re: [PATCH RESEND 1/3] PCI: Add fwnode_handle to pci_sysdata

2016-02-03 Thread Bjorn Helgaas
On Wed, Feb 03, 2016 at 06:32:20PM +, Jake Oshins wrote: > > -Original Message- > > From: Bjorn Helgaas [mailto:helg...@kernel.org] > > Sent: Wednesday, February 3, 2016 10:25 AM > > To: Jake Oshins > > Cc: gre...@linuxfoundation.org; KY Srinivasan ; lin

Re: [PATCH RESEND 1/3] PCI: Add fwnode_handle to pci_sysdata

2016-02-03 Thread Bjorn Helgaas
Hi Jake, On Tue, Feb 02, 2016 at 05:41:41PM +, ja...@microsoft.com wrote: > From: Jake Oshins > > This patch adds an fwnode_handle to struct pci_sysdata, which is > used by the next patch in the series when trying to locate an > IRQ domain associated with a root PCI bus. > > Signed-off-by:

Re: [PATCH v2 04/12] drivers:pci: Add IRQ domain lookup by PCI domain

2015-09-21 Thread Bjorn Helgaas
Hi Jake, I don't know how this will be morphed after Marc's comments, but when you repost this series, please take a look at the existing change history, e.g., with "git log --oneline drivers/pci/probe.c", and make your subject lines follow the existing conventions. In this case, they look like:

Re: [PATCH 0/25] Replace DEFINE_PCI_DEVICE_TABLE macro use

2014-07-21 Thread Bjorn Helgaas
[+cc Jingoo] On Fri, Jul 18, 2014 at 12:50 PM, James Bottomley wrote: > On Fri, 2014-07-18 at 11:17 -0700, Greg KH wrote: >> On Fri, Jul 18, 2014 at 09:54:32AM -0700, James Bottomley wrote: >> > On Fri, 2014-07-18 at 09:43 -0700, Greg KH wrote: >> > > On Fri, Jul 18, 2014 at 12:22:13PM -0400, Joh

Re: [PATCH 0/4] pci_ids, 8250_pci: remove PCI_VENDOR_ID_ADDIDATA_OLD

2013-07-19 Thread Bjorn Helgaas
drivers/staging/comedi/comedidev.h | 1 - > drivers/tty/serial/8250/8250_pci.c | 9 + > include/linux/pci_ids.h| 4 ++-- > 3 files changed, 7 insertions(+), 7 deletions(-) For patches 1 & 4 (the ones that touch pci_ids.h): Acked-by: Bjorn Helgaas Please merge them al