All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Jason Wang <jasowang@redhat.com>,
	Richard Henderson <rth@twiddle.net>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PULL 06/28] pc: add 2.4 machine types
Date: Mon, 11 May 2015 14:47:13 +0200	[thread overview]
Message-ID: <1431329108-2605-7-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1431329108-2605-1-git-send-email-mst@redhat.com>

From: Jason Wang <jasowang@redhat.com>

The following patches will limit the following things to legacy
machine type:

- maximum number of virtqueues for virtio-pci were limited to 64
- auto msix bar size for virtio-net-pci were disabled by default

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/i386/pc_piix.c | 29 +++++++++++++++++++++++++----
 hw/i386/pc_q35.c  | 26 +++++++++++++++++++++++---
 2 files changed, 48 insertions(+), 7 deletions(-)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 1fe7bfb..212e263 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -310,8 +310,13 @@ static void pc_init_pci(MachineState *machine)
     pc_init1(machine, 1, 1);
 }
 
+static void pc_compat_2_3(MachineState *machine)
+{
+}
+
 static void pc_compat_2_2(MachineState *machine)
 {
+    pc_compat_2_3(machine);
     rsdp_in_ram = false;
     x86_cpu_compat_set_features("kvm64", FEAT_1_EDX, 0, CPUID_VME);
     x86_cpu_compat_set_features("kvm32", FEAT_1_EDX, 0, CPUID_VME);
@@ -413,6 +418,12 @@ static void pc_compat_1_2(MachineState *machine)
     x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, 1 << KVM_FEATURE_PV_EOI);
 }
 
