On Tue, May 21, 2024 at 10:21:52AM +0300, Mike Rapoport wrote:
>Hi,
>
>On Fri, May 10, 2024 at 02:04:22AM +0000, Wei Yang wrote:
>> When CONFIG_ARCH_KEEP_MEMBLOCK not set, we expect to discard related
>> code and data. But it doesn't until CONFIG_MEMORY_HOTPLUG not s
e and
data.
After this, from the log message in mem_init_print_info(), init size
increase from 2420K to 2432K on arch x86.
Signed-off-by: Wei Yang
---
v2: fix orphan section for powerpc
---
arch/powerpc/kernel/vmlinux.lds.S | 1 +
include/asm-generic/vmlinux.lds.h | 14 +-
include/linux/
ew Morton
>Cc: Oscar Salvador
>Cc: Baoquan He
>Cc: Wei Yang
>Signed-off-by: David Hildenbrand
Nice.
Reviewed-by: Wei Yang
--
Wei Yang
Help you, Help me
n cover multiple sections. Hence before a vmemmap
>mapping page can be freed, the kernel needs to make sure there are no valid
>sections
>within that mapping. Clearing the section valid bit before
>depopulate_section_memap enables this.
>
>Fixes: d41e2f3bd546 ("mm/hotplug: fix
On Tue, Mar 17, 2020 at 11:49:40AM +0100, David Hildenbrand wrote:
>All in-tree users except the mm-core are gone. Let's drop the export.
>
>Cc: Andrew Morton
>Cc: Michal Hocko
>Cc: Oscar Salvador
>Cc: "Rafael J. Wysocki"
>Cc: Baoquan He
>Cc: Wei
llerman
>Cc: Andrew Morton
>Cc: Greg Kroah-Hartman
>Cc: Michal Hocko
>Cc: Oscar Salvador
>Cc: "Rafael J. Wysocki"
>Cc: Baoquan He
>Cc: Wei Yang
>Cc: linuxppc-dev@lists.ozlabs.org
>Signed-off-by: David Hildenbrand
Looks good.
Reviewed-by: Wei Yang
>
On Wed, Mar 11, 2020 at 02:20:02PM +, Wei Yang wrote:
>On Wed, Mar 11, 2020 at 01:30:24PM +0100, David Hildenbrand wrote:
>>Let's use a simple array which we can reuse soon. While at it, move the
>>string->mmop conversion out of the device hotplug lock.
>>
&
/devices/systemn/memory/auto_online_blocks
>just like we are able to specify for a single memory block via
>/sys/devices/systemn/memory/memoryX/state
>
>Cc: Greg Kroah-Hartman
>Cc: Andrew Morton
>Cc: Michal Hocko
>Cc: Oscar Salvador
>Cc: "Rafael J. Wysocki"
"Rafael J. Wysocki"
>Cc: Baoquan He
>Cc: Wei Yang
>Cc: Benjamin Herrenschmidt
>Cc: Paul Mackerras
>Cc: Michael Ellerman
>Cc: "K. Y. Srinivasan"
>Cc: Haiyang Zhang
>Cc: Stephen Hemminger
>Cc: Wei Liu
>Cc: Thomas Gleixner
>Cc: linuxppc
scar Salvador
>Cc: "Rafael J. Wysocki"
>Cc: Baoquan He
>Cc: Wei Yang
>Signed-off-by: David Hildenbrand
>---
> drivers/base/memory.c | 38 +++---
> 1 file changed, 23 insertions(+), 15 deletions(-)
>
>diff --git a/drivers/base/
e default is now always MMOP_OFFLINE.
>
>This is a preparation to use the online_type as an array index.
>
>Cc: Greg Kroah-Hartman
>Cc: Andrew Morton
>Cc: Michal Hocko
>Cc: Oscar Salvador
>Cc: "Rafael J. Wysocki"
>Cc: Baoquan He
>Cc: Wei Yang
>S
orton
>Cc: Michal Hocko
>Cc: Oscar Salvador
>Cc: "Rafael J. Wysocki"
>Cc: Baoquan He
>Cc: Wei Yang
>Signed-off-by: David Hildenbrand
Reviewed-by: Wei Yang
>---
> drivers/base/memory.c | 9 +
> include/linux/memory_hotplug.h | 6 +-
> 2
On Thu, Feb 06, 2020 at 07:30:51AM +0800, Baoquan He wrote:
>On 02/06/20 at 07:26am, Wei Yang wrote:
>> On Thu, Feb 06, 2020 at 07:08:26AM +0800, Baoquan He wrote:
>> >On 02/06/20 at 06:56am, Wei Yang wrote:
>> >> On Wed, Feb 05, 2020 at 10:48:11PM +0800, Baoqua
On Thu, Feb 06, 2020 at 07:08:26AM +0800, Baoquan He wrote:
>On 02/06/20 at 06:56am, Wei Yang wrote:
>> On Wed, Feb 05, 2020 at 10:48:11PM +0800, Baoquan He wrote:
>> >Hi Wei Yang,
>> >
>> >On 02/05/20 at 05:59pm, Wei Yang wrote:
>> >> >dif
On Wed, Feb 05, 2020 at 10:48:11PM +0800, Baoquan He wrote:
>Hi Wei Yang,
>
>On 02/05/20 at 05:59pm, Wei Yang wrote:
>> >diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
>> >index f294918f7211..8dafa1ba8d9f 100644
>> >--- a/mm/memory_hotplug.c
>>
alvador
>Cc: Michal Hocko
>Cc: Pavel Tatashin
>Cc: Dan Williams
>Cc: Wei Yang
>Signed-off-by: David Hildenbrand
Finally understand the code.
Reviewed-by: Wei Yang
--
Wei Yang
Help you, Help me
On Sun, Oct 06, 2019 at 10:56:45AM +0200, David Hildenbrand wrote:
>Get rid of the unnecessary local variables.
>
>Cc: Andrew Morton
>Cc: Oscar Salvador
>Cc: David Hildenbrand
>Cc: Michal Hocko
>Cc: Pavel Tatashin
>Cc: Dan Williams
>Cc: Wei Yang
>Signed-off
hal Hocko
>Cc: David Hildenbrand
>Cc: Pavel Tatashin
>Cc: Dan Williams
>Cc: Wei Yang
>Signed-off-by: David Hildenbrand
>---
> mm/memory_hotplug.c | 34 +++---
> 1 file changed, 7 insertions(+), 27 deletions(-)
>
>diff --git a/mm/memory_
On Wed, Feb 05, 2020 at 09:59:41AM +0100, David Hildenbrand wrote:
>On 05.02.20 09:57, Wei Yang wrote:
>> On Sun, Oct 06, 2019 at 10:56:43AM +0200, David Hildenbrand wrote:
>>> With shrink_pgdat_span() out of the way, we now always have a valid
>>> zone.
>>>
On Sun, Oct 06, 2019 at 10:56:43AM +0200, David Hildenbrand wrote:
>With shrink_pgdat_span() out of the way, we now always have a valid
>zone.
>
>Cc: Andrew Morton
>Cc: Oscar Salvador
>Cc: David Hildenbrand
>Cc: Michal Hocko
>Cc: Pavel Tatashin
>Cc: Dan Williams
&g
;>> + end_block_id = block_id;
>>>> + for (block_id = start_block_id; block_id != end_block_id;
>>>> + block_id++) {
>>>> + mem = find_memory_block_by_id(block_id, NULL);
>>>> + mem->section_count = 0;
>>>> + unregister_memory(mem);
>>>> + }
>>>>}
>>>
>>> Would it be better to do this in reverse order?
>>>
>>> And unregister_memory() would free mem, so it is still necessary to set
>>> section_count to 0?
>>
>> 1. I kept the existing behavior (setting it to 0) for now. I am planning
>> to eventually remove the section count completely (it could be
>> beneficial to detect removing of partially populated memory blocks).
>
>Correction: We already use it to block offlining of partially populated
>memory blocks \o/
Would you mind letting me know where we leverage this?
>
>>
>> 2. Reverse order: We would have to start with "block_id - 1", I don't
>> like that better.
>>
>> Thanks for having a look!
>>
>
>
>--
>
>Thanks,
>
>David / dhildenb
--
Wei Yang
Help you, Help me
gt;Signed-off-by: David Hildenbrand
Reviewed-by: Wei Yang
>---
> include/linux/memory_hotplug.h | 2 +-
> mm/memory_hotplug.c| 2 +-
> mm/sparse.c| 4 ++--
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
>diff --git a/include/linux/memory_hotpl
n
>Cc: Chris Wilson
>Cc: David Hildenbrand
>Cc: Oscar Salvador
>Cc: Andrew Morton
>Cc: Jonathan Cameron
>Signed-off-by: David Hildenbrand
Reviewed-by: Wei Yang
>---
> drivers/base/node.c | 18 +-
> include/linux/node.h | 5 ++---
> 2 files chan
))
> return;
>
>- unregister_memory_section(ms);
>-
> scn_nr = __section_nr(ms);
> start_pfn = section_nr_to_pfn((unsigned long)scn_nr);
> __remove_zone(zone, start_pfn);
>@@ -1845,6 +1843,9 @@ void __ref __remove_memory(int nid, u64 start, u64 size)
> memblock_free(start, size);
> memblock_remove(start, size);
>
>+ /* remove memory block devices before removing memory */
>+ remove_memory_block_devices(start, size);
>+
> arch_remove_memory(nid, start, size, NULL);
> __release_memory_resource(start, size);
>
>--
>2.20.1
--
Wei Yang
Help you, Help me
On Mon, May 27, 2019 at 01:11:49PM +0200, David Hildenbrand wrote:
>No longer needed, the callers of arch_add_memory() can handle this
>manually.
>
>Cc: Andrew Morton
>Cc: David Hildenbrand
>Cc: Michal Hocko
>Cc: Oscar Salvador
>Cc: Pavel Tatashin
>Cc: Wei Yang
looks good to me besides two tiny comments.
>
>Cc: Greg Kroah-Hartman
>Cc: "Rafael J. Wysocki"
>Cc: David Hildenbrand
>Cc: "mike.tra...@hpe.com"
>Cc: Andrew Morton
>Cc: Ingo Molnar
>Cc: Andrew Banman
>Cc: Oscar Salvador
>Cc: Michal Hocko
&g
On Tue, Jun 04, 2019 at 08:59:43AM +0200, David Hildenbrand wrote:
>On 04.06.19 00:15, Wei Yang wrote:
>> Allow arch_remove_pages() or arch_remove_memory()?
>
>Looks like I merged __remove_pages() and arch_remove_memory().
>
>@Andrew, can you fix this up to
>
&g
t
>Cc: David Hildenbrand
>Cc: Oscar Salvador
>Cc: "Kirill A. Shutemov"
>Cc: Alex Deucher
>Cc: "David S. Miller"
>Cc: Mark Brown
>Cc: Chris Wilson
>Cc: Christophe Leroy
>Cc: Nicholas Piggin
>Cc: Vasily Gorbik
>Cc: Rob Herring
>Cc
ret = 0;
> struct memory_block *mem;
>
>@@ -717,7 +716,7 @@ int hotplug_memory_register(int nid, struct mem_section
>*section)
> mem->section_count++;
> put_device(&mem->dev);
> } else {
>- ret = init_memory_block(&mem, section, MEM_OFFLINE);
>+ ret = init_memory_block(&mem, block_id, MEM_OFFLINE);
> if (ret)
> goto out;
> mem->section_count++;
>--
>2.20.1
--
Wei Yang
Help you, Help me
| 2 -
> arch/x86/mm/init_32.c | 2 -
> arch/x86/mm/init_64.c | 2 -
> drivers/base/memory.c | 134 +++--
> drivers/base/node.c| 27 +++
> include/linux/memory.h | 6 +-
> include/linux/memory_hotplug.h | 12 +--
> include/linux/node.h | 7 +-
> mm/memory_hotplug.c| 44 +--
> mm/sparse.c| 10 +--
> 14 files changed, 140 insertions(+), 145 deletions(-)
>
>--
>2.20.1
--
Wei Yang
Help you, Help me
.
>+ */
>+ zone = page_zone(pfn_to_page(start_pfn));
Compared with arch_remove_memory in x86. If altmap is not NULL, zone will be
retrieved from page related to altmap. Not sure why this is not the same?
>+ __remove_pages(zone, start_pfn, nr_pages, altmap);
>+}
>+#endif
> #endif
>--
>2.20.1
--
Wei Yang
Help you, Help me
On Thu, May 09, 2019 at 04:58:56PM +0200, David Hildenbrand wrote:
>On 09.05.19 16:31, Wei Yang wrote:
>> On Tue, May 07, 2019 at 08:38:00PM +0200, David Hildenbrand wrote:
>>> Only memory to be added to the buddy and to be onlined/offlined by
>>> user space using memo
efore arch_add_memory() succeeded.
>
>Cc: Greg Kroah-Hartman
>Cc: "Rafael J. Wysocki"
>Cc: David Hildenbrand
>Cc: "mike.tra...@hpe.com"
>Cc: Andrew Morton
>Cc: Ingo Molnar
>Cc: Andrew Banman
>Cc: Oscar Salvador
>Cc: Michal Hocko
>Cc: Pavel
efore arch_add_memory() succeeded.
>
>Cc: Greg Kroah-Hartman
>Cc: "Rafael J. Wysocki"
>Cc: David Hildenbrand
>Cc: "mike.tra...@hpe.com"
>Cc: Andrew Morton
>Cc: Ingo Molnar
>Cc: Andrew Banman
>Cc: Oscar Salvador
>Cc: Michal Hocko
>Cc: Pavel
efore arch_add_memory() succeeded.
>
>Cc: Greg Kroah-Hartman
>Cc: "Rafael J. Wysocki"
>Cc: David Hildenbrand
>Cc: "mike.tra...@hpe.com"
>Cc: Andrew Morton
>Cc: Ingo Molnar
>Cc: Andrew Banman
>Cc: Oscar Salvador
>Cc: Michal Hocko
>Cc: Pavel
hal Hocko
>Cc: David Hildenbrand
>Cc: Pavel Tatashin
>Cc: Qian Cai
>Cc: Wei Yang
>Cc: Arun KS
>Cc: Mathieu Malaterre
>Signed-off-by: David Hildenbrand
Reviewed-by: Wei Yang
--
Wei Yang
Help you, Help me
e to keep it in here.
>
Yes, this make sense to me now.
>(and I think at least for now it makes sense to not squash patch 1 and
>2, to easier discuss the new user interface/concept introduced in this
>patch).
>
>Thanks!
>
>--
>
>Thanks,
>
>David / dhildenb
--
Wei Yang
Help you, Help me
block types. Turns out abstracting too much was
> rather confusing and not helpful. Properly document them.
>
>Notes:
>- I wanted to convert the enum of types into a named enum but this
> provoked all kinds of different errors. For now, I am doing it just like
> the other types (e.g. online_type) we are using in that context.
>- The "removable" property should never have been named like that. It
> should have been "offlinable". Can we still rename that? E.g. boot memory
> is sometimes marked as removable ...
>
This make sense to me. Remove usually describe physical hotplug phase,
if I am correct.
--
Wei Yang
Help you, Help me
t;Cc: Michal Hocko
>Cc: Dan Williams
>Cc: "Kirill A. Shutemov"
>Cc: Oscar Salvador
>Cc: Nicholas Piggin
>Cc: Stephen Rothwell
>Cc: Christophe Leroy
>Cc: "Jonathan Neusch??fer"
>Cc: Mauricio Faria de Oliveira
>Cc: Vasily Gorbik
>Cc: Arun KS
:
>+ * The type of memory block was not further specified when adding the
>+ * memory block.
>+ *
>+ * MEMORY_BLOCK_BOOT:
>+ * This memory block was added during boot by the basic system. No
>+ * specific device driver takes care of this memory block. This memory
>+ * block type is onlined automatically by the kernel during boot and might
>+ * later be managed by a different device driver, in which case the type
>+ * might change.
>+ */
>+enum {
>+ MEMORY_BLOCK_NONE = 0,
>+ MEMORY_BLOCK_UNSPECIFIED,
>+ MEMORY_BLOCK_BOOT,
>+};
>+
> /* These states are exposed to userspace as text strings in sysfs */
> #define MEM_ONLINE (1<<0) /* exposed to userspace */
> #define MEM_GOING_OFFLINE (1<<1) /* exposed to userspace */
>--
>2.17.2
--
Wei Yang
Help you, Help me
AVE_ARCH_SECCOMP_FILTER for an example.)
>
One question about this change.
The original code would "select" HAVE_ARCH_FREE_INITRD_MEM on those arch.
After this change, we need to manually "select" this?
>-Kees
>
>--
>Kees Cook
>Pixel Security
--
Wei Yang
Help you, Help me
Someone willing to take a look?
On Fri, Oct 02, 2015 at 06:51:59AM +0800, Wei Yang wrote:
>On Thu, Oct 01, 2015 at 02:15:45PM +1000, Michael Ellerman wrote:
>>On Thu, 2015-10-01 at 07:50 +0800, Wei Yang wrote:
>>> Hmm... some comments on this one? like it or not?
>>
>&g
On Mon, Nov 09, 2015 at 10:53:17AM +1100, Alexey Kardashevskiy wrote:
>On 11/08/2015 10:30 AM, Wei Yang wrote:
>>This patchset enables EEH on SRIOV VFs. The general idea is to create proper
>>VF edev and VF PE and handle them properly.
>>
>>Different from the Bus PE
n helps to
locate the VF's PCI device instance when doing hotplug during EEH recovery
if necessary.
Signed-off-by: Wei Yang
---
arch/powerpc/include/asm/eeh.h| 2 +
arch/powerpc/include/asm/pci-bridge.h | 1 +
arch/powerpc/kernel/eeh.c | 8 +++
arch/powerpc/k
e on VF by restore MPS,
disable completion timeout, enable SERR, etc.
Signed-off-by: Wei Yang
---
arch/powerpc/include/asm/pci-bridge.h| 1 +
arch/powerpc/platforms/powernv/eeh-powernv.c | 70 +++-
arch/powerpc/platforms/powernv/pci.c | 18 +++
3 fil
PEs for VFs don't have primary bus. So they have to have their own reset
backend, which is used during EEH recovery. The patch implements the reset
backend for VF's PE by issuing FLR or AF FLR to the VFs, which are contained
in the PE.
Signed-off-by: Wei Yang
---
arch/powerpc/include
The patch creates PEs for VFs in the weak function
pcibios_bus_add_device(). Those PEs for VFs are identified with newly
introduced flag EEH_PE_VF so that we handle them differently during EEH
recovery.
Signed-off-by: Wei Yang
---
arch/powerpc/include/asm/eeh.h | 1 +
arch
add_device() both after pci_dev is
well initialized
* do FLR to reset a VF PE
* imitate the restore function in FW for VF
* remove the reverse order patch, since it is still under discussion
Wei Yang (9):
PCI/IOV: Rename and export virtfn_add/virtfn_remove
PCI: Add pcibios_bus_add_de
same life cycle. Also, VF's EEH device is identified
by (struct eeh_dev::physfn).
Signed-off-by: Wei Yang
---
arch/powerpc/include/asm/eeh.h | 1 +
arch/powerpc/kernel/pci_dn.c | 13 +
2 files changed, 14 insertions(+)
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/power
check for a PCI bridge as we limit
__eeh_addr_cache_insert_dev() to 7 BARs and this effectively excludes PCI
bridges from being cached.
Signed-off-by: Wei Yang
---
arch/powerpc/kernel/eeh_cache.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/k
to PowerPC PCI hotplug path.
Signed-off-by: Wei Yang
---
arch/powerpc/kernel/pci-hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/pci-hotplug.c
b/arch/powerpc/kernel/pci-hotplug.c
index 7f9ed0c..59c4361 100644
--- a/arch/powerpc/kernel/pci-hotplug.c
hotplug during EEH recovery.
Signed-off-by: Wei Yang
Acked-by: Bjorn Helgaas
---
drivers/pci/iov.c | 10 +-
include/linux/pci.h | 8
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index ee0ebff..cc941dd 100644
--- a/dr
Add a weak function pcibios_bus_add_device() for arch dependent code could
do proper setup. For example, powerpc could setup EEH related resources.
Signed-off-by: Wei Yang
Acked-by: Bjorn Helgaas
---
drivers/pci/bus.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/bus.c b
On Wed, Nov 04, 2015 at 04:05:37PM +1100, Alexey Kardashevskiy wrote:
>On 11/04/2015 02:28 PM, Wei Yang wrote:
>>This patchset enables EEH on SRIOV VFs. The general idea is to create proper
>>VF edev and VF PE and handle them properly.
>>
>>Different from the Bus PE
On Wed, Nov 04, 2015 at 04:01:50PM +1100, Alexey Kardashevskiy wrote:
>On 11/04/2015 02:28 PM, Wei Yang wrote:
>>PFs are enumerated on PCI bus, while VFs are created by PF's driver.
>>
>>In EEH recovery, it has two cases:
>>1. Device and driver is EEH aware, error
check for a PCI bridge as we limit
__eeh_addr_cache_insert_dev() to 7 BARs and this effectively excludes PCI
bridges from being cached.
Signed-off-by: Wei Yang
---
arch/powerpc/kernel/eeh_cache.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/k
n helps to
locate the VF's PCI device instance when doing hotplug during EEH recovery
if necessary.
Signed-off-by: Wei Yang
---
arch/powerpc/include/asm/eeh.h| 7 ++
arch/powerpc/include/asm/pci-bridge.h | 1 +
arch/powerpc/kernel/eeh.c | 8 +++
arch/powerpc/k
e on VF by restore MPS,
disable completion timeout, enable SERR, etc.
Signed-off-by: Wei Yang
---
arch/powerpc/include/asm/pci-bridge.h| 1 +
arch/powerpc/platforms/powernv/eeh-powernv.c | 70 +++-
arch/powerpc/platforms/powernv/pci.c | 18 +++
3 fil
The patch creates PEs for VFs in the weak function
pcibios_bus_add_device(). Those PEs for VFs are identified with newly
introduced flag EEH_PE_VF so that we handle them differently during EEH
recovery.
Signed-off-by: Wei Yang
---
arch/powerpc/include/asm/eeh.h | 1 +
arch
PEs for VFs don't have primary bus. So they have to have their own reset
backend, which is used during EEH recovery. The patch implements the reset
backend for VF's PE by issuing FLR or AF FLR to the VFs, which are contained
in the PE.
Signed-off-by: Wei Yang
---
arch/powerpc/include
same life cycle. Also, VF's EEH device is identified
by (struct eeh_dev::physfn).
Signed-off-by: Wei Yang
---
arch/powerpc/include/asm/eeh.h | 1 +
arch/powerpc/kernel/pci_dn.c | 13 +
2 files changed, 14 insertions(+)
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/power
Add a weak function pcibios_bus_add_device() for arch dependent code could
do proper setup. For example, powerpc could setup EEH related resources.
Signed-off-by: Wei Yang
Acked-by: Bjorn Helgaas
---
drivers/pci/bus.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/bus.c b
to PowerPC PCI hotplug path.
Signed-off-by: Wei Yang
---
arch/powerpc/kernel/pci-hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/pci-hotplug.c
b/arch/powerpc/kernel/pci-hotplug.c
index 7f9ed0c..59c4361 100644
--- a/arch/powerpc/kernel/pci-hotplug.c
hotplug during EEH recovery.
Signed-off-by: Wei Yang
Acked-by: Bjorn Helgaas
---
drivers/pci/iov.c | 10 +-
include/linux/pci.h | 8
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index ee0ebff..cc941dd 100644
--- a/dr
_dev is
well initialized
* do FLR to reset a VF PE
* imitate the restore function in FW for VF
* remove the reverse order patch, since it is still under discussion
Wei Yang (9):
PCI/IOV: Rename and export virtfn_add/virtfn_remove
PCI: Add pcibios_bus_add_device() weak function
On Fri, Oct 30, 2015 at 07:05:05PM +1100, Alexey Kardashevskiy wrote:
>On 10/30/2015 06:18 PM, Wei Yang wrote:
>>On Fri, Oct 30, 2015 at 03:11:20PM +1100, Alexey Kardashevskiy wrote:
>>>On 10/26/2015 02:15 PM, Wei Yang wrote:
>>>>PEs for VFs don't have primary
On Mon, Nov 02, 2015 at 10:40:36AM +1100, Alexey Kardashevskiy wrote:
>On 11/01/2015 12:53 PM, Wei Yang wrote:
>>On Fri, Oct 30, 2015 at 04:20:48PM +1100, Alexey Kardashevskiy wrote:
>>>On 10/26/2015 02:16 PM, Wei Yang wrote:
>>>>Different from PCI bus dependent P
On Fri, Oct 30, 2015 at 04:20:48PM +1100, Alexey Kardashevskiy wrote:
>On 10/26/2015 02:16 PM, Wei Yang wrote:
>>Different from PCI bus dependent PE, PE for VFs doesn't have the
>
>s/Different from/Unlike/
>
Will change in next version.
>
>>primary bus, on whic
On Fri, Oct 30, 2015 at 03:56:12PM +1100, Alexey Kardashevskiy wrote:
>On 10/26/2015 02:15 PM, Wei Yang wrote:
>>After PE reset, OPAL API opal_pci_reinit() is called on all devices
>>contained in the PE to reinitialize them. However, VFs can't be seen
>>from skiboot firm
On Fri, Oct 30, 2015 at 06:36:01PM +1100, Alexey Kardashevskiy wrote:
>On 10/30/2015 05:52 PM, Wei Yang wrote:
>>On Fri, Oct 30, 2015 at 02:33:49PM +1100, Alexey Kardashevskiy wrote:
>>>On 10/26/2015 02:15 PM, Wei Yang wrote:
>>>>VFs and their corresponding pc
On Fri, Oct 30, 2015 at 04:35:54PM +1100, Alexey Kardashevskiy wrote:
>On 10/26/2015 02:16 PM, Wei Yang wrote:
>>When PF is EEH aware while VFs are not, VFs will be removed during EEH
>>recovery. This is not supported in current code, while will leads to the VF
>>lost.
>&
On Fri, Oct 30, 2015 at 04:42:07PM +1100, Alexey Kardashevskiy wrote:
>On 10/26/2015 02:16 PM, Wei Yang wrote:
>>From: Gavin Shan
>>
>>When passing through SRIOV VF from host to guest via VFIO PCI
>>infrastructure, the VF is resetted by EEH specific backend
>>(pc
On Fri, Oct 30, 2015 at 03:11:20PM +1100, Alexey Kardashevskiy wrote:
>On 10/26/2015 02:15 PM, Wei Yang wrote:
>>PEs for VFs don't have primary bus. So they have to have their own reset
>>backend, which is used during EEH recovery. The patch implements the reset
>>back
On Fri, Oct 30, 2015 at 02:46:35PM +1100, Alexey Kardashevskiy wrote:
>On 10/26/2015 02:15 PM, Wei Yang wrote:
>>Current EEH recovery code works with the assumption: the PE has primary
>>bus. Unfortunately, that's not true for VF PEs, which generally contains
>>one or
On Fri, Oct 30, 2015 at 02:33:49PM +1100, Alexey Kardashevskiy wrote:
>On 10/26/2015 02:15 PM, Wei Yang wrote:
>>VFs and their corresponding pci_dn instances are created and released
>>dynamically as their PF's SRIOV capability is enabled and disabled.
>>The patch create
On Fri, Oct 30, 2015 at 02:22:43PM +1100, Alexey Kardashevskiy wrote:
>On 10/26/2015 02:15 PM, Wei Yang wrote:
>>EEH address cache, which helps to locate the PCI device according to
>>the given (physical) MMIO address, didn't cover PCI bridges. Also, it
>>shouldn
On Fri, Oct 30, 2015 at 02:04:12PM +1100, Alexey Kardashevskiy wrote:
>On 10/26/2015 02:15 PM, Wei Yang wrote:
>>As commit ac205b7bb72f ("PCI: make sriov work with hotplug remove") indicates,
>>VFs, which might be hooked to same PCI bus as their PF should be removed
>
On Fri, Oct 30, 2015 at 01:05:43PM +1100, Alexey Kardashevskiy wrote:
>On 10/26/2015 02:15 PM, Wei Yang wrote:
>>The patch caches the VF index in pci_dn, which can be used to calculate
>>VF's bus, device and function number. Those information helps to locate
>>the VF&
On Thu, Oct 29, 2015 at 02:29:19PM +1100, Daniel Axtens wrote:
>Wei Yang writes:
>
>> EEH address cache, which helps to locate the PCI device according to
>> the given (physical) MMIO address, didn't cover PCI bridges. Also, it
>> shouldn't return PF with addr
On Tue, Oct 27, 2015 at 06:11:13PM -0500, Bjorn Helgaas wrote:
>On Mon, Oct 26, 2015 at 11:15:50AM +0800, Wei Yang wrote:
>> This patchset enables EEH on SRIOV VFs. The general idea is to create proper
>> VF edev and VF PE and handle them properly.
>> ...
>
>> Ga
On Wed, Oct 28, 2015 at 09:04:34AM +1100, Daniel Axtens wrote:
>Hi,
>
>>
>> diff --git a/arch/powerpc/include/asm/pci-bridge.h
>> b/arch/powerpc/include/asm/pci-bridge.h
>> index b3a226b..3d7e537 100644
>> --- a/arch/powerpc/include/asm/pci-bridge.h
>> +++ b/arch/powerpc/include/asm/pci-bridge.h
>
On Tue, Oct 27, 2015 at 06:06:54PM -0500, Bjorn Helgaas wrote:
>On Mon, Oct 26, 2015 at 11:15:51AM +0800, Wei Yang wrote:
>> During EEH recovery, hotplug is applied to the devices which don't
>> have drivers or their drivers don't support EEH. However, the hotplug,
>&
When PF is EEH aware while VFs are not, VFs will be removed during EEH
recovery. This is not supported in current code, while will leads to the VF
lost.
This patch fixes this by adding VFs back. VFs should be added back after PF
get recovered properly.
Signed-off-by: Wei Yang
Signed-off-by
From: Gavin Shan
When passing through SRIOV VF from host to guest via VFIO PCI
infrastructure, the VF is resetted by EEH specific backend
(pcibios_set_pcie_reset_state()). We can't block the PCI config,
otherwise, the reset (FLR or AF FLR), to be completed by PCI
config access to the VF, can't be
: changelog and code refactoring]
Signed-off-by: Wei Yang
Acked-by: Gavin Shan
---
arch/powerpc/include/asm/eeh.h | 1 +
arch/powerpc/kernel/eeh.c| 8
arch/powerpc/kernel/eeh_driver.c | 100 +++
arch/powerpc/kernel/eeh_pe.c | 3 +-
4 fi
gelog and code refactoring]
Signed-off-by: Wei Yang
Acked-by: Gavin Shan
---
arch/powerpc/include/asm/pci-bridge.h| 1 +
arch/powerpc/platforms/powernv/eeh-powernv.c | 70 +++-
arch/powerpc/platforms/powernv/pci.c | 18 +++
3 files changed, 88 inser
PEs for VFs don't have primary bus. So they have to have their own reset
backend, which is used during EEH recovery. The patch implements the reset
backend for VF's PE by issuing FLR or AF FLR to the VFs, which are contained
in the PE.
[gwshan: changelog and code refactoring]
Signed-o
ified with newly
introduced flag EEH_PE_VF so that we handle them differently during EEH
recovery.
[gwshan: changelog and code refactoring]
Signed-off-by: Wei Yang
Acked-by: Gavin Shan
---
arch/powerpc/include/asm/eeh.h | 1 +
arch/powerpc/kernel/eeh_pe.c
same life cycle. Also, VF's EEH device is identified
by (struct eeh_dev::physfn).
[gwshan: changelog and removed CONFIG_PCI_IOV]
Signed-off-by: Wei Yang
Acked-by: Gavin Shan
---
arch/powerpc/include/asm/eeh.h | 1 +
arch/powerpc/kernel/pci_dn.c | 12
2 files changed, 13
owerPC PCI hotplug path.
[gwshan: changelog]
Signed-off-by: Wei Yang
Acked-by: Gavin Shan
---
arch/powerpc/kernel/pci-hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/pci-hotplug.c
b/arch/powerpc/kernel/pci-hotplug.c
index 7f9ed0c..59c4361 100644
e type check in
eeh_addr_cache_insert_dev(), since bridge's window would not be cached.
The patch restricts the address cache to cover first 7 BARs for the
above purposes.
[gwshan: changelog]
Signed-off-by: Wei Yang
Acked-by: Gavin Shan
---
arch/powerpc/kernel/eeh_cache.c | 6 +-
1 file changed, 1 inser
The patch caches the VF index in pci_dn, which can be used to calculate
VF's bus, device and function number. Those information helps to locate
the VF's PCI device instance when doing hotplug during EEH recovery if
necessary.
Signed-off-by: Wei Yang
Acked-by: Gavin Shan
---
ar
This patch adds a weak function pcibios_bus_add_device() for arch dependent
code could do proper setup. For example, powerpc could setup EEH related
resources.
Signed-off-by: Wei Yang
Acked-by: Bjorn Helgaas
---
drivers/pci/bus.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers
can be used in PCI hotplug during EEH recovery.
[gwshan: changelog]
Signed-off-by: Wei Yang
Reviewed-by: Gavin Shan
Acked-by: Bjorn Helgaas
---
drivers/pci/iov.c | 10 +-
include/linux/pci.h | 8
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/iov.
PE
* imitate the restore function in FW for VF
* remove the reverse order patch, since it is still under discussion
Gavin Shan (1):
powerpc/eeh: Don't block PCI config on resetting VF PE
Wei Yang (11):
PCI/IOV: Rename and export virtfn_add/virtfn_remove
PCI: Add pcibios_bus
Each VF could have 6 BARs at most. When the total BAR size exceeds the
gate, after expanding it will also exhaust the M64 Window.
This patch limits the boundary by checking the total VF BAR size instead of
the individual BAR.
Signed-off-by: Wei Yang
Reviewed-by: Gavin Shan
Acked-by: Alexey
it.
Signed-off-by: Wei Yang
Reviewed-by: Gavin Shan
Acked-by: Alexey Kardashevskiy
---
arch/powerpc/platforms/powernv/pci-ioda.c | 28 +++-
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c
b/arch/powerpc/platf
When M64 BAR is set to Single PE mode, the PE# assigned to VF could be
sparse.
This patch restructures the code to allocate sparse PE# for VFs when M64
BAR is set to Single PE mode. Also it rename the offset to pe_num_map to
reflect the content is the PE number.
Signed-off-by: Wei Yang
Reviewed
n M64 Single PE is used
* when M64 Single PE is used, compare num_vfs with M64 BAR available number
in system at first
Wei Yang (6):
powerpc/powernv: don't enable SRIOV when VF BAR has non
64bit-prefetchable BAR
powerpc/powernv: simplify the calculation of iov resource alig
olute isolation for VFs.
Signed-off-by: Wei Yang
Reviewed-by: Gavin Shan
Acked-by: Alexey Kardashevskiy
---
arch/powerpc/include/asm/pci-bridge.h | 5 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 177 --
2 files changed, 75 insertions(+), 107 deletions(-)
diff
1 - 100 of 617 matches
Mail list logo