LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Eric Lacombe <goretux@gmail.com>
To: avi@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [x86] - technical questions about HV implementation on Intel VT
Date: Mon, 20 Oct 2008 19:27:33 +0200	[thread overview]
Message-ID: <200810201927.33580.goretux@gmail.com> (raw)

Hello,

I worked on a particular hypervisor, that just put in a VM the currently 
running kernel. But I faced some problems and I would like to know some good 
practices in order to debug the module I develop.

When the module put the current kernel in "vmx non-root mode", some conditions 
irremediably trigger a VM-Exit (with the processor I use, loading cr3 always 
trigger a vmexit). And here comes my problem. How can I reliably get 
information (by way of printk) when my hypervisor screw something up, and 
crash the machine with lots of debug info that scroll quickly on the screen, 
just before freezing the machine.

In fact, It seems that in some situations the machine "loop on page faults".
Let me depict the scenario:
After a vmxlaunch, the host hand over the cpu to the guest then a vmexit 
occurs. Thus, the guest hand over to the host. the host checks some things 
and issue a vmxresume, and.. a vmexit occurs again, etc. etc.

So, when the host take control for the first time after the first vmexit, I 
would like the host to print informations and to "die correctly", so as I 
could read these information on the screen (ie, without being polluted with 
lots of debug messages that scroll on the screen).

Note: I already have some vmexits due to invalid guest state during vmxlaunch, 
but it seems (because my trivial printings for those situations do not show 
again) I fully repaired those problems. Now there is a lot of debug info 
quickly scrolling on the screen before the system crashes :/

Thanks in advance for your answers.

	Eric

             reply	other threads:[~2008-10-20 17:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-20 17:27 Eric Lacombe [this message]
2008-10-21  9:05 ` Avi Kivity
2008-10-27 14:29   ` Eric Lacombe
2008-10-27 16:38     ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200810201927.33580.goretux@gmail.com \
    --to=goretux@gmail.com \
    --cc=avi@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [x86] - technical questions about HV implementation on Intel VT' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).