[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 +- include/hw/arm/nrf51_soc

[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: <20190315145123.

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 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: git://repo.or.cz/qemu/armb

[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 Me

[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 o

[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: Markus

[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: <20190131164614.19209-

[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 failu

[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 i

[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 u

[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 asking

[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 pat

[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 rig

[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 504019c458..014281

[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. D

[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 a/include/qemu-comm

[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 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 Gilb

[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 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 b

[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 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 type-pu

[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_fprint

[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 6d13ef877b.

[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 callba

[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 the

[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 and

[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 --- a/

[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 ac

[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 the

[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 ++ 1

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 len

[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

[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: "Marc-And

[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: Ke

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 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 interface

[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 monit

[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+) binuti

[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 a

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 repo

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] [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:

[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 a/configu

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 work

[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 --- v3:

[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 + default-configs/i386-sof

[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 Mamm

[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 build_append_foo(

[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 de

[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é --- hw/arm/virt-acpi-buil

[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] [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 eleme

[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. h

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 subma

[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 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 >

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 v3 01/10] block/pflash_cfi02: Add test for supported commands

2019-04-18 Thread Thomas Huth
Hi, On 18/04/2019 22.43, Stephen Checkoway wrote: [...] > I'm new to contributing to QEMU and I have a two procedural questions: > > 1. When should I send version 4 of this patch series? I don't want to bombard > everyone with another 11 emails after fixing every review comment, but I also > d

[Qemu-devel] [PATCH 00/17] Delete 16 *_cpu_class_by_name() functions

2019-04-18 Thread Eduardo Habkost
This series adds a new CPUClass::class_name_format field, which allows us to delete 16 of the 21 *_cpu_class_by_name() functions that exist today. Cornelia Huck (1): hw: add compat machines for 4.1 Eduardo Habkost (9): cpu: Rename parse_cpu_model() to parse_cpu_option() cpu: Fix crash with

[Qemu-devel] [PATCH 01/17] hw: add compat machines for 4.1

2019-04-18 Thread Eduardo Habkost
From: Cornelia Huck Add 4.1 machine types for arm/i440fx/q35/s390x/spapr. Signed-off-by: Cornelia Huck Message-Id: <20190411102025.22559-1-coh...@redhat.com> Acked-by: Greg Kurz Acked-by: David Gibson Signed-off-by: Eduardo Habkost --- include/hw/boards.h| 3 +++ include/hw/i386/pc

[Qemu-devel] [PATCH 04/17] vl: Clean up after previous commit

2019-04-18 Thread Eduardo Habkost
From: Markus Armbruster Since the previous commit, find_machine() and find_default_machine() don't have to deallocate on return. This permits further simplifications. Signed-off-by: Markus Armbruster Reviewed-by: Wei Yang Message-Id: <20190405064121.23662-4-richardw.y...@linux.intel.com> Sign

[Qemu-devel] [PATCH 02/17] vl.c: make find_default_machine() local

2019-04-18 Thread Eduardo Habkost
From: Wei Yang Function find_default_machine() is introduced by commit 2c8cffa599b7 "vl: make find_default_machine externally visible", and it was used outside of vl.c until commit a904410af5f1 "pc_sysfw: remove the rom_only property". Commit a904410af5f1 "pc_sysfw: remove the rom_only property"

[Qemu-devel] [PATCH 03/17] vl.c: allocate TYPE_MACHINE list once during bootup

2019-04-18 Thread Eduardo Habkost
From: Wei Yang Now all the functions used to select machine is local and the call flow looks like below: select_machine() find_default_machine() machine_parse() find_machine() All these related function will need a GSList for TYPE_MACHINE. Currently we allocate t

[Qemu-devel] [PATCH 05/17] vl: Simplify machine_parse()

2019-04-18 Thread Eduardo Habkost
From: Markus Armbruster Exploit that argument @name is nerver null. Check is_help_option() first, because that's what we do elsewhere. If we (foolishly!) defined a machine named "help", -machine help would now print help instead of selecting the machine named "help". Signed-off-by: Markus Armb

[Qemu-devel] [PATCH 06/17] cpu: Rename parse_cpu_model() to parse_cpu_option()

2019-04-18 Thread Eduardo Habkost
The "model[,option...]" string parsed by the function is not just a CPU model. Rename the function and its argument to indicate it expects the full "-cpu" option to be provided. Signed-off-by: Eduardo Habkost Message-Id: <20190417025944.16154-2-ehabk...@redhat.com> Reviewed-by: David Gibson Rev

[Qemu-devel] [PATCH 5/7] cpu: Let architectures set CPU class name format

2019-04-18 Thread Eduardo Habkost
Instead of requiring every architecture to implement a class_by_name function, let them set a format string at CPUClass::class_name_format. This will let us get rid of at least 16 class_by_name functions in the next commits. Signed-off-by: Eduardo Habkost --- include/qom/cpu.h | 12

[Qemu-devel] [PATCH 2/7] riscv: Don't split CPU model string

2019-04-18 Thread Eduardo Habkost
CPUClass::class_by_name is called after the CPU model name and options were already split, there's no need to split the string again. Signed-off-by: Eduardo Habkost --- Cc: Palmer Dabbelt Cc: Alistair Francis Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: qemu-ri...@nongnu.org --- target/ri

[Qemu-devel] [PATCH 4/7] arm: Remove special case for "any" CPU model

2019-04-18 Thread Eduardo Habkost
We already have an entry for "any" at arm_cpus[], which makes a "any-arm-cpu" QOM type be registered. This means the regular QOM type name lookup code already works and there's no need for a special case. Signed-off-by: Eduardo Habkost --- Cc: Peter Maydell Cc: qemu-...@nongnu.org --- target/a

Re: [Qemu-devel] [PATCH 00/17] Delete 16 *_cpu_class_by_name() functions

2019-04-18 Thread Eduardo Habkost
Please ignore this series. I used master as base instead of machine-next by mistake and it included all the patches that were already in machine-next. I'm sending another series with just the 7 patches that I intended to submit. -- Eduardo

[Qemu-devel] [PATCH 0/7] Delete 16 *_cpu_class_by_name() functions

2019-04-18 Thread Eduardo Habkost
This series adds a new CPUClass::class_name_format field, which allows us to delete 16 of the 21 *_cpu_class_by_name() functions that exist today. Eduardo Habkost (7): cpu: Change return type of cpu_class_by_name() to CPUClass riscv: Don't split CPU model string arm: Don't split CPU model st

[Qemu-devel] [PATCH 3/7] arm: Don't split CPU model string

2019-04-18 Thread Eduardo Habkost
CPUClass::class_by_name is called after the CPU model name and options were already split, there's no need to split the string again. Fixes: fb8d6c24b095 ("target-arm: Add CPU property to disable AArch64") Signed-off-by: Eduardo Habkost --- Cc: Greg Bellows Cc: Peter Maydell Cc: qemu-...@nongnu

[Qemu-devel] [PATCH 6/7] cpu: Set class name format for some architectures

2019-04-18 Thread Eduardo Habkost
Set CPUClass::class_name_format for 12 architectures that simply generate a class name using g_strdup_printf(): arm, i386, lm32, m68k, mips, moxie, openrisc, riscv, s390x, tricore, unicore32, xtensa. Signed-off-by: Eduardo Habkost --- Cc: Peter Maydell Cc: Paolo Bonzini Cc: Richard Henderson C

[Qemu-devel] [PATCH 1/7] cpu: Change return type of cpu_class_by_name() to CPUClass

2019-04-18 Thread Eduardo Habkost
The function always returns a CPU class. Change the return type to reflect that. I'm not changing the return type of CPUClass::class_by_name() yet, because many of its implementations will be eliminated by the next commits. Signed-off-by: Eduardo Habkost --- Cc: Cornelia Huck Cc: David Hildenb

[Qemu-devel] [PATCH 7/7] cpu: Set fixed class name on some architectures

2019-04-18 Thread Eduardo Habkost
hppa, microblaze, nios2, and tilegx have a fixed class name being returned by CPUClass::class_by_name. We can implement the same behavior by setting CPUClass::class_name_format. Signed-off-by: Eduardo Habkost --- Cc: Richard Henderson Cc: "Edgar E. Iglesias" Cc: Chris Wulff Cc: Marek Vasut -

<    1   2   3