From af506c7036003a4a860e23e694034b9a914d1d2f Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Wed, 22 Aug 2012 15:44:38 -0500 Subject: Update version for 1.2.0-rc1 release Signed-off-by: Anthony Liguori --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 69658cdda..069199b82 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.90 +1.1.91 -- cgit v1.2.3 From b4a738bf93c3137b92d532e59d60edccc4e1ea96 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Wed, 22 Aug 2012 15:22:05 -0500 Subject: boards: add a 'none' machine type to all platforms This allows any QEMU binary to be executed with: $QEMU_BINARY -M none -qmp stdio Without errors from missing options that are required by various boards. This also provides a mode that we can use in the future to construct machines entirely through QMP commands. Cc: Daniel Berrange Cc: Markus Armbruster Signed-off-by: Anthony Liguori --- hw/Makefile.objs | 2 ++ hw/null-machine.c | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 hw/null-machine.c diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 7f57ed58e..6dfebd297 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -134,6 +134,8 @@ hw-obj-$(CONFIG_DP8393X) += dp8393x.o hw-obj-$(CONFIG_DS1225Y) += ds1225y.o hw-obj-$(CONFIG_MIPSNET) += mipsnet.o +hw-obj-y += null-machine.o + # Sound sound-obj-y = sound-obj-$(CONFIG_SB16) += sb16.o diff --git a/hw/null-machine.c b/hw/null-machine.c new file mode 100644 index 000000000..69910d399 --- /dev/null +++ b/hw/null-machine.c @@ -0,0 +1,40 @@ +/* + * Empty machine + * + * Copyright IBM, Corp. 2012 + * + * Authors: + * Anthony Liguori + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + */ + +#include "qemu-common.h" +#include "hw/hw.h" +#include "hw/boards.h" + +static void machine_none_init(ram_addr_t ram_size, + const char *boot_device, + const char *kernel_filename, + const char *kernel_cmdline, + const char *initrd_filename, + const char *cpu_model) +{ +} + +static QEMUMachine machine_none = { + .name = "none", + .desc = "empty machine", + .init = machine_none_init, + .max_cpus = 0, +}; + +static void register_machines(void) +{ + qemu_register_machine(&machine_none); +} + +machine_init(register_machines); + -- cgit v1.2.3 From 58617a795c8067b2f9800cffce60f38707d3aa31 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Thu, 23 Aug 2012 08:03:21 -0500 Subject: monitor: move json init from OPEN event to init At some point in the past, the OPEN event was changed to be issued from a bottom half. This creates a small window whereas a data callback registered in init may be invoked before the OPEN event has been issued. This is reproducible with: echo "{'execute': 'qmp_capabilities'}" | qemu-system-x86_64 -M none -qmp stdio We can fix this for the monitor by moving the parser initialization to init. The remaining state that is set in OPEN appears harmless. Reported-by: Daniel Berrange Signed-off-by: Anthony Liguori --- monitor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index 480f583f7..b18858205 100644 --- a/monitor.c +++ b/monitor.c @@ -4832,7 +4832,6 @@ static void monitor_control_event(void *opaque, int event) switch (event) { case CHR_EVENT_OPENED: mon->mc->command_mode = 0; - json_message_parser_init(&mon->mc->parser, handle_qmp_command); data = get_qmp_greeting(); monitor_json_emitter(mon, data); qobject_decref(data); @@ -4840,6 +4839,7 @@ static void monitor_control_event(void *opaque, int event) break; case CHR_EVENT_CLOSED: json_message_parser_destroy(&mon->mc->parser); + json_message_parser_init(&mon->mc->parser, handle_qmp_command); mon_refcount--; monitor_fdsets_cleanup(); break; @@ -4951,6 +4951,8 @@ void monitor_init(CharDriverState *chr, int flags) monitor_event, mon); } + json_message_parser_init(&mon->mc->parser, handle_qmp_command); + QLIST_INSERT_HEAD(&mon_list, mon, entry); if (!default_mon || (flags & MONITOR_IS_DEFAULT)) default_mon = mon; -- cgit v1.2.3 From 94159135cb59684853dcd45ff70d6dbc54a29209 Mon Sep 17 00:00:00 2001 From: Meador Inge Date: Tue, 21 Aug 2012 12:31:37 -0500 Subject: target-mips: Enable access to required RDHWR hardware registers While running in the usermode emulator all of the required* MIPS32r2 RDHWR hardware registers should be accessible (the Linux kernel enables access to these same registers). Note that these registers are still enabled when the MIPS ISA is not release 2. This is OK since the Linux kernel emulates access to them when they are not available in hardware. * There is also the ULR register which is only recommended for full release 2 compliance. Incidentally, accessing this register in the current implementation works fine without flipping its access bit. Signed-off-by: Meador Inge Signed-off-by: Aurelien Jarno --- target-mips/translate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 47daf8574..d643676e5 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -12768,8 +12768,9 @@ void cpu_state_reset(CPUMIPSState *env) #if defined(CONFIG_USER_ONLY) env->hflags = MIPS_HFLAG_UM; - /* Enable access to the SYNCI_Step register. */ - env->CP0_HWREna |= (1 << 1); + /* Enable access to the CPUNum, SYNCI_Step, CC, and CCRes RDHWR + hardware registers. */ + env->CP0_HWREna |= 0x0000000F; if (env->CP0_Config1 & (1 << CP0C1_FP)) { env->hflags |= MIPS_HFLAG_FPU; } -- cgit v1.2.3