]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 12 Jun 2018 18:34:04 +0000 (11:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 12 Jun 2018 18:34:04 +0000 (11:34 -0700)
Pull KVM updates from Paolo Bonzini:
 "Small update for KVM:

  ARM:
   - lazy context-switching of FPSIMD registers on arm64
   - "split" regions for vGIC redistributor

  s390:
   - cleanups for nested
   - clock handling
   - crypto
   - storage keys
   - control register bits

  x86:
   - many bugfixes
   - implement more Hyper-V super powers
   - implement lapic_timer_advance_ns even when the LAPIC timer is
     emulated using the processor's VMX preemption timer.
   - two security-related bugfixes at the top of the branch"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (79 commits)
  kvm: fix typo in flag name
  kvm: x86: use correct privilege level for sgdt/sidt/fxsave/fxrstor access
  KVM: x86: pass kvm_vcpu to kvm_read_guest_virt and kvm_write_guest_virt_system
  KVM: x86: introduce linear_{read,write}_system
  kvm: nVMX: Enforce cpl=0 for VMX instructions
  kvm: nVMX: Add support for "VMWRITE to any supported field"
  kvm: nVMX: Restrict VMX capability MSR changes
  KVM: VMX: Optimize tscdeadline timer latency
  KVM: docs: nVMX: Remove known limitations as they do not exist now
  KVM: docs: mmu: KVM support exposing SLAT to guests
  kvm: no need to check return value of debugfs_create functions
  kvm: Make VM ioctl do valloc for some archs
  kvm: Change return type to vm_fault_t
  KVM: docs: mmu: Fix link to NPT presentation from KVM Forum 2008
  kvm: x86: Amend the KVM_GET_SUPPORTED_CPUID API documentation
  KVM: x86: hyperv: declare KVM_CAP_HYPERV_TLBFLUSH capability
  KVM: x86: hyperv: simplistic HVCALL_FLUSH_VIRTUAL_ADDRESS_{LIST,SPACE}_EX implementation
  KVM: x86: hyperv: simplistic HVCALL_FLUSH_VIRTUAL_ADDRESS_{LIST,SPACE} implementation
  KVM: introduce kvm_make_vcpus_request_mask() API
  KVM: x86: hyperv: do rep check for each hypercall separately
  ...

25 files changed:
1  2 
arch/arm/include/asm/kvm_host.h
arch/arm64/Kconfig
arch/arm64/include/asm/cpufeature.h
arch/arm64/include/asm/kvm_asm.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/include/asm/processor.h
arch/arm64/include/asm/thread_info.h
arch/arm64/kernel/fpsimd.c
arch/arm64/kernel/ptrace.c
arch/arm64/kvm/hyp/hyp-entry.S
arch/arm64/kvm/hyp/switch.c
arch/mips/kvm/mips.c
arch/powerpc/kvm/book3s_hv.c
arch/s390/include/asm/pgtable.h
arch/s390/kvm/priv.c
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/cpuid.c
arch/x86/kvm/hyperv.c
arch/x86/kvm/lapic.c
arch/x86/kvm/mmu.c
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
include/linux/sched.h
virt/kvm/arm/arm.c

Simple merge
Simple merge
index 55bc1f073bfbe4b8905cb43da8cb21a509fad686,0a6b7133195e1f0f3a07adec705929334f29e46f..1717ba1db35ddb935720c20ec46c318d59ca9b83
@@@ -510,55 -508,6 +508,28 @@@ static inline bool system_supports_sve(
                cpus_have_const_cap(ARM64_SVE);
  }
  
- /*
-  * Read the pseudo-ZCR used by cpufeatures to identify the supported SVE
-  * vector length.
-  *
-  * Use only if SVE is present.
-  * This function clobbers the SVE vector length.
-  */
- static inline u64 read_zcr_features(void)
- {
-       u64 zcr;
-       unsigned int vq_max;
-       /*
-        * Set the maximum possible VL, and write zeroes to all other
-        * bits to see if they stick.
-        */
-       sve_kernel_enable(NULL);
-       write_sysreg_s(ZCR_ELx_LEN_MASK, SYS_ZCR_EL1);
-       zcr = read_sysreg_s(SYS_ZCR_EL1);
-       zcr &= ~(u64)ZCR_ELx_LEN_MASK; /* find sticky 1s outside LEN field */
-       vq_max = sve_vq_from_vl(sve_get_vl());
-       zcr |= vq_max - 1; /* set LEN field to maximum effective value */
-       return zcr;
- }
 +#define ARM64_SSBD_UNKNOWN            -1
 +#define ARM64_SSBD_FORCE_DISABLE      0
 +#define ARM64_SSBD_KERNEL             1
 +#define ARM64_SSBD_FORCE_ENABLE               2
 +#define ARM64_SSBD_MITIGATED          3
 +
 +static inline int arm64_get_ssbd_state(void)
 +{
 +#ifdef CONFIG_ARM64_SSBD
 +      extern int ssbd_state;
 +      return ssbd_state;
 +#else
 +      return ARM64_SSBD_UNKNOWN;
 +#endif
 +}
 +
 +#ifdef CONFIG_ARM64_SSBD
 +void arm64_set_ssbd_mitigation(bool state);
 +#else
 +static inline void arm64_set_ssbd_mitigation(bool state) {}
 +#endif
 +
  #endif /* __ASSEMBLY__ */
  
  #endif
Simple merge
index 95d8a0e15b5fbcede8b98a708e1ea6559eb7aada,c923d3e17ba3ce511239961749f64ad5b80cc1e5..fda9a8ca48bef71b0d4a76be1a45295af1211dd6
@@@ -216,11 -217,8 +217,11 @@@ struct kvm_vcpu_arch 
        /* Exception Information */
        struct kvm_vcpu_fault_info fault;
  
-       /* Guest debug state */
-       u64 debug_flags;
 +      /* State of various workarounds, see kvm_asm.h for bit assignment */
 +      u64 workaround_flags;
 +
+       /* Miscellaneous vcpu state flags */
+       u64 flags;
  
        /*
         * We maintain more than a single set of debug registers to support
index 65ab83e8926e794d04dbeaea14b3ba9dff9ad73b,c99e657fdd57ba7128d08e11d6bcad0fe3597399..a73ae1e492007e53ffdf7d1c94d15cea33ea25ff
@@@ -246,9 -246,17 +248,20 @@@ void cpu_enable_pan(const struct arm64_
  void cpu_enable_cache_maint_trap(const struct arm64_cpu_capabilities *__unused);
  void cpu_clear_disr(const struct arm64_cpu_capabilities *__unused);
  
 +extern unsigned long __ro_after_init signal_minsigstksz; /* sigframe size */
 +extern void __init minsigstksz_setup(void);
 +
+ /*
+  * Not at the top of the file due to a direct #include cycle between
+  * <asm/fpsimd.h> and <asm/processor.h>.  Deferring this #include
+  * ensures that contents of processor.h are visible to fpsimd.h even if
+  * processor.h is included first.
+  *
+  * These prctl helpers are the only things in this file that require
+  * fpsimd.h.  The core code expects them to be in this header.
+  */
+ #include <asm/fpsimd.h>
  /* Userspace interface for PR_SVE_{SET,GET}_VL prctl()s: */
  #define SVE_SET_VL(arg)       sve_set_current_vl(arg)
  #define SVE_GET_VL()  sve_get_current_vl()
Simple merge
Simple merge
Simple merge
Simple merge
index c50cedc447f1ab33e2eda5682d6b72fda272514d,2d45bd719a5dfba78a81e36bf25cc4b72c42541b..d496ef579859627edd1ba98c1233d9584cd407e3
@@@ -452,10 -475,6 +511,8 @@@ int kvm_vcpu_run_vhe(struct kvm_vcpu *v
                /* And we're baaack! */
        } while (fixup_guest_exit(vcpu, &exit_code));
  
-       fp_enabled = fpsimd_enabled_vhe();
 +      __set_host_arch_workaround_state(vcpu);
 +
        sysreg_save_guest_state_vhe(guest_ctxt);
  
        __deactivate_traps(vcpu);
@@@ -512,10 -525,6 +565,8 @@@ int __hyp_text __kvm_vcpu_run_nvhe(stru
                /* And we're baaack! */
        } while (fixup_guest_exit(vcpu, &exit_code));
  
-       fp_enabled = __fpsimd_enabled_nvhe();
 +      __set_host_arch_workaround_state(vcpu);
 +
        __sysreg_save_state_nvhe(guest_ctxt);
        __sysreg32_save_state(vcpu);
        __timer_disable_traps(vcpu);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 46ff64da44cab46d637facafffb10ba1a1269a1f,14e0d0ae4e0a8ea86969cd7f93ea029b89a0a070..af8caf965baa291319a7e5825b27ab28f97a24cf
@@@ -1385,8 -1527,8 +1531,7 @@@ int kvm_hv_hypercall(struct kvm_vcpu *v
                break;
        }
  
- out:
 -      kvm_hv_hypercall_set_result(vcpu, ret);
 -      return 1;
 +      return kvm_hv_hypercall_complete(vcpu, ret);
  }
  
  void kvm_hv_init_vm(struct kvm *kvm)
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge