From 58823a0b48222b9d9cabf34d5f22a890f1ce3ba0 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 6 Feb 2019 14:28:48 -0600 Subject: [PATCH 01/14] qapi: Fix qcow2 encryption doc typo Present since commit b25b387f (2.10). Signed-off-by: Eric Blake Reviewed-by: Thomas Huth Message-Id: <20190206202848.16999-1-eblake@redhat.com> Signed-off-by: Laurent Vivier --- qapi/block-core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 0f349d4603..ee1ab7a8a2 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2998,7 +2998,7 @@ ## # @BlockdevQcow2EncryptionFormat: -# @aes: AES-CBC with plain64 initialization venctors +# @aes: AES-CBC with plain64 initialization vectors # # Since: 2.10 ## From b5ec7de7b5111f898453f96bdfd095fc1d8f6e18 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Thu, 7 Feb 2019 14:14:55 +0100 Subject: [PATCH 02/14] qemu-deprecated: Remove -virtioconsole and -no-frame for good The two sections have accidentally been added again during the merge of Paolo's and Gerd's trees. Fixes: 3e29da9fd81002a0c03041aaa26dea6d9dd9bd65 Signed-off-by: Thomas Huth Reviewed-by: Peter Maydell Message-Id: <1549545296-18903-2-git-send-email-thuth@redhat.com> Signed-off-by: Laurent Vivier --- qemu-deprecated.texi | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 80b0702ad5..90e5860fd1 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -37,18 +37,6 @@ would automatically enable USB support on the machine type. If using the new syntax, USB support must be explicitly enabled via the ``-machine usb=on'' argument. -@subsection -virtioconsole (since 3.0.0) - -Option @option{-virtioconsole} has been replaced by -@option{-device virtconsole}. - -@subsection -no-frame (since 2.12.0) - -The @code{--no-frame} argument works with SDL 1.2 only. The other user -interfaces never implemented this in the first place. So this will be -removed together with SDL 1.2 support. ->>>>>>> remotes/bonzini/tags/for-upstream - @subsection -clock (since 3.0.0) The @code{-clock} option is ignored since QEMU version 1.7.0. There is no From e6e40f80cdf37021deb8c4f4311724a64461a1d1 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Thu, 7 Feb 2019 14:14:56 +0100 Subject: [PATCH 03/14] qemu-options: Remove deprecated option -clock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The option is only a dummy since a long time. We've finally deprecated it in QEMU v3.0, so it's time to remove it now. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <1549545296-18903-3-git-send-email-thuth@redhat.com> Signed-off-by: Laurent Vivier --- qemu-deprecated.texi | 5 ----- qemu-options.hx | 3 --- vl.c | 6 ------ 3 files changed, 14 deletions(-) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 90e5860fd1..fe905551c5 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -37,11 +37,6 @@ would automatically enable USB support on the machine type. If using the new syntax, USB support must be explicitly enabled via the ``-machine usb=on'' argument. -@subsection -clock (since 3.0.0) - -The @code{-clock} option is ignored since QEMU version 1.7.0. There is no -replacement since it is not needed anymore. - @subsection -drive file=json:@{...@{'driver':'file'@}@} (since 3.0) The 'file' driver for drives is no longer appropriate for character or host diff --git a/qemu-options.hx b/qemu-options.hx index 06ef1a7c5c..77bd98e20b 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3444,9 +3444,6 @@ Load the contents of @var{file} as an option ROM. This option is useful to load things like EtherBoot. ETEXI -HXCOMM Silently ignored for compatibility -DEF("clock", HAS_ARG, QEMU_OPTION_clock, "", QEMU_ARCH_ALL) - DEF("rtc", HAS_ARG, QEMU_OPTION_rtc, \ "-rtc [base=utc|localtime|][,clock=host|rt|vm][,driftfix=none|slew]\n" \ " set the RTC base and clock, enable drift fix for clock ticks (x86 only)\n", diff --git a/vl.c b/vl.c index 9e4dba7f92..90ff23333d 100644 --- a/vl.c +++ b/vl.c @@ -3735,12 +3735,6 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_old_param: old_param = 1; break; - case QEMU_OPTION_clock: - /* Clock options no longer exist. Keep this option for - * backward compatibility. - */ - warn_report("This option is ignored and will be removed soon"); - break; case QEMU_OPTION_rtc: opts = qemu_opts_parse_noisily(qemu_find_opts("rtc"), optarg, false); From 41b0b34b261ffb47b044481f018d76068afdf03b Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Thu, 7 Feb 2019 14:36:02 -0500 Subject: [PATCH 04/14] configure: remove handling of "wav" audio driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This looks like a leftover that was never implemented. Signed-off-by: Cleber Rosa Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190207193605.25676-2-crosa@redhat.com> Signed-off-by: Laurent Vivier --- configure | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configure b/configure index fbd0825488..ff55e2273e 100755 --- a/configure +++ b/configure @@ -3350,10 +3350,6 @@ for drv in $audio_drv_list; do oss_libs="$oss_lib" ;; - wav) - # XXX: Probes for CoreAudio, DirectSound - ;; - *) echo "$audio_possible_drivers" | grep -q "\<$drv\>" || { error_exit "Unknown driver '$drv' selected" \ From 8de73fa88a48729506d36ac3481d96924bfedb43 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Thu, 7 Feb 2019 14:36:03 -0500 Subject: [PATCH 05/14] configure: fix qemu-img name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cleber Rosa Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190207193605.25676-3-crosa@redhat.com> Signed-off-by: Laurent Vivier --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index ff55e2273e..c8fc1647fe 100755 --- a/configure +++ b/configure @@ -1768,7 +1768,7 @@ disabled with --disable-FEATURE, default is enabled if available: virglrenderer virgl rendering support xfsctl xfsctl support qom-cast-debug cast debugging support - tools build qemu-io, qemu-nbd and qemu-image tools + tools build qemu-io, qemu-nbd and qemu-img tools vxhs Veritas HyperScale vDisk backend support bochs bochs image format support cloop cloop image format support From 604a5b9978c8824dbd2164d1fc990016a67ced40 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Fri, 8 Feb 2019 00:37:04 +0100 Subject: [PATCH 06/14] configure: Add HAX support in NetBSD The NetBSD support in Intel HAXM has beem merged upstream and is functional. Signed-off-by: Kamil Rytarowski Message-Id: <20190207233704.29978-1-n54@gmx.com> Signed-off-by: Laurent Vivier --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index c8fc1647fe..649ef1b158 100755 --- a/configure +++ b/configure @@ -817,6 +817,7 @@ DragonFly) ;; NetBSD) bsd="yes" + hax="yes" make="${MAKE-gmake}" audio_drv_list="oss try-sdl" audio_possible_drivers="oss sdl" From 2911b3d3ab26d96023b13c66a4b97adf1ab6d17b Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Fri, 8 Feb 2019 13:21:12 +0000 Subject: [PATCH 07/14] configure: Make -Waddress-of-packed-member warnings be errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have now managed to eradicate all the places in the codebase that triggered clang's -Waddress-of-packed-member warning. Remove the compiler flag that exempted it from our usual -Werror policy. This will prevent any new problematic code being added in future. Signed-off-by: Peter Maydell Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190208132112.31493-1-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 649ef1b158..c0f2781418 100755 --- a/configure +++ b/configure @@ -1882,7 +1882,6 @@ gcc_flags="-Wno-missing-include-dirs -Wempty-body -Wnested-externs $gcc_flags" gcc_flags="-Wendif-labels -Wno-shift-negative-value $gcc_flags" gcc_flags="-Wno-initializer-overrides -Wexpansion-to-defined $gcc_flags" gcc_flags="-Wno-string-plus-int $gcc_flags" -gcc_flags="-Wno-error=address-of-packed-member $gcc_flags" # Note that we do not add -Werror to gcc_flags here, because that would # enable it for all configure tests. If a configure test failed due # to -Werror this would just silently disable some features, From 65b182c379b96b87973567084123c9d47af474e5 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Tue, 16 Oct 2018 12:22:32 +0100 Subject: [PATCH 08/14] pckbd: Convert DPRINTF->trace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Message-Id: <20181016112232.23241-1-dgilbert@redhat.com> Signed-off-by: Laurent Vivier --- hw/input/pckbd.c | 19 ++++++------------- hw/input/trace-events | 7 +++++++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index 72e7d5f6cc..47a606f5e3 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -30,14 +30,7 @@ #include "hw/input/i8042.h" #include "sysemu/sysemu.h" -/* debug PC keyboard */ -//#define DEBUG_KBD -#ifdef DEBUG_KBD -#define DPRINTF(fmt, ...) \ - do { printf("KBD: " fmt , ## __VA_ARGS__); } while (0) -#else -#define DPRINTF(fmt, ...) -#endif +#include "trace.h" /* Keyboard Controller Commands */ #define KBD_CCMD_READ_MODE 0x20 /* Read mode bits */ @@ -210,7 +203,7 @@ static uint64_t kbd_read_status(void *opaque, hwaddr addr, KBDState *s = opaque; int val; val = s->status; - DPRINTF("kbd: read status=0x%02x\n", val); + trace_pckbd_kbd_read_status(val); return val; } @@ -224,7 +217,7 @@ static void kbd_queue(KBDState *s, int b, int aux) static void outport_write(KBDState *s, uint32_t val) { - DPRINTF("kbd: write outport=0x%02x\n", val); + trace_pckbd_outport_write(val); s->outport = val; qemu_set_irq(s->a20_out, (val >> 1) & 1); if (!(val & 1)) { @@ -237,7 +230,7 @@ static void kbd_write_command(void *opaque, hwaddr addr, { KBDState *s = opaque; - DPRINTF("kbd: write cmd=0x%02" PRIx64 "\n", val); + trace_pckbd_kbd_write_command(val); /* Bits 3-0 of the output port P2 of the keyboard controller may be pulsed * low for approximately 6 micro seconds. Bits 3-0 of the KBD_CCMD_PULSE @@ -326,7 +319,7 @@ static uint64_t kbd_read_data(void *opaque, hwaddr addr, else val = ps2_read_data(s->kbd); - DPRINTF("kbd: read data=0x%02x\n", val); + trace_pckbd_kbd_read_data(val); return val; } @@ -335,7 +328,7 @@ static void kbd_write_data(void *opaque, hwaddr addr, { KBDState *s = opaque; - DPRINTF("kbd: write data=0x%02" PRIx64 "\n", val); + trace_pckbd_kbd_write_data(val); switch(s->write_cmd) { case 0: diff --git a/hw/input/trace-events b/hw/input/trace-events index 3965a842ae..8e53ae5bbf 100644 --- a/hw/input/trace-events +++ b/hw/input/trace-events @@ -14,6 +14,13 @@ adb_mouse_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x o adb_mouse_request_change_addr(int devaddr) "change addr to 0x%x" adb_mouse_request_change_addr_and_handler(int devaddr, int handler) "change addr and handler to 0x%x, 0x%x" +# hw/input/pckbd.c +pckbd_kbd_read_data(uint32_t val) "0x%02x" +pckbd_kbd_read_status(int status) "0x%02x" +pckbd_outport_write(uint32_t val) "0x%02x" +pckbd_kbd_write_command(uint64_t val) "0x%02"PRIx64 +pckbd_kbd_write_data(uint64_t val) "0x%02"PRIx64 + # hw/input/ps2.c ps2_put_keycode(void *opaque, int keycode) "%p keycode 0x%02x" ps2_keyboard_event(void *opaque, int qcode, int down, unsigned int modifier, unsigned int modifiers) "%p qcode %d down %d modifier 0x%x modifiers 0x%x" From 66363e9a43f649360a3f74d2805c9f864da027eb Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Tue, 12 Feb 2019 13:47:56 +0000 Subject: [PATCH 09/14] HMP: Prepend errors with 'Error:' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Always make error messages start with 'Error:' as a fallback to make sure that anything parsing them can tell it failed. Note: Some places don't use hmp_handle_error Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Message-Id: <20190212134758.10514-3-dgilbert@redhat.com> Signed-off-by: Laurent Vivier --- hmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmp.c b/hmp.c index b2a2b1f84e..4d14718fea 100644 --- a/hmp.c +++ b/hmp.c @@ -62,7 +62,7 @@ static void hmp_handle_error(Monitor *mon, Error **errp) { assert(errp); if (*errp) { - error_report_err(*errp); + error_reportf_err(*errp, "Error: "); } } From 876d16cd31da6e4cb26d360763dd9f7b8de4e85b Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Tue, 12 Feb 2019 13:47:57 +0000 Subject: [PATCH 10/14] kvm: Add kvm_set_ioeventfd* traces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a couple of traces around the kvm_set_ioeventfd* calls. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Message-Id: <20190212134758.10514-4-dgilbert@redhat.com> Signed-off-by: Laurent Vivier --- accel/kvm/kvm-all.c | 3 +++ accel/kvm/trace-events | 2 ++ 2 files changed, 5 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 4e1de942ce..fd92b6f375 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -657,6 +657,8 @@ static int kvm_set_ioeventfd_mmio(int fd, hwaddr addr, uint32_t val, .fd = fd, }; + trace_kvm_set_ioeventfd_mmio(fd, (uint64_t)addr, val, assign, size, + datamatch); if (!kvm_enabled()) { return -ENOSYS; } @@ -688,6 +690,7 @@ static int kvm_set_ioeventfd_pio(int fd, uint16_t addr, uint16_t val, .fd = fd, }; int r; + trace_kvm_set_ioeventfd_pio(fd, addr, val, assign, size, datamatch); if (!kvm_enabled()) { return -ENOSYS; } diff --git a/accel/kvm/trace-events b/accel/kvm/trace-events index 58e98efe5d..8841025d68 100644 --- a/accel/kvm/trace-events +++ b/accel/kvm/trace-events @@ -12,5 +12,7 @@ kvm_irqchip_commit_routes(void) "" kvm_irqchip_add_msi_route(char *name, int vector, int virq) "dev %s vector %d virq %d" kvm_irqchip_update_msi_route(int virq) "Updating MSI route virq=%d" kvm_irqchip_release_virq(int virq) "virq %d" +kvm_set_ioeventfd_mmio(int fd, uint64_t addr, uint32_t val, bool assign, uint32_t size, bool datamatch) "fd: %d @0x%" PRIx64 " val=0x%x assign: %d size: %d match: %d" +kvm_set_ioeventfd_pio(int fd, uint16_t addr, uint32_t val, bool assign, uint32_t size, bool datamatch) "fd: %d @0x%x val=0x%x assign: %d size: %d match: %d" kvm_set_user_memory(uint32_t slot, uint32_t flags, uint64_t guest_phys_addr, uint64_t memory_size, uint64_t userspace_addr, int ret) "Slot#%d flags=0x%x gpa=0x%"PRIx64 " size=0x%"PRIx64 " ua=0x%"PRIx64 " ret=%d" From 8beaac1228f23cb5103fec6bcd4c1c32e8079958 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Mon, 20 Mar 2017 17:38:40 +0000 Subject: [PATCH 11/14] wavcapture: Convert to error_report Kill off a pile of monitor_printf's and cur_mon usage. The only one left in wavcapture.c is the info case. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Message-Id: <20170320173840.3626-3-dgilbert@redhat.com> Signed-off-by: Laurent Vivier --- audio/wavcapture.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/audio/wavcapture.c b/audio/wavcapture.c index cf31ed652c..cd24570aa7 100644 --- a/audio/wavcapture.c +++ b/audio/wavcapture.c @@ -38,30 +38,29 @@ static void wav_destroy (void *opaque) uint8_t dlen[4]; uint32_t datalen = wav->bytes; uint32_t rifflen = datalen + 36; - Monitor *mon = cur_mon; if (wav->f) { le_store (rlen, rifflen, 4); le_store (dlen, datalen, 4); if (fseek (wav->f, 4, SEEK_SET)) { - monitor_printf (mon, "wav_destroy: rlen fseek failed\nReason: %s\n", - strerror (errno)); + error_report("wav_destroy: rlen fseek failed: %s", + strerror(errno)); goto doclose; } if (fwrite (rlen, 4, 1, wav->f) != 1) { - monitor_printf (mon, "wav_destroy: rlen fwrite failed\nReason %s\n", - strerror (errno)); + error_report("wav_destroy: rlen fwrite failed: %s", + strerror(errno)); goto doclose; } if (fseek (wav->f, 32, SEEK_CUR)) { - monitor_printf (mon, "wav_destroy: dlen fseek failed\nReason %s\n", - strerror (errno)); + error_report("wav_destroy: dlen fseek failed: %s", + strerror(errno)); goto doclose; } if (fwrite (dlen, 1, 4, wav->f) != 4) { - monitor_printf (mon, "wav_destroy: dlen fwrite failed\nReason %s\n", - strerror (errno)); + error_report("wav_destroy: dlen fwrite failed: %s", + strerror(errno)); goto doclose; } doclose: @@ -78,8 +77,7 @@ static void wav_capture (void *opaque, void *buf, int size) WAVState *wav = opaque; if (fwrite (buf, size, 1, wav->f) != 1) { - monitor_printf (cur_mon, "wav_capture: fwrite error\nReason: %s", - strerror (errno)); + error_report("wav_capture: fwrite error: %s", strerror(errno)); } wav->bytes += size; } @@ -110,7 +108,6 @@ static struct capture_ops wav_capture_ops = { int wav_start_capture (CaptureState *s, const char *path, int freq, int bits, int nchannels) { - Monitor *mon = cur_mon; WAVState *wav; uint8_t hdr[] = { 0x52, 0x49, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00, 0x57, 0x41, 0x56, @@ -124,13 +121,13 @@ int wav_start_capture (CaptureState *s, const char *path, int freq, CaptureVoiceOut *cap; if (bits != 8 && bits != 16) { - monitor_printf (mon, "incorrect bit count %d, must be 8 or 16\n", bits); + error_report("incorrect bit count %d, must be 8 or 16", bits); return -1; } if (nchannels != 1 && nchannels != 2) { - monitor_printf (mon, "incorrect channel count %d, must be 1 or 2\n", - nchannels); + error_report("incorrect channel count %d, must be 1 or 2", + nchannels); return -1; } @@ -158,8 +155,8 @@ int wav_start_capture (CaptureState *s, const char *path, int freq, wav->f = fopen (path, "wb"); if (!wav->f) { - monitor_printf (mon, "Failed to open wave file `%s'\nReason: %s\n", - path, strerror (errno)); + error_report("Failed to open wave file `%s': %s", + path, strerror(errno)); g_free (wav); return -1; } @@ -170,14 +167,13 @@ int wav_start_capture (CaptureState *s, const char *path, int freq, wav->freq = freq; if (fwrite (hdr, sizeof (hdr), 1, wav->f) != 1) { - monitor_printf (mon, "Failed to write header\nReason: %s\n", - strerror (errno)); + error_report("Failed to write header: %s", strerror(errno)); goto error_free; } cap = AUD_add_capture (&as, &ops, wav); if (!cap) { - monitor_printf (mon, "Failed to add audio capture\n"); + error_report("Failed to add audio capture"); goto error_free; } @@ -189,8 +185,7 @@ int wav_start_capture (CaptureState *s, const char *path, int freq, error_free: g_free (wav->path); if (fclose (wav->f)) { - monitor_printf (mon, "Failed to close wave file\nReason: %s\n", - strerror (errno)); + error_report("Failed to close wave file: %s", strerror(errno)); } g_free (wav); return -1; From c1a00ff85bd088b93d25511c6161f687fe938c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 12 Feb 2019 15:53:22 +0100 Subject: [PATCH 12/14] hw/dma/i8257: Use qemu_log_mask(UNIMP) instead of fprintf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid to clutter stdout until explicitly requested (with -d unimp): $ qemu-system-mips64el -M fulong2e -bios pmon_2e.bin dma: command df not supported dma: command df not supported dma: command df not supported dma: command df not supported Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Stefano Garzarella Message-Id: <20190212145322.30974-1-philmd@redhat.com> Signed-off-by: Laurent Vivier --- hw/dma/i8257.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index 52675e97c9..3e1f13a4aa 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -26,6 +26,7 @@ #include "hw/isa/isa.h" #include "hw/dma/i8257.h" #include "qemu/main-loop.h" +#include "qemu/log.h" #include "trace.h" #define I8257(obj) \ @@ -185,7 +186,8 @@ static void i8257_write_cont(void *opaque, hwaddr nport, uint64_t data, switch (iport) { case 0x00: /* command */ if ((data != 0) && (data & CMD_NOT_SUPPORTED)) { - dolog("command %"PRIx64" not supported\n", data); + qemu_log_mask(LOG_UNIMP, "%s: cmd 0x%02"PRIx64" not supported\n", + __func__, data); return; } d->command = data; From 9aed808e350b66914cc9b3a45357ec3cf295f405 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 13 Feb 2019 08:07:19 +0100 Subject: [PATCH 13/14] hw/sparc64: Explicitly set default_display = "std" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sun4uv_init() function expects vga_interface_type to be either VGA_STD or VGA_NONE and sets up a stdvga device or no vga card accordingly. However, the code in vl.c prefers the Cirrus VGA card to stdvga if it is available and the user and the machine did not specify anything else. So far this has not been a problem, since the Cirrus VGA was not linked into the sparc64 target. But with the upcoming Kconfig build system, all theoretically possible PCI cards will be enabled by default, so the Cirrus VGA card might become available on the sparc64 target, too. vl.c then picks the wrong card, causing sun4uv_init() to abort. Thus let's make it explicit that we always want stdvga for sparc64 and so set default_display = "std" for these machines. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id: <1550041639-10232-1-git-send-email-thuth@redhat.com> Signed-off-by: Laurent Vivier --- hw/sparc64/sun4u.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index ff24d9b350..399f2d73c8 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -797,6 +797,7 @@ static void sun4u_class_init(ObjectClass *oc, void *data) mc->default_boot_order = "c"; mc->default_cpu_type = SPARC_CPU_TYPE_NAME("TI-UltraSparc-IIi"); mc->ignore_boot_device_suffixes = true; + mc->default_display = "std"; fwc->get_dev_path = sun4u_fw_dev_path; } @@ -820,6 +821,7 @@ static void sun4v_class_init(ObjectClass *oc, void *data) mc->max_cpus = 1; /* XXX for now */ mc->default_boot_order = "c"; mc->default_cpu_type = SPARC_CPU_TYPE_NAME("Sun-UltraSparc-T1"); + mc->default_display = "std"; } static const TypeInfo sun4v_type = { From 96566d09aa105ee04cbc1c9539cf8a9a40e8e422 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 13 Feb 2019 22:18:27 +0100 Subject: [PATCH 14/14] configure: improve usbfs check The current check to test if usbfs support should be compiled or not solely relies on the presence of , without actually checking that all definition used by Qemu are provided by this header file. With sufficiently old kernel headers, may be present, but some of the definitions needed by Qemu may not be available. This commit improves the check by building a small program that actually tests whether the necessary definitions are available. In addition, it fixes a bug where have_usbfs was set to "yes" regardless of the result of the test. Signed-off-by: Thomas Petazzoni Reviewed-by: Thomas Huth Message-Id: <20190213211827.20300-1-thomas.petazzoni@bootlin.com> Signed-off-by: Laurent Vivier --- configure | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/configure b/configure index c0f2781418..90b9e2fa3c 100755 --- a/configure +++ b/configure @@ -4262,10 +4262,25 @@ fi # check for usbfs have_usbfs=no if test "$linux_user" = "yes"; then - if check_include linux/usbdevice_fs.h; then + cat > $TMPC << EOF +#include + +#ifndef USBDEVFS_GET_CAPABILITIES +#error "USBDEVFS_GET_CAPABILITIES undefined" +#endif + +#ifndef USBDEVFS_DISCONNECT_CLAIM +#error "USBDEVFS_DISCONNECT_CLAIM undefined" +#endif + +int main(void) +{ + return 0; +} +EOF + if compile_prog "" ""; then have_usbfs=yes fi - have_usbfs=yes fi # check for fallocate