xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Fantoni <fabio.fantoni@m2r.biz>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: xen-devel <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Anthony PERARD <Anthony.Perard@citrix.com>,
	Tiejun Chen <tiejun.chen@intel.com>
Subject: Re: [Xen-devel] [PATCH v2] libxl: change default QEMU machine to pc-i440fx-1.6
Date: Thu, 12 Jun 2014 19:07:14 +0200	[thread overview]
Message-ID: <CABMPFzj0OkzQLS-GgokbdTCPz4nUm0q+XLnpRDeHrWu77hXQMg@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1406121512360.13771@kaball.uk.xensource.com>

[-- Attachment #1: Type: text/plain, Size: 5376 bytes --]

2014-06-12 16:33 GMT+02:00 Stefano Stabellini <
stefano.stabellini@eu.citrix.com>:

> Choose pc-i440fx-1.6 instead of pc for HVM guests, so that we know for
> sure what is the machine that we are emulating.
>
> Use pc-i440fx-1.6 regardless of the xen_platform_pci option. Add the
> xen-platform device if requested.  Move the machine options earlier,
> before any emulated devices options so that QEMU will assign slot 2 to
> the xen-platform device, maintaining compatibility with current
> installations.
>
> In case of Intel graphic passthrough, slot 2 might be needed by the
> grafics card. However it is easy to change the position of the
> xen-platform device on the PCI bus if graphic passthrough is enabled, by
> passing "addr=desired_slot_number".
>
> Specify PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off, because
> differently from xenfv, the other QEMU machines do not have that option
> off by default.
>
> This patch does not change the emulated environment in the guest, unless
> soundhw='hda' is specified, in that case the xen-platform device is
> moved to slot 3 (used to be always slot 2). This change might cause
> problems to guests with soundhw='hda', migrating from 4.4 to 4.5.
>

Without fixed xen-platform slot I think will be ok also in migrate.
For test the case it is sufficient save on unstable without the patch and
restore with this patch? If yes I'll thest this on my next build test.


>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>
>
> ---
>
> Changes in v2:
> - note the dependency on QEMU >= 1.6.1 in the README;
> - move the -machine options even earlier and drop the explicit
>   ",slot=0x2".
>
>
> diff --git a/README b/README
> index 9bbe734..cb66893 100644
> --- a/README
> +++ b/README
> @@ -73,6 +73,10 @@ disabled at compile time:
>      * markdown
>      * figlet (for generating the traditional Xen start of day banner)
>
> +As a runtime requirement, you need a QEMU binary newer than v1.6.1,
>

Probably my english is very bad but this seems to me >1.6.1 but should be
>=1.6.1 (for example: at least version 1.6.1 of QEMU binary)


> +compiled with Xen support. By default the Xen build system will clone
> +and build one for you.
>


> +
>  Second, you need to acquire a suitable kernel for use in domain 0. If
>  possible you should use a kernel provided by your OS distributor. If
>  no suitable kernel is available from your OS distributor then refer to
> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> index 51ab2bf..b5a0beb 100644
> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -403,6 +403,27 @@ static char **
> libxl__build_device_model_args_new(libxl__gc *gc,
>                        "-xen-domid",
>                        libxl__sprintf(gc, "%d", guest_domid), NULL);
>
> +    switch (b_info->type) {
> +    case LIBXL_DOMAIN_TYPE_PV:
> +        flexarray_append_pair(dm_args, "-machine", "xenpv");
> +        for (i = 0; b_info->extra_pv && b_info->extra_pv[i] != NULL; i++)
> +            flexarray_append(dm_args, b_info->extra_pv[i]);
> +        break;
> +    case LIBXL_DOMAIN_TYPE_HVM:
> +        flexarray_append_pair(dm_args, "-machine",
> "pc-i440fx-1.6,accel=xen");
> +        flexarray_append_pair(dm_args, "-global",
> +                "PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off");
> +        if (libxl_defbool_val(b_info->u.hvm.xen_platform_pci)) {
> +            flexarray_append(dm_args, "-device");
> +            flexarray_append(dm_args, "xen-platform");
> +        }
> +        for (i = 0; b_info->extra_hvm && b_info->extra_hvm[i] != NULL;
> i++)
> +            flexarray_append(dm_args, b_info->extra_hvm[i]);
> +        break;
> +    default:
> +        abort();
> +    }
> +
>      flexarray_append(dm_args, "-chardev");
>      flexarray_append(dm_args,
>                       libxl__sprintf(gc, "socket,id=libxl-cmd,"
> @@ -646,29 +667,6 @@ static char **
> libxl__build_device_model_args_new(libxl__gc *gc,
>      for (i = 0; b_info->extra && b_info->extra[i] != NULL; i++)
>          flexarray_append(dm_args, b_info->extra[i]);
>
> -    flexarray_append(dm_args, "-machine");
> -    switch (b_info->type) {
> -    case LIBXL_DOMAIN_TYPE_PV:
> -        flexarray_append(dm_args, "xenpv");
> -        for (i = 0; b_info->extra_pv && b_info->extra_pv[i] != NULL; i++)
> -            flexarray_append(dm_args, b_info->extra_pv[i]);
> -        break;
> -    case LIBXL_DOMAIN_TYPE_HVM:
> -        if (!libxl_defbool_val(b_info->u.hvm.xen_platform_pci)) {
> -            /* Switching here to the machine "pc" which does not add
> -             * the xen-platform device instead of the default "xenfv"
> machine.
> -             */
> -            flexarray_append(dm_args, "pc,accel=xen");
> -        } else {
> -            flexarray_append(dm_args, "xenfv");
> -        }
> -        for (i = 0; b_info->extra_hvm && b_info->extra_hvm[i] != NULL;
> i++)
> -            flexarray_append(dm_args, b_info->extra_hvm[i]);
> -        break;
> -    default:
> -        abort();
> -    }
> -
>      ram_size = libxl__sizekb_to_mb(b_info->max_memkb -
> b_info->video_memkb);
>      flexarray_append(dm_args, "-m");
>      flexarray_append(dm_args, libxl__sprintf(gc, "%"PRId64, ram_size));
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>

[-- Attachment #2: Type: text/html, Size: 7379 bytes --]

  reply	other threads:[~2014-06-12 17:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12 14:33 [PATCH v2] libxl: change default QEMU machine to pc-i440fx-1.6 Stefano Stabellini
2014-06-12 17:07 ` Fabio Fantoni [this message]
2014-07-10 17:03 ` Stefano Stabellini
2014-07-10 17:22   ` Ian Jackson
2014-07-11 11:14     ` Stefano Stabellini
2014-07-11 14:19       ` Ian Campbell
2014-07-11 14:54         ` [Xen-devel] " Stefano Stabellini
2014-07-11 15:08           ` Ian Campbell
2014-07-15 12:25             ` Don Slutz

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=CABMPFzj0OkzQLS-GgokbdTCPz4nUm0q+XLnpRDeHrWu77hXQMg@mail.gmail.com \
    --to=fabio.fantoni@m2r.biz \
    --cc=Anthony.Perard@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tiejun.chen@intel.com \
    --cc=xen-devel@lists.xensource.com \
    /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;
as well as URLs for NNTP newsgroup(s).