freebsd-dev/sys/amd64/vmm
Stefan Eßer e2650af157 Make CPU_SET macros compliant with other implementations
The introduction of <sched.h> improved compatibility with some 3rd
party software, but caused the configure scripts of some ports to
assume that they were run in a GLIBC compatible environment.

Parts of sched.h were made conditional on -D_WITH_CPU_SET_T being
added to ports, but there still were compatibility issues due to
invalid assumptions made in autoconfigure scripts.

The differences between the FreeBSD version of macros like CPU_AND,
CPU_OR, etc. and the GLIBC versions was in the number of arguments:
FreeBSD used a 2-address scheme (one source argument is also used as
the destination of the operation), while GLIBC uses a 3-adderess
scheme (2 source operands and a separately passed destination).

The GLIBC scheme provides a super-set of the functionality of the
FreeBSD macros, since it does not prevent passing the same variable
as source and destination arguments. In code that wanted to preserve
both source arguments, the FreeBSD macros required a temporary copy of
one of the source arguments.

This patch set allows to unconditionally provide functions and macros
expected by 3rd party software written for GLIBC based systems, but
breaks builds of externally maintained sources that use any of the
following macros: CPU_AND, CPU_ANDNOT, CPU_OR, CPU_XOR.

One contributed driver (contrib/ofed/libmlx5) has been patched to
support both the old and the new CPU_OR signatures. If this commit
is merged to -STABLE, the version test will have to be extended to
cover more ranges.

Ports that have added -D_WITH_CPU_SET_T to build on -CURRENT do
no longer require that option.

The FreeBSD version has been bumped to 1400046 to reflect this
incompatible change.

Reviewed by:	kib
MFC after:	2 weeks
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D33451
2021-12-30 12:20:32 +01:00
..
amd Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
intel Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
io vlapic: Schedule callouts on the local CPU 2021-10-19 21:22:57 -04:00
vmm_dev.c vmm: Add credential to cdev object 2021-08-18 13:41:33 -04:00
vmm_host.c Correct undesirable interaction between caching of %cr4 in bhyve and 2018-04-24 13:44:19 +00:00
vmm_host.h amd64: move GDT into PCPU area. 2019-11-12 15:51:47 +00:00
vmm_instruction_emul.c Add bhyve support for LA57 guest mode. 2020-08-23 20:37:21 +00:00
vmm_ioport.c Add SPDX tags to vmm(4). 2018-06-13 07:02:58 +00:00
vmm_ioport.h Add SPDX tags to vmm(4). 2018-06-13 07:02:58 +00:00
vmm_ktr.h sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
vmm_lapic.c cpuset(9): Add CPU_FOREACH_IS(SET|CLR) and modify consumers to use it 2021-10-18 09:56:58 -04:00
vmm_lapic.h vmx: use C99 bool, not boolean_t 2019-08-01 02:16:48 +00:00
vmm_mem.c sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
vmm_mem.h sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
vmm_snapshot.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
vmm_stat.c vmm: Add Hygon Dhyana support. 2020-02-13 19:03:12 +00:00
vmm_stat.h amd64: clean up empty lines in .c and .h files 2020-09-01 21:16:54 +00:00
vmm_util.c Convert vmm_ops calls to IFUNC 2020-11-28 01:16:59 +00:00
vmm_util.h Convert vmm_ops calls to IFUNC 2020-11-28 01:16:59 +00:00
vmm.c Make CPU_SET macros compliant with other implementations 2021-12-30 12:20:32 +01:00
x86.c vmm: Let guests enable SMEP/SMAP if the host supports it 2021-05-26 09:34:52 -04:00
x86.h Clear the upper 32-bits of registers in x86_emulate_cpuid(). 2020-10-01 16:45:11 +00:00