From e743ccecb1148485f0440db28f20f064bb89446e Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Wed, 15 Aug 2012 12:29:24 +0100 Subject: [PATCH 1/9] Makefile: Avoid explicit list of directories in clean target Avoid having an explicit list of directories in the 'clean' target by using 'find' to remove all .o and .d files instead. Signed-off-by: Peter Maydell Reviewed-by: Eric Blake Signed-off-by: Stefan Hajnoczi --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d736ea5311..2964d5c00a 100644 --- a/Makefile +++ b/Makefile @@ -214,13 +214,10 @@ clean: # avoid old build problems by removing potentially incorrect old files rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f qemu-options.def - rm -f *.o *.d *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ + find . -name '*.[od]' -exec rm -f {} + + rm -f *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ rm -Rf .libs - rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d - rm -f qom/*.o qom/*.d libuser/qom/*.o libuser/qom/*.d - rm -f hw/usb/*.o hw/usb/*.d hw/*.o hw/*.d rm -f qemu-img-cmds.h - rm -f trace/*.o trace/*.d rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp @# May not be present in GENERATED_HEADERS rm -f trace-dtrace.h trace-dtrace.h-timestamp From df6839c7f7f0afb208414234903a8f8202fc6770 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Ruiz Date: Tue, 14 Aug 2012 16:13:02 +0200 Subject: [PATCH 2/9] ehci: fix assertion typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Martinez Ruiz Reviewed-by: Andreas Färber Signed-off-by: Stefan Hajnoczi --- hw/usb/hcd-ehci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index b043e7c23e..104c21d315 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -2010,7 +2010,7 @@ static void ehci_fill_queue(EHCIPacket *p) p->qtdaddr = qtdaddr; p->qtd = qtd; p->usb_status = ehci_execute(p, "queue"); - assert(p->usb_status = USB_RET_ASYNC); + assert(p->usb_status == USB_RET_ASYNC); p->async = EHCI_ASYNC_INFLIGHT; } } From 116aae36ae446cd97dd0010ae813194042732ccc Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Fri, 10 Aug 2012 17:14:05 +0100 Subject: [PATCH 3/9] cputlb.c: Fix out of date comment The comment about the return address from get_page_addr_code() was well out of date as phys_ram_base has not existed for some time. Signed-off-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- cputlb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cputlb.c b/cputlb.c index 0d1e2527fb..d3e7b257ae 100644 --- a/cputlb.c +++ b/cputlb.c @@ -312,7 +312,9 @@ void tlb_set_page(CPUArchState *env, target_ulong vaddr, /* NOTE: this function can trigger an exception */ /* NOTE2: the returned address is not exactly the physical address: it - is the offset relative to phys_ram_base */ + * is actually a ram_addr_t (in system mode; the user mode emulation + * version of this function returns a guest virtual address). + */ tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr) { int mmu_idx, page_index, pd; From eda5edd12db3c172671f12f79d0676eeb78dae73 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 10 Aug 2012 21:48:07 +0200 Subject: [PATCH 4/9] trace: Fix "Qemu" -> "QEMU" Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- scripts/simpletrace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py index 9b4419f7c3..8bbcb42cc4 100755 --- a/scripts/simpletrace.py +++ b/scripts/simpletrace.py @@ -71,7 +71,7 @@ def read_trace_file(edict, fobj): log_version = header[2] if log_version == 0: - raise ValueError('Older log format, not supported with this Qemu release!') + raise ValueError('Older log format, not supported with this QEMU release!') while True: rec = read_record(edict, fobj) From 280a66a6ab896252829d049c0a0331716497db7e Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 10 Aug 2012 21:53:02 +0200 Subject: [PATCH 5/9] docs: Fix spelling (propery -> property) Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- docs/bootindex.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/bootindex.txt b/docs/bootindex.txt index 16083b387e..803ebfc831 100644 --- a/docs/bootindex.txt +++ b/docs/bootindex.txt @@ -1,4 +1,4 @@ -= Bootindex propery = += Bootindex property = Block and net devices have bootindex property. This property is used to determine the order in which firmware will consider devices for booting From 370de0234cb2bff701248a07e8cf37fafc7e1043 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 10 Aug 2012 21:56:46 +0200 Subject: [PATCH 6/9] Spelling fix in comment (peripherans -> peripherals) Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- hw/versatilepb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/versatilepb.c b/hw/versatilepb.c index 4fd5d9b04b..7a92034718 100644 --- a/hw/versatilepb.c +++ b/hw/versatilepb.c @@ -162,7 +162,7 @@ static int vpb_sic_init(SysBusDevice *dev) /* Board init. */ /* The AB and PB boards both use the same core, just with different - peripherans and expansion busses. For now we emulate a subset of the + peripherals and expansion busses. For now we emulate a subset of the PB peripherals and just change the board ID. */ static struct arm_boot_info versatile_binfo; From 9c6bb55b864d34d78aa617440fc055e1c61cd2a6 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 11 Aug 2012 21:32:02 +0200 Subject: [PATCH 7/9] framebuffer: Fix spelling in comment (leight -> height) Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- hw/framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/framebuffer.c b/hw/framebuffer.c index f4747cd646..85a00a5798 100644 --- a/hw/framebuffer.c +++ b/hw/framebuffer.c @@ -28,7 +28,7 @@ void framebuffer_update_display( MemoryRegion *address_space, target_phys_addr_t base, int cols, /* Width in pixels. */ - int rows, /* Leight in pixels. */ + int rows, /* Height in pixels. */ int src_width, /* Length of source line, in bytes. */ int dest_row_pitch, /* Bytes between adjacent horizontal output pixels. */ int dest_col_pitch, /* Bytes between adjacent vertical output pixels. */ From bb9558679ffaae062ea26ef97d2273b148e9c515 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Sat, 11 Aug 2012 22:24:35 +0100 Subject: [PATCH 8/9] iov_send_recv(): Handle zero bytes case even if OS does not POSIX allows sendmsg() and recvmsg() to fail EMSGSIZE if passed a zero msg.msg_iovlen (in particular the MacOS X implementation will do this). Handle the case where iov_send_recv() is passed a zero byte count explicitly, to avoid accidentally depending on the OS to treat zero msg_iovlen as a no-op. Signed-off-by: Peter Maydell Acked-by: Michael Tokarev Signed-off-by: Stefan Hajnoczi --- iov.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/iov.c b/iov.c index b3330610bb..60705c73ab 100644 --- a/iov.c +++ b/iov.c @@ -146,6 +146,13 @@ ssize_t iov_send_recv(int sockfd, struct iovec *iov, unsigned iov_cnt, { ssize_t ret; unsigned si, ei; /* start and end indexes */ + if (bytes == 0) { + /* Catch the do-nothing case early, as otherwise we will pass an + * empty iovec to sendmsg/recvmsg(), and not all implementations + * accept this. + */ + return 0; + } /* Find the start position, skipping `offset' bytes: * first, skip all full-sized vector elements, */ From c3594ed73e0a7e7feae309be79f0eb6bafcc02ab Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Tue, 14 Aug 2012 14:41:28 +0300 Subject: [PATCH 9/9] ivshmem, qdev-monitor: fix order of qerror parameters Now that the QERR_ macros no longer contain a json dictionary, the order of some parameters needs to be fixed for them to appear correctly. Signed-off-by: Alberto Garcia Reviewed-by: Luiz Capitulino Signed-off-by: Stefan Hajnoczi --- hw/ivshmem.c | 3 ++- hw/qdev-monitor.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index 0c58161565..b4d65a6db5 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -677,7 +677,8 @@ static int pci_ivshmem_init(PCIDevice *dev) } if (s->role_val == IVSHMEM_PEER) { - error_set(&s->migration_blocker, QERR_DEVICE_FEATURE_BLOCKS_MIGRATION, "ivshmem", "peer mode"); + error_set(&s->migration_blocker, QERR_DEVICE_FEATURE_BLOCKS_MIGRATION, + "peer mode", "ivshmem"); migrate_add_blocker(s->migration_blocker); } diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index b22a37a00c..018b386782 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -443,7 +443,7 @@ DeviceState *qdev_device_add(QemuOpts *opts) bus = qbus_find_recursive(sysbus_get_default(), NULL, k->bus_type); if (!bus) { qerror_report(QERR_NO_BUS_FOR_DEVICE, - driver, k->bus_type); + k->bus_type, driver); return NULL; } }