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: Wed, 29 Apr 2009 18:13:47 +0200 [thread overview]
Message-ID: <200904291813.48212.goretux@gmail.com> (raw)
In-Reply-To: <200904291650.16079.goretux@gmail.com>
Yeah, I got it! All seems to work well now ;)
It was simply the host_cr3 field that I did not correctly fill...
When I started to write my module, I used the cr3 of the current process to
fill the host_cr3 VMCS field .... big mistake !!! as the process (insmod) dies
after loading my module, the corresponding page where my host_cr3 field points
is then invalid. And that's why when I tried to execute a command that is not
a built-in command (which induced more allocations), the system went crazy, as
my host_cr3 page was then used for something else...
Thank you anyway to have spent some time on my problem.
Best regards,
Eric
Le mercredi 29 avril 2009 16:50:15 Eric Lacombe, vous avez écrit :
> Hi,
>
> Le mardi 21 avril 2009 13:16:06 Eric Lacombe, vous avez écrit :
> > 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.
>
> I setup a minimal initramfs with busybox and my module inside.
> The init script in the initramfs only mount /proc /sys, populate /dev
> (busybox mdev), then execute the busybox shell.
>
> Then when I insmod'ed my module, I had to cope with an exit reason at the
> very first entry (through vmlaunch) to the VM.
> This was because of the host and guest fs_selector VMCS fields, whose TI
> and RPL bits were not 0.
>
> After fixing that (setting TI and RPL bits to 0, instead of using directly
> fs and gs values), the vmlaunch succeed, and I got quite the same behaviour
> as when the system boots with the rootfs pointing to the hard disk, i.e.
> the system works for "echo", "pwd", ... but freezes after a ls for example.
>
> I say "quite", as I sometime got a freeze after a "echo something".
> So the problem is definitely not a problem with files on the hard disk...
>
> Do you have some new hints on what could go wrong?
> And what could I try to resolve this problem?
>
> I really need to resolve that thing, and all assistance is more than
> greatly welcome ;)
>
> Thanks in advance for your response and the time you have already spent to
> help me.
>
> Eric Lacombe
prev parent reply other threads:[~2009-04-29 16:13 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
2009-04-29 14:50 ` Eric Lacombe
2009-04-29 16:13 ` Eric Lacombe [this message]
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=200904291813.48212.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