Refactor vmd(8)'s pci io handler.
Break out of scanning for appropriate bar when found. Tidy up a bit
and reduce some nested struct member access to shorten up the code.
ok mlarkin@
Handle AMD SEV-ES GHCB MSR protocol for guest termination in vmm(4).
Another service requested by a SEV-ES enabled guest through the
GHCB MSR protocol is guest termination.
With this commit, vmm(4) will be able to run a SEV-ES enabled guest.
Still missing is vmd(8) support to configure and enable SEV-ES and
the guest side changes.
from hshoexer@; OK mlarkin@
Handle AMD SEV-ES GHCB MSR protocol for CPUID in vmm(4).
When a SEV-ES guest is in locore0, it will not be able yet to use
a GHCB to communicate with vmm(4). Therefore, AMD specifies a "GHCB
MSR protocol" that uses the lower 12 bits of the GHCB MSR to request
services from vmm(4). Guest writes to the GHCB MSR will show up
in the v_ghcb_gpa member of the VMCB and are thus accesible by
vmm(4). The response of vmm(4) can be provided by writing it to
the VMCB.
In locore0 a SEV-ES guest will need to request CPUID from vmm(4)
using the GHCB MSR protocol. This commit provides vmm(4) implementation.
from hshoexer@; OK mlarkin@
When entering sched_idle() the first time the CPU ci is not idle.
Actually at that point this code is not running on that CPU so do
not pretend that the CPU is idle by fiddling with the sched_idle_cpus
cpuset.
OK mpi@
Delete bad advice about abusing malloc_options = "X" as a production
feature to terminate the program when out of memory. Application code
should always handle failure of library functions properly. So if you
want your program to terminate, write something like
| p = malloc(...);
| if (p == NULL)
| err(1, NULL);
and don't abuse malloc_options.
Direction suggested by otto@ after anton@ pointed out that this very old
text still used an outdated data type for malloc_options and potentially
failed to define its value at compile time.
OK otto@
Handle IOIO for AMD SEV-ES VMGEXIT in vmm(4).
Fill in the actual handler for IOIO related GEXIT. The actual "in"
or "out" instruction is encoded in the exitinfo provided by the
guest in the GHCB. For "in" vmm(4) returns the result in the A
general purpose register.
The actual emulation is done by svm_handle_inout() and vmd(8). On
the way back into the guest, vmm(4) synchronizes the computed result
back to the GHCB.
With this commit, vmm(4) and vmd(8) will be able to deal with all
GEXITs that will be generated for now by openbsd SEV-ES enabled
guest.
from hshoexer@; OK mlarkin@
Convert IP6_EXTHDR_GET() macro to ip6_exthdr_get() inline function.
Make the new function static inline so it can stay in the same
netinet/ip6.h header file. Returning a void pointer avoids all the
type casts. Convert the panic("m_pulldown malfunction") to an
kassert and move it into m_pulldown(). Keep the offset and length
parameter int as this type is what m_pulldown() expects.
OK claudio@
Make EVP_CIPHER_[gs]et_asn1_iv() local to evp_cipher
These formerly public functions have only ever been called from
EVP_CIPHER_asn1_to_param() and EVP_CPIHER_param_to_asn1(), either
directly if the EVP_CIPH_FLAG_DEFAULT_ASN1 flag is set, or indirectly
when set as the .[gs]et_asn1_parameters() method of the EVP_CIPHER.
This commit removes their use in .[gs]et_asn1_parameters() dating back
to long before the EVP_CIPH_FLAG_DEFAULT_ASN1 was introduced in 2010.
This way the only remaining consumer of .[gs]et_asn1_parameters() is RC2.
ok jsing
Mop up more remnants of non-shared archs handling
As espie points out, the need for a $def vs $frag split was removed in
PkgCreate.pm r1.120 in 2016, now it's just an unnecessary dance that
gets in the way of upcoming work in fragment handling, so clean that up.
from espie
pfctl(8) should not attempt to read limits when open('/dev/pf') fails.
The bug was introduced by my earlier commit (pfctl.c,v 1.396) to pfctl(8).
The issue was discovered and analyzed by anton@
OK @anton
Handle MSR for AMD SEV-ES VMGEXIT in vmm(4).
Fill in the actual handler for MSR related VMGEXIT. The SEV-ES
guest sends vmm(4) A, C and D general purpose registers for wrmsr,
and C register for rdmsr. For wrmsr vmm(4) returns nothing to the
guest, for rdmsr the 64bit result is split into EAX and EDX. As
with regular SVM_VMEXIT_MSR, svm_handle_msr() does the actual work.
from hshoexer@; OK mlarkin@
Remove by now incorrect usage of malloc_options in httpd patterns
regress. As stated in bsd.regress.mk(5), one is advised favor the
MALLOC_OPTIONS environment variable.
add Navi 44 and Navi 48 ids
7550 rev c2 is Radeon RX 9070 GRE
7551 rev c0 is Radeon AI PRO R9700
7590 rev c0 is Radeon RX 9060 XT
found in ROCm 6.4.1 libdrm-amdgpu-common
fdisk: consistently print an ASCII tab after disk name
This aligns GPT and MBR output a bit better and is going to be handy
for regress tests. Adjust the manpage examples accordingly.
ok krw
Handle CPUID for AMD SEV-ES VMGEXIT in vmm(4).
Fill in the actual handler for CPUID related VMGEXIT. The SEV-ES
guest sends vmm(4) the content of A and C general purpose registers.
vmm(4) dispatches to vmm_handle_cpuid(); and returns the results
in A, B, C and D registers.
from hshoexer@; OK mlarkin@