On Thursday, December 12, 2013 4:00:08 pm Neel Natu wrote:
> Hi John,
> On Thu, Dec 12, 2013 at 12:11 PM, John Baldwin <j...@freebsd.org> wrote:
> > If I suspend and resume my laptop and then try to start a guest after the
> > resume, I get an odd panic.  It generates a privileged instruction fault (in
> > kernel mode) for 'vmclear'.  I've checked CR4 and it claims that VMXE is 
> > set.
> > I dont have any other ideas off the top of my head on what I should be 
> > poking
> > at?  It looks like we read a bunch of MSRs in vmx_init(), but we don't write
> > to them, and all vmx_enable() does on each CPU is set VMXE in CR4 from what 
> > I
> > can tell.
> >
> It also does a "vmxon" on each logical cpu which may also need to be
> done after a resume.

Ah, yes it does.  That was sufficient both for starting a new guest after
resume and even doing a suspend/resume while a guest was active (and the
guest continued to run fine).  I have a hacky patch for this.  One, it
includes both a suspend and resume hook for VMM, though for my testing I only
needed a resume hook to invoke vmxon.  Second, the name of vmx_resume2()
is a total hack (because vmx_resume() was already taken.  I think for now
if I were to commit this, I'd just add the resme hook and maybe call the
Intel method vmx_reset() or vmx_restore()?


John Baldwin
freebsd-virtualization@freebsd.org mailing list
To unsubscribe, send any mail to 

Reply via email to