From 91980db1beecd52e34a1550a247e374cfcc746a2 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 9 Dec 2022 10:26:23 -0800 Subject: [PATCH] vmm: Don't lock a vCPU for VM_PPTDEV_MSI[X]. These are manipulating state in a ppt(4) device none of which is vCPU-specific. Mark the vcpu fields in the relevant ioctl structures as unused, but don't remove them for now. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D37639 --- sys/amd64/include/vmm_dev.h | 4 ++-- sys/amd64/vmm/vmm_dev.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/amd64/include/vmm_dev.h b/sys/amd64/include/vmm_dev.h index 9ed8f32302a..deeb125428f 100644 --- a/sys/amd64/include/vmm_dev.h +++ b/sys/amd64/include/vmm_dev.h @@ -147,7 +147,7 @@ struct vm_pptdev_mmio { }; struct vm_pptdev_msi { - int vcpu; + int vcpu; /* unused */ int bus; int slot; int func; @@ -157,7 +157,7 @@ struct vm_pptdev_msi { }; struct vm_pptdev_msix { - int vcpu; + int vcpu; /* unused */ int bus; int slot; int func; diff --git a/sys/amd64/vmm/vmm_dev.c b/sys/amd64/vmm/vmm_dev.c index 38990387c16..aad4cf89311 100644 --- a/sys/amd64/vmm/vmm_dev.c +++ b/sys/amd64/vmm/vmm_dev.c @@ -451,8 +451,6 @@ vmmdev_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, case VM_INJECT_EXCEPTION: case VM_GET_CAPABILITY: case VM_SET_CAPABILITY: - case VM_PPTDEV_MSI: - case VM_PPTDEV_MSIX: case VM_SET_X2APIC_STATE: case VM_GLA2GPA: case VM_GLA2GPA_NOFAULT: