Update tlb invalidation routines for FEAT_LPA2
Subsystems (3)
cover Update tlb invalidation routines for FEAT_LPA2
Hi All,
As raised yesterday against Ard's LPA2 series [1], we need to address the TLBI changes to properly support LPA2 before Ard's changes get merged. So far those changes have been part of my KVM LPA2 series [2]. So this is an attempt to split the TLBI changes to make them independent. The idea is that this series would go in first, then Ard's and the rest of my series can race eachother and it doesn't really matter who wins.
I've attempted to address all of Marc's feedback against the versions of these patches posted at [2], including adding benchmark data (see patch 1). Although if people are still nervous that this could regress non-lpa2 performance in some cases, I could rework so that there are lpa2 and non-lpa2 variants of __flush_tlb_range_op(), and the correct version is chosen at the higher level (based on lpa2_is_enabled() / kvm_lpa2_is_enabled()).
It turns out that we won't be able to key LPA2 usage off the same static key for both the kernel and kvm usage because the kernel usage additionally depends on CONFIG_ARM64_LPA2 being enabled. So I've introduced 2 stub functions (lpa2_is_enabled() and kvm_lpa2_is_enabled()) to advertise it. Ard already defines and implements lpa2_is_enabled() in his series, so there will be a minor conflict to resolve there. I plan to define kvm_lpa2_is_enabled() to be the static key for kvm in my series. Marc, would you be happy with this approach?
Anyway, I wanted to put this out there as an RFC. If we are happy with it, then I'll re-post on 6.7-rc1.
[1] https://lore.kernel.org/linux-arm-kernel/[email protected]/
[2] https://lore.kernel.org/kvmarm/[email protected]/
Thanks,
Ryan
Ryan Roberts (3):
arm64/mm: Modify range-based tlbi to decrement scale arm64/mm: Add lpa2_is_enabled() kvm_lpa2_is_enabled() stubs arm64/mm: Update tlb invalidation routines for FEAT_LPA2
arch/arm64/include/asm/kvm_mmu.h | 3 + arch/arm64/include/asm/pgtable-prot.h | 2 + arch/arm64/include/asm/tlb.h | 15 ++-- arch/arm64/include/asm/tlbflush.h | 100 ++++++++++++++++---------- 4 files changed, 78 insertions(+), 42 deletions(-)
--
2.25.1
RFC PATCH 1/3 arm64/mm: Modify range-based tlbi to decrement scale
In preparation for adding support for LPA2 to the tlb invalidation routines, modify the algorithm used by range-based tlbi to start at the highest 'scale' and decrement instead of starting at the lowest 'scale' and incrementing. This new approach makes it possible to maintain 64K alignment as we work through the range, until the last op (at scale=0). This is required when LPA2 is enabled. (This part will be added in a subsequent commit).
This change is separated into its own patch because it will also impact non-LPA2 systems, and I want to make it easy to bisect in case it leads to performance regression (see below for benchmarks that suggest this should not be a problem).
The original commit (d1d3aa98 "arm64: tlb: Use the TLBI RANGE feature in arm64") stated this as the reason for _incrementing_ scale:
However, in most scenarios, the pages = 1 when flush_tlb_range() is called. Start from scale = 3 or other proper value (such as scale =ilog2(pages)), will incur extra overhead. So increase 'scale' from 0 to maximum.
But pages=1 is already special cased by the non-range invalidation path, which will take care of it the first time through the loop (both in the original commit and in my change), so I don't think switching to decrement scale should have any extra performance impact after all.
Indeed benchmarking kernel compilation, a TLBI-heavy workload, suggests that this new approach actually _improves_ performance slightly (using a virtual machine on Apple M2):
Table shows time to execute kernel compilation workload with 8 jobs, relative to baseline without this patch (more negative number is bigger speedup). Repeated 9 times across 3 system reboots:
| counter | mean | stdev | |:----------|-----------:|----------:| | real-time | -0.6% | 0.0% | | kern-time | -1.6% | 0.5% | | user-time | -0.4% | 0.1% |
--- arch/arm64/include/asm/tlbflush.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
arch/arm64/include/asm/tlbflush.h +10 -10
@@ -351,14 +351,14 @@ static inline void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch)* entries one by one at the granularity of 'stride'. If the TLB * range ops are supported, then: * -* 1. If 'pages' is odd, flush the first page through non-range -* operations; +* 1. The minimum range granularity is decided by 'scale', so multiple range +* TLBI operations may be required. Start from scale = 3, flush the largest +* possible number of pages ((num+1)*2^(5*scale+1)) that fit into the +* requested range, then decrement scale and continue until one or zero pages +* are left. * -* 2. For remaining pages: the minimum range granularity is decided -* by 'scale', so multiple range TLBI operations may be required. -* Start from scale = 0, flush the corresponding number of pages -* ((num+1)*2^(5*scale+1) starting from 'addr'), then increase it -* until no pages left. +* 2. If there is 1 page remaining, flush it through non-range operations. Range +* operations can only span an even number of pages. * * Note that certain ranges can be represented by either num = 31 and * scale or num = 0 and scale + 1. The loop below favours the latter
@@ -368,12 +368,12 @@ static inline void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch) asid, tlb_level, tlbi_user) \ do { \ int num = 0; \ - int scale = 0; \ + int scale = 3; \ unsigned long addr; \ \ while (pages > 0) { \ if (!system_supports_tlb_range() || \ - pages % 2 == 1) { \ + pages == 1) { \ addr = __TLBI_VADDR(start, asid); \ __tlbi_level(op, addr, tlb_level); \ if (tlbi_user) \
@@ -393,7 +393,7 @@ do { \ start +=__TLBI_RANGE_PAGES (num, scale) <<PAGE_SHIFT ; \ pages -=__TLBI_RANGE_PAGES (num, scale); \ } \ - scale++; \ + scale--; \ } \ }while (0 )
--
2.25.1
RFC PATCH 2/3 arm64/mm: Add lpa2_is_enabled() kvm_lpa2_is_enabled() stubs
In reply to Ryan RobertsAdd stub functions which is initially always return false. These provide the hooks that we need to update the range-based TLBI routines, whose operands are encoded differently depending on whether lpa2 is enabled or not.
The kernel and kvm will enable the use of lpa2 asynchronously in future, and part of that enablement will involve fleshing out their respective hook to advertise when it is using lpa2.
Since the kernel's decision to use lpa2 relies on more than just whether the HW supports the feature, it can't just use the same static key as kvm. This is another reason to use separate functions. lpa2_is_enabled() is already implemented as part of Ard's kernel lpa2 series. Since kvm will make its decision solely based on HW support, kvm_lpa2_is_enabled() will be defined as system_supports_lpa2() once kvm starts using lpa2.
--- arch/arm64/include/asm/kvm_mmu.h | 3 +++ arch/arm64/include/asm/pgtable-prot.h | 2 ++ 2 files changed, 5 insertions(+)
arch/arm64/include/asm/kvm_mmu.h +3 -0
@@ -314,5 +314,8 @@ static inline struct kvm *kvm_s2_mmu_to_kvm(struct kvm_s2_mmu *mmu) { return container_of(mmu->arch, struct kvm, arch); } + +#define kvm_lpa2_is_enabled () false +#endif /* __ASSEMBLY__ */ #endif /* __ARM64_KVM_MMU_H__ */
arch/arm64/include/asm/pgtable-prot.h +2 -0
@@ -71,6 +71,8 @@ extern bool arm64_use_ng_mappings;#define PTE_MAYBE_NG (arm64_use_ng_mappings ? PTE_NG : 0)#define PMD_MAYBE_NG (arm64_use_ng_mappings ? PMD_SECT_NG : 0) +#define lpa2_is_enabled () false +/* * If we have userspace only BTI we don't want to mark kernel pages * guarded even if the system does support BTI.
--
2.25.1
RFC PATCH 3/3 arm64/mm: Update tlb invalidation routines for FEAT_LPA2
In reply to Ryan RobertsFEAT_LPA2 impacts tlb invalidation in 2 ways; Firstly, the TTL field in the non-range tlbi instructions can now validly take a 0 value as a level hint for the 4KB granule (this is due to the extra level of translation) - previously TTL=0b0100 meant no hint and was treated as 0b0000. Secondly, The BADDR field of the range-based tlbi instructions is specified in 64KB units when LPA2 is in use (TCR.DS=1), whereas it is in page units otherwise. Changes are required for tlbi to continue to operate correctly when LPA2 is in use.
Solve the first problem by always adding the level hint if the level is between [0, 3] (previously anything other than 0 was hinted, which breaks in the new level -1 case from kvm). When running on non-LPA2 HW, 0 is still safe to hint as the HW will fall back to non-hinted. While we are at it, we replace the notion of 0 being the non-hinted sentinel with a macro, TLBI_TTL_UNKNOWN. This means callers won't need updating if/when translation depth increases in future.
The second issue is more complex: When LPA2 is in use, use the non-range tlbi instructions to forward align to a 64KB boundary first, then use range-based tlbi from there on, until we have either invalidated all pages or we have a single page remaining. If the latter, that is done with non-range tlbi. We determine whether LPA2 is in use based on lpa2_is_enabled() (for kernel calls) or kvm_lpa2_is_enabled() (for kvm calls).
--- arch/arm64/include/asm/tlb.h | 15 ++++-- arch/arm64/include/asm/tlbflush.h | 90 ++++++++++++++++++++----------- 2 files changed, 68 insertions(+), 37 deletions(-)
arch/arm64/include/asm/tlb.h +10 -5
@@ -22,15 +22,15 @@ static void tlb_flush(struct mmu_gather *tlb);#include <asm-generic/tlb.h> /* -* get the tlbi levels in arm64. Default value is 0 if more than one -* of cleared_* is set or neither is set. -* Arm64 doesn't support p4ds now. +* get the tlbi levels in arm64. Default value is TLBI_TTL_UNKNOWN if more than +* one of cleared_* is set or neither is set - this elides the level hinting to +* the hardware. */ static inline int tlb_get_level (struct mmu_gather *tlb) {/* The TTL field is only valid for the leaf entry. */ if (tlb->freed_tables) -return 0 ; +return TLBI_TTL_UNKNOWN ; if (tlb->cleared_ptes && !(tlb->cleared_pmds || tlb->cleared_puds ||
@@ -47,7 +47,12 @@ static inline int tlb_get_level(struct mmu_gather *tlb) tlb->cleared_p4ds))return 1 ; -return 0 ; +if (tlb->cleared_p4ds && !(tlb->cleared_ptes || + tlb->cleared_pmds || + tlb->cleared_puds)) +return 0 ; + +return TLBI_TTL_UNKNOWN ; }static inline void tlb_flush (struct mmu_gather *tlb)
arch/arm64/include/asm/tlbflush.h +58 -32
184 lines not on this page · raw message
--
2.25.1
Quoted 24 lines · Ryan Roberts
Hi All,
As raised yesterday against Ard's LPA2 series [1], we need to address the TLBI changes to properly support LPA2 before Ard's changes get merged. So far those changes have been part of my KVM LPA2 series [2]. So this is an attempt to split the TLBI changes to make them independent. The idea is that this series would go in first, then Ard's and the rest of my series can race eachother and it doesn't really matter who wins.
I've attempted to address all of Marc's feedback against the versions of these patches posted at [2], including adding benchmark data (see patch 1). Although if people are still nervous that this could regress non-lpa2 performance in some cases, I could rework so that there are lpa2 and non-lpa2 variants of
__flush_tlb_range_op(), and the correct version is chosen at the higher level (based onlpa2_is_enabled()/kvm_lpa2_is_enabled()).It turns out that we won't be able to key LPA2 usage off the same static key for both the kernel and kvm usage because the kernel usage additionally depends on
CONFIG_ARM64_LPA2being enabled. So I've introduced 2 stub functions (lpa2_is_enabled()andkvm_lpa2_is_enabled()) to advertise it. Ard already defines and implementslpa2_is_enabled()in his series, so there will be a minor conflict to resolve there. I plan to definekvm_lpa2_is_enabled()to be the static key for kvm in my series. Marc, would you be happy with this approach?
Quoted 2 lines
Anyway, I wanted to put this out there as an RFC. If we are happy with it, then I'll re-post on 6.7-rc1.
Marc, All,
I polite bump; I never heard back on this. I'm planning to post my LPA2/KVM series on top of v6.7-rc1 in the next day or 2. By default, these 3 patches will be the first 3 of the series. But if you have an issue with the approach it would be good to work out an alternative plan to avoid wasting effort preparing the series.
Thanks,
Ryan
Quoted 21 lines
[1] https://lore.kernel.org/linux-arm-kernel/[email protected]/
[2] https://lore.kernel.org/kvmarm/[email protected]/Thanks,
RyanRyan Roberts (3):
arm64/mm: Modify range-based tlbi to decrement scale arm64/mm: Addlpa2_is_enabled()kvm_lpa2_is_enabled()stubs arm64/mm: Update tlb invalidation routines forFEAT_LPA2arch/arm64/include/asm/kvm_mmu.h | 3 + arch/arm64/include/asm/pgtable-prot.h | 2 + arch/arm64/include/asm/tlb.h | 15 ++-- arch/arm64/include/asm/tlbflush.h | 100 ++++++++++++++++---------- 4 files changed, 78 insertions(+), 42 deletions(-)--
2.25.1
Marc Zyngier
maintainerQuoted 29 lines · Ryan Roberts
Quoted 24 lines · Ryan Roberts
Hi All,
As raised yesterday against Ard's LPA2 series [1], we need to address the TLBI changes to properly support LPA2 before Ard's changes get merged. So far those changes have been part of my KVM LPA2 series [2]. So this is an attempt to split the TLBI changes to make them independent. The idea is that this series would go in first, then Ard's and the rest of my series can race eachother and it doesn't really matter who wins.
I've attempted to address all of Marc's feedback against the versions of these patches posted at [2], including adding benchmark data (see patch 1). Although if people are still nervous that this could regress non-lpa2 performance in some cases, I could rework so that there are lpa2 and non-lpa2 variants of
__flush_tlb_range_op(), and the correct version is chosen at the higher level (based onlpa2_is_enabled()/kvm_lpa2_is_enabled()).It turns out that we won't be able to key LPA2 usage off the same static key for both the kernel and kvm usage because the kernel usage additionally depends on
CONFIG_ARM64_LPA2being enabled. So I've introduced 2 stub functions (lpa2_is_enabled()andkvm_lpa2_is_enabled()) to advertise it. Ard already defines and implementslpa2_is_enabled()in his series, so there will be a minor conflict to resolve there. I plan to definekvm_lpa2_is_enabled()to be the static key for kvm in my series. Marc, would you be happy with this approach?Quoted 2 lines
Anyway, I wanted to put this out there as an RFC. If we are happy with it, then I'll re-post on 6.7-rc1.
Quoted 7 lines
Marc, All,
I polite bump; I never heard back on this. I'm planning to post my LPA2/KVM series on top of v6.7-rc1 in the next day or 2. By default, these 3 patches will be the first 3 of the series. But if you have an issue with the approach it would be good to work out an alternative plan to avoid wasting effort preparing the series.
No specific concern on the approach. Having a static-key for the KVM side is good, and the uplift on the range stuff seems compelling.
Thanks,
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Quoted 34 lines · Marc Zyngier
Quoted 31 lines · Ryan Roberts
Quoted 24 lines · Ryan Roberts
Hi All,
As raised yesterday against Ard's LPA2 series [1], we need to address the TLBI changes to properly support LPA2 before Ard's changes get merged. So far those changes have been part of my KVM LPA2 series [2]. So this is an attempt to split the TLBI changes to make them independent. The idea is that this series would go in first, then Ard's and the rest of my series can race eachother and it doesn't really matter who wins.
I've attempted to address all of Marc's feedback against the versions of these patches posted at [2], including adding benchmark data (see patch 1). Although if people are still nervous that this could regress non-lpa2 performance in some cases, I could rework so that there are lpa2 and non-lpa2 variants of
__flush_tlb_range_op(), and the correct version is chosen at the higher level (based onlpa2_is_enabled()/kvm_lpa2_is_enabled()).It turns out that we won't be able to key LPA2 usage off the same static key for both the kernel and kvm usage because the kernel usage additionally depends on
CONFIG_ARM64_LPA2being enabled. So I've introduced 2 stub functions (lpa2_is_enabled()andkvm_lpa2_is_enabled()) to advertise it. Ard already defines and implementslpa2_is_enabled()in his series, so there will be a minor conflict to resolve there. I plan to definekvm_lpa2_is_enabled()to be the static key for kvm in my series. Marc, would you be happy with this approach?Quoted 2 lines
Anyway, I wanted to put this out there as an RFC. If we are happy with it, then I'll re-post on 6.7-rc1.
Marc, All,
Quoted 9 lines
Quoted 5 lines
I polite bump; I never heard back on this. I'm planning to post my LPA2/KVM series on top of v6.7-rc1 in the next day or 2. By default, these 3 patches will be the first 3 of the series. But if you have an issue with the approach it would be good to work out an alternative plan to avoid wasting effort preparing the series.
No specific concern on the approach. Having a static-key for the KVM side is good, and the uplift on the range stuff seems compelling.
OK, I'll put these at the start of my ++v as well.
Thanks,
Quoted 41 lines · Ard Biesheuvel
Quoted 40 lines · Marc Zyngier
Quoted 36 lines · Ryan Roberts
Quoted 24 lines · Ryan Roberts
Hi All,
As raised yesterday against Ard's LPA2 series [1], we need to address the TLBI changes to properly support LPA2 before Ard's changes get merged. So far those changes have been part of my KVM LPA2 series [2]. So this is an attempt to split the TLBI changes to make them independent. The idea is that this series would go in first, then Ard's and the rest of my series can race eachother and it doesn't really matter who wins.
I've attempted to address all of Marc's feedback against the versions of these patches posted at [2], including adding benchmark data (see patch 1). Although if people are still nervous that this could regress non-lpa2 performance in some cases, I could rework so that there are lpa2 and non-lpa2 variants of
__flush_tlb_range_op(), and the correct version is chosen at the higher level (based onlpa2_is_enabled()/kvm_lpa2_is_enabled()).It turns out that we won't be able to key LPA2 usage off the same static key for both the kernel and kvm usage because the kernel usage additionally depends on
CONFIG_ARM64_LPA2being enabled. So I've introduced 2 stub functions (lpa2_is_enabled()andkvm_lpa2_is_enabled()) to advertise it. Ard already defines and implementslpa2_is_enabled()in his series, so there will be a minor conflict to resolve there. I plan to definekvm_lpa2_is_enabled()to be the static key for kvm in my series. Marc, would you be happy with this approach?Quoted 2 lines
Anyway, I wanted to put this out there as an RFC. If we are happy with it, then I'll re-post on 6.7-rc1.
Marc, All,
I polite bump; I never heard back on this. I'm planning to post my LPA2/KVM series on top of v6.7-rc1 in the next day or 2. By default, these 3 patches will be the first 3 of the series. But if you have an issue with the approach it would be good to work out an alternative plan to avoid wasting effort preparing the series.
Quoted 5 lines
Quoted 3 lines
No specific concern on the approach. Having a static-key for the KVM side is good, and the uplift on the range stuff seems compelling.
OK, I'll put these at the start of my ++v as well.
Great - thanks both!
Quoted 3 lines
Thanks,
Catalin Marinas
maintainerQuoted 25 lines · Ryan Roberts
Quoted 24 lines · Ryan Roberts
As raised yesterday against Ard's LPA2 series [1], we need to address the TLBI changes to properly support LPA2 before Ard's changes get merged. So far those changes have been part of my KVM LPA2 series [2]. So this is an attempt to split the TLBI changes to make them independent. The idea is that this series would go in first, then Ard's and the rest of my series can race eachother and it doesn't really matter who wins.
I've attempted to address all of Marc's feedback against the versions of these patches posted at [2], including adding benchmark data (see patch 1). Although if people are still nervous that this could regress non-lpa2 performance in some cases, I could rework so that there are lpa2 and non-lpa2 variants of
__flush_tlb_range_op(), and the correct version is chosen at the higher level (based onlpa2_is_enabled()/kvm_lpa2_is_enabled()).It turns out that we won't be able to key LPA2 usage off the same static key for both the kernel and kvm usage because the kernel usage additionally depends on
CONFIG_ARM64_LPA2being enabled. So I've introduced 2 stub functions (lpa2_is_enabled()andkvm_lpa2_is_enabled()) to advertise it. Ard already defines and implementslpa2_is_enabled()in his series, so there will be a minor conflict to resolve there. I plan to definekvm_lpa2_is_enabled()to be the static key for kvm in my series. Marc, would you be happy with this approach?Anyway, I wanted to put this out there as an RFC. If we are happy with it, then I'll re-post on 6.7-rc1.
[...]
Quoted 2 lines
I polite bump; I never heard back on this. I'm planning to post my LPA2/KVM series on top of v6.7-rc1 in the next day or 2.
I suspect that's what most maintainers wait for ;). Usually patches posted just before or during the merging window get ignored, unless they are urgent fixes.
Quoted 4 lines
By default, these 3 patches will
be the first 3 of the series. But if you have an issue with the approach it would be good to work out an alternative plan to avoid wasting effort preparing the series.
If these patches are needed for Ard's series (I think they do), they could be posted together. But first we need to split Ard's series into at least two: reworking the memory map together with moving (some of) the init code to C and the actual LPA2 stage 1 support. We might even through LPA2 stage 2 on top if we feel brave ;). We can queue them all together but having separate series gives us an option to drop bits if needed.
Signature · 1 line
Catalin
Quoted 39 lines · Catalin Marinas
Quoted 25 lines · Ryan Roberts
Quoted 24 lines · Ryan Roberts
As raised yesterday against Ard's LPA2 series [1], we need to address the TLBI changes to properly support LPA2 before Ard's changes get merged. So far those changes have been part of my KVM LPA2 series [2]. So this is an attempt to split the TLBI changes to make them independent. The idea is that this series would go in first, then Ard's and the rest of my series can race eachother and it doesn't really matter who wins.
I've attempted to address all of Marc's feedback against the versions of these patches posted at [2], including adding benchmark data (see patch 1). Although if people are still nervous that this could regress non-lpa2 performance in some cases, I could rework so that there are lpa2 and non-lpa2 variants of
__flush_tlb_range_op(), and the correct version is chosen at the higher level (based onlpa2_is_enabled()/kvm_lpa2_is_enabled()).It turns out that we won't be able to key LPA2 usage off the same static key for both the kernel and kvm usage because the kernel usage additionally depends on
CONFIG_ARM64_LPA2being enabled. So I've introduced 2 stub functions (lpa2_is_enabled()andkvm_lpa2_is_enabled()) to advertise it. Ard already defines and implementslpa2_is_enabled()in his series, so there will be a minor conflict to resolve there. I plan to definekvm_lpa2_is_enabled()to be the static key for kvm in my series. Marc, would you be happy with this approach?Anyway, I wanted to put this out there as an RFC. If we are happy with it, then I'll re-post on 6.7-rc1.
[...]
Quoted 2 lines
I polite bump; I never heard back on this. I'm planning to post my LPA2/KVM series on top of v6.7-rc1 in the next day or 2.
I suspect that's what most maintainers wait for ;). Usually patches posted just before or during the merging window get ignored, unless they are urgent fixes.
Quoted 4 lines
By default, these 3 patches will
be the first 3 of the series. But if you have an issue with the approach it would be good to work out an alternative plan to avoid wasting effort preparing the series.
Quoted 7 lines
If these patches are needed for Ard's series (I think they do), they could be posted together. But first we need to split Ard's series into at least two: reworking the memory map together with moving (some of) the init code to C and the actual LPA2 stage 1 support. We might even through LPA2 stage 2 on top if we feel brave ;). We can queue them all together but having separate series gives us an option to drop bits if needed.
Sorry I'm not completely sure what you are suggesting I do here. In the context of the lpa2/kvm series, Marc previously said he would merge it for v6.8 if I posted against v6.7-rc1 (which is what I'm gearing up for now).
My series and Ard's are independent except that they both depend on the 3 patches in this RFC. Ard has just suggested he would prefix his series with these 3 patches and I would continue to do the same, then they can be handled as 2 independent series (or more if Ard is splitting his) - the first 3 patches will just desolve to nothing for the series that goes in second.
Does that work for you, are are you suggesting I should re-post this as an independent series?
Thanks,
Ryan
Catalin Marinas
maintainerQuoted 9 lines · Ryan Roberts
Quoted 7 lines · Catalin Marinas
If these patches are needed for Ard's series (I think they do), they could be posted together. But first we need to split Ard's series into at least two: reworking the memory map together with moving (some of) the init code to C and the actual LPA2 stage 1 support. We might even through LPA2 stage 2 on top if we feel brave ;). We can queue them all together but having separate series gives us an option to drop bits if needed.
Quoted 3 lines
Sorry I'm not completely sure what you are suggesting I do here. In the context of the lpa2/kvm series, Marc previously said he would merge it for v6.8 if I posted against v6.7-rc1 (which is what I'm gearing up for now).
If we merge your series independently of Ard's, that's fine, these three patches can go together as a prefix.
Quoted 8 lines
My series and Ard's are independent except that they both depend on the 3 patches in this RFC. Ard has just suggested he would prefix his series with these 3 patches and I would continue to do the same, then they can be handled as 2 independent series (or more if Ard is splitting his) - the first 3 patches will just desolve to nothing for the series that goes in second.
Does that work for you, are are you suggesting I should re-post this as an independent series?
No need to. Just post your LPA2 patches with these three as a prefix. Ard can include them as well and if it gets to merging both, we'll sort out a small stable branch for these three patches.
Signature · 1 line
Catalin
Quoted 23 lines · Catalin Marinas
Quoted 9 lines · Ryan Roberts
Quoted 7 lines · Catalin Marinas
If these patches are needed for Ard's series (I think they do), they could be posted together. But first we need to split Ard's series into at least two: reworking the memory map together with moving (some of) the init code to C and the actual LPA2 stage 1 support. We might even through LPA2 stage 2 on top if we feel brave ;). We can queue them all together but having separate series gives us an option to drop bits if needed.
Quoted 3 lines
Sorry I'm not completely sure what you are suggesting I do here. In the context of the lpa2/kvm series, Marc previously said he would merge it for v6.8 if I posted against v6.7-rc1 (which is what I'm gearing up for now).
If we merge your series independently of Ard's, that's fine, these three patches can go together as a prefix.
Quoted 6 lines
My series and Ard's are independent except that they both depend on the 3 patches in this RFC. Ard has just suggested he would prefix his series with these 3 patches and I would continue to do the same, then they can be handled as 2 independent series (or more if Ard is splitting his) - the first 3 patches will just desolve to nothing for the series that goes in second.
Quoted 7 lines
Quoted 2 lines
Does that work for you, are are you suggesting I should re-post this as an independent series?
No need to. Just post your LPA2 patches with these three as a prefix. Ard can include them as well and if it gets to merging both, we'll sort out a small stable branch for these three patches.
Great - thanks for the clarification!
Quoted 8 lines · Catalin Marinas
But first we need to split Ard's series into
at least two: reworking the memory map together with moving (some of) the init code to C and the actual LPA2 stage 1 support. We might even through LPA2 stage 2 on top if we feel brave ;). We can queue them all together but having separate series gives us an option to drop bits if needed.
I have rebased the changes onto v6.7-rc1 and squashed or added some of the followup fixes:
https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=arm64-lpa2-v5
I am happy to carve this up any way you like. A natural split would be to include everything up to and including
arm64: mmu: Make __cpu_replace_ttbr1() out of line
and queue the rest later, but perhaps you prefer to start with a smaller subset?
Catalin Marinas
maintainerQuoted 13 lines · Ard Biesheuvel
Quoted 8 lines · Catalin Marinas
But first we need to split Ard's series into
at least two: reworking the memory map together with moving (some of) the init code to C and the actual LPA2 stage 1 support. We might even through LPA2 stage 2 on top if we feel brave ;). We can queue them all together but having separate series gives us an option to drop bits if needed.I have rebased the changes onto v6.7-rc1 and squashed or added some of the followup fixes:
Quoted 8 lines
https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=arm64-lpa2-v5
I am happy to carve this up any way you like. A natural split would be to include everything up to and including
arm64: mmu: Make
__cpu_replace_ttbr1()out of lineand queue the rest later, but perhaps you prefer to start with a smaller subset?
This looks fine, just split this whole lot in two, the first one to __cpu_replace_ttbr1().
Signature · 1 line
Catalin