Re: [Qemu-devel] [PATCH for-QEMU-4.1 v5 07/29] hw/arm: Express dependencies of the fsl-imx31 machine with Kconfig

2019-04-18 Thread Chubb, Peter (Data61, Kensington NSW)
> "Thomas" == Thomas Huth writes: Thomas> Add Kconfig dependencies for the fsl-imx31 / kzm machine. Thomas> This patch is slightly based on earlier work by Ákos Kovács Thomas> (i.e. his "hw/arm/Kconfig: Add ARM Kconfig" patch). Thomas> Signed-off-by: Thomas Huth Reviewed-by: Peter Chubb

Re: [Qemu-devel] [PATCH 2/2] tests: fw_cfg: add reboot_timeout test case

2019-04-18 Thread Li Qiang
Philippe Mathieu-Daudé 于2019年4月19日周五 上午5:01写道: > Hi Li, > > On 3/19/19 3:30 AM, Li Qiang wrote: > > Signed-off-by: Li Qiang > > --- > > tests/fw_cfg-test.c | 15 ++- > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/tests/fw_cfg-test.c b/tests/fw_cfg-test.c >

[Qemu-devel] [Bug 1825452] [NEW] Pulse audio backend doesn't work in v4.0.0-rc4 release

2019-04-18 Thread Ivan Volosyuk
Public bug reported: Using Gentoo linux, build from source: qemu v4.0.0-rc4 release (eeba63fc7fface36f438bcbc0d3b02e7dcb59983) Pulse audio backend doesn't initialize because of the: audio/paaudio.c: -if (!popts->has_server) { -char pidfile[64]; -char *runtime; -struct

Re: [Qemu-devel] [PATCH v2 1/3] numa: move numa global variable nb_numa_nodes into MachineState

2019-04-18 Thread Tao Xu
On 4/18/2019 10:26 PM, Eduardo Habkost wrote: On Thu, Apr 18, 2019 at 02:46:00PM +0800, Tao Xu wrote: The aim of this patch is to add struct NumaState in MachineState and move existing numa global nb_numa_nodes into NumaState. And add variable numa_support into MachineClass to decide which

[Qemu-devel] [Bug 1818367] Re: Initialization of device cfi.pflash01 failed: Block node is read-only

2019-04-18 Thread Laszlo Ersek (Red Hat)
(more precisely, the nvram element will be auto-generated when you exit "virsh edit", and the nvram file will be created (copied) from the varstore template when you launch the domain) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] [Bug 1818367] Re: Initialization of device cfi.pflash01 failed: Block node is read-only

2019-04-18 Thread Laszlo Ersek (Red Hat)
Hi José, your domain XML is bogus with regard to the firmware configuration. You have: /var/lib/libvirt/qemu/nvram/os-1-ovmf.fd and no element, and you write that "os-1-ovmf.fd" is a copy of "OVMF_VARS.fd". The element, with @type='pflash', no other attributes, and then no sibling

[Qemu-devel] [PATCH v4 1/6] q35: acpi: do not create dummy MCFG table

