From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: ajax@redhat.com, Gerd Hoffmann <kraxel@redhat.com>,
Anthony Liguori <aliguori@amazon.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH 1/2] vga: add default display to machine class
Date: Tue, 28 Oct 2014 10:09:11 +0100 [thread overview]
Message-ID: <1414487352-6027-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1414487352-6027-1-git-send-email-kraxel@redhat.com>
This allows machine classes to specify which display device they want
as default. If unspecified the current behavior (try cirrus, failing
that try stdvga, failing that use no display) will be used.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/i386/pc.c | 1 +
include/hw/boards.h | 2 ++
vl.c | 5 ++++-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 61aba9f..ef37528 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1536,6 +1536,7 @@ static void pc_generic_machine_class_init(ObjectClass *oc, void *data)
mc->is_default = qm->is_default;
mc->default_machine_opts = qm->default_machine_opts;
mc->default_boot_order = qm->default_boot_order;
+ mc->default_display = qm->default_display;
mc->compat_props = qm->compat_props;
mc->hw_version = qm->hw_version;
}
diff --git a/include/hw/boards.h b/include/hw/boards.h
index e07c03f..2a09a10 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -39,6 +39,7 @@ struct QEMUMachine {
int is_default;
const char *default_machine_opts;
const char *default_boot_order;
+ const char *default_display;
GlobalProperty *compat_props;
const char *hw_version;
};
@@ -98,6 +99,7 @@ struct MachineClass {
int is_default;
const char *default_machine_opts;
const char *default_boot_order;
+ const char *default_display;
GlobalProperty *compat_props;
const char *hw_version;
diff --git a/vl.c b/vl.c
index 50b97b4..fb5ab79 100644
--- a/vl.c
+++ b/vl.c
@@ -1437,6 +1437,7 @@ static void machine_class_init(ObjectClass *oc, void *data)
mc->is_default = qm->is_default;
mc->default_machine_opts = qm->default_machine_opts;
mc->default_boot_order = qm->default_boot_order;
+ mc->default_display = qm->default_display;
mc->compat_props = qm->compat_props;
mc->hw_version = qm->hw_version;
}
@@ -4193,7 +4194,9 @@ int main(int argc, char **argv, char **envp)
/* If no default VGA is requested, the default is "none". */
if (default_vga) {
- if (cirrus_vga_available()) {
+ if (machine_class->default_display) {
+ vga_model = machine_class->default_display;
+ } else if (cirrus_vga_available()) {
vga_model = "cirrus";
} else if (vga_available()) {
vga_model = "std";
--
1.8.3.1
next prev parent reply other threads:[~2014-10-28 9:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 9:09 [Qemu-devel] [PATCH 0/2] vga: demote cirrus Gerd Hoffmann
2014-10-28 9:09 ` Gerd Hoffmann [this message]
2014-10-28 9:09 ` [Qemu-devel] [PATCH 2/2] vga: flip qemu 2.2 pc machine types from cirrus to stdvga Gerd Hoffmann
2014-10-28 10:37 ` Dr. David Alan Gilbert
2014-10-28 10:48 ` Gerd Hoffmann
2014-11-23 12:11 ` Michael S. Tsirkin
2014-11-24 8:55 ` Gerd Hoffmann
2014-11-24 11:50 ` Michael S. Tsirkin
2014-11-24 12:18 ` Gerd Hoffmann
2014-11-25 10:35 ` Michael S. Tsirkin
2014-11-25 15:05 ` Gerd Hoffmann
2014-11-02 11:14 ` [Qemu-devel] [PATCH 0/2] vga: demote cirrus Michael S. Tsirkin
2014-11-03 7:10 ` Gerd Hoffmann
2014-11-03 7:43 ` Markus Armbruster
2014-11-03 10:29 ` Michael S. Tsirkin
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=1414487352-6027-2-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=ajax@redhat.com \
--cc=aliguori@amazon.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).