]> Git Repo - J-linux.git/commitdiff
Merge tag 'kvmarm-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmar...
authorPaolo Bonzini <[email protected]>
Fri, 12 Feb 2021 16:23:44 +0000 (11:23 -0500)
committerPaolo Bonzini <[email protected]>
Fri, 12 Feb 2021 16:23:44 +0000 (11:23 -0500)
KVM/arm64 updates for Linux 5.12

- Make the nVHE EL2 object relocatable, resulting in much more
  maintainable code
- Handle concurrent translation faults hitting the same page
  in a more elegant way
- Support for the standard TRNG hypervisor call
- A bunch of small PMU/Debug fixes
- Allow the disabling of symbol export from assembly code
- Simplification of the early init hypercall handling

1  2 
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/hyp/nvhe/hyp-init.S
tools/include/uapi/linux/kvm.h

index 1b8a3d825276503f6226177f7da3631f8aee8191,084d11a2768ca66bc1dce3ec277079e07a92b2ed..3d10e6527f7de73bfe4be18987367f06557008d8
@@@ -30,6 -30,7 +30,6 @@@
  
  #define __KVM_HAVE_ARCH_INTC_INITIALIZED
  
 -#define KVM_USER_MEM_SLOTS 512
  #define KVM_HALT_POLL_NS_DEFAULT 500000
  
  #include <kvm/arm_vgic.h>
@@@ -770,4 -771,6 +770,6 @@@ bool kvm_arm_vcpu_is_finalized(struct k
  #define kvm_vcpu_has_pmu(vcpu)                                        \
        (test_bit(KVM_ARM_VCPU_PMU_V3, (vcpu)->arch.features))
  
+ int kvm_trng_call(struct kvm_vcpu *vcpu);
  #endif /* __ARM64_KVM_HOST_H__ */
index b17bf19217f1100b962bb5794c05a9214262cb54,3dbc0c649d363b080cccbf69d6e1c4a7d82bc330..50be6f4e6b995e815369a7e2e11a35d6ed314e73
@@@ -18,7 -18,7 +18,7 @@@
  #include <asm/virt.h>
  
        .text
-       .pushsection    .hyp.idmap.text, "ax"
+       .pushsection    .idmap.text, "ax"
  
        .align  11
  
@@@ -47,8 -47,6 +47,8 @@@ __invalid
        b       .
  
        /*
 +       * Only uses x0..x3 so as to not clobber callee-saved SMCCC registers.
 +       *
         * x0: SMCCC function ID
         * x1: struct kvm_nvhe_init_params PA
         */
@@@ -57,24 -55,17 +57,17 @@@ __do_hyp_init
        cmp     x0, #HVC_STUB_HCALL_NR
        b.lo    __kvm_handle_stub_hvc
  
-       // We only actively check bits [24:31], and everything
-       // else has to be zero, which we check at build time.
- #if (KVM_HOST_SMCCC_FUNC(__kvm_hyp_init) & 0xFFFFFFFF00FFFFFF)
- #error Unexpected __KVM_HOST_SMCCC_FUNC___kvm_hyp_init value
- #endif
-       ror     x0, x0, #24
-       eor     x0, x0, #((KVM_HOST_SMCCC_FUNC(__kvm_hyp_init) >> 24) & 0xF)
-       ror     x0, x0, #4
-       eor     x0, x0, #((KVM_HOST_SMCCC_FUNC(__kvm_hyp_init) >> 28) & 0xF)
-       cbz     x0, 1f
+       mov     x3, #KVM_HOST_SMCCC_FUNC(__kvm_hyp_init)
+       cmp     x0, x3
+       b.eq    1f
        mov     x0, #SMCCC_RET_NOT_SUPPORTED
        eret
  
  1:    mov     x0, x1
 -      mov     x4, lr
 -      bl      ___kvm_hyp_init
 -      mov     lr, x4
 +      mov     x3, lr
 +      bl      ___kvm_hyp_init                 // Clobbers x0..x2
 +      mov     lr, x3
  
        /* Hello, World! */
        mov     x0, #SMCCC_RET_SUCCESS
@@@ -84,8 -75,8 +77,8 @@@ SYM_CODE_END(__kvm_hyp_init
  /*
   * Initialize the hypervisor in EL2.
   *
 - * Only uses x0..x3 so as to not clobber callee-saved SMCCC registers
 - * and leave x4 for the caller.
 + * Only uses x0..x2 so as to not clobber callee-saved SMCCC registers
 + * and leave x3 for the caller.
   *
   * x0: struct kvm_nvhe_init_params PA
   */
@@@ -114,9 -105,9 +107,9 @@@ alternative_else_nop_endi
        /*
         * Set the PS bits in TCR_EL2.
         */
 -      ldr     x1, [x0, #NVHE_INIT_TCR_EL2]
 -      tcr_compute_pa_size x1, #TCR_EL2_PS_SHIFT, x2, x3
 -      msr     tcr_el2, x1
 +      ldr     x0, [x0, #NVHE_INIT_TCR_EL2]
 +      tcr_compute_pa_size x0, #TCR_EL2_PS_SHIFT, x1, x2
 +      msr     tcr_el2, x0
  
        isb
  
@@@ -141,7 -132,6 +134,6 @@@ alternative_else_nop_endi
  
        /* Set the host vector */
        ldr     x0, =__kvm_hyp_host_vector
-       kimg_hyp_va x0, x1
        msr     vbar_el2, x0
  
        ret
@@@ -195,12 -185,11 +187,11 @@@ SYM_CODE_START_LOCAL(__kvm_hyp_init_cpu
  
        /* Enable MMU, set vectors and stack. */
        mov     x0, x28
 -      bl      ___kvm_hyp_init                 // Clobbers x0..x3
 +      bl      ___kvm_hyp_init                 // Clobbers x0..x2
  
        /* Leave idmap. */
        mov     x0, x29
        ldr     x1, =kvm_host_psci_cpu_entry
-       kimg_hyp_va x1, x2
        br      x1
  SYM_CODE_END(__kvm_hyp_init_cpu)
  
index 9c284a9c3ac5d6f0bb2ad89b12df2202c8d76c31,374c67875cdbd5c60eb15c1b932e7fcdc7f9fa7d..abb89bbe563544034496af2271d77622aca86381
@@@ -251,6 -251,7 +251,7 @@@ struct kvm_hyperv_exit 
  #define KVM_EXIT_X86_RDMSR        29
  #define KVM_EXIT_X86_WRMSR        30
  #define KVM_EXIT_DIRTY_RING_FULL  31
+ #define KVM_EXIT_AP_RESET_HOLD    32
  
  /* For KVM_EXIT_INTERNAL_ERROR */
  /* Emulate instruction failed. */
@@@ -573,6 -574,7 +574,7 @@@ struct kvm_vapic_addr 
  #define KVM_MP_STATE_CHECK_STOP        6
  #define KVM_MP_STATE_OPERATING         7
  #define KVM_MP_STATE_LOAD              8
+ #define KVM_MP_STATE_AP_RESET_HOLD     9
  
  struct kvm_mp_state {
        __u32 mp_state;
@@@ -1056,7 -1058,6 +1058,7 @@@ struct kvm_ppc_resize_hpt 
  #define KVM_CAP_ENFORCE_PV_FEATURE_CPUID 190
  #define KVM_CAP_SYS_HYPERV_CPUID 191
  #define KVM_CAP_DIRTY_LOG_RING 192
 +#define KVM_CAP_PPC_DAWR1 194
  
  #ifdef KVM_CAP_IRQ_ROUTING
  
This page took 0.111862 seconds and 4 git commands to generate.