[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 26/27] pc: create separate init function for pc-1.3
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PATCH 26/27] pc: create separate init function for pc-1.3 |
Date: |
Wed, 24 Oct 2012 15:50:00 -0200 |
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 <address@hidden>
---
Cc: "Michael S. Tsirkin" <address@hidden>
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.
---
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
- [Qemu-devel] Subject: [PATCH 00/27] Fix APIC-ID-based CPU topology, take 3, Eduardo Habkost, 2012/10/24
- [Qemu-devel] [PATCH 03/27] hw/apic.c: rename bit functions to not conflict with bitops.h, Eduardo Habkost, 2012/10/24
- [Qemu-devel] [PATCH 04/27] target-i386: initialize APIC at CPU level, Eduardo Habkost, 2012/10/24
- [Qemu-devel] [PATCH 19/27] cpu_x86_init: check for x86_cpu_realize() errors, Eduardo Habkost, 2012/10/24
- [Qemu-devel] [PATCH 14/27] pc: use FWCfgState* instead of void* for fw_cfg data, Eduardo Habkost, 2012/10/24
- [Qemu-devel] [PATCH 26/27] pc: create separate init function for pc-1.3,
Eduardo Habkost <=
- [Qemu-devel] [PATCH 05/27] kvm: create kvm_arch_vcpu_id() function, Eduardo Habkost, 2012/10/24
- [Qemu-devel] [PATCH 11/27] pc: add PC_DEFAULT_CPU_MODEL #define, Eduardo Habkost, 2012/10/24
- [Qemu-devel] [PATCH 01/27] move I/O-related definitions from qemu-common.h to a new header (qemu-stdio.h), Eduardo Habkost, 2012/10/24
- [Qemu-devel] [PATCH 20/27] target-i386: do not call x86_cpu_realize() on cpu_x86_init(), Eduardo Habkost, 2012/10/24