public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Lacombe <goretux@gmail.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [x86] - technical questions about HV implementation on Intel VT
Date: Tue, 21 Apr 2009 13:16:06 +0200	[thread overview]
Message-ID: <200904211316.06778.goretux@gmail.com> (raw)
In-Reply-To: <49ECBD5D.4080205@redhat.com>

Thanks a lot for your answer ;)

Le lundi 20 avril 2009 20:22:21 Avi Kivity, vous avez écrit :
> Eric Lacombe wrote:
[...]
> echo and pwd are part of bash, so they are probably in memory.  I guess
> once you go to disk things fail.
>
> Try to boot the entire OS from initramfs (and keep it there).

I will try this but maybe what follows say that the problem is elsewhere.

[...]
> > (Recall: When loaded, my module use VT-x to go on vmx root operation,
> > then it creates a vmcs in order to execute the OS inside a VM.)
>
> I imagine you have interrupts working properly?  Does 'watch -d cat
> /proc/interrupts' give the expected results (run it before you enter vmx
> to load it into cache)?

I made many times this test:
1. I run on a first console 'watch -n0,2 -d cat /proc/interrupts'
2. I load from another console my module (that is modified at the beginning of 
its init step with the addition of a schedule_timeout_uninterruptible())
3. I switch to the first console and wait for schedule_timeout to return

And when my module does its stuff, the machine freezes... Maybe my module  
"implies" a deadlock in the VFS after a VM-entry?

Note: in my module, I do not intercept (in the VM-execution controls) external 
interruptions nor exception.

I also check in the documentation the "VMX aborts" but it does not seem to be 
my problem --- the freeze occurs when I do not use MSR load/store areas as 
well as when I use them.
Note: now, I just load/store the Kernel_GS_BASE MSR to cover swapgs, even if 
it is not actually necessary for my module. (Besides, I intercept rdmsr/wrmsr 
as can be seen in the logs, and modify accordingly the VMCS when needed).

>
> Are you virtualizing memory, or does the guest manipulate page tables
> directly?

The guest manipulates directly page tables in my current module.
I just handle two cases of cr3 access ("mov from" and "mov to") by just 
carrying out the "mov" in the guest registers.

Best regards

	Eric Lacombe


  reply	other threads:[~2009-04-21 11:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200903241822.11529.goretux@gmail.com>
     [not found] ` <200904071926.30643.goretux@gmail.com>
2009-04-14 12:24   ` [x86] - technical questions about HV implementation on Intel VT Eric Lacombe
2009-04-20 17:53     ` Eric Lacombe
2009-04-20 18:22       ` Avi Kivity
2009-04-21 11:16         ` Eric Lacombe [this message]
2009-04-29 14:50           ` Eric Lacombe
2009-04-29 16:13             ` Eric Lacombe

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=200904211316.06778.goretux@gmail.com \
    --to=goretux@gmail.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox