Page MenuHomeFreeBSD

amd64: Fix sys/pcpu.h usage in vmm_host.h and md_var.h
ClosedPublic

Authored by rosenfeld_grumpf.hope-2000.org on Jul 26 2025, 11:14 AM.
Tags
None
Referenced Files
F142837530: D51550.diff
Sat, Jan 24, 1:28 AM
Unknown Object (File)
Thu, Jan 22, 7:51 PM
Unknown Object (File)
Tue, Jan 20, 12:36 PM
Unknown Object (File)
Sat, Jan 17, 5:20 PM
Unknown Object (File)
Fri, Jan 16, 6:39 PM
Unknown Object (File)
Thu, Jan 15, 11:18 PM
Unknown Object (File)
Dec 16 2025, 12:28 AM
Unknown Object (File)
Dec 11 2025, 7:22 AM

Details

Summary

Include sys/pcpu in vmm_host.h as its structs and functions are used
there, and add a forward declaration of struct pcpu to md_var.h as it
is used in some function prototypes.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jul 28 2025, 9:03 AM
rosenfeld_grumpf.hope-2000.org retitled this revision from amd64: add missing include sys/pcpu.h to vmm_host.h and md_var.h to amd64: Add missing include sys/pcpu.h to vmm_host.h and md_var.h.Thu, Jan 15, 1:46 PM
This revision now requires review to proceed.Thu, Jan 15, 1:47 PM
markj added inline comments.
sys/amd64/include/md_var.h
39

Why is pcpu.h needed here? Do we just need a forward declaration of struct pcpu? That can be added to the list below (starting with struct __mcontext).

sys/amd64/include/md_var.h
39

I don't recall what the exact error was that I ran into, but whatever it was it is apparently gone since I've rebased my work on your recent header changes. I've reverted it locally and everything still seems to build just fine.

sys/amd64/include/md_var.h
39

I think the change to vmm_host.h is still reasonable.

rosenfeld_grumpf.hope-2000.org retitled this revision from amd64: Add missing include sys/pcpu.h to vmm_host.h and md_var.h to Fix sys/pcpu.h usage in vmm_host.h and md_var.h'.Fri, Jan 16, 2:32 PM
rosenfeld_grumpf.hope-2000.org edited the summary of this revision. (Show Details)
rosenfeld_grumpf.hope-2000.org retitled this revision from Fix sys/pcpu.h usage in vmm_host.h and md_var.h' to Fix sys/pcpu.h usage in vmm_host.h and md_var.h.
rosenfeld_grumpf.hope-2000.org retitled this revision from Fix sys/pcpu.h usage in vmm_host.h and md_var.h to amd64: Fix sys/pcpu.h usage in vmm_host.h and md_var.h.

Add only a forward declaration of struct pcpu to md_var.h as suggested by markj.

This revision is now accepted and ready to land.Fri, Jan 16, 3:26 PM