HomeFreeBSD

vmm: avoid spurious rendezvous

Description

vmm: avoid spurious rendezvous

A vcpu only checks if a rendezvous is in progress or not to decide if it
should handle a rendezvous. This could lead to spurios rendezvous where
a vcpu tries a handle a rendezvous it isn't part of. This situation is
properly handled by vm_handle_rendezvous but it could potentially
degrade the performance. Avoid that by an early check if the vcpu is
part of the rendezvous or not.

At the moment, rendezvous are only used to spin up application
processors and to send ioapic interrupts. Spinning up application
processors is done in the guest boot phase by sending INIT SIPI
sequences to single vcpus. This is known to cause spurious rendezvous
and only occurs in the boot phase. Sending ioapic interrupts is rare
because modern guest will use msi and the rendezvous is always send to
all vcpus.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D37390

(cherry picked from commit 892feec2211d0dbd58252a34d78dbcb2d5dd7593)

Details

Provenance
corvinkAuthored on Nov 15 2022, 10:53 AM
Reviewer
jhb
Differential Revision
D37390: vmm: avoid spurios rendezvous
Parents
rGc8452bdeed4f: libthr pshared: correct a bug in allocation
Branches
Unknown
Tags
Unknown