Date: Fri, 8 Nov 2024 17:07:34 +0530 From: Anup Patel To: Paolo Bonzini Cc: Palmer Dabbelt , Palmer Dabbelt , Andrew Jones , Atish Patra , Atish Patra , "open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv)" , KVM General , linux-riscv Subject: [GIT PULL] KVM/riscv changes for 6.13 Hi Paolo, We have the following KVM RISC-V changes for 6.13: 1) Accelerate KVM RISC-V when running as a guest 2) Perf support to collect KVM guest statistics from host side In addition, the pointer masking support (Ssnpm and Smnpm) for KVM guest is going through the RISC-V tree. I also have Svade and Svadu support for host and guest in my queue which I will send in the second week of the merge window to avoid conflict with the RISC-V tree. Please pull. Regards, Anup The following changes since commit 81983758430957d9a5cb3333fe324fd70cf63e7e= : Linux 6.12-rc5 (2024-10-27 12:52:02 -1000) are available in the Git repository at: https://github.com/kvm-riscv/linux.git tags/kvm-riscv-6.13-1 for you to fetch changes up to 332fa4a802b16ccb727199da685294f85f9880cb: riscv: kvm: Fix out-of-bounds array access (2024-11-05 13:27:32 +0530) ---------------------------------------------------------------- KVM/riscv changes for 6.13 - Accelerate KVM RISC-V when running as a guest - Perf support to collect KVM guest statistics from host side ---------------------------------------------------------------- Anup Patel (13): RISC-V: KVM: Order the object files alphabetically RISC-V: KVM: Save/restore HSTATUS in C source RISC-V: KVM: Save/restore SCOUNTEREN in C source RISC-V: KVM: Break down the __kvm_riscv_switch_to() into macros RISC-V: KVM: Replace aia_set_hvictl() with aia_hvictl_value() RISC-V: KVM: Don't setup SGEI for zero guest external interrupts RISC-V: Add defines for the SBI nested acceleration extension RISC-V: KVM: Add common nested acceleration support RISC-V: KVM: Use nacl_csr_xyz() for accessing H-extension CSRs RISC-V: KVM: Use nacl_csr_xyz() for accessing AIA CSRs RISC-V: KVM: Use SBI sync SRET call when available RISC-V: KVM: Save trap CSRs in kvm_riscv_vcpu_enter_exit() RISC-V: KVM: Use NACL HFENCEs for KVM request based HFENCEs Bj=C3=B6rn T=C3=B6pel (1): riscv: kvm: Fix out-of-bounds array access Quan Zhou (2): riscv: perf: add guest vs host distinction riscv: KVM: add basic support for host vs guest profiling Yong-Xuan Wang (1): RISC-V: KVM: Fix APLIC in_clrip and clripnum write emulation arch/riscv/include/asm/kvm_host.h | 10 ++ arch/riscv/include/asm/kvm_nacl.h | 245 ++++++++++++++++++++++++++++++++= ++++ arch/riscv/include/asm/perf_event.h | 6 + arch/riscv/include/asm/sbi.h | 120 ++++++++++++++++++ arch/riscv/kernel/perf_callchain.c | 38 ++++++ arch/riscv/kvm/Kconfig | 1 + arch/riscv/kvm/Makefile | 27 ++-- arch/riscv/kvm/aia.c | 114 +++++++++++------ arch/riscv/kvm/aia_aplic.c | 3 +- arch/riscv/kvm/main.c | 63 +++++++++- arch/riscv/kvm/mmu.c | 4 +- arch/riscv/kvm/nacl.c | 152 ++++++++++++++++++++++ arch/riscv/kvm/tlb.c | 57 ++++++--- arch/riscv/kvm/vcpu.c | 191 +++++++++++++++++++++------- arch/riscv/kvm/vcpu_sbi.c | 11 +- arch/riscv/kvm/vcpu_switch.S | 137 ++++++++++++-------- arch/riscv/kvm/vcpu_timer.c | 28 ++--- 17 files changed, 1022 insertions(+), 185 deletions(-) create mode 100644 arch/riscv/include/asm/kvm_nacl.h create mode 100644 arch/riscv/kvm/nacl.c . Date: Tue, 12 Nov 2024 17:23:14 +0100 From: Janosch Frank To: pbonzini@redhat.com Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, david@redhat.com, borntraeger@linux.ibm.com, cohuck@redhat.com, linux-s390@vger.kernel.org, imbrenda@linux.ibm.com, hca@linux.ibm.com Subject: [GIT PULL 00/14] KVM: s390: pull requests for 6.13 Paolo, here's the second and final tranche of ucontrol tests together with cpumodel sanity tests and the gen 17 cpumodel changes. Heiko and I decided to move the uvdevice patches through the s390 kernel tree since a set of crypto changes depend on them and we didn't feel like creating a topic branch. Please pull. The following changes since commit 8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b: Linux 6.12-rc2 (2024-10-06 15:32:27 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-next-6.13-1 for you to fetch changes up to 7a1f3143377adb655a3912b8dea714949f819fa3: KVM: s390: selftests: Add regression tests for PFCR subfunctions (2024-11-11 12:15:44 +0000) ---------------------------------------------------------------- - second part of the ucontrol selftest - cpumodel sanity check selftest - gen17 cpumodel changes ---------------------------------------------------------------- Christoph Schlameuss (5): KVM: s390: selftests: Add uc_map_unmap VM test case KVM: s390: selftests: Add uc_skey VM test case KVM: s390: selftests: Verify reject memory region operations for ucontrol VMs KVM: s390: selftests: Fix whitespace confusion in ucontrol test KVM: s390: selftests: correct IP.b length in uc_handle_sieic debug output Hariharan Mari (5): KVM: s390: selftests: Add regression tests for SORTL and DFLTCC CPU subfunctions KVM: s390: selftests: Add regression tests for PRNO, KDSA and KMA crypto subfunctions KVM: s390: selftests: Add regression tests for KMCTR, KMF, KMO and PCC crypto subfunctions KVM: s390: selftests: Add regression tests for KMAC, KMC, KM, KIMD and KLMD crypto subfunctions KVM: s390: selftests: Add regression tests for PLO subfunctions Hendrik Brueckner (4): KVM: s390: add concurrent-function facility to cpu model KVM: s390: add msa11 to cpu model KVM: s390: add gen17 facilities to CPU model KVM: s390: selftests: Add regression tests for PFCR subfunctions arch/s390/include/asm/kvm_host.h | 1 + arch/s390/include/uapi/asm/kvm.h | 3 +- arch/s390/kvm/kvm-s390.c | 43 ++- arch/s390/kvm/vsie.c | 3 +- arch/s390/tools/gen_facilities.c | 2 + tools/arch/s390/include/uapi/asm/kvm.h | 3 +- tools/testing/selftests/kvm/Makefile | 2 + .../selftests/kvm/include/s390x/facility.h | 50 +++ .../selftests/kvm/include/s390x/processor.h | 6 + .../selftests/kvm/lib/s390x/facility.c | 14 + .../kvm/s390x/cpumodel_subfuncs_test.c | 301 ++++++++++++++++ .../selftests/kvm/s390x/ucontrol_test.c | 322 +++++++++++++++++- 12 files changed, 737 insertions(+), 13 deletions(-) create mode 100644 tools/testing/selftests/kvm/include/s390x/facility.h create mode 100644 tools/testing/selftests/kvm/lib/s390x/facility.c create mode 100644 tools/testing/selftests/kvm/s390x/cpumodel_subfuncs_test.c -- 2.47.0 . Date: Tue, 12 Nov 2024 13:17:00 -0500 From: Paolo Bonzini To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [GIT PULL] KVM fixes for Linux 6.12-rc8 or final Linus, The following changes since commit 59b723cd2adbac2a34fc8e12c74ae26ae45bf230: Linux 6.12-rc6 (2024-11-03 14:05:52 -1000) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus for you to fetch changes up to aa0d42cacf093a6fcca872edc954f6f812926a17: KVM: VMX: Bury Intel PT virtualization (guest/host mode) behind CONFIG_BROKEN (2024-11-08 05:57:13 -0500) ---------------------------------------------------------------- KVM x86 and selftests fixes for 6.12: x86: - When emulating a guest TLB flush for a nested guest, flush vpid01, not vpid02, if L2 is active but VPID is disabled in vmcs12, i.e. if L2 and L1 are sharing VPID '0' (from L1's perspective). - Fix a bug in the SNP initialization flow where KVM would return '0' to userspace instead of -errno on failure. - Move the Intel PT virtualization (i.e. outputting host trace to host buffer and guest trace to guest buffer) behind CONFIG_BROKEN. - Fix memory leak on failure of KVM_SEV_SNP_LAUNCH_START - Fix a bug where KVM fails to inject an interrupt from the IRR after KVM_SET_LAPIC. Selftests: - Increase the timeout for the memslot performance selftest to avoid false failures on arm64 and nested x86 platforms. - Fix a goof in the guest_memfd selftest where a for-loop initialized a bit mask to zero instead of BIT(0). - Disable strict aliasing when building KVM selftests to prevent the compiler from treating things like "u64 *" to "uint64_t *" cases as undefined behavior, which can lead to nasty, hard to debug failures. - Force -march=x86-64-v2 for KVM x86 selftests if and only if the uarch is supported by the compiler. - Fix broken compilation of kvm selftests after a header sync in tools/ ---------------------------------------------------------------- Dionna Glaze (1): kvm: svm: Fix gctx page leak on invalid inputs John Sperbeck (1): KVM: selftests: use X86_MEMTYPE_WB instead of VMX_BASIC_MEM_TYPE_WB Maxim Levitsky (1): KVM: selftests: memslot_perf_test: increase guest sync timeout Paolo Bonzini (1): Merge tag 'kvm-x86-fixes-6.12-rcN' of https://github.com/kvm-x86/linux into HEAD Patrick Roy (1): KVM: selftests: fix unintentional noop test in guest_memfd_test.c Sean Christopherson (6): KVM: selftests: Disable strict aliasing KVM: selftests: Don't force -march=x86-64-v2 if it's unsupported KVM: nVMX: Treat vpid01 as current if L2 is active, but with VPID disabled KVM: SVM: Propagate error from snp_guest_req_init() to userspace KVM: x86: Unconditionally set irr_pending when updating APICv state KVM: VMX: Bury Intel PT virtualization (guest/host mode) behind CONFIG_BROKEN arch/x86/kvm/lapic.c | 29 +++++++++++++++--------- arch/x86/kvm/svm/sev.c | 15 ++++++++----- arch/x86/kvm/vmx/nested.c | 30 ++++++++++++++++++++----- arch/x86/kvm/vmx/vmx.c | 6 +++-- tools/testing/selftests/kvm/Makefile | 10 +++++---- tools/testing/selftests/kvm/guest_memfd_test.c | 2 +- tools/testing/selftests/kvm/lib/x86_64/vmx.c | 2 +- tools/testing/selftests/kvm/memslot_perf_test.c | 2 +- 8 files changed, 65 insertions(+), 31 deletions(-) . Date: Tue, 12 Nov 2024 11:33:30 -0800 From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson Subject: [GIT PULL] KVM: x86 changes for 6.13 AFAIK, there are no conflicts or dependencies with other architectures or trees. . Date: Wed, 13 Nov 2024 23:38:23 -0800 From: Oliver Upton To: Paolo Bonzini Cc: Marc Zyngier , Joey Gouly , Suzuki K Poulose , Zenghui Yu , James Morse , David Woodhouse , Fuad Tabba , Kunkun Jiang , Will Deacon , James Clark , Jing Zhang , Raghavendra Rao Ananta , Sean Christopherson , Shameer Kolothum , kvm@vger.kernel.org, kvmarm@lists.linux.dev Subject: [GIT PULL] KVM/arm64 changes for 6.13 Hi Paolo, Here's the main pile of changes for 6.13. The march towards implementing nested continues on, this time with the PMU and MMU getting attention. Note I've taken David's patch to use SYSTEM_OFF2 in the PSCI driver to hibernate, which was part of his combined series. There is also an extremely trivial conflict between this and the arm64 tree, both adding the same field enumeration to the sysreg table. Details found in the tag, please pull. -- Thanks, Oliver The following changes since commit 81983758430957d9a5cb3333fe324fd70cf63e7e: Linux 6.12-rc5 (2024-10-27 12:52:02 -1000) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git/ tags/kvmarm-6.13 for you to fetch changes up to 60ad25e14ab5a4e56c8bf7f7d6846eacb9cd53df: KVM: arm64: Pass on SVE mapping failures (2024-11-12 11:04:39 -0800) ---------------------------------------------------------------- KVM/arm64 changes for 6.13, part #1 - Support for stage-1 permission indirection (FEAT_S1PIE) and permission overlays (FEAT_S1POE), including nested virt + the emulated page table walker - Introduce PSCI SYSTEM_OFF2 support to KVM + client driver. This call was introduced in PSCIv1.3 as a mechanism to request hibernation, similar to the S4 state in ACPI - Explicitly trap + hide FEAT_MPAM (QoS controls) from KVM guests. As part of it, introduce trivial initialization of the host's MPAM context so KVM can use the corresponding traps - PMU support under nested virtualization, honoring the guest hypervisor's trap configuration and event filtering when running a nested guest - Fixes to vgic ITS serialization where stale device/interrupt table entries are not zeroed when the mapping is invalidated by the VM - Avoid emulated MMIO completion if userspace has requested synchronous external abort injection - Various fixes and cleanups affecting pKVM, vCPU initialization, and selftests ---------------------------------------------------------------- David Woodhouse (6): firmware/psci: Add definitions for PSCI v1.3 specification KVM: arm64: Add PSCI v1.3 SYSTEM_OFF2 function for hibernation KVM: arm64: Add support for PSCI v1.2 and v1.3 KVM: selftests: Add test for PSCI SYSTEM_OFF2 KVM: arm64: nvhe: Pass through PSCI v1.3 SYSTEM_OFF2 call arm64: Use SYSTEM_OFF2 PSCI call to power off for hibernate Fuad Tabba (4): KVM: arm64: Move pkvm_vcpu_init_traps() to init_pkvm_hyp_vcpu() KVM: arm64: Refactor kvm_vcpu_enable_ptrauth() for hyp use KVM: arm64: Initialize the hypervisor's VM state at EL2 KVM: arm64: Initialize trap register values in hyp in pKVM James Clark (1): KVM: arm64: Pass on SVE mapping failures James Morse (7): arm64/sysreg: Convert existing MPAM sysregs and add the remaining entries arm64: head.S: Initialise MPAM EL2 registers and disable traps arm64: cpufeature: discover CPU support for MPAM KVM: arm64: Fix missing traps of guest accesses to the MPAM registers KVM: arm64: Add a macro for creating filtered sys_reg_descs entries KVM: arm64: Disable MPAM visibility by default and ignore VMM writes KVM: arm64: selftests: Test ID_AA64PFR0.MPAM isn't completely ignored Jing Zhang (1): KVM: arm64: vgic-its: Add a data length check in vgic_its_save_* Kunkun Jiang (2): KVM: arm64: vgic-its: Clear DTE when MAPD unmaps a device KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE Marc Zyngier (33): arm64: Drop SKL0/SKL1 from TCR2_EL2 arm64: Remove VNCR definition for PIRE0_EL2 arm64: Add encoding for PIRE0_EL2 KVM: arm64: Drop useless struct s2_mmu in __kvm_at_s1e2() KVM: arm64: nv: Add missing EL2->EL1 mappings in get_el2_to_el1_mapping() KVM: arm64: nv: Handle CNTHCTL_EL2 specially arm64: Define ID_AA64MMFR1_EL1.HAFDBS advertising FEAT_HAFT KVM: arm64: Add TCR2_EL2 to the sysreg arrays KVM: arm64: nv: Save/Restore vEL2 sysregs KVM: arm64: Sanitise TCR2_EL2 KVM: arm64: Correctly access TCR2_EL1, PIR_EL1, PIRE0_EL1 with VHE KVM: arm64: Add save/restore for TCR2_EL2 KVM: arm64: Extend masking facility to arbitrary registers KVM: arm64: Add PIR{,E0}_EL2 to the sysreg arrays KVM: arm64: Add save/restore for PIR{,E0}_EL2 KVM: arm64: Handle PIR{,E0}_EL2 traps KVM: arm64: Add AT fast-path support for S1PIE KVM: arm64: Split S1 permission evaluation into direct and hierarchical parts KVM: arm64: Disable hierarchical permissions when S1PIE is enabled KVM: arm64: Implement AT S1PIE support KVM: arm64: Add a composite EL2 visibility helper KVM: arm64: Rely on visibility to let PIR*_ELx/TCR2_ELx UNDEF arm64: Add encoding for POR_EL2 KVM: arm64: Drop bogus CPTR_EL2.E0POE trap routing KVM: arm64: Subject S1PIE/S1POE registers to HCR_EL2.{TVM,TRVM} KVM: arm64: Add kvm_has_s1poe() helper KVM: arm64: Add basic support for POR_EL2 KVM: arm64: Add save/restore support for POR_EL2 KVM: arm64: Add POE save/restore for AT emulation fast-path KVM: arm64: Disable hierarchical permissions when POE is enabled KVM: arm64: Make PAN conditions part of the S1 walk context KVM: arm64: Handle stage-1 permission overlays KVM: arm64: Handle WXN attribute Mark Brown (3): KVM: arm64: Define helper for EL2 registers with custom visibility KVM: arm64: Hide TCR2_EL1 from userspace when disabled for guests KVM: arm64: Hide S1PIE registers from userspace when disabled for guests Oliver Upton (28): KVM: arm64: Don't retire aborted MMIO instruction tools: arm64: Grab a copy of esr.h from kernel KVM: arm64: selftests: Convert to kernel's ESR terminology KVM: arm64: selftests: Add tests for MMIO external abort injection arm64: sysreg: Describe ID_AA64DFR2_EL1 fields arm64: sysreg: Migrate MDCR_EL2 definition to table arm64: sysreg: Add new definitions for ID_AA64DFR0_EL1 KVM: arm64: Describe RES0/RES1 bits of MDCR_EL2 KVM: arm64: nv: Allow coarse-grained trap combos to use complex traps KVM: arm64: nv: Rename BEHAVE_FORWARD_ANY KVM: arm64: nv: Reinject traps that take effect in Host EL0 KVM: arm64: nv: Honor MDCR_EL2.{TPM, TPMCR} in Host EL0 KVM: arm64: nv: Describe trap behaviour of MDCR_EL2.HPMN KVM: arm64: nv: Advertise support for FEAT_HPMN0 KVM: arm64: Rename kvm_pmu_valid_counter_mask() KVM: arm64: nv: Adjust range of accessible PMCs according to HPMN KVM: arm64: Add helpers to determine if PMC counts at a given EL KVM: arm64: nv: Honor MDCR_EL2.HPME KVM: arm64: nv: Honor MDCR_EL2.HLP KVM: arm64: nv: Apply EL2 event filtering when in hyp context KVM: arm64: nv: Reprogram PMU events affected by nested transition Merge branch kvm-arm64/nv-s1pie-s1poe into kvmarm/next Merge branch kvm-arm64/psci-1.3 into kvmarm/next Merge branch kvm-arm64/mpam-ni into kvmarm/next Merge branch kvm-arm64/misc into kvmarm/next Merge branch kvm-arm64/mmio-sea into kvmarm/next Merge branch kvm-arm64/nv-pmu into kvmarm/next Merge branch kvm-arm64/vgic-its-fixes into kvmarm/next Raghavendra Rao Ananta (1): KVM: arm64: Get rid of userspace_irqchip_in_use Sean Christopherson (1): KVM: selftests: Don't bother deleting memslots in KVM when freeing VMs Shameer Kolothum (1): KVM: arm64: Make L1Ip feature in CTR_EL0 writable from userspace Will Deacon (2): KVM: arm64: Just advertise SEIS as 0 when emulating ICC_CTLR_EL1 KVM: arm64: Don't map 'kvm_vgic_global_state' at EL2 with pKVM Documentation/arch/arm64/cpu-feature-registers.rst | 2 + Documentation/virt/kvm/api.rst | 10 + arch/arm64/include/asm/cpu.h | 1 + arch/arm64/include/asm/cpucaps.h | 5 + arch/arm64/include/asm/cpufeature.h | 17 + arch/arm64/include/asm/el2_setup.h | 14 + arch/arm64/include/asm/kvm_arm.h | 30 +- arch/arm64/include/asm/kvm_asm.h | 1 - arch/arm64/include/asm/kvm_emulate.h | 9 + arch/arm64/include/asm/kvm_host.h | 44 +- arch/arm64/include/asm/sysreg.h | 12 - arch/arm64/include/asm/vncr_mapping.h | 1 - arch/arm64/include/uapi/asm/kvm.h | 6 + arch/arm64/kernel/cpufeature.c | 96 +++++ arch/arm64/kernel/cpuinfo.c | 3 + arch/arm64/kvm/arch_timer.c | 3 +- arch/arm64/kvm/arm.c | 26 +- arch/arm64/kvm/at.c | 470 ++++++++++++++++++--- arch/arm64/kvm/emulate-nested.c | 301 +++++++------ arch/arm64/kvm/hyp/include/hyp/switch.h | 31 ++ arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 11 +- arch/arm64/kvm/hyp/include/nvhe/trap_handler.h | 2 - arch/arm64/kvm/hyp/nvhe/hyp-main.c | 12 +- arch/arm64/kvm/hyp/nvhe/pkvm.c | 116 ++++- arch/arm64/kvm/hyp/nvhe/psci-relay.c | 2 + arch/arm64/kvm/hyp/nvhe/setup.c | 20 +- arch/arm64/kvm/hyp/nvhe/sysreg-sr.c | 2 +- arch/arm64/kvm/hyp/vgic-v3-sr.c | 3 - arch/arm64/kvm/hyp/vhe/sysreg-sr.c | 160 ++++++- arch/arm64/kvm/hypercalls.c | 2 + arch/arm64/kvm/mmio.c | 32 +- arch/arm64/kvm/nested.c | 82 +++- arch/arm64/kvm/pmu-emul.c | 143 ++++++- arch/arm64/kvm/psci.c | 44 +- arch/arm64/kvm/reset.c | 5 - arch/arm64/kvm/sys_regs.c | 309 +++++++++++--- arch/arm64/kvm/vgic/vgic-its.c | 32 +- arch/arm64/kvm/vgic/vgic.h | 23 + arch/arm64/tools/cpucaps | 2 + arch/arm64/tools/sysreg | 249 ++++++++++- drivers/firmware/psci/psci.c | 45 ++ include/kvm/arm_arch_timer.h | 3 + include/kvm/arm_pmu.h | 18 +- include/kvm/arm_psci.h | 4 +- include/uapi/linux/psci.h | 5 + kernel/power/hibernate.c | 5 +- tools/arch/arm64/include/asm/brk-imm.h | 42 ++ tools/arch/arm64/include/asm/esr.h | 455 ++++++++++++++++++++ tools/testing/selftests/kvm/Makefile | 1 + .../selftests/kvm/aarch64/debug-exceptions.c | 10 +- tools/testing/selftests/kvm/aarch64/mmio_abort.c | 159 +++++++ tools/testing/selftests/kvm/aarch64/no-vgic-v3.c | 2 +- .../selftests/kvm/aarch64/page_fault_test.c | 4 +- tools/testing/selftests/kvm/aarch64/psci_test.c | 92 ++++ tools/testing/selftests/kvm/aarch64/set_id_regs.c | 99 ++++- .../selftests/kvm/aarch64/vpmu_counter_access.c | 12 +- .../selftests/kvm/include/aarch64/processor.h | 15 +- .../testing/selftests/kvm/lib/aarch64/processor.c | 6 +- tools/testing/selftests/kvm/lib/kvm_util.c | 10 +- 59 files changed, 2859 insertions(+), 461 deletions(-) create mode 100644 tools/arch/arm64/include/asm/brk-imm.h create mode 100644 tools/arch/arm64/include/asm/esr.h create mode 100644 tools/testing/selftests/kvm/aarch64/mmio_abort.c . Date: Thu, 14 Nov 2024 17:41:28 +0800 From: Huacai Chen To: Paolo Bonzini , Huacai Chen , Tianrui Zhao , Bibo Mao Cc: kvm@vger.kernel.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Xuerui Wang , Jiaxun Yang , Huacai Chen Subject: [GIT PULL] LoongArch KVM changes for v6.13 The following changes since commit 2d5404caa8c7bb5c4e0435f94b28834ae5456623: Linux 6.12-rc7 (2024-11-10 14:19:35 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git tags/loongarch-kvm-6.13 for you to fetch changes up to 9899b8201025d00b23aee143594a30c55cc4cc35: irqchip/loongson-eiointc: Add virt extension support (2024-11-13 16:18:27 +0800) ---------------------------------------------------------------- LoongArch KVM changes for v6.13 1. Add iocsr and mmio bus simulation in kernel. 2. Add in-kernel interrupt controller emulation. 3. Add virt extension support for eiointc irqchip. ---------------------------------------------------------------- Bibo Mao (1): irqchip/loongson-eiointc: Add virt extension support Xianglai Li (11): LoongArch: KVM: Add iocsr and mmio bus simulation in kernel LoongArch: KVM: Add IPI device support LoongArch: KVM: Add IPI read and write function LoongArch: KVM: Add IPI user mode read and write function LoongArch: KVM: Add EIOINTC device support LoongArch: KVM: Add EIOINTC read and write functions LoongArch: KVM: Add EIOINTC user mode read and write functions LoongArch: KVM: Add PCHPIC device support LoongArch: KVM: Add PCHPIC read and write functions LoongArch: KVM: Add PCHPIC user mode read and write functions LoongArch: KVM: Add irqfd support Documentation/arch/loongarch/irq-chip-model.rst | 64 ++ .../zh_CN/arch/loongarch/irq-chip-model.rst | 55 ++ arch/loongarch/include/asm/irq.h | 1 + arch/loongarch/include/asm/kvm_eiointc.h | 123 +++ arch/loongarch/include/asm/kvm_host.h | 18 +- arch/loongarch/include/asm/kvm_ipi.h | 45 + arch/loongarch/include/asm/kvm_pch_pic.h | 62 ++ arch/loongarch/include/uapi/asm/kvm.h | 20 + arch/loongarch/kvm/Kconfig | 5 +- arch/loongarch/kvm/Makefile | 4 + arch/loongarch/kvm/exit.c | 82 +- arch/loongarch/kvm/intc/eiointc.c | 1027 ++++++++++++++++++++ arch/loongarch/kvm/intc/ipi.c | 475 +++++++++ arch/loongarch/kvm/intc/pch_pic.c | 519 ++++++++++ arch/loongarch/kvm/irqfd.c | 89 ++ arch/loongarch/kvm/main.c | 19 +- arch/loongarch/kvm/vcpu.c | 3 + arch/loongarch/kvm/vm.c | 21 + drivers/irqchip/irq-loongson-eiointc.c | 108 +- include/linux/kvm_host.h | 1 + include/trace/events/kvm.h | 35 + include/uapi/linux/kvm.h | 8 + 22 files changed, 2735 insertions(+), 49 deletions(-) create mode 100644 arch/loongarch/include/asm/kvm_eiointc.h create mode 100644 arch/loongarch/include/asm/kvm_ipi.h create mode 100644 arch/loongarch/include/asm/kvm_pch_pic.h create mode 100644 arch/loongarch/kvm/intc/eiointc.c create mode 100644 arch/loongarch/kvm/intc/ipi.c create mode 100644 arch/loongarch/kvm/intc/pch_pic.c create mode 100644 arch/loongarch/kvm/irqfd.c .