bhyve.8: mention VM nodes in /dev/vmm
Currently, VM nodes in /dev/vmm are only described in the
EXAMPLES section of bhyvectl.8. Add a FILES section to bhyve.8
to make this information easier to find.
Update the bhyvectl.8 example to say "Existing VMs"
instead of "Running VMs" as the VMs listed in /dev/vmm
are not necessarily running.
Update bhyvectl.8 to refer to vmm(4).
Reviewed by: ziaee
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61623
(cherry picked from commit 8651589fd72d8b1de9f1b5512d6542c610fca1b3)
bhyve.8: mention config files for VM parameters
Mention that virtual CPUs, memory and other options can be configured
with a configuration file, and refer to the -k option.
Reviewed by: ziaee
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61718
(cherry picked from commit ed4bad79ec89248d3e3b0475cd44c25541198306)
bhyve.8: mention VM nodes in /dev/vmm
Currently, VM nodes in /dev/vmm are only described in the
EXAMPLES section of bhyvectl.8. Add a FILES section to bhyve.8
to make this information easier to find.
Update the bhyvectl.8 example to say "Existing VMs"
instead of "Running VMs" as the VMs listed in /dev/vmm
are not necessarily running.
Update bhyvectl.8 to refer to vmm(4).
Reviewed by: ziaee
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61623
(cherry picked from commit 8651589fd72d8b1de9f1b5512d6542c610fca1b3)
bhyve.8: mention config files for VM parameters
Mention that virtual CPUs, memory and other options can be configured
with a configuration file, and refer to the -k option.
Reviewed by: ziaee
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61718
(cherry picked from commit ed4bad79ec89248d3e3b0475cd44c25541198306)
arm64/vmm: Implement vgic_v5
Adds support for GICv5 as both a host and guest. Additionally, on platforms with
FEAT_GICE_LEGACY, supports a GICv3 guest under a GICv5 host.
The current implementation only implements the IRS component. The ITS is not
currently emulated, which prevents the use of MSIs.
Co-developed-by: Andrew Turner <andrew at FreeBSD.org>
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D60115
arm64/vmm: Add handling for all supported ID registers
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D61192
netipsec: Copy the offload interface name to a cloned SA
When SADB_UPDATE changes the addresses of an SA, key_updateaddresses()
replaces the SA with a clone. For an SA that names an offload interface
it allocated a buffer for the clone's copy of the name, and then called
strncpy() with the arguments swapped. The clone was left with an
uninitialized name, and the name of the old SA was overwritten with the
contents of the new buffer.
Copy the name from the old SA to the new one.
Also, the clone starts as a bcopy() of the old SA, so its natt and
accel_ifname pointers refer to memory owned by the old SA until they are
replaced. If one of the offload allocations failed, the error path freed
that memory, and key_cleansav() freed it again with the last reference
to the old SA. Clear both pointers right after the copy.
Reported by: llm-postcr
Reviewed by: kib
[4 lines not shown]
netipsec: Process a nested IPsec header on IPv6 input
After a transport mode SA has processed an inbound IPv6 packet,
ipsec6_common_input_cb() walks the remaining header chain itself and
calls ip6_protox[] for each next header. AH, ESP and IPComp have had no
entry in ip6_protox[] since the projects/ipsec merge; ip6_input() reaches
them through IPSEC_INPUT() instead. The callback did not, so when the
next header was another IPsec header the packet went to rip6_input() and
was never decapsulated. The receiving side of a bundle such as ESP
beneath a transport mode AH, or ESP with IPComp, did not work over IPv6.
Hand such a header back to ipsec_common_input() from the loop. Look up
the offset of the preceding next header field with ip6_get_prevhdr(),
since extension headers may sit between the two IPsec headers.
The bundle cases of the flowlabel test had to ignore the result of ping
because of this. Have them check it, and give the second target, which
no host owned, an address on hostB.
[6 lines not shown]
zfs: merge openzfs/zfs at a1daebfec
Notable upstream pull request merges:
#18910 f53b6403e Keep the local key where a raw receive brings a foreign
one
#19226 f765c2d2b zio: don't write dedup copies from an override BP's data
#19280 -multiple dmu_recv: split WRITE_EMBEDDED records that don't match
block size
#19305 e25bc5b83 Read the objset in the fadvise handlers after entering
#19311 470e0e81f zcp: check clone names with clone_namecheck()
#19317 9ac6648a2 spa: keep ZIL claims relative to the loaded txg
#19484 7865f6b5f dsl_scan: fix scan-prefetch shutdown race leaking stale
queue entries
#19490 495cc5f52 dsl_userhold: free on-close state when the pool is
unavailable
#19494 13793f363 zpool remove: erase log labels once the hole is on disk
#19548 b054fbbe5 Set fletcher4 fastest uses_fpu from both byte orders
#19677 -multiple zio: retain device injection provenance
#19746 -multiple FreeBSD: Reduce unnecessary SPL wrappers - #19746
[10 lines not shown]
ixl/iavf: Start the head write-back completion index at the head
With head write-back, tx_cidx_processed holds the head value that the
credits update consumed last: the index of the next descriptor to
complete. With the Report Status queue it is the index of the last
completed descriptor. 088a0b27adb4 made both start at the last
descriptor of the ring, which is right for the Report Status queue
only. With head write-back, the default in ixl(4), the first credits
update after every initialization reports a completed descriptor that
was never sent.
iflib's own reclaim holds back isc_tx_nsegments descriptors and does
not notice. netmap uses the count as it is: iflib_netmap_txsync()
puts the tail of its ring one slot too far. Once the card has sent
everything, the tail meets the head, which netmap reads as a ring
without a free slot, and no completion is left that would move it.
The ring never transmits again: pkt-gen at full rate stops after a few
thousand packets, and a ring that one pkt-gen has used cannot be used
by the next.
[12 lines not shown]
hwpmc_amd: Service the core counters when IBS claims the NMI
IBS and the core counters share the PMC NMI. amd_intr() and
amd_intr_v2() return as soon as pmc_ibs_intr() claims an NMI, so a core
counter overflow that arrives with the same NMI is not serviced: the
counter is not reloaded and sampling with it stops.
Service the core counters after pmc_ibs_intr() and claim the NMI if
either side found work. An NMI that IBS claimed no longer uses up a
core stray-NMI credit. With no core counter sampling, amd_intr_v2()
still returns right after IBS, without freezing the core counters.
Add a test that samples unhalted cycles on cpu0 alone and then next to
IBS op, and requires the second phase to keep at least half of the
core samples.
Reviewed by: mhorne
Sponsored by: Advanced Micro Devices, Inc.
Differential Revision: https://reviews.freebsd.org/D61451
amd64: Mark the BSP as a small core
cpu_init_small_core() records in the pcpu area that a CPU is an Intel
small (Atom) core, and that it needs the workaround for INVLPG not
flushing global TLB entries when PCID is enabled. hammer_time() calls
it for the BSP before the BSP has a pcpu area: the temporary one is
zeroed and installed only later, and pmap_bootstrap() then replaces it
with the final one, zeroed again. The BSP therefore never has
pc_small_core or pc_pcid_invlpg_workaround set, while the APs, which
call it from initializecpu(), do.
On a hybrid machine the BSP is normally a large core and nothing is
missing. On a machine with small cores only, such as an Atom C1110 or
x7809C, the BSP is one of them, and its invalidations of kernel
mappings in pmap_invlpg(), pmap_invalidate_range() and the shootdown
handler go without the workaround.
Do it in amd64_bsp_pcpu_init1() instead, which runs for both of the
BSP's pcpu areas once %gs points at them. The PCID features and
[7 lines not shown]
dnode_sync: Relax constraint on indirect freeing
One of the roles of the dnode sync thread is freeing. There are two
modes of this operation: freeing a portion of an object, and freeing
the object itself.
Freeing is handled by `free_children()`. This function verifies that
if the dnode has children there must be at least one marked as dirty
before proceeding to recursively free the tree of block pointers.
As described in a comment, this VERIFY is overly strict. In practice,
children may not be marked as dirty when the dnode itself is being
freed. Relax the VERIFY slightly by avoiding the VERIFY when indirect
blocks are to be immediately freed, to more closely match the comment
motivating the VERIFY.
While here, clarify the logic of the test by using VERIFY_IMPLY instead
of chaining multiple tests.
[7 lines not shown]
pmc(8): handle AMD Zen3-B0 IBS errata in the frontend view
AMD Family 19h Model 00h-0Fh (Zen3-B0) has IBS errata that make some
fetch and op sample fields wrong. Detect this silicon from the CPUID
block in the pmc(8) log header, set one flag per erratum, and correct
the affected samples before the callchain callbacks:
- #1197: drop fetch samples with a zero linear address.
- #1238: omit the IC Miss column; the IcMiss bit is unreliable.
- #1293: zero DATA2 and the DATA3 L2Miss/OpenMemReqs fields on the
trigger conditions, keeping the sample.
Reviewed by: Ali Mashtizadeh <ali at mashtizadeh.com>
MFC after: 1 week
Signed-off-by: Andre Silva <andasilv at amd.com>
Differential Revision: https://reviews.freebsd.org/D58715
ipfw: fix value index allocation on shared value storage resize
alloc_table_vidx() treated a successful resize_shared_value_storage()
as complete success and returned an uninitialized vidx instead of
allocating a new index in the grown bitmap. The removed restart
machinery in b0c13e7e2446 used to handle this case by restarting the
whole operation.
Also refresh pval pointer in ipfw_link_table_values() after the resize,
otherwise the new value object is registered against the freed old storage.
PR: 300802, 300803
Reported by: pouria
Tested by: pouria
evdev: Map the HP mic mute and programmable keys
HP laptops send these keys as AT scancodes 0xE0 0x01 and 0x68, which
evdev dropped. Map 0xE0 0x01 to KEY_MICMUTE, as systemd's hwdb does
for the HP business laptops (EliteBook, ProBook, ZBook, Elite
Dragonfly), and 0x68 to KEY_PROG1, as it does for the Elite
Dragonfly G2.
hwdb maps 0xE0 0x01 to Fn+Esc on the other HP models. The AT table is
not per machine, so Fn+Esc there now sends KEY_MICMUTE instead of
nothing.
Reviewed by: wulf
Approved by: wulf
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/122
pci: Accept D3hot in pci_set_powerstate_method()
Since D3 was split into D3hot and D3cold, PCI_POWERSTATE_D3 is D3cold
and the switch rejects D3hot with EINVAL. Devices whose _SxD is 3
(D3hot) then stay in D0 on suspend, and acpi_pci skips their ACPI
transition. LinuxKPI pci_set_power_state(PCI_D3hot) fails the same way.
The PM register has a single D3 state, so write it for both.
Reviewed by: kbowling
Approved by: kbowling
Fixes: 84bbfc32a3f4 ("acpi_powerres: D3cold support")
MFC after: 1 week
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/111
tools/build: also stage machine/cpu_flags.h on powerpc
powerpc's machine/elf.h now includes machine/cpu_flags.h, but only elf.h
gets copied into the legacy include directory. Building world natively
on a powerpc host that doesn't have cpu_flags.h installed yet then fails
in libllvmminimal.
Reviewed by: jhibbits
Fixes: 90bc40e26c61 ("powerpc: Split CPU flags into separate file...")
MFC with: 90bc40e26c61
Differential Revision: https://reviews.freebsd.org/D61920
tpm: crb: Do not attach when no CRB interface answers
Some firmware describes a CRB TPM that is not there: a Protectli FW6
with coreboot 4.12 publishes a TPM2 table at 0xfed40000, but no PTT
answers and the Intel ME interface is absent too. Every register
reads all-ones, so attach failed only after 0.6 s of state timeouts,
with ready, idle and locality messages that hid the cause.
Check INTF_ID once, as tpm_tis12_probe() does for TPM 1.2.
Reviewed by: kbowling
Approved by: kbowling
MFC after: 1 week
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/128
capsicum-test: Disable `HAVE_SEND_RECV_MMSG` again
04c4b2084eb9 accidentally added some changes from another WIP commit into that
diff. Instead of wholesale reverting the change, just revert the part that's
currently broken (`HAVE_SEND_RECV_MMSG`). While some of the related tests pass,
one of the testcases (`capmode.cc:AllowedMmsgSendRecv`) doesn't currently pass.
Revert the change to make the CI run more green again.
MFC after: 1 week
Fixes: 04c4b2084eb9 ("capsicum-test: make the code WARNS=6 clean")
(cherry picked from commit 71eddb44d7dfa60e43f77c90b51bd091f0693f85)
contrib/kyua: update config.h for 0.15.1 -> 0.15.2
This was accidentally missed in the prior commit.
This commit addresses a largely cosmetic issue.
MFC after: 6 days
MFC with: c16da33701d0
Fixes: c16da33701d0 contrib/kyua: update to 0.15.2
(cherry picked from commit d9daf5ae796518af1793f919156fb6feba05959d)
tests/sys/capsicum: Fix -Wshadow issue with `fd_set`
`fd_set` is defined in `sys/select.h`, and prior to this change, was in fcntl.cc as well.
This change renames `fd_set` to `fd_set_` to avoid the name collision.
MFC after: 1 week
Reported by: gcc 14
Fixes: 04c4b2084eb9 ("capsicum-test: make the code WARNS=6 clean")
(cherry picked from commit a479301abb2c7b384f574fcc641e502f70654835)
capsicum-test: make the code WARNS=6 clean
Make the code WARNS=6 clean by doing the following:
- Renaming variables (-Wshadow).
- Use memcpy instead of assigning the result of CMSG_DATA to a variable
(-Wcast-align).
- Wrap some macros with do-while(0) to avoid variable collisions
(-Wshadow).
- Push one of the TRACE statements up by 1 layer to avoid a collision
between 2 calls of TRACE via the same overarching macro.
This was needed in order for the code to build properly with D61066,
since the code was not compiling with WARNS set to 3 at the testcase
level.
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D61080
(cherry picked from commit 04c4b2084eb93fc2374dbb89f343f3941585a640)
GoogleTest: run several tests as plain C++ tests
Some of the tests provided by GoogleTest don't play well with the kyua
GoogleTest engine available in 0.15.0, in part because they test
edgecases that the kyua GoogleTest engine does not expect or handle
gracefully.
Treat the tests as plain C++ tests to keep parity (result-wise) before
switching the testcase type from `plain` (what it is today under the
covers) to `googletest`.
MFC after: 1 month
MFC with: 3fb03fb35b20 ("[tests] switch GoogleTest tests to ...")
(cherry picked from commit eecc84de3572d1ee6caac1fa14dd3140c9601c9c)