For the lbr feature, could we thought of it as first come, first served?Doesn't work that way.
For example, if we have 2 host threads who want to use lbr at the same time,
I think one of them would simply fail to use.
So if guest first gets the lbr, host wouldn't take over unless some
userspace command (we added to QEMU) is executed to have the vCPU
actively stop using lbr.
Say you start KVM with LBR emulation, it creates this task event, it
gets the LBR (nobody else wants it) and the guest works and starts using
the LBR.
Then the host creates a CPU LBR event and the vCPU suddenly gets denied
the LBR and the guest no longer functions correctly.
Or you should fail to VMENTER, in which case you starve the guest, but
at least it doesn't malfunction.