Page MenuHomeFreeBSD

LinuxKPI: Add xen/xen.h header
ClosedPublic

Authored by wulf on Nov 28 2023, 8:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 23, 4:23 PM
Unknown Object (File)
Mon, Sep 22, 3:55 AM
Unknown Object (File)
Sun, Sep 21, 3:33 PM
Unknown Object (File)
Aug 14 2025, 10:11 AM
Unknown Object (File)
Jun 28 2025, 3:39 PM
Unknown Object (File)
Jun 28 2025, 2:34 PM
Unknown Object (File)
Jun 20 2025, 7:09 PM
Unknown Object (File)
Jun 18 2025, 1:34 PM

Details

Summary

It contains proxy-implementation of xen_initial_domain() and
xen_pv_domain() required by latest drm-kmod.

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week

Diff Detail

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

Event Timeline

wulf requested review of this revision.Nov 28 2023, 8:48 PM
This revision is now accepted and ready to land.Nov 29 2023, 6:10 AM
ehem_freebsd_m5p.com added inline comments.
sys/compat/linuxkpi/common/src/linux_compat.c
107–108

This is due to sys/amd64/include/xen/hypercall.h. I suspect the use is identical to what Linux headers used (the file originated with Linux as MIT/GPL2).

I think it would be reasonable to surround the #define __must_check in sys/amd64/include/xen/hypercall.h with #ifndef __must_check. This will interact with the merge from sys/amd64/include/xen/hypercall.h => sys/xen/hypercall.h though. @royger opinion on allowing use of the Linux-KPI's definition of __must_check?

While the hypercall headers where originally imported from Linux, I think there's very little chance we will even sync again with Linuxes version, so s/__must_check/__result_use_check/ in the Xen hypercall headers would be the best solution IMO. Playing games with ifdef/ifndef is usually not a good idea.

This revision was automatically updated to reflect the committed changes.