summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-12-20 13:54:52 +0200
committerAvi Kivity <avi@redhat.com>2009-12-20 13:54:52 +0200
commit643bcbd667793141d75b39a3546dda41d66ff603 (patch)
treed821818915c4bca2cd6c8b3ccef90ee44cc8fddd
parentMerge commit '345c22aa80d1f6ddfe7898f721fd1be3bccb08f1' into stable-0.12-merge (diff)
parentUpdate version and changelog for 0.12.1 (diff)
downloadqemu-kvm-643bcbd667793141d75b39a3546dda41d66ff603.tar.gz
qemu-kvm-643bcbd667793141d75b39a3546dda41d66ff603.tar.bz2
qemu-kvm-643bcbd667793141d75b39a3546dda41d66ff603.zip
Merge commit 'fe1b69708c72b163d3acdf2bb012e169d2d3dda0' into stable-0.12-merge
* commit 'fe1b69708c72b163d3acdf2bb012e169d2d3dda0': Update version and changelog for 0.12.1 Multiboot support: Fix rom_copy roms: allow roms to be loaded at address 0 Update for 0.12.0 release Update to SeaBIOS 0.5.0 Revert "monitor: Convert do_migrate_set_speed() to QObject" e1000: Don't muck with PCI commmand register monitor: do_balloon(): Use 'M' argument type monitor: Introduce 'M' argument type QMP: Update spec file QMP: Update README file QMP: Assure that returned data is a QDict QMP: Return an empty dict by default QMP: Only handle converted commands Update SeaBIOS to include PCI based option rom loading Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--Changelog38
-rw-r--r--QMP/README34
-rw-r--r--QMP/qmp-spec.txt60
-rw-r--r--VERSION2
-rw-r--r--hw/e1000.c1
-rw-r--r--hw/loader.c15
-rw-r--r--migration.c2
-rw-r--r--migration.h2
-rw-r--r--monitor.c13
-rw-r--r--pc-bios/bios.binbin131072 -> 131072 bytes
-rw-r--r--qemu-monitor.hx5
m---------roms/seabios0
12 files changed, 114 insertions, 58 deletions
diff --git a/Changelog b/Changelog
index 79cd934a4..ee2af7303 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,41 @@
+version 0.12.1:
+ - loader: fix rom loading at address 0 (fixes target-arm) (Aurelien Jarno)
+ - loader: fix rom_copy (fixes multiboot) (Kevin Wolf)
+
+version 0.12.0:
+
+ - Update to SeaBIOS 0.5.0
+ - e1000: fix device link status in Linux (Anthony Liguori)
+ - monitor: fix QMP for balloon command (Luiz Capitulino)
+ - QMP: Return an empty dict by default (Luiz Capitulino)
+ - QMP: Only handle converted commands (Luiz Capitulino)
+ - pci: support PCI based option rom loading (Gerd Hoffman/Anthony Liguori)
+ - Fix backcompat for hotplug of SCSI controllers (Daniel P. Berrange)
+ - fdc: fix migration from 0.11 (Juan Quintela)
+ - vmware-vga: fix segv on cursor resize. (Dave Airlie)
+ - vmware-vga: various fixes (Dave Airlie/Anthony Liguori)
+ - qdev: improve property error reporting. (Gerd Hoffmann)
+ - fix vga names in default_list (Gerd Hoffmann)
+ - usb-host: check mon before using it. (Gerd Hoffmann)
+ - usb-net: use qdev for -usbdevice (Gerd Hoffmann)
+ - monitor: Catch printing to non-existent monitor (Luiz Capitulino)
+ - Avoid permanently disabled QEMU monitor when UNIX migration fails (Daniel P. Berrange)
+ - Fix loading of ELF multiboot kernels (Kevin Wolf)
+ - qemu-io: Fix memory leak (Kevin Wolf)
+ - Fix thinko in linuxboot.S (Paolo Bonzini)
+ - target-i386: Fix evaluation of DR7 register (Jan Kiszka)
+ - vnc: hextile: do not generate ForegroundSpecified and SubrectsColoured tiles (Anthony Liguori)
+ - S390: Bail out without KVM (Alexander Graf)
+ - S390: Don't tell guest we're updating config space (Alexander Graf)
+ - target-s390: Fail on unknown instructions (Alexander Graf)
+ - osdep: Fix runtime failure on older Linux kernels (Andre Przywara)
+ - Fix a make -j race (Juergen Lock)
+ - target-alpha: Fix generic ctz64. (Richard Henderson)
+ - s390: Fix buggy assignment (Stefan Weil)
+ - target-mips: fix user-mode emulation startup (Nathan Froyd)
+ - target-i386: Update CPUID feature set for TCG (Andre Przywara)
+ - s390: fix build on 32 bit host (Michael S. Tsirkin)
+
version 0.12.0-rc2:
- v2: properly save kvm system time msr registers (Glauber Costa)
diff --git a/QMP/README b/QMP/README
index 50c31f20c..09e705375 100644
--- a/QMP/README
+++ b/QMP/README
@@ -4,45 +4,57 @@
Introduction
-------------
-The QEMU Monitor Protocol (QMP) is a JSON[1] based protocol for QEMU.
+The QEMU Monitor Protocol (QMP) allows applications to communicate with
+QEMU's Monitor.
-By using it applications can control QEMU in reliable and "parseable" way,
-QMP also provides asynchronous events support.
+QMP is JSON[1] based and has the following features:
+
+- Lightweight, text-based, easy to parse data format
+- Asynchronous events support
+- Stability
For more information, please, refer to the following files:
-o qmp-spec.txt QEMU Monitor Protocol current draft specification
+o qmp-spec.txt QEMU Monitor Protocol current specification
o qmp-events.txt List of available asynchronous events
There are also two simple Python scripts available:
o qmp-shell A shell
-o vm-info Show some informations about the Virtal Machine
+o vm-info Show some information about the Virtual Machine
[1] http://www.json.org
Usage
-----
-To enable QMP, QEMU has to be started in "control mode". This is done
-by passing the flag "control" to the "-monitor" command-line option.
+To enable QMP, QEMU has to be started in "control mode". There are
+two ways of doing this, the simplest one is using the the '-qmp'
+command-line option.
For example:
-$ qemu [...] -monitor control,tcp:localhost:4444,server
+$ qemu [...] -qmp tcp:localhost:4444,server
Will start QEMU in control mode, waiting for a client TCP connection
on localhost port 4444.
-To manually test it you can connect with telnet and issue commands:
+It is also possible to use the '-mon' command-line option to have
+more complex combinations. Please, refer to the QEMU's manpage for
+more information.
+
+Simple Testing
+--------------
+
+To manually test QMP one can connect with telnet and issue commands:
$ telnet localhost 4444
-Trying ::1...
+Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
{"QMP": {"capabilities": []}}
{ "execute": "query-version" }
-{"return": "0.11.50"}
+{"return": {"qemu": "0.11.50", "package": ""}}
Contact
-------
diff --git a/QMP/qmp-spec.txt b/QMP/qmp-spec.txt
index 1cbd21cd4..56f388c3b 100644
--- a/QMP/qmp-spec.txt
+++ b/QMP/qmp-spec.txt
@@ -1,4 +1,4 @@
- QEMU Monitor Protocol Draft Specification - Version 0.1
+ QEMU Monitor Protocol Specification - Version 0.1
1. Introduction
===============
@@ -27,9 +27,9 @@ the JSON standard:
http://www.ietf.org/rfc/rfc4627.txt
-For convenience, json-objects mentioned in this document will have its members
-in a certain order. However, in real protocol usage json-objects members can
-be in ANY order, thus no particular order should be assumed.
+For convenience, json-object members and json-array elements mentioned in
+this document will be in a certain order. However, in real protocol usage
+they can be in ANY order, thus no particular order should be assumed.
2.1 General Definitions
-----------------------
@@ -85,12 +85,13 @@ without errors.
The format is:
-{ "return": json-value, "id": json-value }
+{ "return": json-object, "id": json-value }
Where,
- The "return" member contains the command returned data, which is defined
- in a per-command basis or "OK" if the command does not return data
+ in a per-command basis or an empty json-object if the command does not
+ return data
- The "id" member contains the transaction identification associated
with the command execution (if issued by the Client)
@@ -102,7 +103,7 @@ completed because of an error condition.
The format is:
-{ "error": { "class": json-string, "data": json-value, "desc": json-string },
+{ "error": { "class": json-string, "data": json-object, "desc": json-string },
"id": json-value }
Where,
@@ -110,7 +111,7 @@ The format is:
- The "class" member contains the error class name (eg. "ServiceUnavailable")
- The "data" member contains specific error data and is defined in a
per-command basis, it will be an empty json-object if the error has no data
-- The "desc" member is a human-readable error message. Clients should
+- The "desc" member is a human-readable error message. Clients should
not attempt to parse this message.
- The "id" member contains the transaction identification associated with
the command execution (if issued by the Client)
@@ -127,7 +128,7 @@ to the Client at any time. They are called 'asynchronous events'.
The format is:
-{ "event": json-string, "data": json-value,
+{ "event": json-string, "data": json-object,
"timestamp": { "seconds": json-number, "microseconds": json-number } }
Where,
@@ -135,7 +136,7 @@ The format is:
- The "event" member contains the event's name
- The "data" member contains event specific data, which is defined in a
per-event basis, it is optional
-- The "timestamp" member contains the exact time of when the event ocurred
+- The "timestamp" member contains the exact time of when the event occurred
in the Server. It is a fixed json-object with time in seconds and
microseconds
@@ -157,19 +158,20 @@ S: {"QMP": {"capabilities": []}}
---------------------------
C: { "execute": "stop" }
-S: {"return": "OK"}
+S: {"return": {}}
3.3 KVM information
-------------------
-C: {"execute": "query-kvm", "id": "example"}
-S: {"return": "enabled", "id": "example"}
+C: { "execute": "query-kvm", "id": "example" }
+S: {"return": {"enabled": true, "present": true}, "id": "example"}
3.4 Parsing error
------------------
C: { "execute": }
-S: {"error": {"class": "JSONParsing", "data": {}}}
+S: {"error": {"class": "JSONParsing", "desc": "Invalid JSON syntax", "data":
+{}}}
3.5 Powerdown event
-------------------
@@ -177,19 +179,25 @@ S: {"error": {"class": "JSONParsing", "data": {}}}
S: {"timestamp": {"seconds": 1258551470, "microseconds": 802384}, "event":
"POWERDOWN"}
-4. Notes to Client implementors
--------------------------------
+4. Compatibility Considerations
+--------------------------------
-4.1 It is recommended to always start the Server in pause mode, thus the
- Client is able to perform any setup procedure without the risk of
- race conditions and related problems
+In order to achieve maximum compatibility between versions, Clients must not
+assume any particular:
-4.2 It is recommended to always check the capabilities json-array, issued
- with the greeting message, at connection time
+- Size of json-objects or length of json-arrays
+- Order of json-object members or json-array elements
+- Amount of errors generated by a command, that is, new errors can be added
+ to any existing command in newer versions of the Server
-4.3 Json-objects or json-arrays mentioned in this document are not fixed
- and no particular size or number of members/elements should be assumed.
- New members/elements can be added at any time.
+Additionally, Clients should always:
-4.4 No particular order of json-objects members should be assumed, they
- can change at any time
+- Check the capabilities json-array at connection time
+- Check the availability of commands with 'query-commands' before issuing them
+
+5. Recommendations to Client implementors
+-----------------------------------------
+
+5.1 The Server should be always started in pause mode, thus the Client is
+ able to perform any setup procedure without the risk of race conditions
+ and related problems
diff --git a/VERSION b/VERSION
index c25276499..34a83616b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.11.92
+0.12.1
diff --git a/hw/e1000.c b/hw/e1000.c
index 33c4bc61f..a0faf5ec8 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -1089,7 +1089,6 @@ static int pci_e1000_init(PCIDevice *pci_dev)
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
pci_config_set_device_id(pci_conf, E1000_DEVID);
- *(uint16_t *)(pci_conf+0x04) = cpu_to_le16(0x0407);
*(uint16_t *)(pci_conf+0x06) = cpu_to_le16(0x0010);
pci_conf[0x08] = 0x03;
pci_config_set_class(pci_conf, PCI_CLASS_NETWORK_ETHERNET);
diff --git a/hw/loader.c b/hw/loader.c
index 49d4839b1..2ceb8eba4 100644
--- a/hw/loader.c
+++ b/hw/loader.c
@@ -636,8 +636,6 @@ static void rom_reset(void *unused)
Rom *rom;
QTAILQ_FOREACH(rom, &roms, next) {
- if (rom->addr == 0)
- continue;
if (rom->data == NULL)
continue;
cpu_physical_memory_write_rom(rom->addr, rom->data, rom->romsize);
@@ -656,8 +654,6 @@ int rom_load_all(void)
Rom *rom;
QTAILQ_FOREACH(rom, &roms, next) {
- if (rom->addr == 0)
- continue;
if (addr > rom->addr) {
fprintf(stderr, "rom: requested regions overlap "
"(rom %s. free=0x" TARGET_FMT_plx
@@ -693,8 +689,6 @@ static Rom *find_rom(target_phys_addr_t addr)
Rom *rom;
QTAILQ_FOREACH(rom, &roms, next) {
- if (rom->addr == 0)
- continue;
if (rom->addr > addr)
continue;
if (rom->addr + rom->romsize < addr)
@@ -704,6 +698,11 @@ static Rom *find_rom(target_phys_addr_t addr)
return NULL;
}
+/*
+ * Copies memory from registered ROMs to dest. Any memory that is contained in
+ * a ROM between addr and addr + size is copied. Note that this can involve
+ * multiple ROMs, which need not start at addr and need not end at addr + size.
+ */
int rom_copy(uint8_t *dest, target_phys_addr_t addr, size_t size)
{
target_phys_addr_t end = addr + size;
@@ -712,10 +711,6 @@ int rom_copy(uint8_t *dest, target_phys_addr_t addr, size_t size)
Rom *rom;
QTAILQ_FOREACH(rom, &roms, next) {
- if (rom->addr == 0)
- continue;
- if (rom->addr > addr)
- continue;
if (rom->addr + rom->romsize < addr)
continue;
if (rom->addr > end)
diff --git a/migration.c b/migration.c
index fda61e642..598f8df5c 100644
--- a/migration.c
+++ b/migration.c
@@ -106,7 +106,7 @@ void do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data)
s->cancel(s);
}
-void do_migrate_set_speed(Monitor *mon, const QDict *qdict, QObject **ret_data)
+void do_migrate_set_speed(Monitor *mon, const QDict *qdict)
{
double d;
char *ptr;
diff --git a/migration.h b/migration.h
index 3ac208bf5..cbd456b90 100644
--- a/migration.h
+++ b/migration.h
@@ -56,7 +56,7 @@ void do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data);
void do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data);
-void do_migrate_set_speed(Monitor *mon, const QDict *qdict, QObject **ret_data);
+void do_migrate_set_speed(Monitor *mon, const QDict *qdict);
uint64_t migrate_max_downtime(void);
diff --git a/monitor.c b/monitor.c
index f495da149..5a9fae642 100644
--- a/monitor.c
+++ b/monitor.c
@@ -286,10 +286,12 @@ static void monitor_protocol_emitter(Monitor *mon, QObject *data)
if (!monitor_has_error(mon)) {
/* success response */
if (data) {
+ assert(qobject_type(data) == QTYPE_QDICT);
qobject_incref(data);
qdict_put_obj(qmp, "return", data);
} else {
- qdict_put(qmp, "return", qstring_from_str("OK"));
+ /* return an empty QDict by default */
+ qdict_put(qmp, "return", qdict_new());
}
} else {
/* error response */
@@ -2114,8 +2116,7 @@ static void do_balloon(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
if (balloon_get_value()) {
/* ballooning is active */
- ram_addr_t value = qdict_get_int(qdict, "value");
- qemu_balloon(value << 20);
+ qemu_balloon(qdict_get_int(qdict, "value"));
}
}
@@ -3532,6 +3533,7 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
break;
case 'i':
case 'l':
+ case 'M':
{
int64_t val;
@@ -3562,6 +3564,8 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
monitor_printf(mon, "\'%s\' has failed: ", cmdname);
monitor_printf(mon, "integer is for 32-bit values\n");
goto fail;
+ } else if (c == 'M') {
+ val <<= 20;
}
qdict_put(qdict, key, qint_from_int(val));
}
@@ -3966,6 +3970,7 @@ static int check_arg(const CmdArgs *cmd_args, QDict *args)
}
case 'i':
case 'l':
+ case 'M':
if (qobject_type(value) != QTYPE_QINT) {
qemu_error_new(QERR_INVALID_PARAMETER_TYPE, name, "int");
return -1;
@@ -4103,7 +4108,7 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens)
qobject_from_jsonf("{ 'item': %s }", info_item));
} else {
cmd = monitor_find_command(cmd_name);
- if (!cmd) {
+ if (!cmd || !monitor_handler_ported(cmd)) {
qemu_error_new(QERR_COMMAND_NOT_FOUND, cmd_name);
goto err_input;
}
diff --git a/pc-bios/bios.bin b/pc-bios/bios.bin
index 294958019..827327db9 100644
--- a/pc-bios/bios.bin
+++ b/pc-bios/bios.bin
Binary files differ
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 7b5107037..9e3ea3cfb 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -763,8 +763,7 @@ ETEXI
.args_type = "value:s",
.params = "value",
.help = "set maximum speed (in bytes) for migrations",
- .user_print = monitor_user_noop,
- .mhandler.cmd_new = do_migrate_set_speed,
+ .mhandler.cmd = do_migrate_set_speed,
},
STEXI
@@ -887,7 +886,7 @@ ETEXI
{
.name = "balloon",
- .args_type = "value:i",
+ .args_type = "value:M",
.params = "target",
.help = "request VM to change it's memory allocation (in MB)",
.user_print = monitor_user_noop,
diff --git a/roms/seabios b/roms/seabios
-Subproject 42bc3940d93911e382f5e72289f043d1faa9083
+Subproject 494302fe196f7016d56814f0adc83ba1d54c051