[PW_SID:1100002] RISC-V: KVM: Convert HGEI management to fully per-HART#2002
[PW_SID:1100002] RISC-V: KVM: Convert HGEI management to fully per-HART#2002linux-riscv-bot wants to merge 2 commits into
Conversation
Add nr_guest_files in per-HART local config to represent the number of guest files available on a particular HART whereas the nr_guest_files in the global config represents the number of guest files available across all HARTs. This allows KVM RISC-V to use nr_guest_files from per-HART local config for asymmetric big.Little systems. Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org> Acked-by: Thomas Gleixner <tglx@kernel.org> Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Previously, the number of Hypervisor Guest External Interrupt (HGEI)
lines was stored in a single global variable `kvm_riscv_aia_nr_hgei`
and assumed to be the same for all HARTs. This assumption does not
hold on heterogeneous RISC-V SoCs where different cores may expose
different HGEIE CSR widths.
Introduce `nr_hgei` field into the per-CPU `struct aia_hgei_control`
and probe the actual supported HGEI count for the current HART in
`kvm_riscv_aia_enable()` using the standard RISC-V CSR probe technique:
csr_write(CSR_HGEIE, -1UL);
nr = fls_long(csr_read(CSR_HGEIE));
if (nr)
nr--;
All HGEI allocation, free and disable paths (`kvm_riscv_aia_free_hgei()`,
`kvm_riscv_aia_disable()`, etc.) now use the per-CPU value instead of
the global one.
The global `kvm_riscv_aia_nr_hgei` now represents the minimum number
of HGEI lines across HARTs and can be used to check whether HGEI
support is available or not.
This makes KVM AIA robust on big.LITTLE-style asymmetric platforms.
Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org>
Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v3,1/2] irqchip/riscv-imsic: Add nr_guest_files in per-HART local config" |
|
Patch 1: "[v3,1/2] irqchip/riscv-imsic: Add nr_guest_files in per-HART local config" |
|
Patch 1: "[v3,1/2] irqchip/riscv-imsic: Add nr_guest_files in per-HART local config" |
|
Patch 1: "[v3,1/2] irqchip/riscv-imsic: Add nr_guest_files in per-HART local config" |
|
Patch 1: "[v3,1/2] irqchip/riscv-imsic: Add nr_guest_files in per-HART local config" |
|
Patch 1: "[v3,1/2] irqchip/riscv-imsic: Add nr_guest_files in per-HART local config" |
|
Patch 1: "[v3,1/2] irqchip/riscv-imsic: Add nr_guest_files in per-HART local config" |
|
Patch 1: "[v3,1/2] irqchip/riscv-imsic: Add nr_guest_files in per-HART local config" |
|
Patch 1: "[v3,1/2] irqchip/riscv-imsic: Add nr_guest_files in per-HART local config" |
|
Patch 1: "[v3,1/2] irqchip/riscv-imsic: Add nr_guest_files in per-HART local config" |
|
Patch 1: "[v3,1/2] irqchip/riscv-imsic: Add nr_guest_files in per-HART local config" |
|
Patch 1: "[v3,1/2] irqchip/riscv-imsic: Add nr_guest_files in per-HART local config" |
|
Patch 2: "[v3,2/2] RISC-V: KVM: AIA: Make HGEI number management fully per-CPU" |
|
Patch 2: "[v3,2/2] RISC-V: KVM: AIA: Make HGEI number management fully per-CPU" |
|
Patch 2: "[v3,2/2] RISC-V: KVM: AIA: Make HGEI number management fully per-CPU" |
|
Patch 2: "[v3,2/2] RISC-V: KVM: AIA: Make HGEI number management fully per-CPU" |
|
Patch 2: "[v3,2/2] RISC-V: KVM: AIA: Make HGEI number management fully per-CPU" |
|
Patch 2: "[v3,2/2] RISC-V: KVM: AIA: Make HGEI number management fully per-CPU" |
|
Patch 2: "[v3,2/2] RISC-V: KVM: AIA: Make HGEI number management fully per-CPU" |
|
Patch 2: "[v3,2/2] RISC-V: KVM: AIA: Make HGEI number management fully per-CPU" |
|
Patch 2: "[v3,2/2] RISC-V: KVM: AIA: Make HGEI number management fully per-CPU" |
|
Patch 2: "[v3,2/2] RISC-V: KVM: AIA: Make HGEI number management fully per-CPU" |
|
Patch 2: "[v3,2/2] RISC-V: KVM: AIA: Make HGEI number management fully per-CPU" |
|
Patch 2: "[v3,2/2] RISC-V: KVM: AIA: Make HGEI number management fully per-CPU" |
PR for series 1100002 applied to workflow__riscv__fixes
Name: RISC-V: KVM: Convert HGEI management to fully per-HART
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1100002
Version: 3