Commit de8e8ebb authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

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

KVM TDX changes for 6.19:

 - Overhaul the TDX code to address systemic races where KVM (acting on behalf
   of userspace) could inadvertantly trigger lock contention in the TDX-Module,
   which KVM was either working around in weird, ugly ways, or was simply
   oblivious to (as proven by Yan tripping several KVM_BUG_ON()s with clever
   selftests).

 - Fix a bug where KVM could corrupt a vCPU's cpu_list when freeing a vCPU if
   creating said vCPU failed partway through.

 - Fix a few sparse warnings (bad annotation, 0 != NULL).

 - Use struct_size() to simplify copying capabilities to userspace.
parents adc99a6c 398180f9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1835,6 +1835,12 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
	return r;
}

long kvm_arch_vcpu_unlocked_ioctl(struct file *filp, unsigned int ioctl,
				  unsigned long arg)
{
	return -ENOIOCTLCMD;
}

void kvm_arch_sync_dirty_log(struct kvm *kvm, struct kvm_memory_slot *memslot)
{

+0 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ config KVM
	select HAVE_KVM_IRQCHIP
	select HAVE_KVM_MSI
	select HAVE_KVM_READONLY_MEM
	select HAVE_KVM_VCPU_ASYNC_IOCTL
	select KVM_COMMON
	select KVM_GENERIC_DIRTYLOG_READ_PROTECT
	select KVM_GENERIC_HARDWARE_ENABLING
+2 −2
Original line number Diff line number Diff line
@@ -1473,8 +1473,8 @@ int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu, struct kvm_interrupt *irq)
	return 0;
}

long kvm_arch_vcpu_async_ioctl(struct file *filp,
			       unsigned int ioctl, unsigned long arg)
long kvm_arch_vcpu_unlocked_ioctl(struct file *filp, unsigned int ioctl,
				  unsigned long arg)
{
	void __user *argp = (void __user *)arg;
	struct kvm_vcpu *vcpu = filp->private_data;
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ config KVM
	select EXPORT_UASM
	select KVM_COMMON
	select KVM_GENERIC_DIRTYLOG_READ_PROTECT
	select HAVE_KVM_VCPU_ASYNC_IOCTL
	select KVM_MMIO
	select KVM_GENERIC_MMU_NOTIFIER
	select KVM_GENERIC_HARDWARE_ENABLING
+2 −2
Original line number Diff line number Diff line
@@ -895,7 +895,7 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu,
	return r;
}

long kvm_arch_vcpu_async_ioctl(struct file *filp, unsigned int ioctl,
long kvm_arch_vcpu_unlocked_ioctl(struct file *filp, unsigned int ioctl,
				  unsigned long arg)
{
	struct kvm_vcpu *vcpu = filp->private_data;
Loading