From patchwork Fri Aug 15 05:46:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiejun Chen X-Patchwork-Id: 380092 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 608A61400B5 for ; Fri, 15 Aug 2014 15:47:12 +1000 (EST) Received: from localhost ([::1]:57644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIAM2-00012S-A7 for incoming@patchwork.ozlabs.org; Fri, 15 Aug 2014 01:47:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIALe-0000bT-0z for qemu-devel@nongnu.org; Fri, 15 Aug 2014 01:46:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XIALW-0007o5-NL for qemu-devel@nongnu.org; Fri, 15 Aug 2014 01:46:45 -0400 Received: from mga01.intel.com ([192.55.52.88]:36204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIALW-0007nu-HS for qemu-devel@nongnu.org; Fri, 15 Aug 2014 01:46:38 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 14 Aug 2014 22:46:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="372698722" Received: from tiejunch-mobl.ccr.corp.intel.com (HELO [10.238.130.73]) ([10.238.130.73]) by FMSMGA003.fm.intel.com with ESMTP; 14 Aug 2014 22:43:07 -0700 Message-ID: <53ED9EB9.4060708@intel.com> Date: Fri, 15 Aug 2014 13:46:33 +0800 From: "Chen, Tiejun" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: "Michael S. Tsirkin" References: <1407836957-29098-1-git-send-email-tiejun.chen@intel.com> <1407836957-29098-5-git-send-email-tiejun.chen@intel.com> <20140814160338.GA10653@redhat.com> In-Reply-To: <20140814160338.GA10653@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.88 Cc: pbonzini@redhat.com, xen-devel@lists.xensource.com, qemu-devel@nongnu.org, stefano.stabellini@eu.citrix.com Subject: Re: [Qemu-devel] [v5][PATCH 4/4] xen:hw:i386:pc_piix: introduce new machine for IGD passthrough X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On 2014/8/15 0:03, Michael S. Tsirkin wrote: > On Tue, Aug 12, 2014 at 05:49:17PM +0800, Tiejun Chen wrote: >> Now we can introduce a new machine, xenigd, specific to IGD >> passthrough. This can avoid involving other common codes. >> >> Signed-off-by: Tiejun Chen > > This broke make check since the new machine was not > blacklisted. Sorry I didn't realize we have such a good test that we can do in case of qemu. Often I just do compile and run to validate a fix. Now I'd like to keep this in my mind. > I sent a patch to fix this, Thanks so much. I guest what you fixed should be as follows, > pls make sure make check passes when posting patches. Definitely. Thanks Tiejun > > >> --- >> hw/i386/pc_piix.c | 43 +++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 43 insertions(+) >> >> v5: >> >> * Nothing is changed. >> >> v4: >> >> * Rebase >> >> v3: >> >> * Rebase >> >> v2: >> >> * Unify prefix with XEN_IGD_PASSTHROUGH/xen_igd_passthrough like patch #3 >> >> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c >> index 2bf8046..9d37f18 100644 >> --- a/hw/i386/pc_piix.c >> +++ b/hw/i386/pc_piix.c >> @@ -309,6 +309,15 @@ static void pc_init_pci(MachineState *machine) >> TYPE_I440FX_PCI_DEVICE); >> } >> >> + >> +#ifdef CONFIG_XEN >> +static void xen_igd_passthrough_pc_init_pci(MachineState *machine) >> +{ >> + pc_init1(machine, 1, 1, TYPE_I440FX_PCI_HOST_BRIDGE, >> + TYPE_XEN_IGD_PASSTHROUGH_I440FX_PCI_DEVICE); >> +} >> +#endif >> + >> static void pc_compat_2_0(MachineState *machine) >> { >> /* This value depends on the actual DSDT and SSDT compiled into >> @@ -457,6 +466,18 @@ static void pc_xen_hvm_init(MachineState *machine) >> pci_create_simple(bus, -1, "xen-platform"); >> } >> } >> + >> +static void xen_igd_passthrough_pc_hvm_init(MachineState *machine) >> +{ >> + PCIBus *bus; >> + >> + xen_igd_passthrough_pc_init_pci(machine); >> + >> + bus = pci_find_primary_bus(); >> + if (bus != NULL) { >> + pci_create_simple(bus, -1, "xen-platform"); >> + } >> +} >> #endif >> >> #define PC_I440FX_MACHINE_OPTIONS \ >> @@ -906,6 +927,27 @@ static QEMUMachine xenfv_machine = { >> { /* end of list */ } >> }, >> }; >> + >> +static QEMUMachine xenigd_machine = { >> + PC_COMMON_MACHINE_OPTIONS, >> + .name = "xenigd", >> + .desc = "Xen Fully-virtualized PC specific to IGD", >> + .init = xen_igd_passthrough_pc_hvm_init, >> + .max_cpus = HVM_MAX_VCPUS, >> + .default_machine_opts = "accel=xen", >> + .hot_add_cpu = pc_hot_add_cpu, >> + .compat_props = (GlobalProperty[]) { >> + /* xenfv has no fwcfg and so does not load acpi from QEMU. >> + * as such new acpi features don't work. >> + */ >> + { >> + .driver = "PIIX4_PM", >> + .property = "acpi-pci-hotplug-with-bridge-support", >> + .value = "off", >> + }, >> + { /* end of list */ } >> + }, >> +}; >> #endif >> >> static void pc_machine_init(void) >> @@ -929,6 +971,7 @@ static void pc_machine_init(void) >> qemu_register_pc_machine(&isapc_machine); >> #ifdef CONFIG_XEN >> qemu_register_pc_machine(&xenfv_machine); >> + qemu_register_pc_machine(&xenigd_machine); >> #endif >> } >> >> -- >> 1.9.1 > > diff --git a/tests/qom-test.c b/tests/qom-test.c index 4246382..10799e2 100644 --- a/tests/qom-test.c +++ b/tests/qom-test.c @@ -16,7 +16,7 @@ #include "qapi/qmp/types.h" static const char *blacklist_x86[] = { - "xenfv", "xenpv", NULL + "xenfv", "xenpv", "xenigd", NULL }; static const struct {