From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnMkX-0000b9-Nh for qemu-devel@nongnu.org; Thu, 22 May 2014 02:45:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnMkQ-0008Qj-78 for qemu-devel@nongnu.org; Thu, 22 May 2014 02:45:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnMkP-0008Oa-R2 for qemu-devel@nongnu.org; Thu, 22 May 2014 02:45:02 -0400 Message-ID: <1400741081.25874.38.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Thu, 22 May 2014 08:44:41 +0200 In-Reply-To: References: <1400237624-8505-1-git-send-email-tiejun.chen@intel.com> <1400237624-8505-5-git-send-email-tiejun.chen@intel.com> <1400481887.32155.34.camel@nilsson.home.kraxel.org> <1400498570.32155.59.camel@nilsson.home.kraxel.org> <1400507431.32155.75.camel@nilsson.home.kraxel.org> <1400737176.25874.10.camel@nilsson.home.kraxel.org> Content-Type: multipart/mixed; boundary="=-cV5ezs4HajDSzjm9uF9V" Mime-Version: 1.0 Subject: Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Chen, Tiejun" Cc: "peter.maydell@linaro.org" , "xen-devel@lists.xensource.com" , "stefano.stabellini@eu.citrix.com" , "mst@redhat.com" , "Kay, Allen M" , "Kelly.Zytaruk@amd.com" , "qemu-devel@nongnu.org" , "Zhang, Yang Z" , "anthony@codemonkey.ws" , Anthony PERARD --=-cV5ezs4HajDSzjm9uF9V Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi, > > Another useful thing would be to not create the xen platform device in case > > "-nodefaults" was specified on the command line (that switch turns off a bunch > > of other devices present by default: vga, nic, cdrom, ...). > > Currently looks 'xen-platform' itself can't be created, not those devices existed on that. The error message looks more like libxl tries to hot-unplug the xen platform device. Attached patch (untested!) hooks up the xen platform device to the default device code we have in qemu. Two effects: (1) As mentioned above the device will not be created in case -nodefaults is specified on the command line. (2) Autocreating the device is also turned off in case xen-platform is added manually via -device. With the patch applied you should be able to move the xen-platform device to some other place with a simple 'qemu -device xen-platform,addr=$slot'. cheers, Gerd --=-cV5ezs4HajDSzjm9uF9V Content-Disposition: attachment; filename="0001-xen-make-xen-platform-a-default-device.patch" Content-Type: text/x-patch; name="0001-xen-make-xen-platform-a-default-device.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit >>From 405349bf38fc05653bfb8c971c61796e981eee98 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 22 May 2014 08:34:28 +0200 Subject: [PATCH] xen: make xen-platform a default device --- hw/i386/pc_piix.c | 2 +- include/hw/xen/xen.h | 1 + vl.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index eaf3e61..f987d03 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -385,7 +385,7 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs *args) pc_init_pci(args); bus = pci_find_primary_bus(); - if (bus != NULL) { + if (bus != NULL && default_xenplatform) { pci_create_simple(bus, -1, "xen-platform"); } } diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h index 85fda3d..b350413 100644 --- a/include/hw/xen/xen.h +++ b/include/hw/xen/xen.h @@ -20,6 +20,7 @@ enum xen_mode { extern uint32_t xen_domid; extern enum xen_mode xen_mode; +extern int default_xenplatform; extern bool xen_allowed; diff --git a/vl.c b/vl.c index 709d8cd..673148e 100644 --- a/vl.c +++ b/vl.c @@ -226,6 +226,7 @@ static int default_floppy = 1; static int default_cdrom = 1; static int default_sdcard = 1; static int default_vga = 1; +int default_xenplatform = 1; static struct { const char *driver; @@ -247,6 +248,7 @@ static struct { { .driver = "isa-cirrus-vga", .flag = &default_vga }, { .driver = "vmware-svga", .flag = &default_vga }, { .driver = "qxl-vga", .flag = &default_vga }, + { .driver = "xen-platform", .flag = &default_xenplatform }, }; static QemuOptsList qemu_rtc_opts = { @@ -4101,6 +4103,7 @@ int main(int argc, char **argv, char **envp) default_monitor = 0; default_net = 0; default_vga = 0; + default_xenplatform = 0; } if (is_daemonized()) { -- 1.8.3.1 --=-cV5ezs4HajDSzjm9uF9V-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD Date: Thu, 22 May 2014 08:44:41 +0200 Message-ID: <1400741081.25874.38.camel@nilsson.home.kraxel.org> References: <1400237624-8505-1-git-send-email-tiejun.chen@intel.com> <1400237624-8505-5-git-send-email-tiejun.chen@intel.com> <1400481887.32155.34.camel@nilsson.home.kraxel.org> <1400498570.32155.59.camel@nilsson.home.kraxel.org> <1400507431.32155.75.camel@nilsson.home.kraxel.org> <1400737176.25874.10.camel@nilsson.home.kraxel.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-cV5ezs4HajDSzjm9uF9V" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: "Chen, Tiejun" Cc: "peter.maydell@linaro.org" , "xen-devel@lists.xensource.com" , "stefano.stabellini@eu.citrix.com" , "mst@redhat.com" , "Kay, Allen M" , "Kelly.Zytaruk@amd.com" , "qemu-devel@nongnu.org" , "Zhang, Yang Z" , "anthony@codemonkey.ws" , Anthony PERARD List-Id: xen-devel@lists.xenproject.org --=-cV5ezs4HajDSzjm9uF9V Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi, > > Another useful thing would be to not create the xen platform device in case > > "-nodefaults" was specified on the command line (that switch turns off a bunch > > of other devices present by default: vga, nic, cdrom, ...). > > Currently looks 'xen-platform' itself can't be created, not those devices existed on that. The error message looks more like libxl tries to hot-unplug the xen platform device. Attached patch (untested!) hooks up the xen platform device to the default device code we have in qemu. Two effects: (1) As mentioned above the device will not be created in case -nodefaults is specified on the command line. (2) Autocreating the device is also turned off in case xen-platform is added manually via -device. With the patch applied you should be able to move the xen-platform device to some other place with a simple 'qemu -device xen-platform,addr=$slot'. cheers, Gerd --=-cV5ezs4HajDSzjm9uF9V Content-Disposition: attachment; filename="0001-xen-make-xen-platform-a-default-device.patch" Content-Type: text/x-patch; name="0001-xen-make-xen-platform-a-default-device.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit >>From 405349bf38fc05653bfb8c971c61796e981eee98 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 22 May 2014 08:34:28 +0200 Subject: [PATCH] xen: make xen-platform a default device --- hw/i386/pc_piix.c | 2 +- include/hw/xen/xen.h | 1 + vl.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index eaf3e61..f987d03 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -385,7 +385,7 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs *args) pc_init_pci(args); bus = pci_find_primary_bus(); - if (bus != NULL) { + if (bus != NULL && default_xenplatform) { pci_create_simple(bus, -1, "xen-platform"); } } diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h index 85fda3d..b350413 100644 --- a/include/hw/xen/xen.h +++ b/include/hw/xen/xen.h @@ -20,6 +20,7 @@ enum xen_mode { extern uint32_t xen_domid; extern enum xen_mode xen_mode; +extern int default_xenplatform; extern bool xen_allowed; diff --git a/vl.c b/vl.c index 709d8cd..673148e 100644 --- a/vl.c +++ b/vl.c @@ -226,6 +226,7 @@ static int default_floppy = 1; static int default_cdrom = 1; static int default_sdcard = 1; static int default_vga = 1; +int default_xenplatform = 1; static struct { const char *driver; @@ -247,6 +248,7 @@ static struct { { .driver = "isa-cirrus-vga", .flag = &default_vga }, { .driver = "vmware-svga", .flag = &default_vga }, { .driver = "qxl-vga", .flag = &default_vga }, + { .driver = "xen-platform", .flag = &default_xenplatform }, }; static QemuOptsList qemu_rtc_opts = { @@ -4101,6 +4103,7 @@ int main(int argc, char **argv, char **envp) default_monitor = 0; default_net = 0; default_vga = 0; + default_xenplatform = 0; } if (is_daemonized()) { -- 1.8.3.1 --=-cV5ezs4HajDSzjm9uF9V--