On Fri, Mar 27, 2026 at 01:19:15PM -0700, Jork Loeser wrote: > The SynIC is shared between VMBus and MSHV. VMBus owns the message > page (SIMP), event flags page (SIEFP), global enable (SCONTROL), and > SINT2. MSHV adds SINT0, SINT5, and the event ring page (SIRBP). > > Currently mshv_synic_init() redundantly enables SIMP, SIEFP, and > SCONTROL that VMBus already configured, and mshv_synic_cleanup() > disables all of them. This is wrong because MSHV can be torn down > while VMBus is still active. In particular, a kexec reboot notifier > tears down MSHV first. Disabling SCONTROL, SIMP, and SIEFP out from > under VMBus causes its later cleanup to write SynIC MSRs while SynIC > is disabled, which the hypervisor does not tolerate. > > Restrict MSHV to managing only the resources it owns: > - SINT0, SINT5: mask on cleanup, unmask on init > - SIRBP: enable/disable as before > - SIMP, SIEFP, SCONTROL: on L1VH leave entirely to VMBus (it > already enabled them); on root partition VMBus doesn't run, so > MSHV must enable/disable them
Maybe it's time to extract all the synic management stuff to a separate file to act like synic "driver" which facilitates synic access to mutiple users i.e. mshv & vmbus. Thanks, Anirudh.

