- 02 7月, 2010 15 次提交
-
-
由 Luiz Capitulino 提交于
Historically, user monitor arguments beginning with '-' (eg. '-f') were passed as integers down to handlers. I've maintained this behavior in the new monitor because we didn't have a boolean type at the very beginning of QMP. Today we have it and this behavior is causing trouble to QMP's argument checker. This commit fixes the problem by doing the following changes: 1. User Monitor Before: the optional arg was represented as a QInt, we'd pass 1 down to handlers if the user specified the argument or 0 otherwise This commit: the optional arg is represented as a QBool, we pass true down to handlers if the user specified the argument, otherwise _nothing_ is passed 2. QMP Before: the client was required to pass the arg as QBool, but we'd convert it to QInt internally. If the argument wasn't passed, we'd pass 0 down This commit: still require a QBool, but doesn't do any conversion and doesn't pass any default value 3. Convert existing handlers (do_eject()/do_migrate()) to the new way Before: Both handlers would expect a QInt value, either 0 or 1 This commit: Change the handlers to accept a QBool, they handle the following cases: A) true is passed: the option is enabled B) false is passed: the option is disabled C) nothing is passed: option not specified, use default behavior Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
It's composed of functions qdict_first() and qdict_next(), plus functions to access QDictEntry values. This API was suggested by Markus Armbruster <armbru@redhat.com> and it offers full control over the iteration process. The usage is simple, the following example prints all keys in 'qdict' (it's hopefully better than any English description): QDict *qdict; const QDictEntry *ent; [...] for (ent = qdict_first(qdict); ent; ent = qdict_next(qdict, ent)) { printf("%s ", qdict_entry_key(ent)); } Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
Next commit will introduce a new QDict iteration API which returns QDictEntry entries, but we don't want users to directly access its members since QDictEntry should be private to QDict. In the near future this kind of data type will be turned into a forward reference. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
Let's call a 'hash' only what is returned by our hash function, anything else is a 'bucket'. This helps avoiding confusion with regard to how we traverse our table. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
A missing key is not an error. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
The 'by the guest' part is misleading, it could be disabled by the host too. We will likely need more surgery if we care for the distinction, just dropping the problematic part is good enough for now. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
The current asynchronous command API doesn't return a QMP response when the async command fails. This is easy to reproduce with the balloon command (the sole async command we have so far): run qemu w/o the '-balloon virtio' option and try to issue the balloon command via QMP: no response will be sent to the client. This commit fixes the problem by making qmp_async_cmd_handler() return the handler's error code and then calling monitor_protocol_emitter() if the handler has returned an error. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Yoshiaki Tamura 提交于
This fixes the following scenario using QMP. First, put a bogus argument "foo" to "type", which results in an error. {"execute": "netdev_add", "arguments": { "type": "foo", "id": "netdev1" } } Then, call it again with correct argument "user". {"execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } } This results in "DuplicatedId" error. Because the first command was invalid, it should be able to reuse the same "id", and the second command should work. Reported-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NYoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Jan Kiszka 提交于
Remove the arbitrary limitation of 1024 characters per return string and read complete lines instead. Required for device_show. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Jan Kiszka 提交于
As sending "qmp_capabilities" on session start became mandatory, both python examples were broken. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Jan Kiszka 提交于
As we want to add more flags to monitor commands, convert the only so far existing one accordingly. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Jan Kiszka 提交于
We now have to move forward to the next argument type via next_arg_type. This patch fixes completion for 'eject' and maybe also other commands. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Jan Kiszka 提交于
Given too many arguments or an invalid command, we were leaking the duplicated argument strings. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 01 7月, 2010 23 次提交
-
-
由 Kevin Wolf 提交于
scanf calls must not use PRI constants, they have probably the wrong size and corrupt memory. We could replace them by SCN ones, but strtol is simpler than scanf here anyway. While at it, also fix the parsers to reject garbage after the number ("4096xyz" was accepted before). Signed-off-by: NKevin Wolf <kwolf@redhat.com> Richard Henderson <rth@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Shahar Havivi 提交于
Signed-off-by: NShahar Havivi <shaharh@redhat.com> Acked-by: NGerd Hoffmann <kraxel@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Shahar Havivi 提交于
Signed-off-by: NShahar Havivi <shaharh@redhat.com> Acked-by: NGerd Hoffmann <kraxel@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Amit Shah 提交于
Commit 50e32ea8 changed the behaviour for the return type of net_client_init() when a nic type with no init method was specified. 'none' is one such nic type. Instead of returning 0, which gets interpreted as an index into the nd_table[] array, we switched to returning -1, which signifies an error as well. That broke VM start with '-net none'. Testing was only done with the monitor command 'pci_add', which doesn't fail. The correct fix would still be to return 0+ values from net_client_init() only when the return value can be used as an index to refer to an entry in nd_table[]. With the current code, callers can erroneously poke into nd_table[0] when -net nic is used, which can lead to badness. However, this commit just returns to the previous behaviour before the offending commit. Signed-off-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Jan Kiszka 提交于
We currently only clear SVM_EVTINJ_VALID after successful interrupt delivery. This apparently does not match real hardware which clears the whole event_inj field on every vmexit, including unsuccessful interrupt delivery. Reported-by: NErik van der Kouwe <vdkouwe@cs.vu.nl> Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 TeLeMan 提交于
The commit 8e65b7c0 introduced expire_time of UHCIState. But expire_time is not in vmstate, the second uhci_frame_timer will not be fired immediately after loadvm. Signed-off-by: NTeLeMan <geleman@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 cmchao 提交于
Signed-off-by: Ncmchao <cmchao@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 cmchao 提交于
Signed-off-by: Ncmchao <cmchao@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 cmchao 提交于
Signed-off-by: Ncmchao <cmchao@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 cmchao 提交于
Signed-off-by: Ncmchao <cmchao@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 cmchao 提交于
Signed-off-by: Ncmchao <cmchao@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 cmchao 提交于
Signed-off-by: Ncmchao <cmchao@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 cmchao 提交于
Signed-off-by: Ncmchao <cmchao@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 cmchao 提交于
Signed-off-by: Ncmchao <cmchao@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 cmchao 提交于
Signed-off-by: Ncmchao <cmchao@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 cmchao 提交于
Signed-off-by: Ncmchao <cmchao@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 cmchao 提交于
Signed-off-by: Ncmchao <cmchao@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 cmchao 提交于
Signed-off-by: Ncmchao <cmchao@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Markus Armbruster 提交于
For all i, ports_map[i] is used in and only in the i-th iteration. Replace the dynamic array by a scalar variable. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Acked-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Markus Armbruster 提交于
Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Acked-by: NGerd Hoffmann <kraxel@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Jun Koi 提交于
This patch avoids handling write watchpoints on read-only memory access. It also breaks the searching loop for watchpoint once the setup for handling watchpoint later is done. Signed-off-by: NJun Koi <junkoi2004@gmail.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Aurelien Jarno 提交于
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Aurelien Jarno 提交于
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
- 30 6月, 2010 2 次提交
-
-
由 Aurelien Jarno 提交于
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Aurelien Jarno 提交于
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-