@@ -267,10 +267,6 @@ static int trap_wbinvd;
267267SYSCTL_INT (_hw_vmm , OID_AUTO , trap_wbinvd , CTLFLAG_RDTUN , & trap_wbinvd , 0 ,
268268 "WBINVD triggers a VM-exit" );
269269
270- u_int vm_maxcpu ;
271- SYSCTL_UINT (_hw_vmm , OID_AUTO , maxcpu , CTLFLAG_RDTUN | CTLFLAG_NOFETCH ,
272- & vm_maxcpu , 0 , "Maximum number of vCPUs" );
273-
274270static void vcpu_notify_event_locked (struct vcpu * vcpu );
275271
276272/* global statistics */
@@ -296,14 +292,6 @@ VMM_STAT(VMEXIT_USERSPACE, "number of vm exits handled in userspace");
296292VMM_STAT (VMEXIT_RENDEZVOUS , "number of times rendezvous pending at exit" );
297293VMM_STAT (VMEXIT_EXCEPTION , "number of vm exits due to exceptions" );
298294
299- /*
300- * Upper limit on vm_maxcpu. Limited by use of uint16_t types for CPU
301- * counts as well as range of vpid values for VT-x and by the capacity
302- * of cpuset_t masks. The call to new_unrhdr() in vpid_init() in
303- * vmx.c requires 'vm_maxcpu + 1 <= 0xffff', hence the '- 1' below.
304- */
305- #define VM_MAXCPU MIN(0xffff - 1, CPU_SETSIZE)
306-
307295#ifdef KTR
308296static const char *
309297vcpu_state2str (enum vcpu_state state )
@@ -405,16 +393,6 @@ vmm_modinit(void)
405393 if (!vmm_is_hw_supported ())
406394 return (ENXIO );
407395
408- vm_maxcpu = mp_ncpus ;
409- TUNABLE_INT_FETCH ("hw.vmm.maxcpu" , & vm_maxcpu );
410-
411- if (vm_maxcpu > VM_MAXCPU ) {
412- printf ("vmm: vm_maxcpu clamped to %u\n" , VM_MAXCPU );
413- vm_maxcpu = VM_MAXCPU ;
414- }
415- if (vm_maxcpu == 0 )
416- vm_maxcpu = 1 ;
417-
418396 vmm_host_state_init ();
419397
420398 vmm_ipinum = lapic_ipi_alloc (pti ? & IDTVEC (justreturn1_pti ) :
0 commit comments