Received: from eggs.gnu.org ([208.118.235.92]:55895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRNNt-0004t4-9p for qemu-devel@nongnu.org; Thu, 25 Oct 2012 09:22:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRNNn-0006oF-0k for qemu-devel@nongnu.org; Thu, 25 Oct 2012 09:22:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRNNm-0006o5-NR for qemu-devel@nongnu.org; Thu, 25 Oct 2012 09:21:58 -0400 Date: Thu, 25 Oct 2012 11:23:25 -0200 From: Eduardo Habkost Message-ID: <20121025132325.GA3149@otherpad.lan.raisama.net> References: <1351101001-14589-1-git-send-email-ehabkost@redhat.com> <1351101001-14589-27-git-send-email-ehabkost@redhat.com> <20121024181236.GA11118@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121024181236.GA11118@redhat.com> Subject: Re: [Qemu-devel] [PATCH 26/27] pc: create separate init function for pc-1.3 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Igor Mammedov , Paolo Bonzini , qemu-devel@nongnu.org, Andreas =?iso-8859-1?Q?F=E4rber?= On Wed, Oct 24, 2012 at 08:12:36PM +0200, Michael S. Tsirkin wrote: > On Wed, Oct 24, 2012 at 03:50:00PM -0200, Eduardo Habkost wrote: > > This: > > - Renames the init function for pc-1.2 and lower to pc_init_pci_v1_2; > > - Creates a pc_init_pci_v1_3 function for pc-1.3. > > > > Right now both functions have exactly the same code, but the following patch > > will change pc_init_v1_2 to set compatibility PCInitArgs fields. > > > > Signed-off-by: Eduardo Habkost > > --- > > Cc: "Michael S. Tsirkin" > > > > This patch conflicts with a patch from Michael S. Tsirkin. If his patch > > gets into the tree first (which is likely), I can rebase this one to use > > the new function created by Michael. > > Could you simply include my patch in your patchset instead? > This removes any confusion and git am automatically ignores > duplicates. I could, and maybe I will do that if I have to respin. I just didn't want to introduce a dependency on the unrelated PV EOI fix, by now. If you had two separate patches: one for splitting the functions, and another one for the PV EOI change, I would surely pull the first one. > > > --- > > hw/pc_piix.c | 25 ++++++++++++++++++------- > > 1 file changed, 18 insertions(+), 7 deletions(-) > > > > diff --git a/hw/pc_piix.c b/hw/pc_piix.c > > index 7de8f0d..57a3228 100644 > > --- a/hw/pc_piix.c > > +++ b/hw/pc_piix.c > > @@ -280,7 +280,8 @@ static void pc_init1(PCInitArgs *pc_args) > > } > > } > > > > -static void pc_init_pci(QEMUMachineInitArgs *args) > > +/* PC init function for pc-1.3 and higher */ > > +static void pc_init_pci_v1_3(QEMUMachineInitArgs *args) > > { > > PCInitArgs pc_args = { > > .qemu_args = args, > > @@ -290,6 +291,16 @@ static void pc_init_pci(QEMUMachineInitArgs *args) > > pc_init1(&pc_args); > > } > > > > +/* PC init function for pc-1.2 and lower */ > > +static void pc_init_pci_v1_2(QEMUMachineInitArgs *args) > > +{ > > + PCInitArgs pc_args = { > > + .qemu_args = args, > > + .pci_enabled = true, > > + .kvmclock_enabled = true, > > + }; > > + pc_init1(&pc_args); > > +} > > static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args) > > { > > PCInitArgs pc_args = { > > @@ -327,7 +338,7 @@ static QEMUMachine pc_machine_v1_3 = { > > .name = "pc-1.3", > > .alias = "pc", > > .desc = "Standard PC", > > - .init = pc_init_pci, > > + .init = pc_init_pci_v1_3, > > .max_cpus = 255, > > .is_default = 1, > > }; > > @@ -362,7 +373,7 @@ static QEMUMachine pc_machine_v1_3 = { > > static QEMUMachine pc_machine_v1_2 = { > > .name = "pc-1.2", > > .desc = "Standard PC", > > - .init = pc_init_pci, > > + .init = pc_init_pci_v1_2, > > .max_cpus = 255, > > .compat_props = (GlobalProperty[]) { > > PC_COMPAT_1_2, > > @@ -405,7 +416,7 @@ static QEMUMachine pc_machine_v1_2 = { > > static QEMUMachine pc_machine_v1_1 = { > > .name = "pc-1.1", > > .desc = "Standard PC", > > - .init = pc_init_pci, > > + .init = pc_init_pci_v1_2, > > .max_cpus = 255, > > .compat_props = (GlobalProperty[]) { > > PC_COMPAT_1_1, > > @@ -440,7 +451,7 @@ static QEMUMachine pc_machine_v1_1 = { > > static QEMUMachine pc_machine_v1_0 = { > > .name = "pc-1.0", > > .desc = "Standard PC", > > - .init = pc_init_pci, > > + .init = pc_init_pci_v1_2, > > .max_cpus = 255, > > .compat_props = (GlobalProperty[]) { > > PC_COMPAT_1_0, > > @@ -455,7 +466,7 @@ static QEMUMachine pc_machine_v1_0 = { > > static QEMUMachine pc_machine_v0_15 = { > > .name = "pc-0.15", > > .desc = "Standard PC", > > - .init = pc_init_pci, > > + .init = pc_init_pci_v1_2, > > .max_cpus = 255, > > .compat_props = (GlobalProperty[]) { > > PC_COMPAT_0_15, > > @@ -487,7 +498,7 @@ static QEMUMachine pc_machine_v0_15 = { > > static QEMUMachine pc_machine_v0_14 = { > > .name = "pc-0.14", > > .desc = "Standard PC", > > - .init = pc_init_pci, > > + .init = pc_init_pci_v1_2, > > .max_cpus = 255, > > .compat_props = (GlobalProperty[]) { > > PC_COMPAT_0_14, > > -- > > 1.7.11.7 -- Eduardo