Re: [PATCH v13 16/40] KVM: arm64: Manage GCS access and registers for guests

2024-10-02 Thread Marc Zyngier
On Wed, 02 Oct 2024 19:24:12 +0100, Mark Brown wrote: > > [1 ] > On Wed, Oct 02, 2024 at 04:55:25PM +0100, Marc Zyngier wrote: > > Marc Zyngier wrote: > > > > > + if (!kvm_has_gcs(kvm)) > > > > + kvm->arch.fgu[HFGxTR_GROUP] |= (HFGxTR_EL2_nGCS_EL0 | > > > > +

Re: [PATCH 07/33] riscv: zicfilp / zicfiss in dt-bindings (extensions.yaml)

2024-10-02 Thread Rob Herring
On Tue, Oct 01, 2024 at 09:06:12AM -0700, Deepak Gupta wrote: > Make an entry for cfi extensions in extensions.yaml. Run "git log --oneline" on the file/subsystem and follow the subject prefix pattern. > > Signed-off-by: Deepak Gupta > --- > Documentation/devicetree/bindings/riscv/extensions.

[PATCH] docs: backporting: fix a typo

2024-10-02 Thread Andrew Kreimer
Fix a typo in documentation. Signed-off-by: Andrew Kreimer --- Documentation/process/backporting.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/process/backporting.rst b/Documentation/process/backporting.rst index a71480fcf3b4..18e41e76ecba 100644 --- a/Do

Re: [PATCH 33/33] kselftest/riscv: kselftest for user mode cfi

2024-10-02 Thread Shuah Khan
On 10/1/24 10:06, Deepak Gupta wrote: Adds kselftest for RISC-V control flow integrity implementation for user mode. There is not a lot going on in kernel for enabling landing pad for user mode. cfi selftest are intended to be compiled with zicfilp and zicfiss enabled compiler. Thus kselftest sim

[PATCH v2 0/6] Add AutoFDO and Propeller support for Clang build

2024-10-02 Thread Rong Xu
Hi, This patch series is to integrate AutoFDO and Propeller support into the Linux kernel. AutoFDO is a profile-guided optimization technique that leverages hardware sampling to enhance binary performance. Unlike Instrumentation-based FDO (iFDO), AutoFDO offers a user-friendly and straightforward

[PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-02 Thread Rong Xu
Add the build support for using Clang's AutoFDO. Building the kernel with AutoFDO does not reduce the optimization level from the compiler. AutoFDO uses hardware sampling to gather information about the frequency of execution of different code paths within a binary. This information is then used to

[PATCH v2 3/6] Change the symbols order when --ffuntion-sections is enabled

2024-10-02 Thread Rong Xu
When the -ffunction-sections compiler option is enabled, each function is placed in a separate section named .text.function_name rather than putting all functions in a single .text section. However, using -function-sections can cause problems with the linker script. The comments included in includ

[PATCH v2 2/6] objtool: Fix unreachable instruction warnings for weak funcitons

2024-10-02 Thread Rong Xu
In the presence of both weak and strong function definitions, the linker drops the weak symbol in favor of a strong symbol, but leaves the code in place. Code in ignore_unreachable_insn() has some heuristics to suppress the warning, but it does not work when -ffunction-sections is enabled. Suppose

[PATCH v2 4/6] AutoFDO: Enable -ffunction-sections for the AutoFDO build

2024-10-02 Thread Rong Xu
Enable -ffunction-sections by default for the AutoFDO build. With -ffunction-sections, the compiler places each function in its own section named .text.function_name instead of placing all functions in the .text section. In the AutoFDO build, this allows the linker to utilize profile information t

[PATCH v2 6/6] Add Propeller configuration for kernel build.

2024-10-02 Thread Rong Xu
Add the build support for using Clang's Propeller optimizer. Like AutoFDO, Propeller uses hardware sampling to gather information about the frequency of execution of different code paths within a binary. This information is then used to guide the compiler's optimization decisions, resulting in a mo

[PATCH v2 5/6] AutoFDO: Enable machine function split optimization for AutoFDO

2024-10-02 Thread Rong Xu
Enable the machine function split optimization for AutoFDO in Clang. Machine function split (MFS) is a pass in the Clang compiler that splits a function into hot and cold parts. The linker groups all cold blocks across functions together. This decreases hot code fragmentation and improves iCache a

Re: [PATCH] docs: dev-tools: Add documentation for the device focused kselftests

2024-10-02 Thread Shuah Khan
On 10/1/24 09:43, Nícolas F. R. A. Prado wrote: Add documentation for the kselftests focused on testing devices and point to it from the kselftest documentation. There are multiple tests in this category so the aim of this page is to make it clear when to run each test. Signed-off-by: Nícolas F.

Re: [PATCH v13 16/40] KVM: arm64: Manage GCS access and registers for guests

2024-10-02 Thread Mark Brown
On Wed, Oct 02, 2024 at 04:55:25PM +0100, Marc Zyngier wrote: > Marc Zyngier wrote: > > > + if (!kvm_has_gcs(kvm)) > > > + kvm->arch.fgu[HFGxTR_GROUP] |= (HFGxTR_EL2_nGCS_EL0 | > > > + HFGxTR_EL2_nGCS_EL1); > > Why are you still allowing the GCS in

Re: [PATCH v2] Documentation/process: maintainer-soc: clarify submitting patches

2024-10-02 Thread Linus Walleij
On Wed, Sep 25, 2024 at 11:56 AM Krzysztof Kozlowski wrote: > Patches for SoCs are expected to be picked up by SoC submaintainers. > The main SoC maintainers should be addressed only in few cases. > > Rewrite the section about maintainer handling to document above > expectation. > > Signed-off-by

Re: [PATCH v10 01/14] dt-bindings: riscv: Add xtheadvector ISA extension description

2024-10-02 Thread Andy Chiu
Charlie Jenkins 於 2024年9月12日 週四 下午1:57寫道: > > The xtheadvector ISA extension is described on the T-Head extension spec > Github page [1] at commit 95358cb2cca9. > > Link: > https://github.com/T-head-Semi/thead-extension-spec/blob/95358cb2cca9489361c61d335e03d3134b14133f/xtheadvector.adoc > [1] >

Re: [PATCH v10 02/14] dt-bindings: cpus: add a thead vlen register length property

2024-10-02 Thread Andy Chiu
Charlie Jenkins 於 2024年9月12日 週四 下午1:57寫道: > > Add a property analogous to the vlenb CSR so that software can detect > the vector length of each CPU prior to it being brought online. > Currently software has to assume that the vector length read from the > boot CPU applies to all possible CPUs. On

Re: [PATCH v10 05/14] riscv: vector: Use vlenb from DT for thead

2024-10-02 Thread Andy Chiu
Charlie Jenkins 於 2024年9月12日 週四 下午1:57寫道: > > If thead,vlenb is provided in the device tree, prefer that over reading > the vlenb csr. > > Signed-off-by: Charlie Jenkins > Acked-by: Conor Dooley > --- > arch/riscv/Kconfig.vendor| 13 +++ > arch/riscv/include/asm/cpuf

Re: [PATCH v10 10/14] riscv: hwprobe: Add thead vendor extension probing

2024-10-02 Thread Emil Renner Berthing
Charlie Jenkins wrote: > Add a new hwprobe key "RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0" which > allows userspace to probe for the new RISCV_ISA_VENDOR_EXT_XTHEADVECTOR > vendor extension. > > This new key will allow userspace code to probe for which thead vendor > extensions are supported. This API i

Re: [PATCH v13 16/40] KVM: arm64: Manage GCS access and registers for guests

2024-10-02 Thread Marc Zyngier
On Wed, 02 Oct 2024 01:24:25 +0100, Marc Zyngier wrote: > > On Tue, 01 Oct 2024 23:58:55 +0100, > Mark Brown wrote: > > > @@ -4714,6 +4735,10 @@ void kvm_calculate_traps(struct kvm_vcpu *vcpu) > > kvm->arch.fgu[HFGxTR_GROUP] |= (HFGxTR_EL2_nPOR_EL1 | > >