Merge tag 'kvm-riscv-6.4-1' of https://github.com/kvm-riscv/linux into HEAD
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 May 2023 10:11:48 +0000 (06:11 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 May 2023 10:11:48 +0000 (06:11 -0400)
KVM/riscv changes for 6.4

- ONE_REG interface to enable/disable SBI extensions
- Zbb extension for Guest/VM
- AIA CSR virtualization

1  2 
arch/riscv/include/asm/csr.h
arch/riscv/include/asm/hwcap.h
arch/riscv/include/uapi/asm/kvm.h
arch/riscv/kernel/cpu.c
arch/riscv/kernel/cpufeature.c
arch/riscv/kvm/Kconfig
arch/riscv/kvm/vcpu.c
arch/riscv/kvm/vm.c

Simple merge
index 9af7939708558782be28662ca68507dee48c8c38,ab2abf5615208689ac8c684d584e6b815baef26d..e0c40a4c63d51d4591c77eeda2e0dda070187d16
  #define RISCV_ISA_EXT_ZBB             30
  #define RISCV_ISA_EXT_ZICBOM          31
  #define RISCV_ISA_EXT_ZIHINTPAUSE     32
 -#define RISCV_ISA_EXT_SMAIA           33
 -#define RISCV_ISA_EXT_SSAIA           34
 +#define RISCV_ISA_EXT_SVNAPOT         33
 +#define RISCV_ISA_EXT_ZICBOZ          34
++#define RISCV_ISA_EXT_SMAIA           35
++#define RISCV_ISA_EXT_SSAIA           36
  
  #define RISCV_ISA_EXT_MAX             64
  #define RISCV_ISA_EXT_NAME_LEN_MAX    32
index e44c1e90eaa77ba27908e047f3b653229d7bf048,59707b80b3151886c7f6665764e500537f54d26b..f92790c9481a33f384ba461dc0dcfd1f83b10b90
@@@ -106,7 -117,8 +118,9 @@@ enum KVM_RISCV_ISA_EXT_ID 
        KVM_RISCV_ISA_EXT_SVINVAL,
        KVM_RISCV_ISA_EXT_ZIHINTPAUSE,
        KVM_RISCV_ISA_EXT_ZICBOM,
 +      KVM_RISCV_ISA_EXT_ZICBOZ,
+       KVM_RISCV_ISA_EXT_ZBB,
+       KVM_RISCV_ISA_EXT_SSAIA,
        KVM_RISCV_ISA_EXT_MAX,
  };
  
index 3df38052dcbd769455e86f5e008411c2f0911be4,ae1e7bbf9344e4daa7773ec765201acceae2a605..c96aa56cf1c7b2a8856c8eda3da77e4a24b447e0
@@@ -182,9 -186,10 +182,11 @@@ arch_initcall(riscv_cpuinfo_init)
   */
  static struct riscv_isa_ext_data isa_ext_arr[] = {
        __RISCV_ISA_EXT_DATA(zicbom, RISCV_ISA_EXT_ZICBOM),
 +      __RISCV_ISA_EXT_DATA(zicboz, RISCV_ISA_EXT_ZICBOZ),
        __RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE),
        __RISCV_ISA_EXT_DATA(zbb, RISCV_ISA_EXT_ZBB),
+       __RISCV_ISA_EXT_DATA(smaia, RISCV_ISA_EXT_SMAIA),
+       __RISCV_ISA_EXT_DATA(ssaia, RISCV_ISA_EXT_SSAIA),
        __RISCV_ISA_EXT_DATA(sscofpmf, RISCV_ISA_EXT_SSCOFPMF),
        __RISCV_ISA_EXT_DATA(sstc, RISCV_ISA_EXT_SSTC),
        __RISCV_ISA_EXT_DATA(svinval, RISCV_ISA_EXT_SVINVAL),
Simple merge
index 5682d8c017b3e419d982115777d17c7c1184d717,5bcb2d519b95dce9c731e9e328d9178b2a96174c..28891e583259c0e7d8fb9d9947235c5ac3151cfc
@@@ -20,14 -20,15 +20,14 @@@ if VIRTUALIZATIO
  config KVM
        tristate "Kernel-based Virtual Machine (KVM) support (EXPERIMENTAL)"
        depends on RISCV_SBI && MMU
+       select HAVE_KVM_EVENTFD
+       select HAVE_KVM_VCPU_ASYNC_IOCTL
+       select KVM_GENERIC_DIRTYLOG_READ_PROTECT
        select KVM_GENERIC_HARDWARE_ENABLING
-       select MMU_NOTIFIER
-       select PREEMPT_NOTIFIERS
        select KVM_MMIO
-       select KVM_GENERIC_DIRTYLOG_READ_PROTECT
        select KVM_XFER_TO_GUEST_WORK
-       select HAVE_KVM_VCPU_ASYNC_IOCTL
-       select HAVE_KVM_EVENTFD
+       select MMU_NOTIFIER
+       select PREEMPT_NOTIFIERS
 -      select SRCU
        help
          Support hosting virtualized guest machines.
  
index 6adb1b6112a1d0dfe90e064ca4e5631530fc4580,811c7e9a308c2b722d608918fd77f943632a02bd..8bd9f2a8a0b9131b54ef9605de1a6a01aae11621
@@@ -61,9 -62,9 +62,10 @@@ static const unsigned long kvm_isa_ext_
        KVM_ISA_EXT_ARR(SSTC),
        KVM_ISA_EXT_ARR(SVINVAL),
        KVM_ISA_EXT_ARR(SVPBMT),
+       KVM_ISA_EXT_ARR(ZBB),
        KVM_ISA_EXT_ARR(ZIHINTPAUSE),
        KVM_ISA_EXT_ARR(ZICBOM),
 +      KVM_ISA_EXT_ARR(ZICBOZ),
  };
  
  static unsigned long kvm_riscv_vcpu_base2isa_ext(unsigned long base_ext)
Simple merge