From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Richard Henderson <rth@twiddle.net>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH 2/3] pc: Create pc_compat_2_4() function
Date: Fri, 30 Oct 2015 17:00:59 -0200 [thread overview]
Message-ID: <1446231660-24394-3-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1446231660-24394-1-git-send-email-ehabkost@redhat.com>
We will need to call x86_cpu_change_kvm_default() for pc-2.4 too, so we
will need a pc_compat_2_4() function.
I plan to fix this by adding a kvm_defaults list to PCMachineClass
later, but while we don't have that, let's do it the easy way and add
the new function.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/i386/pc_piix.c | 12 +++++-------
hw/i386/pc_q35.c | 12 +++++-------
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index fd4bbc9..d6616c4 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -294,16 +294,14 @@ static void pc_init1(MachineState *machine,
}
}
-/* Looking for a pc_compat_2_4() function? It doesn't exist.
- * pc_compat_*() functions that run on machine-init time and
- * change global QEMU state are deprecated. Please don't create
- * one, and implement any pc-*-2.4 (and newer) compat code in
- * HW_COMPAT_*, PC_COMPAT_*, or * pc_*_machine_options().
- */
+static void pc_compat_2_4(MachineState *machine)
+{
+}
static void pc_compat_2_3(MachineState *machine)
{
PCMachineState *pcms = PC_MACHINE(machine);
+ pc_compat_2_4(machine);
savevm_skip_section_footers();
if (kvm_enabled()) {
pcms->smm = ON_OFF_AUTO_OFF;
@@ -490,7 +488,7 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m)
SET_MACHINE_COMPAT(m, PC_COMPAT_2_4);
}
-DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL,
+DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", pc_compat_2_4,
pc_i440fx_2_4_machine_options)
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 833b1c1..b33fcdc 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -277,16 +277,14 @@ static void pc_q35_init(MachineState *machine)
}
}
-/* Looking for a pc_compat_2_4() function? It doesn't exist.
- * pc_compat_*() functions that run on machine-init time and
- * change global QEMU state are deprecated. Please don't create
- * one, and implement any pc-*-2.4 (and newer) compat code in
- * HW_COMPAT_*, PC_COMPAT_*, or * pc_*_machine_options().
- */
+static void pc_compat_2_4(MachineState *machine)
+{
+}
static void pc_compat_2_3(MachineState *machine)
{
PCMachineState *pcms = PC_MACHINE(machine);
+ pc_compat_2_4(machine);
savevm_skip_section_footers();
if (kvm_enabled()) {
pcms->smm = ON_OFF_AUTO_OFF;
@@ -388,7 +386,7 @@ static void pc_q35_2_4_machine_options(MachineClass *m)
SET_MACHINE_COMPAT(m, PC_COMPAT_2_4);
}
-DEFINE_Q35_MACHINE(v2_4, "pc-q35-2.4", NULL,
+DEFINE_Q35_MACHINE(v2_4, "pc-q35-2.4", pc_compat_2_4,
pc_q35_2_4_machine_options);
--
2.1.0
next prev parent reply other threads:[~2015-10-30 19:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 19:00 [Qemu-devel] [PATCH 0/3] target-i386: Don't trigger "check" warnings by default in KVM mode Eduardo Habkost
2015-10-30 19:00 ` [Qemu-devel] [PATCH 1/3] target-i386: Add optional class name to kvm_default_props Eduardo Habkost
2015-10-30 19:00 ` Eduardo Habkost [this message]
2015-10-30 19:01 ` [Qemu-devel] [PATCH 3/3] target-i386: Don't enable SSE4A by default with KVM Eduardo Habkost
2015-10-30 19:13 ` [Qemu-devel] [PATCH 0/3] target-i386: Don't trigger "check" warnings by default in KVM mode Eduardo Habkost
2015-11-02 11:37 ` Paolo Bonzini
2015-11-03 16:41 ` Eduardo Habkost
2015-11-03 17:21 ` Paolo Bonzini
2015-11-03 17:54 ` Eduardo Habkost
2015-11-03 17:41 ` Eduardo Habkost
2015-11-03 17:49 ` Paolo Bonzini
2015-11-03 17:56 ` Eduardo Habkost
2015-11-03 19:53 ` Paolo Bonzini
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=1446231660-24394-3-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).