Commit 4f2a5a6b authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

Merge tag 'kvm-x86-misc-6.3' of https://github.com/kvm-x86/linux into HEAD

KVM x86 changes for 6.3:

 - Advertise support for Intel's fancy new fast REP string features

 - Fix a double-shootdown issue in the emergency reboot code

 - Ensure GIF=1 and disable SVM during an emergency reboot, i.e. give SVM
   similar treatment to VMX

 - Update Xen's TSC info CPUID sub-leaves as appropriate

 - Add support for Hyper-V's extended hypercalls, where "support" at this
   point is just forwarding the hypercalls to userspace

 - Clean up the kvm->lock vs. kvm->srcu sequences when updating the PMU and
   MSR filters

 - One-off fixes and cleanups
parents cf8e6cf6 e73ba25f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -312,6 +312,9 @@
#define X86_FEATURE_AVX_VNNI		(12*32+ 4) /* AVX VNNI instructions */
#define X86_FEATURE_AVX512_BF16		(12*32+ 5) /* AVX512 BFLOAT16 instructions */
#define X86_FEATURE_CMPCCXADD           (12*32+ 7) /* "" CMPccXADD instructions */
#define X86_FEATURE_FZRM		(12*32+10) /* "" Fast zero-length REP MOVSB */
#define X86_FEATURE_FSRS		(12*32+11) /* "" Fast short REP STOSB */
#define X86_FEATURE_FSRC		(12*32+12) /* "" Fast short REP {CMPSB,SCASB} */
#define X86_FEATURE_AMX_FP16		(12*32+21) /* "" AMX fp16 Support */
#define X86_FEATURE_AVX_IFMA            (12*32+23) /* "" Support for VPMADD52[H,L]UQ */

+7 −2
Original line number Diff line number Diff line
@@ -678,6 +678,11 @@ struct kvm_vcpu_hv {
	} nested;
};

struct kvm_hypervisor_cpuid {
	u32 base;
	u32 limit;
};

/* Xen HVM per vcpu emulation context */
struct kvm_vcpu_xen {
	u64 hypercall_rip;
@@ -698,6 +703,7 @@ struct kvm_vcpu_xen {
	struct hrtimer timer;
	int poll_evtchn;
	struct timer_list poll_timer;
	struct kvm_hypervisor_cpuid cpuid;
};

struct kvm_queued_exception {
@@ -826,7 +832,7 @@ struct kvm_vcpu_arch {

	int cpuid_nent;
	struct kvm_cpuid_entry2 *cpuid_entries;
	u32 kvm_cpuid_base;
	struct kvm_hypervisor_cpuid kvm_cpuid;

	u64 reserved_gpa_bits;
	int maxphyaddr;
@@ -1327,7 +1333,6 @@ struct kvm_arch {
	u32 bsp_vcpu_id;

	u64 disabled_quirks;
	int cpu_dirty_logging_count;

	enum kvm_irqchip_mode irqchip_mode;
	u8 nr_reserved_ioapic_pins;
+2 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@ void __noreturn machine_real_restart(unsigned int type);
#define MRR_BIOS	0
#define MRR_APM		1

void cpu_emergency_disable_virtualization(void);

typedef void (*nmi_shootdown_cb)(int, struct pt_regs*);
void nmi_panic_self_stop(struct pt_regs *regs);
void nmi_shootdown_cpus(nmi_shootdown_cb callback);
+15 −1
Original line number Diff line number Diff line
@@ -126,8 +126,22 @@ static inline void cpu_svm_disable(void)

	wrmsrl(MSR_VM_HSAVE_PA, 0);
	rdmsrl(MSR_EFER, efer);
	if (efer & EFER_SVME) {
		/*
		 * Force GIF=1 prior to disabling SVM to ensure INIT and NMI
		 * aren't blocked, e.g. if a fatal error occurred between CLGI
		 * and STGI.  Note, STGI may #UD if SVM is disabled from NMI
		 * context between reading EFER and executing STGI.  In that
		 * case, GIF must already be set, otherwise the NMI would have
		 * been blocked, so just eat the fault.
		 */
		asm_volatile_goto("1: stgi\n\t"
				  _ASM_EXTABLE(1b, %l[fault])
				  ::: "memory" : fault);
fault:
		wrmsrl(MSR_EFER, efer & ~EFER_SVME);
	}
}

/** Makes sure SVM is disabled, if it is supported on the CPU
 */
+3 −1
Original line number Diff line number Diff line
@@ -38,9 +38,11 @@ extern struct start_info *xen_start_info;

#include <asm/processor.h>

#define XEN_SIGNATURE "XenVMMXenVMM"

static inline uint32_t xen_cpuid_base(void)
{
	return hypervisor_cpuid_base("XenVMMXenVMM", 2);
	return hypervisor_cpuid_base(XEN_SIGNATURE, 2);
}

struct pci_dev;
Loading