On Sun, 23 Jan 2022, Geert Uytterhoeven wrote:
Below is the list of build error/warning regressions/improvements in
v5.17-rc1[1] compared to v5.16[2].
Summarized:
- build errors: +17/-2
- build warnings: +23/-25
Note that there may be false regressions, as some logs are incomplete.
Still, the
within_module_core() and within_module_init() are doing the exact same
test, one on core_layout, the second on init_layout.
In preparation of increasing the complexity of that verification,
refactor it into a single function called within_module_layout().
Signed-off-by: Christophe Leroy
---
inc
This series allow architectures to request having modules data in
vmalloc area instead of module area.
This is required on powerpc book3s/32 in order to set data non
executable, because it is not possible to set executability on page
basis, this is done per 256 Mbytes segments. The module area has
Add a macro to check whether an address is within module's text.
Signed-off-by: Christophe Leroy
---
include/linux/module.h | 13 +
kernel/module.c| 17 +
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/include/linux/module.h b/include/linux/m
In order to separate text and data, we need to setup
two rb trees.
This also means that struct mod_tree_root is required even without
MODULES_TREE_LOOKUP.
Also remove module_addr_min and module_addr_max as there will
be one min and one max for each tree.
Signed-off-by: Christophe Leroy
---
ker
In order to separate text and data, we need to setup
two rb trees. So modify functions to give the tree
as a parameter.
Signed-off-by: Christophe Leroy
---
kernel/module.c | 38 +++---
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/kernel/module.c
In order to allow separation of data from text, add another layout,
called data_layout. For architectures requesting separation of text
and data, only text will go in core_layout and data will go in
data_layout.
For architectures which keep text and data together, make data_layout
an alias of core
Add CONFIG_ARCH_WANTS_MODULES_DATA_IN_VMALLOC to allow architectures
to request having modules data in vmalloc area instead of module area.
This is required on powerpc book3s/32 in order to set data non
executable, because it is not possible to set executability on page
basis, this is done per 256
book3s/32 and 8xx have a separate area for allocating modules,
defined by MODULES_VADDR / MODULES_END.
On book3s/32, it is not possible to protect against execution
on a page basis. A full 256M segment is either Exec or NoExec.
The module area is in an Exec segment while vmalloc area is
in a NoExe
On 2022-01-19 20:06, Zi Yan wrote:
From: Zi Yan
Enable set_migratetype_isolate() to check specified sub-range for
unmovable pages during isolation. Page isolation is done
at max(MAX_ORDER_NR_PAEGS, pageblock_nr_pages) granularity, but not all
pages within that granularity are intended to be iso
These patches seem to be the quickest and easiest way to avoid the
host crash and to get recent Linux images (that use scv) to run under
PR.
These are independent of the syscall emulation series. Those just came
about when looking at ways to fix the host problem and seeing emulation
was broken.
T
PR KVM does not support running with AIL enabled, and SCV does is not
supported with AIL disabled.
Fix this by ensuring the SCV facility is disabled with FSCR while a
CPU can be running with AIL=0. PowerNV host supports disabling AIL on a
per-CPU basis, so SCV just needs to be disabled when a vCPU
KVM PR does not implement address translation modes on interrupt, so it
must not allow H_SET_MODE to succeed.
This is not compatible with QEMU behaviour. The solution might be to
have a cap-ail for this, but now it's broken either way so fix it in
KVM to start with.
This allows PR Linux guests th
Hi Christophe,
I love your patch! Perhaps something to improve:
[auto build test WARNING on mcgrof/modules-next]
[also build test WARNING on powerpc/next linus/master jeyu/modules-next
v5.17-rc1 next-20220124]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when
On Mon, Jan 24, 2022 at 09:22:15AM +, Christophe Leroy wrote:
> +static inline bool within_range(unsigned long addr, void *base, unsigned int
> size)
Please avoid the overly long line.
.. But given that this function only has a single caller I see no
point in factoring it out anyway.
Le 24/01/2022 à 13:32, Christoph Hellwig a écrit :
> On Mon, Jan 24, 2022 at 09:22:15AM +, Christophe Leroy wrote:
>> +static inline bool within_range(unsigned long addr, void *base, unsigned
>> int size)
>
> Please avoid the overly long line.
>
> .. But given that this function only has a
This defines and exports a platform specific custom vm_get_page_prot() via
subscribing ARCH_HAS_VM_GET_PAGE_PROT. Subsequently all __SXXX and __PXXX
macros can be dropped which are no longer needed. While here, this also
localizes arch_vm_get_page_prot() as powerpc_vm_get_page_prot().
Cc: Michael
Mahesh & Sourabh identified two problems[1][2] with ppc64_bolted_size()
and paca allocation.
The first is that on a Radix capable machine but with "disable_radix" on
the command line, there is a window during early boot where
early_radix_enabled() is true, even though it will later become false.
On 1/11/22 01:54, Alexey Kardashevskiy wrote:
At the moment KVM on PPC creates 4 types of entries under the kvm debugfs:
1) "%pid-%fd" per a KVM instance (for all platforms);
2) "vm%pid" (for PPC Book3s HV KVM);
3) "vm%u_vcpu%u_timing" (for PPC Book3e KVM);
4) "kvm-xive-%p" (for XIVE PPC Book3s K
On Wed, Jan 19, 2022 at 02:06:17PM -0500, Zi Yan wrote:
> From: Zi Yan
>
> This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance.
> It prepares for the upcoming removal of the MAX_ORDER-1 alignment
> requirement for CMA and alloc_contig_range().
>
> MIGRARTE_HIGHATOMIC should not
The decrementer exception can fail to be cleared when the interrupt
returns in the case where the decrementer wraps with the next timer
still beyond decrementer_max. This results in a decrementer interrupt
storm. This is triggerable with small decrementer system with hard
and soft watchdogs disable
If the next host timer is beyond decrementer range, timer_rearm_host_dec
will leave decrementer not programmed. This will not cause a problem for
the host it will just set the decrementer correctly when the decrementer
interrupt hits, it seems safer not to leave the next host decrementer
interrupt
The stop/shutdown op should not use decrementer_set_next_event because
that sets decrementers_next_tb to now + decrementer_max, which means a
decrementer interrupt that occurs after that time will call the
clockevent event handler unexpectedly. Set next_tb to ~0 here to prevent
any clock event call
On 24 Jan 2022, at 9:02, Mel Gorman wrote:
> On Wed, Jan 19, 2022 at 02:06:17PM -0500, Zi Yan wrote:
>> From: Zi Yan
>>
>> This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance.
>> It prepares for the upcoming removal of the MAX_ORDER-1 alignment
>> requirement for CMA and alloc_c
On Mon, 24 Jan 2022 20:15:06 +0800
Yinan Liu wrote:
> Hi, Steven and Sachin
>
> I don't have a powerpc machine for testing, I guess the ppc has a
> similar problem with the s390. It's not clear to me why the compiler
> does this. Maybe we can handle ppc like you did with the s390 before,
> bu
On Mon, Jan 24, 2022 at 11:12:07AM -0500, Zi Yan wrote:
> On 24 Jan 2022, at 9:02, Mel Gorman wrote:
>
> > On Wed, Jan 19, 2022 at 02:06:17PM -0500, Zi Yan wrote:
> >> From: Zi Yan
> >>
> >> This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance.
> >> It prepares for the upcoming r
On Mon, 24 Jan 2022 08:55:40 +0100 (CET) Geert Uytterhoeven wrote:
> > + /kisskb/src/drivers/net/ethernet/freescale/fec_mpc52xx.c: error: passing
> > argument 2 of 'mpc52xx_fec_set_paddr' discards 'const' qualifier from
> > pointer target type [-Werror=discarded-qualifiers]: => 659:29
>
> po
On 24 Jan 2022, at 4:55, Oscar Salvador wrote:
> On 2022-01-19 20:06, Zi Yan wrote:
>> From: Zi Yan
>>
>> Enable set_migratetype_isolate() to check specified sub-range for
>> unmovable pages during isolation. Page isolation is done
>> at max(MAX_ORDER_NR_PAEGS, pageblock_nr_pages) granularity, bu
Nicholas Piggin writes:
> The L0 is storing HFSCR requested by the L1 for the L2 in struct
> kvm_nested_guest when the L1 requests a vCPU enter L2. kvm_nested_guest
> is not a per-vCPU structure. Hilarity ensues.
>
> Fix it by moving the nested hfscr into the vCPU structure together with
> the ot
Nicholas Piggin writes:
> This facility is controlled by FSCR only. Reserved bits should not be
> set in the HFSCR register (although it's likely harmless as this
> position would not be re-used, and the L0 is forgiving here too).
>
> Signed-off-by: Nicholas Piggin
Reviewed-by: Fabiano Rosas
On Mon, 24 Jan 2022 09:04:33 -0800 Jakub Kicinski wrote:
> On Mon, 24 Jan 2022 08:55:40 +0100 (CET) Geert Uytterhoeven wrote:
> > > + /kisskb/src/drivers/net/ethernet/freescale/fec_mpc52xx.c: error:
> > > passing argument 2 of 'mpc52xx_fec_set_paddr' discards 'const' qualifier
> > > from pointer
Nicholas Piggin writes:
> It is better to get all loads for the register values in flight
> before starting to switch LPID, PID, and LPCR because those
> mtSPRs are expensive and serialising.
>
> This also just tidies up the code for a potential future change
> to the context switching sequence.
On Mon, Jan 24, 2022 at 5:25 AM Geert Uytterhoeven wrote:
>
> On Sun, 23 Jan 2022, Geert Uytterhoeven wrote:
> > Below is the list of build error/warning regressions/improvements in
> > v5.17-rc1[1] compared to v5.16[2].
> >
> > Summarized:
> > - build errors: +17/-2
> > - build warnings: +23/-2
Hi Alex,
On Mon, Jan 24, 2022 at 7:52 PM Alex Deucher wrote:
> On Mon, Jan 24, 2022 at 5:25 AM Geert Uytterhoeven
> wrote:
> > On Sun, 23 Jan 2022, Geert Uytterhoeven wrote:
> > > + /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:
> > > error: control reaches end of non-void f
On 1/24/22 10:55, Geert Uytterhoeven wrote:
> Hi Alex,
>
> On Mon, Jan 24, 2022 at 7:52 PM Alex Deucher wrote:
>> On Mon, Jan 24, 2022 at 5:25 AM Geert Uytterhoeven
>> wrote:
>>> On Sun, 23 Jan 2022, Geert Uytterhoeven wrote:
+ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topol
Presently PAPR doesn't support injecting smart errors on an
NVDIMM. This makes testing the NVDIMM health reporting functionality
difficult as simulating NVDIMM health related events need a hacked up
qemu version.
To solve this problem this patch proposes simulating certain set of
NVDIMM health rel
在 2022/1/24 下午5:19, Sachin Sant 写道:
While running stress_code_patching test from selftests/powerpc/mm
against 5.17-rc1 booted on a POWER10 LPAR following ftrace warning
is seen:
WARNING: CPU: 1 PID: 2017392 at kernel/trace/ftrace.c:2068
ftrace_bug+0x274/0x2d8
Modules linked in: dm_mod bonding r
Hi,
On Mon, Jan 24, 2022 at 1:22 AM Christophe Leroy
wrote:
>
> --- a/kernel/debug/kdb/kdb_main.c
> +++ b/kernel/debug/kdb/kdb_main.c
> @@ -2022,8 +2022,11 @@ static int kdb_lsmod(int argc, const char **argv)
> if (mod->state == MODULE_STATE_UNFORMED)
> con
The return of the function is being shadowed by the call to
kvmppc_uvmem_init.
Fixes: ca9f4942670c ("KVM: PPC: Book3S HV: Support for running secure guests")
Signed-off-by: Fabiano Rosas
Reviewed-by: Nicholas Piggin
---
arch/powerpc/kvm/book3s_hv.c | 5 -
1 file changed, 4 insertions(+), 1
Delay the setting of kvm_hv_ops until after all init code has
completed. This avoids leaving the ops still accessible if the init
fails.
Signed-off-by: Fabiano Rosas
---
arch/powerpc/kvm/book3s_hv.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/kvm
The module's exit function is not called when the init fails, we need
to do cleanup before returning.
Signed-off-by: Fabiano Rosas
Reviewed-by: Nicholas Piggin
---
arch/powerpc/kvm/book3s_hv.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kvm/
We increment the reference count for KVM-HV/PR before the call to
kvmppc_core_init_vm. If that function fails we need to decrement the
refcount.
Signed-off-by: Fabiano Rosas
---
Caught this while testing Nick's LPID patches by looking at
/sys/module/kvm_hv/refcnt
---
arch/powerpc/kvm/powerpc.c |
Nicholas Piggin writes:
> The LPID allocator init is changed to:
> - use mmu_lpid_bits rather than hard-coding;
> - use KVM_MAX_NESTED_GUESTS for nested hypervisors;
> - not reserve the top LPID on POWER9 and newer CPUs.
>
> The reserved LPID is made a POWER7/8-specific detail.
>
> Signed-off-by:
Nicholas Piggin writes:
> This removes the fixed-size lpid_inuse array.
>
> Signed-off-by: Nicholas Piggin
> ---
Reviewed-by: Fabiano Rosas
> arch/powerpc/kvm/powerpc.c | 25 +
> 1 file changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/arch/powerpc/kvm/power
Nicholas Piggin writes:
> This removes the fixed sized kvm->arch.nested_guests array.
>
> Signed-off-by: Nicholas Piggin
> ---
Reviewed-by: Fabiano Rosas
> arch/powerpc/include/asm/kvm_host.h | 3 +-
> arch/powerpc/kvm/book3s_hv_nested.c | 110 +++-
> 2 files change
Nicholas Piggin writes:
> Rather than tie this to KVMPPC_NR_LPIDS which is becoming more dynamic,
> fix it to 4096 (12-bits) explicitly for now.
>
> kvmhv_get_nested() does not have to check against KVM_MAX_NESTED_GUESTS
> because the L1 partition table registration hcall already did that, and
>
Nicholas Piggin writes:
> KVMPPC_NR_LPIDS no longer represents any size restriction on the
> LPID space and can be removed. A CPU with more than 12 LPID bits
> implemented will now be able to create more than 4095 guests.
>
> Signed-off-by: Nicholas Piggin
Reviewed-by: Fabiano Rosas
> ---
>
I stumbled upon another issue with our module exit so I'm sending
another version to add a fix for it.
- patches 1 and 3 are already reviewed;
- patch 2 lacks a Reviewed-by. Nick asked about an issue Alexey might
have encountered. I haven't heard of any issues with the module exit
aside from
Nicholas Piggin writes:
> PR KVM does not support running with AIL enabled, and SCV does is not
> supported with AIL disabled.
>
> Fix this by ensuring the SCV facility is disabled with FSCR while a
> CPU can be running with AIL=0. PowerNV host supports disabling AIL on a
> per-CPU basis, so SCV
Nicholas Piggin writes:
> KVM PR does not implement address translation modes on interrupt, so it
> must not allow H_SET_MODE to succeed.
>
> This is not compatible with QEMU behaviour. The solution might be to
> have a cap-ail for this, but now it's broken either way so fix it in
> KVM to start
Am 2022-01-24 um 14:11 schrieb Randy Dunlap:
On 1/24/22 10:55, Geert Uytterhoeven wrote:
Hi Alex,
On Mon, Jan 24, 2022 at 7:52 PM Alex Deucher wrote:
On Mon, Jan 24, 2022 at 5:25 AM Geert Uytterhoeven wrote:
On Sun, 23 Jan 2022, Geert Uytterhoeven wrote:
+ /kisskb/src/drivers/gpu/drm/a
On 1/24/22 17:23, Felix Kuehling wrote:
>
> Am 2022-01-24 um 14:11 schrieb Randy Dunlap:
>> On 1/24/22 10:55, Geert Uytterhoeven wrote:
>>> Hi Alex,
>>>
>>> On Mon, Jan 24, 2022 at 7:52 PM Alex Deucher wrote:
On Mon, Jan 24, 2022 at 5:25 AM Geert Uytterhoeven
wrote:
> On Sun, 2
+Naveen (sorry missed cc'ing you at first)
Excerpts from Christophe Leroy's message of January 24, 2022 4:39 pm:
>
>
> Le 24/01/2022 à 06:57, Nicholas Piggin a écrit :
>> As discussed previously
>>
>> https://lists.ozlabs.org/pipermail/linuxppc-dev/2022-January/238946.html
>>
>> I'm wondering
Excerpts from Fabiano Rosas's message of January 22, 2022 8:26 am:
> The MMIO interface between the kernel and userspace uses a structure
> that supports a maximum of 8-bytes of data. Instructions that access
> more than that need to be emulated in parts.
>
> We currently don't have generic suppor
Yeah, I think it's time to opt in, instead of opting out.
Something like this:
-- Steve
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c2724d986fa0..5256ebe57451 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -82,6 +82,7 @@ config ARM
select HAVE_EBPF_JIT if !CPU_ENDIAN
Excerpts from Fabiano Rosas's message of January 22, 2022 8:26 am:
> If MMIO emulation fails we don't want to crash the whole guest by
> returning to userspace.
>
> The original commit bbf45ba57eae ("KVM: ppc: PowerPC 440 KVM
> implementation") added a todo:
>
> /* XXX Deliver Program interrupt
Excerpts from Fabiano Rosas's message of January 22, 2022 8:26 am:
> MMIO emulation can fail if the guest uses an instruction that we are
> not prepared to emulate. Since these instructions can be and most
> likely are valid ones, this is (slightly) closer to an access fault
> than to an illegal in
Excerpts from Fabiano Rosas's message of January 25, 2022 8:08 am:
> We increment the reference count for KVM-HV/PR before the call to
> kvmppc_core_init_vm. If that function fails we need to decrement the
> refcount.
>
> Signed-off-by: Fabiano Rosas
> ---
> Caught this while testing Nick's LPID
Excerpts from Fabiano Rosas's message of January 25, 2022 8:49 am:
> Nicholas Piggin writes:
>
>> PR KVM does not support running with AIL enabled, and SCV does is not
>> supported with AIL disabled.
>>
>> Fix this by ensuring the SCV facility is disabled with FSCR while a
>> CPU can be running w
> On 24-Jan-2022, at 10:15 PM, Steven Rostedt wrote:
>
> On Mon, 24 Jan 2022 20:15:06 +0800
> Yinan Liu wrote:
>
>> Hi, Steven and Sachin
>>
>> I don't have a powerpc machine for testing, I guess the ppc has a
>> similar problem with the s390. It's not clear to me why the compiler
>> does
Le 24/01/2022 à 22:43, Doug Anderson a écrit :
> Hi,
>
> On Mon, Jan 24, 2022 at 1:22 AM Christophe Leroy
> wrote:
>>
>> --- a/kernel/debug/kdb/kdb_main.c
>> +++ b/kernel/debug/kdb/kdb_main.c
>> @@ -2022,8 +2022,11 @@ static int kdb_lsmod(int argc, const char **argv)
>> if (mod
Le 25/01/2022 à 04:04, Nicholas Piggin a écrit :
> +Naveen (sorry missed cc'ing you at first)
>
> Excerpts from Christophe Leroy's message of January 24, 2022 4:39 pm:
>>
>>
>> Le 24/01/2022 à 06:57, Nicholas Piggin a écrit :
>>> As discussed previously
>>>
>>> https://lists.ozlabs.org/pipermail
On 2022-01-19 20:06, Zi Yan wrote:
From: Zi Yan
has_unmovable_pages() is only used in mm/page_isolation.c. Move it from
mm/page_alloc.c and make it static.
Signed-off-by: Zi Yan
Reviewed-by: Oscar Salvador
--
Oscar Salvador
SUSE Labs
Replace the outdated iteration and timeout calculations here with
indefinite spin_until_cond()-wrapped poll of cpu_callin_map. __cpu_up()
already does this when waiting for the cpu to set its online bit before
returning, so this change is not really making the function more brittle.
Removing the m
64 matches
Mail list logo