+static void pc_init_pci_2_3(MachineState *machine)
+{
+    pc_compat_2_3(machine);
+    pc_init_pci(machine);
+}
+
 static void pc_init_pci_2_2(MachineState *machine)
 {
     pc_compat_2_2(machine);
@@ -512,19 +523,28 @@ static void pc_xen_hvm_init(MachineState *machine)
     .desc = "Standard PC (i440FX + PIIX, 1996)", \
     .hot_add_cpu = pc_hot_add_cpu
 
-#define PC_I440FX_2_3_MACHINE_OPTIONS                           \
+#define PC_I440FX_2_4_MACHINE_OPTIONS                           \
     PC_I440FX_MACHINE_OPTIONS,                                  \
     .default_machine_opts = "firmware=bios-256k.bin",           \
     .default_display = "std"
 
-static QEMUMachine pc_i440fx_machine_v2_3 = {
-    PC_I440FX_2_3_MACHINE_OPTIONS,
-    .name = "pc-i440fx-2.3",
+
+static QEMUMachine pc_i440fx_machine_v2_4 = {
+    PC_I440FX_2_4_MACHINE_OPTIONS,
+    .name = "pc-i440fx-2.4",
     .alias = "pc",
     .init = pc_init_pci,
     .is_default = 1,
 };
 
+#define PC_I440FX_2_3_MACHINE_OPTIONS PC_I440FX_2_4_MACHINE_OPTIONS
+
+static QEMUMachine pc_i440fx_machine_v2_3 = {
+    PC_I440FX_2_3_MACHINE_OPTIONS,
+    .name = "pc-i440fx-2.3",
+    .init = pc_init_pci_2_3,
+};
+
 #define PC_I440FX_2_2_MACHINE_OPTIONS PC_I440FX_2_3_MACHINE_OPTIONS
 
 static QEMUMachine pc_i440fx_machine_v2_2 = {
@@ -970,6 +990,7 @@ static QEMUMachine xenfv_machine = {
 
 static void pc_machine_init(void)
 {
+    qemu_register_pc_machine(&pc_i440fx_machine_v2_4);
     qemu_register_pc_machine(&pc_i440fx_machine_v2_3);
     qemu_register_pc_machine(&pc_i440fx_machine_v2_2);
     qemu_register_pc_machine(&pc_i440fx_machine_v2_1);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index dcc17c0..e67f2de 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -289,8 +289,13 @@ static void pc_q35_init(MachineState *machine)
     }
 }
 
+static void pc_compat_2_3(MachineState *machine)
+{
+}
+
 static void pc_compat_2_2(MachineState *machine)
 {
+    pc_compat_2_3(machine);
     rsdp_in_ram = false;
     x86_cpu_compat_set_features("kvm64", FEAT_1_EDX, 0, CPUID_VME);
     x86_cpu_compat_set_features("kvm32", FEAT_1_EDX, 0, CPUID_VME);
@@ -361,6 +366,12 @@ static void pc_compat_1_4(MachineState *machine)
     x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, 0, CPUID_EXT_PCLMULQDQ);
 }
 
+static void pc_q35_init_2_3(MachineState *machine)
+{
+    pc_compat_2_3(machine);
+    pc_q35_init(machine);
+}
+
 static void pc_q35_init_2_2(MachineState *machine)
 {
     pc_compat_2_2(machine);
@@ -410,16 +421,24 @@ static void pc_q35_init_1_4(MachineState *machine)
     .hot_add_cpu = pc_hot_add_cpu, \
     .units_per_default_bus = 1
 
-#define PC_Q35_2_3_MACHINE_OPTIONS                      \
+#define PC_Q35_2_4_MACHINE_OPTIONS                      \
     PC_Q35_MACHINE_OPTIONS,                             \
     .default_machine_opts = "firmware=bios-256k.bin",   \
     .default_display = "std"
 
+static QEMUMachine pc_q35_machine_v2_4 = {
+    PC_Q35_2_4_MACHINE_OPTIONS,
+    .name = "pc-q35-2.4",
+    .alias = "q35",
+    .init = pc_q35_init,
+};
+
+#define PC_Q35_2_3_MACHINE_OPTIONS PC_Q35_2_4_MACHINE_OPTIONS
+
 static QEMUMachine pc_q35_machine_v2_3 = {
     PC_Q35_2_3_MACHINE_OPTIONS,
     .name = "pc-q35-2.3",
-    .alias = "q35",
-    .init = pc_q35_init,
+    .init = pc_q35_init_2_3,
 };
 
 #define PC_Q35_2_2_MACHINE_OPTIONS PC_Q35_2_3_MACHINE_OPTIONS
@@ -506,6 +525,7 @@ static QEMUMachine pc_q35_machine_v1_4 = {
 
 static void pc_q35_machine_init(void)
 {
+    qemu_register_pc_machine(&pc_q35_machine_v2_4);
     qemu_register_pc_machine(&pc_q35_machine_v2_3);
     qemu_register_pc_machine(&pc_q35_machine_v2_2);
     qemu_register_pc_machine(&pc_q35_machine_v2_1);
-- 
MST

  parent reply	other threads:[~2015-05-11 12:47 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 12:46 [Qemu-devel] [PULL 00/28] pc, virtio enhancements Michael S. Tsirkin
2015-05-11 12:46 ` [Qemu-devel] [PULL 01/28] acpi-build: close } in comment Michael S. Tsirkin
2015-05-11 12:47 ` [Qemu-devel] [PULL 02/28] hw/i386: Move ACPI header definitions in an arch-independent location Michael S. Tsirkin
2015-05-11 12:47 ` [Qemu-devel] [PULL 03/28] hw/i386/acpi-build: move generic acpi building helpers into dedictated file Michael S. Tsirkin
2015-05-11 12:47 ` [Qemu-devel] [PULL 04/28] vhost-user: Send VHOST_RESET_OWNER on vhost stop Michael S. Tsirkin
2015-05-11 12:47 ` [Qemu-devel] [PULL 05/28] virtio-net: fix the upper bound when trying to delete queues Michael S. Tsirkin
2015-05-11 12:47 ` Michael S. Tsirkin [this message]
2015-05-11 12:47 ` [Qemu-devel] [PULL 07/28] spapr: add machine type specific instance init function Michael S. Tsirkin
2015-05-11 12:47 ` [Qemu-devel] [PULL 08/28] ppc: spapr: add 2.4 machine type Michael S. Tsirkin
2015-05-11 12:47 ` [Qemu-devel] [PULL 09/28] monitor: replace the magic number 255 with MAX_QUEUE_NUM Michael S. Tsirkin
2015-05-11 12:47 ` [Qemu-devel] [PULL 10/28] monitor: check return value of qemu_find_net_clients_except() Michael S. Tsirkin
2015-05-11 12:47 ` [Qemu-devel] [PULL 11/28] virtio-ccw: using VIRTIO_NO_VECTOR instead of 0 for invalid virtqueue Michael S. Tsirkin
2015-05-11 12:47 ` [Qemu-devel] [PULL 12/28] virtio: introduce vector to virtqueues mapping Michael S. Tsirkin
2015-05-11 12:47 ` [Qemu-devel] [PULL 13/28] virtio-pci: speedup MSI-X masking and unmasking Michael S. Tsirkin
2015-05-11 12:47 ` [Qemu-devel] [PULL 14/28] pci: remove hard-coded bar size in msix_init_exclusive_bar() Michael S. Tsirkin
2015-05-11 12:47 ` [Qemu-devel] [PULL 15/28] virtio: coding style tweak Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 16/28] docs: update documentation for memory hot unplug Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 17/28] acpi, mem-hotplug: add acpi_memory_slot_status() to get MemStatus Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 18/28] acpi, mem-hotplug: add unplug request cb for memory device Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 19/28] acpi, mem-hotplug: add unplug " Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 20/28] acpi: extend aml_field() to support UpdateRule Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 21/28] acpi: fix "Memory device control fields" register Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 22/28] acpi: add hardware implementation for memory hot unplug Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 23/28] qmp-event: add event notification for memory hot unplug error Michael S. Tsirkin
2015-05-11 15:03   ` Eric Blake
2015-05-11 15:17     ` Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 24/28] acpi: add a missing backslash to the \_SB scope Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 25/28] pci: Merge pci_nic_init() into pci_nic_init_nofail() Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 26/28] virtio-net: Move DEFINE_VIRTIO_NET_FEATURES to virtio-net Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 27/28] virtio-scsi: Move DEFINE_VIRTIO_SCSI_FEATURES to virtio-scsi Michael S. Tsirkin
2015-05-11 12:48 ` [Qemu-devel] [PULL 28/28] acpi: update expected files for memory unplug Michael S. Tsirkin
2015-05-12  7:49 ` [Qemu-devel] [PULL 00/28] pc, virtio enhancements Peter Maydell

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=1431329108-2605-7-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.