2019-04-18 Thread Wei Yang
From: Igor Mammedov Dummy table (with signature "QEMU") creation came from original SeaBIOS codebase. And QEMU would have to keep it around if there were Q35 machine that depended on keeping ACPI tables blob constant size. Luckily there were no versioned Q35 machine types before commit: (since

[Qemu-devel] [PATCH v4 2/6] hw/arm/virt-acpi-build: remove unnecessary variable mcfg_start

2019-04-18 Thread Wei Yang
mcfg_start points to the start of MCFG table and is used in build_header. While this information could be derived from mcfg. This patch removes the unnecessary variable mcfg_start. Signed-off-by: Wei Yang Reviewed-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé ---

[Qemu-devel] [PATCH v4 3/6] i386, acpi: remove mcfg_ prefix in AcpiMcfgInfo members

2019-04-18 Thread Wei Yang
This is obvious the member in AcpiMcfgInfo describe MCFG's property. Remove the mcfg_ prefix. Signed-off-by: Wei Yang Suggested-by: Igor Mammedov Reviewed-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/acpi-build.c | 14 +++--- 1 file changed, 7 insertions(+), 7

[Qemu-devel] [PATCH v4 0/6] Extract build_mcfg

2019-04-18 Thread Wei Yang
This patch set tries to generalize MCFG table build process. And it is based on one un-merged patch from Igor, which is included in this serials. v3->v4: * adjust comment to give more information about MCFG table v2->v3: * Includes the un-merged patch from Igor * use

[Qemu-devel] [PATCH v4 5/6] hw/acpi: Consolidate build_mcfg to pci.c

2019-04-18 Thread Wei Yang
Now we have two identical build_mcfg functions. Consolidate them in acpi/pci.c. Signed-off-by: Wei Yang Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov --- v3: * adjust changelog based on Igor's suggestion --- default-configs/arm-softmmu.mak | 1 +

[Qemu-devel] [PATCH v4 6/6] acpi: pci: use build_append_foo() API to construct MCFG

2019-04-18 Thread Wei Yang
build_append_foo() API doesn't need explicit endianness conversions which eliminates a source of errors and it makes build_mcfg() look like declarative definition of MCFG table in ACPI spec, which makes it easy to review. Signed-off-by: Wei Yang Suggested-by: Igor Mammedov Reviewed-by: Igor

[Qemu-devel] [PATCH v4 4/6] hw/arm/virt-acpi-build: pass AcpiMcfgInfo to build_mcfg()

2019-04-18 Thread Wei Yang
To build MCFG, two information is necessary: * bus number * base address Abstract these two information to AcpiMcfgInfo so that build_mcfg and build_mcfg_q35 will have the same declaration. Signed-off-by: Wei Yang Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov ---

Re: [Qemu-devel] How do we do user input bitmap properties?

2019-04-18 Thread Laszlo Ersek
On 04/18/19 11:28, Andrew Jones wrote: > Hi all, > > First some background: > > For the userspace side of AArch64 guest SVE support we need to > expose KVM's allowed vector lengths bitmap to the user and allow > the user to choose a subset of that bitmap. Since bitmaps are a > bit awkward to

[Qemu-devel] [PATCH] configure: Change capstone's default state to disabled

2019-04-18 Thread John Arbuckle
Capstone is not necessary in order to use QEMU. Disable it by default. This will save the user the pain of having to figure why QEMU isn't building when this library is missing. Signed-off-by: John Arbuckle --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH V13 4/5] util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap()

2019-04-18 Thread Eduardo Habkost
On Thu, Apr 18, 2019 at 07:05:16PM -0300, Eduardo Habkost wrote: > Hi, > > I found out that this series missed QEMU 4.0 and I was going to > queue for 4.1, but unfortunately this patch conflicts with: > > commit 2044c3e7116eeac0449dcb4a4130cc8f8b9310da > Author: Murilo Opsfelder Araujo > Date:

Re: [Qemu-devel] [PATCH V13 4/5] util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap()

2019-04-18 Thread Eduardo Habkost
Hi, I found out that this series missed QEMU 4.0 and I was going to queue for 4.1, but unfortunately this patch conflicts with: commit 2044c3e7116eeac0449dcb4a4130cc8f8b9310da Author: Murilo Opsfelder Araujo Date: Wed Jan 30 21:36:04 2019 -0200 mmap-alloc: unfold qemu_ram_mmap()

Re: [Qemu-devel] [PULL for-4.1 00/36] Error reporting & monitor patches for 2019-04-18

2019-04-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190418205135.6686-1-arm...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20190418205135.6686-1-arm...@redhat.com Subject: [Qemu-devel] [PULL for-4.1 00/36] Error

[Qemu-devel] [PULL for-4.1 29/36] target: Clean up how the dump_mmu() print

2019-04-18 Thread Markus Armbruster
The various dump_mmu() take an fprintf()-like callback and a FILE * to pass to it, and so do their helper functions. Passing around callback and argument is rather tiresome. Most dump_mmu() are called only by the target's hmp_info_tlb(). These all pass monitor_printf() cast to fprintf_function

[Qemu-devel] [PULL for-4.1 35/36] disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h

2019-04-18 Thread Markus Armbruster
Commit dc99065b5f9 (v0.1.0) added dis-asm.h from binutils. Commit 43d4145a986 (v0.1.5) inlined bfd.h into dis-asm.h to remove the dependency on binutils. Commit 76cad71136b (v1.4.0) moved dis-asm.h to include/disas/bfd.h. The new name is confusing when you try to match against (pre GPLv3+)

[Qemu-devel] [PULL for-4.1 31/36] qom/cpu: Simplify how CPUClass::dump_statistics() prints

2019-04-18 Thread Markus Armbruster
CPUClass method dump_statistics() takes an fprintf()-like callback and a FILE * to pass to it. Its only caller hmp_info_cpustats() (via cpu_dump_statistics()) passes monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts it right back, and is otherwise identical to

[Qemu-devel] [PULL for-4.1 06/36] block/ssh: Do not report read/write/flush errors to the user

2019-04-18 Thread Markus Armbruster
Callbacks ssh_co_readv(), ssh_co_writev(), ssh_co_flush() report errors to the user with error_printf(). They shouldn't, it's their caller's job. Replace by a suitable trace point. While there, drop the unreachable !s->sftp case. Perhaps we should convert this part of the block driver

Re: [Qemu-devel] [PATCH 2/2] tests: fw_cfg: add reboot_timeout test case

2019-04-18 Thread Philippe Mathieu-Daudé
Hi Li, On 3/19/19 3:30 AM, Li Qiang wrote: > Signed-off-by: Li Qiang > --- > tests/fw_cfg-test.c | 15 ++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/tests/fw_cfg-test.c b/tests/fw_cfg-test.c > index 1c5103fe1c..551b51e38f 100644 > --- a/tests/fw_cfg-test.c

[Qemu-devel] [PULL for-4.1 16/36] blockdev: Make -drive format=help print to stdout

2019-04-18 Thread Markus Armbruster
Command line help explicitly requested by the user should be printed to stdout, not stderr. We do elsewhere. Adjust -drive to match: use qemu_printf() instead of error_printf(). Plain printf() would be wrong because we need to print to the current monitor for "drive_add ... format=help". Cc:

[Qemu-devel] [PULL for-4.1 17/36] char: Make -chardev help print to stdout

2019-04-18 Thread Markus Armbruster
Command line help explicitly requested by the user should be printed to stdout, not stderr. We do elsewhere. Adjust -chardev to match: use qemu_printf() instead of error_printf(). Plain printf() would be wrong because we need to print to the current monitor for "chardev-add help". Cc:

[Qemu-devel] [PULL for-4.1 33/36] qom/cpu: Simplify how CPUClass:cpu_dump_state() prints

2019-04-18 Thread Markus Armbruster
CPUClass method dump_statistics() takes an fprintf()-like callback and a FILE * to pass to it. Most callers pass fprintf() and stderr. log_cpu_state() passes fprintf() and qemu_log_file. hmp_info_registers() passes monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts

Re: [Qemu-devel] [PATCH 00/10] block/pflash_cfi02: Implement missing AMD pflash functionality

2019-04-18 Thread Stephen Checkoway
On Apr 9, 2019, at 12:15, Philippe Mathieu-Daudé wrote: > Since you did changes in the CFI table, I think we should add a tests > verifying the table is correctly generated for all you FlashConfig entries. In v3 of the patch, I added tests for the CFI table values - device length - sector

[Qemu-devel] [PULL for-4.1 05/36] qemu-img: Use error_vreport() in error_exit()

2019-04-18 Thread Markus Armbruster
error_exit() uses low-level error_printf() to report errors. Modernize it to use error_vreport(). Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-bl...@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20190417190641.26814-2-arm...@redhat.com> --- qemu-img.c | 6 ++

[Qemu-devel] [PULL for-4.1 23/36] tcg: Simplify how dump_exec_info() prints

2019-04-18 Thread Markus Armbruster
dump_exec_info() takes an fprintf()-like callback and a FILE * to pass to it. Its only caller hmp_info_jit() passes monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts it right back, and is otherwise identical to monitor_printf(). The type-punning is ugly. Drop

[Qemu-devel] [PULL for-4.1 28/36] target: Simplify how the TARGET_cpu_list() print

2019-04-18 Thread Markus Armbruster
The various TARGET_cpu_list() take an fprintf()-like callback and a FILE * to pass to it. Their callers (vl.c's main() via list_cpus(), bsd-user/main.c's main(), linux-user/main.c's main()) all pass fprintf() and stdout. Thus, the flexibility provided by the (rather tiresome) indirection isn't

[Qemu-devel] [PULL for-4.1 10/36] hpet: Report warnings with warn_report(), not error_printf()

2019-04-18 Thread Markus Armbruster
Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Signed-off-by: Markus Armbruster Message-Id: <20190417190641.26814-7-arm...@redhat.com> --- hw/timer/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index d97436bc7b..41024f39fb 100644 ---

[Qemu-devel] [PULL for-4.1 25/36] qsp: Simplify how qsp_report() prints

2019-04-18 Thread Markus Armbruster
qsp_report() takes an fprintf()-like callback and a FILE * to pass to it. Its only caller hmp_sync_profile() passes monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts it right back, and is otherwise identical to monitor_printf(). The type-punning is ugly. Drop

[Qemu-devel] [PULL for-4.1 26/36] block/qapi: Clean up how we print to monitor or stdout

2019-04-18 Thread Markus Armbruster
bdrv_snapshot_dump(), bdrv_image_info_specific_dump(), bdrv_image_info_dump() and their helpers take an fprintf()-like callback and a FILE * to pass to it. hmp.c passes monitor_printf() cast to fprintf_function and the current monitor cast to FILE *. qemu-img.c and qemu-io-cmds.c pass fprintf

[Qemu-devel] [PULL for-4.1 24/36] tcg: Simplify how dump_drift_info() prints

2019-04-18 Thread Markus Armbruster
dump_drift_info() takes an fprintf()-like callback and a FILE * to pass to it. Its only caller hmp_info_jit() passes monitor_fprintf() and a Monitor * cast to FILE *. monitor_fprintf() casts it right back, and is otherwise identical to monitor_printf(). The type-punning is ugly. Drop the

[Qemu-devel] [PULL for-4.1 09/36] pci: Report fatal errors with error_report(), not error_printf()

2019-04-18 Thread Markus Armbruster
Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Signed-off-by: Markus Armbruster Reviewed-by: Marcel Apfelbaum Message-Id: <20190417190641.26814-6-arm...@redhat.com> --- hw/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index

[Qemu-devel] [PULL for-4.1 34/36] monitor: Clean up how monitor_disas() funnels output to monitor

2019-04-18 Thread Markus Armbruster
INIT_DISASSEMBLE_INFO() takes an fprintf()-like callback and a FILE * to pass to it. monitor_disas() passes monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts it right back, and is otherwise identical to monitor_printf(). The type-punning is ugly. Pass

[Qemu-devel] [PULL for-4.1 27/36] memory: Clean up how mtree_info() prints

2019-04-18 Thread Markus Armbruster
mtree_info() takes an fprintf()-like callback and a FILE * to pass to it, and so do its helper functions. Passing around callback and argument is rather tiresome. Its only caller hmp_info_mtree() passes monitor_printf() cast to fprintf_function and the current monitor cast to FILE *. The

[Qemu-devel] [PULL for-4.1 15/36] qemu-print: New qemu_printf(), qemu_vprintf() etc.

2019-04-18 Thread Markus Armbruster
We commonly want to print to the current monitor if we have one, else to stdout/stderr. For stderr, have error_printf(). For stdout, all we have is monitor_vfprintf(), which is rather unwieldy. We often print to stderr just because error_printf() is easier. New qemu_printf() and qemu_vprintf()

[Qemu-devel] [PULL for-4.1 18/36] char-pty: Print "char device redirected" message to stdout

2019-04-18 Thread Markus Armbruster
char_pty_open() prints a "char device redirected to PTY_NAME (label LABEL)" message to the current monitor or else to stderr. This is not an error, so it shouldn't go to stderr. Print it to stdout instead. Why is it even printed? No other ChardevClass::open() prints anything on success. It's

[Qemu-devel] [PULL for-4.1 30/36] target/i386: Simplify how x86_cpu_dump_local_apic_state() prints

2019-04-18 Thread Markus Armbruster
x86_cpu_dump_local_apic_state() takes an fprintf()-like callback and a FILE * to pass to it, and so do its helper functions. Its only caller hmp_info_local_apic() passes monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts it right back, and is otherwise identical to

[Qemu-devel] [PULL for-4.1 19/36] monitor: Simplify how -device/device_add print help

2019-04-18 Thread Markus Armbruster
Commit a95db58f210 added monitor_vfprintf() as an error_printf() generalized from stderr to arbitrary streams, then used it wrapped in helper out_printf() to print -device/device_add help to stdout. Use qemu_printf() instead, and delete monitor_vfprintf() and out_printf(). Cc: Dr. David Alan

[Qemu-devel] [PULL for-4.1 36/36] include: Move fprintf_function to disas/

2019-04-18 Thread Markus Armbruster
The previous commits have eliminated fprintf_function outside disassemblers, simplifying code and cleaning up the ugly type-punning fprintf_function seems to attract. Move fprintf_function to include/disas/dis-asm.h to reduce the temptation to abuse it. I considered renaming it to fprintf_ftype

[Qemu-devel] [PULL for-4.1 20/36] include: Include fprintf-fn.h only where needed

2019-04-18 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert Message-Id: <20190417191805.28198-2-arm...@redhat.com> --- include/qemu-common.h | 2 -- include/qemu/cutils.h | 2 -- include/sysemu/cpus.h | 1 + 3 files changed, 1 insertion(+), 4 deletions(-) diff --git

[Qemu-devel] [PULL for-4.1 22/36] tcg: Simplify how dump_opcount_info() prints

2019-04-18 Thread Markus Armbruster
dump_opcount_info() takes an fprintf()-like callback and a FILE * to pass to it. Its only caller hmp_info_opcount() passes monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts it right back, and is otherwise identical to monitor_printf(). The type-punning is ugly.

[Qemu-devel] [PULL for-4.1 11/36] vfio: Report warnings with warn_report(), not error_printf()

2019-04-18 Thread Markus Armbruster
Cc: Alex Williamson Signed-off-by: Markus Armbruster Message-Id: <20190417190641.26814-8-arm...@redhat.com> Acked-by: Alex Williamson --- hw/vfio/pci.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index

[Qemu-devel] [PULL for-4.1 32/36] qemu-print: New qemu_fprintf(), qemu_vfprintf()

2019-04-18 Thread Markus Armbruster
Code that doesn't want to know about current monitor vs. stdout vs. stderr takes an fprintf_function callback and a FILE * argument to pass to it. Actual arguments are either fprintf() and stdout or stderr, or monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts it

[Qemu-devel] [PULL for-4.1 07/36] loader-fit: Wean off error_printf()

2019-04-18 Thread Markus Armbruster
load_fit() reports errors with error_printf() instead of error_report(). Worse, it even reports errors it actually recovers from, in fit_cfg_compatible() and fit_load_fdt(). Messed up in initial commit 51b58561c1d. Convert the helper functions for load_fit() to Error. Make sure each failure

[Qemu-devel] [PULL for-4.1 14/36] monitor error: Make printf()-like functions return a value

2019-04-18 Thread Markus Armbruster
printf() & friends return the number of characters written on success, negative value on error. monitor_printf(), monitor_vfprintf(), monitor_vprintf(), error_printf(), error_printf_unless_qmp(), error_vprintf(), and error_vprintf_unless_qmp() return void. Some of them carry a TODO comment

[Qemu-devel] [PULL for-4.1 21/36] trace: Simplify how st_print_trace_file_status() prints

2019-04-18 Thread Markus Armbruster
st_print_trace_file_status() takes an fprintf()-like callback and a FILE * to pass to it. Its only caller hmp_trace_file() passes monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts it right back, and is otherwise identical to monitor_printf(). The type-punning is

[Qemu-devel] [PULL for-4.1 12/36] s390x/kvm: Report warnings with warn_report(), not error_printf()

2019-04-18 Thread Markus Armbruster
kvm_s390_mem_op() can fail in two ways: when !cap_mem_op, it returns -ENOSYS, and when kvm_vcpu_ioctl() fails, it returns -errno set by ioctl(). Its caller s390_cpu_virt_mem_rw() recovers from both failures. kvm_s390_mem_op() prints "KVM_S390_MEM_OP failed" with error_printf() in the latter

[Qemu-devel] [PULL for-4.1 03/36] error: Fix error_report_err(), warn_report_err() hint printing

2019-04-18 Thread Markus Armbruster
Before the from qerror_report() to error_setg(), hints looked like this: qerror_report(QERR_MACRO, ... arguments ...); error_printf_unless_qmp(... hint ...); error_printf_unless_qmp() made perfect sense: it printed exactly when qerror_report() did. After the conversion to error_setg():

[Qemu-devel] [PULL for-4.1 08/36] mips/boston: Report errors with error_report(), not error_printf()

2019-04-18 Thread Markus Armbruster
Cc: Paul Burton Cc: Aleksandar Rikalo Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190417190641.26814-5-arm...@redhat.com> --- hw/mips/boston.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/mips/boston.c b/hw/mips/boston.c

[Qemu-devel] [PULL for-4.1 01/36] qemu-io: Use error_[gs]et_progname()

2019-04-18 Thread Markus Armbruster
From: Christophe Fergeau qemu-io reimplements itself what error_get_progname()/error_set_progname() already does. This commit switches it to use this API from qemu-error.h Signed-off-by: Christophe Fergeau Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Message-Id:

[Qemu-devel] [PULL for-4.1 02/36] log: Make glib logging go through QEMU

2019-04-18 Thread Markus Armbruster
From: Christophe Fergeau This commit adds a error_init() helper which calls g_log_set_default_handler() so that glib logs (g_log, g_warning, ...) are handled similarly to other QEMU logs. This means they will get a timestamp if timestamps are enabled, and they will go through the HMP monitor if

[Qemu-devel] [PULL for-4.1 04/36] util/error: do not free error on error_abort

2019-04-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy It would be nice to have Error object not freed away when debugging a coredump. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20190415142519.73060-1-vsement...@virtuozzo.com> [error_printf_unless_qmp() replaced by error_printf()] Reviewed-by:

[Qemu-devel] [PULL for-4.1 13/36] vl: Make -machine $TYPE, help and -accel help print to stdout

2019-04-18 Thread Markus Armbruster
Command line help help explicitly requested by the user should be printed to stdout, not stderr. We do elsewhere. Adjust -machine $TYPE,help and -accel help to match: use printf() instead of error_printf(). Cc: Marcel Apfelbaum Signed-off-by: Markus Armbruster Reviewed-by: Marcel Apfelbaum

[Qemu-devel] [PULL for-4.1 00/36] Error reporting & monitor patches for 2019-04-18

2019-04-18 Thread Markus Armbruster
Early pull request because I'll be on vacation when 4.1 opens. Hope that's okay. The following changes since commit eeba63fc7fface36f438bcbc0d3b02e7dcb59983: Update version for v4.0.0-rc4 release (2019-04-16 21:53:00 +0100) are available in the Git repository at:

Re: [Qemu-devel] [PATCH v3 01/10] block/pflash_cfi02: Add test for supported commands

2019-04-18 Thread Stephen Checkoway
> On Apr 18, 2019, at 00:47, Thomas Huth wrote: > > On 18/04/2019 00.01, Stephen Checkoway wrote: >> Test the AMD command set for parallel flash chips. This test uses an >> ARM musicpal board with a pflash drive to test the following list of >> currently-supported commands. >> - Autoselect >>

[Qemu-devel] [PULL for-4.1 7/9] Clean up ill-advised or unusual header guards

2019-04-18 Thread Markus Armbruster
Leading underscores are ill-advised because such identifiers are reserved. Trailing underscores are merely ugly. Strip both. Our header guards commonly end in _H. Normalize the exceptions. Done with scripts/clean-header-guards.pl. Signed-off-by: Markus Armbruster Message-Id:

[Qemu-devel] [PULL for-4.1 9/9] Clean up decorations and whitespace around header guards

2019-04-18 Thread Markus Armbruster
Cleaned up with scripts/clean-header-guards.pl. Signed-off-by: Markus Armbruster Message-Id: <20190315145123.28030-9-arm...@redhat.com> --- hw/ide/ahci_internal.h | 2 +- include/block/aio-wait.h| 2 +- include/exec/translator.h | 2 +-

[Qemu-devel] [PULL for-4.1 1/9] Clean up includes

2019-04-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes, with the changes to the following files manually reverted: contrib/libvhost-user/libvhost-user-glib.h

[Qemu-devel] [PULL for-4.1 5/9] target/xtensa: Clean up core-isa.h header guards

2019-04-18 Thread Markus Armbruster
scripts/clean-header-guards.pl warns these headers use reserved identifier _XTENSA_CORE_CONFIGURATION_H as header guard symbol. It additionally warns the guard doesn't match the file name. Reuse of the same guard symbol in multiple headers is okay as long as they cannot be included together.

[Qemu-devel] [PULL for-4.1 8/9] Normalize header guard symbol definition.

2019-04-18 Thread Markus Armbruster
We commonly define the header guard symbol without an explicit value. Normalize the exceptions. Done with scripts/clean-header-guards.pl. Signed-off-by: Markus Armbruster Message-Id: <20190315145123.28030-8-arm...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé --- hw/timer/m48t59-internal.h

[Qemu-devel] [PULL for-4.1 4/9] linux-user/nios2 linux-user/riscv: Clean up header guards

2019-04-18 Thread Markus Armbruster
Reuse of the same guard symbol in multiple headers is okay as long as they cannot be included together. scripts/clean-header-guards.pl can't tell, so it warns. Since we can avoid guard symbol reuse easily, do so: use guard symbol ${target^^}_${fname^^} for linux-user/$target/$fname, just like we

[Qemu-devel] [PULL for-4.1 3/9] authz: Normalize #include "authz/trace.h" to "trace.h"

2019-04-18 Thread Markus Armbruster
Include the generated trace.h the same way as we do everywhere else. Signed-off-by: Markus Armbruster Message-Id: <20190315145123.28030-3-arm...@redhat.com> Acked-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé --- authz/base.c | 2 +- authz/list.c | 2 +- authz/listfile.c

[Qemu-devel] [PULL for-4.1 0/9] Miscellaneous patches for 2019-04-18

2019-04-18 Thread Markus Armbruster
Early pull request because I'll be on vacation when 4.1 opens. Hope that's okay. The following changes since commit eeba63fc7fface36f438bcbc0d3b02e7dcb59983: Update version for v4.0.0-rc4 release (2019-04-16 21:53:00 +0100) are available in the Git repository at:

[Qemu-devel] [PULL for-4.1 6/9] Clean up header guards that don't match their file name

2019-04-18 Thread Markus Armbruster
Header guard symbols should match their file name to make guard collisions less likely. Cleaned up with scripts/clean-header-guards.pl, followed by some renaming of new guard symbols picked by the script to better ones. Signed-off-by: Markus Armbruster Message-Id:

[Qemu-devel] [PULL for-4.1 2/9] Use #include "..." for our own headers, <...> for others

2019-04-18 Thread Markus Armbruster
Also delete a few redundant #include. Signed-off-by: Markus Armbruster Message-Id: <20190315145123.28030-2-arm...@redhat.com> --- contrib/rdmacm-mux/main.c | 18 +- contrib/rdmacm-mux/rdmacm-mux.h | 6 +++--- hw/rdma/rdma_utils.h| 1 -

Re: [Qemu-devel] [PATCH v2 3/3] numa: move numa global variable numa_info into MachineState

2019-04-18 Thread Eduardo Habkost
On Thu, Apr 18, 2019 at 02:46:02PM +0800, Tao Xu wrote: > The aim of this patch is to move existing numa global numa_info > into NumaState. > > Suggested-by: Igor Mammedov > Suggested-by: Eduardo Habkost > Signed-off-by: Tao Xu `ms->numa_state->numa_info[i]` is not a very descriptive

Re: [Qemu-devel] [PATCH v3 07/15] vfio: Report warnings with warn_report(), not error_printf()

2019-04-18 Thread Markus Armbruster
Alex Williamson writes: > On Thu, 18 Apr 2019 08:18:56 +0200 > Markus Armbruster wrote: > >> Alex Williamson writes: >> >> > On Wed, 17 Apr 2019 21:06:33 +0200 >> > Markus Armbruster wrote: >> > >> >> Cc: Alex Williamson >> >> Signed-off-by: Markus Armbruster >> >> --- >> >>

Re: [Qemu-devel] [PATCH 0/4] file-posix: Add dynamic-auto-read-only QAPI feature

2019-04-18 Thread Markus Armbruster
Kevin Wolf writes: > This series adds optional feature lists to struct definitions in the > QAPI schema and makes use of them to advertise the new behaviour of > auto-read-only=on in file-posix. General approach looks good to me. It's just a first step, however. One that is already useful.

Re: [Qemu-devel] [PATCH] cpu: Fix crash with empty -cpu option

2019-04-18 Thread Eduardo Habkost
On Thu, Apr 18, 2019 at 12:45:01AM -0300, Eduardo Habkost wrote: > Fix the following crash: > > $ qemu-system-x86_64 -cpu '' > qemu-system-x86_64: qom/cpu.c:291: cpu_class_by_name: \ > Assertion `cpu_model && cc->class_by_name' failed. > > Regression test script included. > > Fixes:

Re: [Qemu-devel] [PATCH 1/4] qapi: Support features for structs

2019-04-18 Thread Markus Armbruster
Kevin Wolf writes: > Sometimes, the behaviour of QEMU changes compatibly, but without a > change in the QMP syntax (usually by allowing values or operations that > previously resulted in an error). QMP clients may still need to know > whether the extension is available. > > This allows to add a

Re: [Qemu-devel] [PATCH 4/4] file-posix: Add dynamic-auto-read-only QAPI feature

2019-04-18 Thread Markus Armbruster
Kevin Wolf writes: > In commit 23dece19da4 ('file-posix: Make auto-read-only dynamic') , > auto-read-only=on changed its behaviour in file-posix for the 4.0 > release. This change cannot be detected through the usual mechanisms > like schema introspection. Add a new feature flag to the schema to

[Qemu-devel] [Bug 1818367] Re: Initialization of device cfi.pflash01 failed: Block node is read-only

2019-04-18 Thread José Pekkarinen
seems to be piece of true on Phil's comments, as extracting the command on the log and executing it manually the result is the following: 2019-04-18T19:37:49.685841Z qemu-system-x86_64: -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-6-os-1 /master-key.aes: Unable to

Re: [Qemu-devel] [PATCH 1/3] qemu-img: Allow rebase with no input base

2019-04-18 Thread Eric Blake
On 7/13/18 6:14 AM, Max Reitz wrote: > Currently, you cannot add a backing file to an image when it currently > has none. It is really simple to allow this, though (effectively by > setting old_backing_size to 0), so this patch does just that. Can't you do that with 'rebase -u'? I guess the

Re: [Qemu-devel] [PATCH 2/3] qemu-img: Use zero writes after source backing EOF

2019-04-18 Thread Eric Blake
On 7/13/18 6:14 AM, Max Reitz wrote: > Past the end of the source backing file, we memset() buf_old to zero, so > it is clearly easy to use blk_pwrite_zeroes() instead of blk_pwrite() > then. > > Signed-off-by: Max Reitz > --- > qemu-img.c | 11 +-- > 1 file changed, 9 insertions(+), 2

[Qemu-devel] [Bug 1825359] Re: cpu_ld*_code() triggers MMU_DATA_LOAD i.s.o. MMU_INST_FETCH

2019-04-18 Thread Shahab Vahedi
This patch has fixed for me both issues. Although I am not very proud of the changes in the second hunk. Please let me know if there is a better way. ** Patch added: "respect address type for tlb_fill() and while using the address from "tlb_entry""

[Qemu-devel] [Bug 1825359] Re: cpu_ld*_code() triggers MMU_DATA_LOAD i.s.o. MMU_INST_FETCH

2019-04-18 Thread Shahab Vahedi
** Patch removed: "bug1825359_io_readx.patch" https://bugs.launchpad.net/qemu/+bug/1825359/+attachment/5256724/+files/bug1825359_io_readx.patch -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] [Bug 1825359] Re: cpu_ld*_code() triggers MMU_DATA_LOAD i.s.o. MMU_INST_FETCH

2019-04-18 Thread Shahab Vahedi
The problem seems to be this piece of code: cputlb.c static uint64_t io_readx(...) { if (recheck) { ... tlb_fill(cpu, addr, size, MMU_DATA_LOAD, mmu_idx, retaddr); entry = tlb_entry(env, mmu_idx, addr); tlb_addr = entry->addr_read; ... }

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-18 Thread Dan Williams
On Thu, Apr 18, 2019 at 9:18 AM Christoph Hellwig wrote: > > On Thu, Apr 18, 2019 at 09:05:05AM -0700, Dan Williams wrote: > > > > I'd either add a comment about avoiding retpoline overhead here or just > > > > make ->flush == NULL mean generic_nvdimm_flush(). Just so that people > > > > don't >

Re: [Qemu-devel] curses.c: "We need a terminal output" ?

2019-04-18 Thread Joachim Durchholz
Am 18.04.19 um 13:02 schrieb Laszlo Ersek: On 04/18/19 07:02, Joachim Durchholz wrote: Am 17.04.19 um 20:27 schrieb Laszlo Ersek: So, let's look at your original question again (which was not a problem statement): So you need an explicit problem statement to know that somebody might have a

[Qemu-devel] [PATCH for-QEMU-4.1 v5 29/29] hw/arm: Remove hard-enablement of the remaining PCI devices

2019-04-18 Thread Thomas Huth
The PCI devices should be pulled in by default if PCI_DEVICES is set, so there is no need anymore to enforce them in the configs file. Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 8 1 file changed, 8 deletions(-) diff --git a/default-configs/arm-softmmu.mak

[Qemu-devel] [PATCH for-QEMU-4.1 v5 14/29] hw/arm: Express dependencies of collie with Kconfig

2019-04-18 Thread Thomas Huth
Add Kconfig dependencies for the Strongarm collie machine. This patch is based on earlier work by Ákos Kovács (i.e. his "hw/arm/Kconfig: Add ARM Kconfig" patch). Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 3 +-- hw/arm/Kconfig | 7 +++

[Qemu-devel] [PATCH for-QEMU-4.1 v5 28/29] hw/arm: Express dependencies of the musca machines with Kconfig

2019-04-18 Thread Thomas Huth
Dependencies have been determined with trial-and-error and by looking at the musca.c source file. Signed-off-by: Thomas Huth --- hw/arm/Kconfig | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 22be1e1231..eca8387050 100644 ---

[Qemu-devel] [PATCH for-QEMU-4.1 v5 27/29] hw/arm: Express dependencies of the xlnx-versal-virt machine with Kconfig

2019-04-18 Thread Thomas Huth
Dependencies have been determined with trial-and-error and by looking at the xlnx-versal.c source file. Signed-off-by: Thomas Huth --- hw/arm/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 32e4cc50e5..22be1e1231 100644 --- a/hw/arm/Kconfig

[Qemu-devel] [PATCH for-QEMU-4.1 v5 20/29] hw/arm: Express dependencies of the raspi machines with Kconfig

2019-04-18 Thread Thomas Huth
Most of the code is directly controlled by the CONFIG_RASPI switch, so not much to add here additionally. Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 4 +--- hw/arm/Kconfig | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH for-QEMU-4.1 v5 22/29] hw/arm: Express dependencies of sabrelite with Kconfig

2019-04-18 Thread Thomas Huth
Add Kconfig dependencies for the Sabrelite / iMX6 machine. Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 4 +--- hw/arm/Kconfig | 7 +++ hw/arm/Makefile.objs| 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH for-QEMU-4.1 v5 18/29] hw/arm: Express dependencies of allwinner / cubieboard with Kconfig

2019-04-18 Thread Thomas Huth
Add dependencies for the Cubitech Cubieboard. Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 6 +- hw/arm/Kconfig | 9 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/default-configs/arm-softmmu.mak

[Qemu-devel] [PATCH for-QEMU-4.1 v5 25/29] hw/arm: Express dependencies of the microbit / nrf51 machine with Kconfig

2019-04-18 Thread Thomas Huth
Add Kconfig dependencies for the NRF51 / microbit machine. Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 3 +-- hw/arm/Kconfig | 6 ++ hw/arm/Makefile.objs| 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH for-QEMU-4.1 v5 16/29] hw/arm: Express dependencies of the virt machine with Kconfig

2019-04-18 Thread Thomas Huth
Dependencies have been determined by looking at hw/arm/virt.c Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 11 +-- hw/arm/Kconfig | 19 +++ hw/arm/Makefile.objs| 3 ++- 3 files changed, 22 insertions(+), 11 deletions(-)

Re: [Qemu-devel] [PATCH 5/6] pc-bios/s390-ccw: Clean up harmless misuse of isdigit()

2019-04-18 Thread Markus Armbruster
Thomas Huth writes: > On 18/04/2019 16.53, Markus Armbruster wrote: >> atoui() and get_index() pass char values to isdigit(). With a >> standard isdigit(), we'd get undefined behavior when the value is >> negative. But we're using isdigit() from pc-bios/s390-ccw/libc.h >> here, which behaves

[Qemu-devel] [PATCH for-QEMU-4.1 v5 24/29] hw/arm: Express dependencies for remaining IMX boards with Kconfig

2019-04-18 Thread Thomas Huth
IMX25, IMX7 and IMX6UL were still missing the Kconfig dependencies. Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 2 -- hw/arm/Kconfig | 19 +++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/default-configs/arm-softmmu.mak

[Qemu-devel] [PATCH for-QEMU-4.1 v5 13/29] hw/arm: Express dependencies of xilinx-zynq with Kconfig

2019-04-18 Thread Thomas Huth
Add Kconfig dependencies for the xilinx-zynq-a9 board. This patch is based on earlier work by Ákos Kovács (i.e. his "hw/arm/Kconfig: Add ARM Kconfig" patch). Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 7 +-- hw/arm/Kconfig | 12 2 files

[Qemu-devel] [PATCH for-QEMU-4.1 v5 07/29] hw/arm: Express dependencies of the fsl-imx31 machine with Kconfig

2019-04-18 Thread Thomas Huth
Add Kconfig dependencies for the fsl-imx31 / kzm machine. This patch is slightly based on earlier work by Ákos Kovács (i.e. his "hw/arm/Kconfig: Add ARM Kconfig" patch). Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 3 +-- hw/arm/Kconfig | 4

[Qemu-devel] [PATCH for-QEMU-4.1 v5 26/29] hw/arm: Express dependencies of the ZynqMP zcu102 machine with Kconfig

2019-04-18 Thread Thomas Huth
This cleans up most settings in default-configs/aarch64-softmmu.mak. Signed-off-by: Thomas Huth --- default-configs/aarch64-softmmu.mak | 4 hw/arm/Kconfig | 11 +++ hw/display/Kconfig | 1 + 3 files changed, 12 insertions(+), 4 deletions(-)

[Qemu-devel] [PATCH for-QEMU-4.1 v5 11/29] hw/arm: Express dependencies of realview, versatile and vexpress with Kconfig

2019-04-18 Thread Thomas Huth
This patch is slightly based on earlier work by Ákos Kovács (i.e. his "hw/arm/Kconfig: Add ARM Kconfig" patch). Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 24 - hw/arm/Kconfig | 48 + hw/arm/Makefile.objs

[Qemu-devel] [PATCH for-QEMU-4.1 v5 19/29] hw/arm: Express dependencies of the MPS2 boards with Kconfig

2019-04-18 Thread Thomas Huth
Add Kconfig dependencies for the mps2-an* machines. Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 20 +--- hw/arm/Kconfig | 18 ++ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/default-configs/arm-softmmu.mak

[Qemu-devel] [PATCH for-QEMU-4.1 v5 05/29] hw/arm: Express dependencies of the highbank machines with Kconfig

2019-04-18 Thread Thomas Huth
Add Kconfig dependencies for the highbank machine (and the midway machine). This patch is slightly based on earlier work by Ákos Kovács (i.e. his "hw/arm/Kconfig: Add ARM Kconfig" patch). Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 9 + hw/arm/Kconfig

[Qemu-devel] [PATCH for-QEMU-4.1 v5 23/29] hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine with Kconfig

2019-04-18 Thread Thomas Huth
Add Kconfig dependencies for the emcraft-sf2 machine - we also distinguish between the machine (CONFIG_EMCRAFT_SF2) and the SoC (CONFIG_MSF2) now. Signed-off-by: Thomas Huth --- default-configs/arm-softmmu.mak | 3 +-- hw/arm/Kconfig | 8 hw/arm/Makefile.objs

  1   2   3   >