On Mon, Sep 04, 2023 at 09:53:34AM +0000, Manali Shukla wrote: > Note that, since IBS registers are swap type C [2], the hypervisor is > responsible for saving and restoring of IBS host state. Hypervisor > does so only when IBS is active on the host to avoid unnecessary > rdmsrs/wrmsrs. Hypervisor needs to disable host IBS before saving the > state and enter the guest. After a guest exit, the hypervisor needs to > restore host IBS state and re-enable IBS. Why do you think it is OK for a guest to disable the host IBS when entering a guest? Perhaps the host was wanting to profile the guest. Only when perf_event_attr::exclude_guest is set is this allowed, otherwise you have to respect the host running IBS and you're not allowed to touch it. Host trumps guest etc..