On Tue, Sep 17, 2019 at 01:16:27PM -0700, Marc Orr wrote: > > > + /* Cleanup. */ > > > + vmcs_write(ENT_MSR_LD_CNT, 0); > > > + vmcs_write(EXI_MSR_LD_CNT, 0); > > > + vmcs_write(EXI_MSR_ST_CNT, 0); > > > + for (i = 0; i < cleanup_count; i++) { > > > + enter_guest(); > > > + skip_exit_vmcall(); > > > + } > > > > I'm missing something, why do we need to reenter the guest after setting > > the count to 0? > > It's for the failure code path, which fails to get into the guest and > skip the single vmcall(). I've refactored the code to make this clear. > Let me know what you think. Why is not entering the guest a problem?