From 7af6f46c6199549f0e02a2176d0f3ec2ec405e99 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Tue, 7 Jan 2014 21:53:51 +0900 Subject: [PATCH 01/11] docs: Fix typo in QMP WAKEUP example Cc: qemu-trivial@nongnu.org Signed-off-by: Namhyung Kim Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- docs/qmp/qmp-events.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/qmp/qmp-events.txt b/docs/qmp/qmp-events.txt index 6b87e9786a..a378c87583 100644 --- a/docs/qmp/qmp-events.txt +++ b/docs/qmp/qmp-events.txt @@ -479,7 +479,7 @@ Data: None. Example: -{ "event": "WATCHDOG", +{ "event": "WAKEUP", "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } WATCHDOG From dc9fc1cac59e46102f2e046ac3233d8ad4535497 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Tue, 7 Jan 2014 09:04:25 +0900 Subject: [PATCH 02/11] Fix typo of tiemr in timer.h Signed-off-by: Namhyung Kim Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Tokarev --- include/qemu/timer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 5afcffc3f9..7f9a074c2a 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -405,7 +405,7 @@ int64_t timerlistgroup_deadline_ns(QEMUTimerListGroup *tlg); * timer_init: * @ts: the timer to be initialised * @timer_list: the timer list to attach the timer to - * @scale: the scale value for the tiemr + * @scale: the scale value for the timer * @cb: the callback to be called when the timer expires * @opaque: the opaque pointer to be passed to the callback * @@ -422,7 +422,7 @@ void timer_init(QEMUTimer *ts, /** * timer_new_tl: * @timer_list: the timer list to attach the timer to - * @scale: the scale value for the tiemr + * @scale: the scale value for the timer * @cb: the callback to be called when the timer expires * @opaque: the opaque pointer to be passed to the callback * @@ -447,7 +447,7 @@ static inline QEMUTimer *timer_new_tl(QEMUTimerList *timer_list, /** * timer_new: * @type: the clock type to use - * @scale: the scale value for the tiemr + * @scale: the scale value for the timer * @cb: the callback to be called when the timer expires * @opaque: the opaque pointer to be passed to the callback * From bf2eaf718e2fcc5cc975326495bf03de7305bbe4 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Mon, 9 Dec 2013 21:33:34 -0200 Subject: [PATCH 03/11] Add bios-256k.bin to BLOBS on Makefile The default machine-type (pc-i440fx-2.0) now requires bios-256k.bin, but "make install" isn't installing it, so qemu-system-x86_64 won't run out of the box. Add it to BLOBS so it gets installed. Signed-off-by: Eduardo Habkost Reviewed-by: Gerd Hoffmann Tested-by: William Dauchy Signed-off-by: Michael Tokarev --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bdff4e4684..807054b3a1 100644 --- a/Makefile +++ b/Makefile @@ -290,7 +290,7 @@ common de-ch es fo fr-ca hu ja mk nl-be pt sl tr \ bepo cz ifdef INSTALL_BLOBS -BLOBS=bios.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ +BLOBS=bios.bin bios-256k.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin \ acpi-dsdt.aml q35-acpi-dsdt.aml \ ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin \ From fb3ecb7ea40c44d15091143c4336993e7165fc4f Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 14 Jan 2014 07:00:28 +0100 Subject: [PATCH 04/11] exec: Exclude non portable function for MinGW cpu_physical_memory_set_dirty_lebitmap calls getpageaddr and ffsl which are unavailable for MinGW. As the function is unused for MinGW, it can simply be excluded from compilation. Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- include/exec/ram_addr.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 33c8acc02e..481a447417 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -79,6 +79,7 @@ static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start, xen_modified_memory(start, length); } +#if !defined(_WIN32) static inline void cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap, ram_addr_t start, ram_addr_t pages) @@ -127,6 +128,7 @@ static inline void cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap, } } } +#endif /* not _WIN32 */ static inline void cpu_physical_memory_clear_dirty_range(ram_addr_t start, ram_addr_t length, From e6baf6130ef26f32a45e0282bd4720913a1ff472 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Thu, 9 Jan 2014 09:58:16 -0500 Subject: [PATCH 05/11] virtio-balloon: don't hardcode config size value Use sizeof(struct virtio_balloon_config) instead. Signed-off-by: Luiz capitulino Reviewed-by: Peter Crosthwaite Signed-off-by: Michael Tokarev --- hw/virtio/virtio-balloon.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index d9754dbd33..a470a0b3a6 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -263,7 +263,7 @@ static void virtio_balloon_get_config(VirtIODevice *vdev, uint8_t *config_data) config.num_pages = cpu_to_le32(dev->num_pages); config.actual = cpu_to_le32(dev->actual); - memcpy(config_data, &config, 8); + memcpy(config_data, &config, sizeof(struct virtio_balloon_config)); } static void virtio_balloon_set_config(VirtIODevice *vdev, @@ -272,7 +272,7 @@ static void virtio_balloon_set_config(VirtIODevice *vdev, VirtIOBalloon *dev = VIRTIO_BALLOON(vdev); struct virtio_balloon_config config; uint32_t oldactual = dev->actual; - memcpy(&config, config_data, 8); + memcpy(&config, config_data, sizeof(struct virtio_balloon_config)); dev->actual = le32_to_cpu(config.actual); if (dev->actual != oldactual) { qemu_balloon_changed(ram_size - @@ -343,7 +343,8 @@ static void virtio_balloon_device_realize(DeviceState *dev, Error **errp) VirtIOBalloon *s = VIRTIO_BALLOON(dev); int ret; - virtio_init(vdev, "virtio-balloon", VIRTIO_ID_BALLOON, 8); + virtio_init(vdev, "virtio-balloon", VIRTIO_ID_BALLOON, + sizeof(struct virtio_balloon_config)); ret = qemu_add_balloon_handler(virtio_balloon_to_target, virtio_balloon_stat, s); From 850484a295a856474978d9338b8c17eb8e00f549 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 25 Dec 2013 15:17:43 +0100 Subject: [PATCH 06/11] ide: cmd_exec_dev_diagnostic() always set error register to 0x01 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This notably fix IDE CD probing on the Plan 9 operating system, which rely on the error register set by the Execute Device Diagnostic command to detect drive configurations. Thanks to RĂ©mi Pommarel for reporting this issue. Signed-off-by: David du Colombier <0intro@gmail.com> Signed-off-by: Michael Tokarev --- hw/ide/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ide/core.c b/hw/ide/core.c index e1f4c33fb8..7783d58291 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1321,6 +1321,7 @@ static bool cmd_exec_dev_diagnostic(IDEState *s, uint8_t cmd) s->status = 0; /* ATAPI spec (v6) section 9.10 defines packet * devices to return a clear status register * with READY_STAT *not* set. */ + s->error = 0x01; } else { s->status = READY_STAT | SEEK_STAT; /* The bits of the error register are not as usual for this command! From 19a894ba777fa45c6f89ae007570311384204a69 Mon Sep 17 00:00:00 2001 From: Pavel Zbitskiy Date: Sat, 11 Jan 2014 13:34:09 +0400 Subject: [PATCH 07/11] linux-user: fixed s390x clone() argument order It was broken by 4ce6243dc6216e35b5b691078ffa856463bfa8db, where TARGET_CLONE_BACKWARDS was specified instead of TARGET_CLONE_BACKWARDS2. Signed-off-by: Pavel Zbitskiy Reviewed-by: Peter Maydell Signed-off-by: Michael Tokarev --- linux-user/s390x/syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/s390x/syscall.h b/linux-user/s390x/syscall.h index ea8c304840..e5ce30b667 100644 --- a/linux-user/s390x/syscall.h +++ b/linux-user/s390x/syscall.h @@ -22,4 +22,4 @@ struct target_pt_regs { #define UNAME_MACHINE "s390x" -#define TARGET_CLONE_BACKWARDS +#define TARGET_CLONE_BACKWARDS2 From fe54b24930f94bdfbc3d38eccd7adedf35f2f26f Mon Sep 17 00:00:00 2001 From: Pavel Zbitskiy Date: Sat, 11 Jan 2014 13:34:10 +0400 Subject: [PATCH 08/11] linux-user: fixed getsockopt() optlen optlen parameter of getsockopt() of type socklen_t* was read into variable of type socklen_t, that caused zeroing out of upper 4 bytes when running s390x on top of x86_64. This patch changes optlen type to abi_ulong. Signed-off-by: Pavel Zbitskiy Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 0ac05b85f2..a9ce6ba11c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2406,7 +2406,7 @@ static abi_long do_socketcall(int num, abi_ulong vptr) abi_ulong level; abi_ulong optname; abi_ulong optval; - socklen_t optlen; + abi_ulong optlen; if (get_user_ual(sockfd, vptr) || get_user_ual(level, vptr + n) From a39ca6a124267dcfc6bc5276fff9c4b02e5c2215 Mon Sep 17 00:00:00 2001 From: Pavel Zbitskiy Date: Sat, 11 Jan 2014 13:34:11 +0400 Subject: [PATCH 09/11] linux-user: fixed recvfrom() addrlen addrlen parameter of recvfrom() of type socklen_t* was read into variable of type socklen_t, that caused zeroing out of upper 4 bytes when running s390x on top of x86_64. This patch changes addrlen type to abi_ulong. Signed-off-by: Pavel Zbitskiy Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index a9ce6ba11c..bc0ac98d4f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2340,7 +2340,7 @@ static abi_long do_socketcall(int num, abi_ulong vptr) size_t len; abi_ulong flags; abi_ulong addr; - socklen_t addrlen; + abi_ulong addrlen; if (get_user_ual(sockfd, vptr) || get_user_ual(msg, vptr + n) From 3babcc8704f593473ccd0f66d6e39c949c672477 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 28 Dec 2013 08:31:11 +0100 Subject: [PATCH 10/11] pc-bios: Remove execute flag from BIOS files BIOS files are not directly executable, so they don't need this flag. All other BIOS files don't use the execute flag. Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- pc-bios/kvmvapic.bin | Bin pc-bios/multiboot.bin | Bin pc-bios/sgabios.bin | Bin 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 pc-bios/kvmvapic.bin mode change 100755 => 100644 pc-bios/multiboot.bin mode change 100755 => 100644 pc-bios/sgabios.bin diff --git a/pc-bios/kvmvapic.bin b/pc-bios/kvmvapic.bin old mode 100755 new mode 100644 diff --git a/pc-bios/multiboot.bin b/pc-bios/multiboot.bin old mode 100755 new mode 100644 diff --git a/pc-bios/sgabios.bin b/pc-bios/sgabios.bin old mode 100755 new mode 100644 From 2c02d1ad48ad44cf00522df7d8de9138689fac85 Mon Sep 17 00:00:00 2001 From: Kewei Yu Date: Tue, 31 Dec 2013 18:36:08 +0800 Subject: [PATCH 11/11] vl: Add a blank space between the variable and '=' Signed-off-by: Kewei Yu Signed-off-by: Michael Tokarev --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 7f4fe0d5df..2b478664a5 100644 --- a/vl.c +++ b/vl.c @@ -2925,7 +2925,7 @@ int main(int argc, char **argv, char **envp) bdrv_init_with_whitelist(); - autostart= 1; + autostart = 1; /* first pass of option parsing */ optind = 1;