git: 83b65d0ae132 - main - Revert "vmm: Remove unneeded variable maxcpus"

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Fri, 09 Sep 2022 13:55:33 UTC
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=83b65d0ae132a4c7deba302ff57bfae886309df6

commit 83b65d0ae132a4c7deba302ff57bfae886309df6
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-09-09 13:54:56 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-09-09 13:54:56 +0000

    Revert "vmm: Remove unneeded variable maxcpus"
    
    This reverts commit 653c36179d9ee587e4d5e4668fd73d6c3d318ef8.
---
 sys/amd64/vmm/io/vlapic.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/amd64/vmm/io/vlapic.c b/sys/amd64/vmm/io/vlapic.c
index 5eda9a8b3616..dc9b00d2316e 100644
--- a/sys/amd64/vmm/io/vlapic.c
+++ b/sys/amd64/vmm/io/vlapic.c
@@ -964,6 +964,7 @@ vlapic_icrlo_write_handler(struct vlapic *vlapic, bool *retu)
 	struct vlapic *vlapic2;
 	struct vm_exit *vmexit;
 	struct LAPIC *lapic;
+	uint16_t maxcpus;
 
 	lapic = vlapic->apic_page;
 	lapic->icr_lo &= ~APIC_DELSTAT_PEND;
@@ -978,6 +979,9 @@ vlapic_icrlo_write_handler(struct vlapic *vlapic, bool *retu)
 	phys = (icrval & APIC_DESTMODE_LOG) == 0;
 	shorthand = icrval & APIC_DEST_MASK;
 
+	maxcpus = vm_get_maxcpus(vlapic->vm);
+
+
 	VLAPIC_CTR2(vlapic, "icrlo 0x%016lx triggered ipi %d", icrval, vec);
 
 	switch (shorthand) {