All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, kvm <kvm@vger.kernel.org>
Subject: Re: Guest kernel device compatability auto-detection
Date: Thu, 25 Aug 2011 16:48:36 -0500	[thread overview]
Message-ID: <4E56C334.5070509@codemonkey.ws> (raw)
In-Reply-To: <1314249688.3459.23.camel@lappy>

On 08/25/2011 12:21 AM, Sasha Levin wrote:
> Hi,
>
> Currently when we run the guest we treat it as a black box, we're not
> quite sure what it's going to start and whether it supports the same
> features we expect it to support when running it from the host.
>
> This forces us to start the guest with the safest defaults possible, for
> example: '-drive file=my_image.qcow2' will be started with slow IDE
> emulation even though the guest is capable of virtio.
>
> I'm currently working on a method to try and detect whether the guest
> kernel has specific configurations enabled and either warn the user if
> we know the kernel is not going to properly work or use better defaults
> if we know some advanced features are going to work.
>
> How am I planning to do it? First, we'll try finding which kernel the
> guest is going to boot (easy when user does '-kernel', less easy when
> the user boots an image). For simplicity sake I'll stick with the
> '-kernel' option for now.

Is the problem you're trying to solve determine whether the guest kernel 
is going to work well under kvm tool or trying to choose the right 
hardware profile to expose to the guest?

If it's the former, I think the path you're heading down is the most 
likely to succeed (trying to guess based on what you can infer about the 
kernel).

If it's the later, there's some interesting possibilities we never fully 
explored in QEMU.

One would be exposing a well supported device (like IDE emulation) and 
having a magic mode that allowed you to basically promote the device 
from IDE emulation to virtio-blk.  Likewise, you could do something like 
that to promote from the e1000 to virtio-net.

It might require some special support in the guest kernel and would 
likely be impossible to do in Windows, but if you primarily care about 
Linux guests, it ought to be possible.

Regards,

Anthony Liguori

WARNING: multiple messages have this Message-ID (diff)
From: Anthony Liguori <anthony@codemonkey.ws>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, kvm <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] Guest kernel device compatability auto-detection
Date: Thu, 25 Aug 2011 16:48:36 -0500	[thread overview]
Message-ID: <4E56C334.5070509@codemonkey.ws> (raw)
In-Reply-To: <1314249688.3459.23.camel@lappy>

On 08/25/2011 12:21 AM, Sasha Levin wrote:
> Hi,
>
> Currently when we run the guest we treat it as a black box, we're not
> quite sure what it's going to start and whether it supports the same
> features we expect it to support when running it from the host.
>
> This forces us to start the guest with the safest defaults possible, for
> example: '-drive file=my_image.qcow2' will be started with slow IDE
> emulation even though the guest is capable of virtio.
>
> I'm currently working on a method to try and detect whether the guest
> kernel has specific configurations enabled and either warn the user if
> we know the kernel is not going to properly work or use better defaults
> if we know some advanced features are going to work.
>
> How am I planning to do it? First, we'll try finding which kernel the
> guest is going to boot (easy when user does '-kernel', less easy when
> the user boots an image). For simplicity sake I'll stick with the
> '-kernel' option for now.

Is the problem you're trying to solve determine whether the guest kernel 
is going to work well under kvm tool or trying to choose the right 
hardware profile to expose to the guest?

If it's the former, I think the path you're heading down is the most 
likely to succeed (trying to guess based on what you can infer about the 
kernel).

If it's the later, there's some interesting possibilities we never fully 
explored in QEMU.

One would be exposing a well supported device (like IDE emulation) and 
having a magic mode that allowed you to basically promote the device 
from IDE emulation to virtio-blk.  Likewise, you could do something like 
that to promote from the e1000 to virtio-net.

It might require some special support in the guest kernel and would 
likely be impossible to do in Windows, but if you primarily care about 
Linux guests, it ought to be possible.

Regards,

Anthony Liguori

  parent reply	other threads:[~2011-08-25 21:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25  5:21 Guest kernel device compatability auto-detection Sasha Levin
2011-08-25  5:21 ` [Qemu-devel] " Sasha Levin
2011-08-25  5:33 ` Avi Kivity
2011-08-25  7:32   ` Richard W.M. Jones
2011-08-25  7:32     ` Richard W.M. Jones
2011-08-25  7:40     ` Sasha Levin
2011-08-25  7:40       ` Sasha Levin
2011-08-25  7:48       ` Richard W.M. Jones
2011-08-25 10:01         ` Richard W.M. Jones
2011-08-25 16:25           ` Decker, Schorschi
2011-08-25 16:25             ` [Qemu-devel] " Decker, Schorschi
2011-08-26  6:22             ` Sasha Levin
2011-08-26  6:22               ` Sasha Levin
2011-08-26  8:04               ` Richard W.M. Jones
2011-08-26  8:04                 ` [Qemu-devel] " Richard W.M. Jones
2011-08-26 10:18                 ` Sasha Levin
2011-08-26 10:18                   ` Sasha Levin
2011-08-26 10:28                   ` Richard W.M. Jones
2011-08-26 10:28                     ` Richard W.M. Jones
2011-08-25 21:48 ` Anthony Liguori [this message]
2011-08-25 21:48   ` Anthony Liguori
2011-08-26  6:08   ` Sasha Levin
2011-08-26  6:08     ` [Qemu-devel] " Sasha Levin
2011-08-26  8:43     ` Richard W.M. Jones
2011-08-26  8:43       ` Richard W.M. Jones
2011-08-26  8:40   ` Richard W.M. Jones

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=4E56C334.5070509@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.