aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-06-29 19:14:48 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-06-29 19:14:48 +0100
commit1ec20c2a3aa5b90522d15fccf7f052a90f70ddaa (patch)
treeec9dc5923851bb31ea6ba07f351b9e9d458e7ef0 /vl.c
parentef8757f1fe8095a256ee617e4dbac69d3b33ae94 (diff)
parent74b6ce43e3aacbb101018407196fc963e2c39fea (diff)
downloadqemu-1ec20c2a3aa5b90522d15fccf7f052a90f70ddaa.zip
qemu-1ec20c2a3aa5b90522d15fccf7f052a90f70ddaa.tar.gz
qemu-1ec20c2a3aa5b90522d15fccf7f052a90f70ddaa.tar.bz2
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* serial port fixes (Paolo) * Q35 modeling improvements (Paolo, Vasily) * chardev cleanup improvements (Marc-André) * iscsi bugfix (Peter L.) * cpu_exec patch from multi-arch patches (Peter C.) * pci-assign tweak (Lin Ma) # gpg: Signature made Wed 29 Jun 2016 15:56:30 BST # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (35 commits) socket: unlink unix socket on remove socket: add listen feature char: clean up remaining chardevs when leaving vhost-user: disable chardev handlers on close vhost-user-test: fix g_cond_wait_until compat implementation vl: smp_parse: fix regression ich9: implement SCI_IRQ_SEL register ich9: implement ACPI_EN register serial: reinstate watch after migration serial: remove watch on reset char: change qemu_chr_fe_add_watch to return unsigned serial: separate serial_xmit and serial_watch_cb serial: simplify tsr_retry reset serial: make tsr_retry unsigned iscsi: fix assertion in is_sector_request_lun_aligned target-*: Don't redefine cpu_exec() pci-assign: Move "Invalid ROM" error message to pci-assign-load-rom.c vnc: generalize "VNC server running on ..." message scsi: esp: fix migration MC146818 RTC: add GPIO access to output IRQ ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/vl.c b/vl.c
index 90cf638..9bb7f4c 100644
--- a/vl.c
+++ b/vl.c
@@ -1214,8 +1214,10 @@ static void smp_parse(QemuOpts *opts)
} else if (cores == 0) {
threads = threads > 0 ? threads : 1;
cores = cpus / (sockets * threads);
+ cores = cores > 0 ? cores : 1;
} else if (threads == 0) {
threads = cpus / (cores * sockets);
+ threads = threads > 0 ? threads : 1;
} else if (sockets * cores * threads < cpus) {
error_report("cpu topology: "
"sockets (%u) * cores (%u) * threads (%u) < "
@@ -2928,7 +2930,6 @@ int main(int argc, char **argv, char **envp)
const char *qtest_log = NULL;
const char *pid_file = NULL;
const char *incoming = NULL;
- int show_vnc_port = 0;
bool defconfig = true;
bool userconfig = true;
bool nographic = false;
@@ -4183,7 +4184,6 @@ int main(int argc, char **argv, char **envp)
display_type = DT_COCOA;
#elif defined(CONFIG_VNC)
vnc_parse("localhost:0,to=99,id=default", &error_abort);
- show_vnc_port = 1;
#else
display_type = DT_NONE;
#endif
@@ -4532,11 +4532,6 @@ int main(int argc, char **argv, char **envp)
qemu_opts_foreach(qemu_find_opts("vnc"),
vnc_init_func, NULL, NULL);
#endif
- if (show_vnc_port) {
- char *ret = vnc_display_local_addr("default");
- printf("VNC server running on '%s'\n", ret);
- g_free(ret);
- }
if (using_spice) {
qemu_spice_display_init();