Re: [Qemu-devel] [PATCH v3 08/38] 9pfs: Fix CLI parsing crash on error

2018-10-17 Thread Greg Kurz
On Tue, 16 Oct 2018 19:41:28 +0200 Markus Armbruster wrote: > Calling error_report() in a function that takes an Error ** argument > is suspicious. 9p-handle.c's handle_parse_opts() does that, and then > fails without setting an error. Wrong. Its caller crashes when it > tries to report the er

Re: [Qemu-devel] [PATCH] qapi: add info about reset to SHUTDOWN event

2018-10-17 Thread Dominik Csapak
On 10/8/18 3:19 PM, Dominik Csapak wrote: when '-no-reboot' is set, it is interesting if the guest was originally shutdown or reset, so save and return that info Signed-off-by: Dominik Csapak --- qapi/run-state.json | 5 - vl.c| 5 - 2 files changed, 8 insertions(+),

Re: [Qemu-devel] [PATCH 1/4] ptr_ring: port ptr_ring from linux kernel to QEMU

2018-10-17 Thread Paolo Bonzini
On 16/10/2018 18:40, Emilio G. Cota wrote: >> +#define SMP_CACHE_BYTES 64 >> +#define cacheline_aligned_in_smp \ >> +__attribute__((__aligned__(SMP_CACHE_BYTES))) > You could use QEMU_ALIGNED() here. > >> + >> +#define WRITE_ONCE(ptr, val) \ >> +(*((volatile typeof(ptr) *)(&(p

Re: [Qemu-devel] [PATCH RFC v5 1/7] Fix segmentation fault when qemu_signal_init fails

2018-10-17 Thread Fei Li
Sorry for the late reply! Omitted this one.. On 10/12/2018 09:26 PM, Markus Armbruster wrote: Fei Li writes: On 10/12/2018 03:56 PM, Markus Armbruster wrote: Fei Li writes: On 10/11/2018 06:02 PM, Markus Armbruster wrote: Fei Li writes: Currently, when qemu_signal_init() fails it onl

Re: [Qemu-devel] [PATCH v3 08/38] 9pfs: Fix CLI parsing crash on error

2018-10-17 Thread Markus Armbruster
Greg Kurz writes: > On Tue, 16 Oct 2018 19:41:28 +0200 > Markus Armbruster wrote: > >> Calling error_report() in a function that takes an Error ** argument >> is suspicious. 9p-handle.c's handle_parse_opts() does that, and then >> fails without setting an error. Wrong. Its caller crashes when

[Qemu-devel] [PATCH v2 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type

2018-10-17 Thread Artem Pisarenko
Recent patches from series [PATCH v6] "Fixing record/replay and adding reverse debugging" introduced new clock type QEMU_CLOCK_VIRTUAL_EXT and replaced virtual timers in some external subsystems with it. This resulted in small change to existing behavior, which I consider to be unacceptable. Pro

[Qemu-devel] [PATCH v2 1/4] Revert some patches from recent [PATCH v6] "Fixing record/replay and adding reverse debugging"

2018-10-17 Thread Artem Pisarenko
That patch series introduced new virtual clock type for use in external subsystems. It breaks desired behavior in non-record/replay usage scenarios. This reverts commit 87f4fe7653baf55b5c2f2753fe6003f473c07342. This reverts commit 775a412bf83f6bc0c5c02091ee06cf649b34c593. This reverts commit 9888

[Qemu-devel] [PATCH v2 2/4] Introduce attributes to qemu timer subsystem

2018-10-17 Thread Artem Pisarenko
Attributes are simple flags, associated with individual timers for their whole lifetime. They intended to be used to mark individual timers for special handling by various qemu features operating at qemu core level. New/init functions family in timer interface updated and refactored (new 'attrib

[Qemu-devel] [PATCH v4 12/38] migration: Fix !replay_can_snapshot() error handling

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. save_snapshot() and load_snapshot() do that, and then fail without setting an error. Wrong. The HMP commands survive this unscathed, since hmp_handle_error() does nothing when no error has been set. Callers main

[Qemu-devel] [PATCH v4 03/38] block: Use warn_report() & friends to report warnings

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. Convert a few that are actually warnings to warn_report(). While there, split warnings consisting of multiple sentences to conform to conventions spelled out in warn_report()'s contract, and improve a rather usele

[Qemu-devel] [PATCH v2 4/4] Optimize record/replay checkpointing for all clocks it applies to

2018-10-17 Thread Artem Pisarenko
Removes redundant checkpoints in replay log when there are no expired timers in timers list, associated with corresponding clock (i.e. no rr events associated with current clock value). This also improves performance in rr mode. Signed-off-by: Artem Pisarenko --- include/qemu/timer.h | 2 +-

[Qemu-devel] [PATCH v2 3/4] Restores record/replay behavior related to special virtual clock processing for timers used in external subsystems.

2018-10-17 Thread Artem Pisarenko
Adds EXTERNAL attribute definition to qemu timers subsystem and assigns it to virtual clock timers, used in slirp (ICMP IPv6) and ui (key queue). Virtual clock processing in rr mode reimplemented using this attribute. Fixes: 87f4fe7653baf55b5c2f2753fe6003f473c07342 Fixes: 775a412bf83f6bc0c5c02091

qemu-devel@nongnu.org

2018-10-17 Thread Markus Armbruster
>From include/qapi/error.h: * Pass an existing error to the caller with the message modified: * error_propagate(errp, err); * error_prepend(errp, "Could not frobnicate '%s': ", name); Fei Li pointed out that doing error_propagate() first doesn't work well when @errp is &error_fatal

[Qemu-devel] [PATCH v4 08/38] 9pfs: Fix CLI parsing crash on error

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. 9p-handle.c's handle_parse_opts() does that, and then fails without setting an error. Wrong. Its caller crashes when it tries to report the error: $ qemu-system-x86_64 -nodefaults -fsdev id=foo,fsdriver=hand

[Qemu-devel] [PATCH v4 18/38] vl: Clean up error reporting in parse_add_fd()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_add_fd() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Also change call of cleanup_add_fd(), which can't fail, for

[Qemu-devel] [PATCH v4 16/38] xen/pt: Fix incomplete conversion to realize()

2018-10-17 Thread Markus Armbruster
The conversion of "xen-pci-passthrough" to realize() (commit 5a11d0f7549, v2.6.0) neglected to convert the xen_pt_config_init() error path. If xen_pt_config_init() fails, xen_pt_realize() reports the error, then returns success without completing its job. I don't know the exact impact, but it can

[Qemu-devel] [PATCH v4 14/38] net/socket: Fix invalid socket type error handling

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. net_socket_fd_init() does that, and then fails without setting an error. Wrong. I didn't analyze how exactly this can break. A caller that reports the error on failure would crash. Broken when commit c37f0bb1d0

[Qemu-devel] [PATCH v4 00/38] Replace some unwise uses of error_report() & friends

2018-10-17 Thread Markus Armbruster
Calling error_report() or similar in a function that takes an Error ** argument is suspicious. Fix a number of instances that are actually wrong. Clean up a few more that are merely fragile / bad examples. v4: * PATCH 36-37: Unbreak qemu-iotests [Eric] v3: * PATCH 27: Drop useless error message

[Qemu-devel] [PATCH v4 06/38] vfio: Clean up error reporting after previous commit

2018-10-17 Thread Markus Armbruster
The previous commit changed vfio's warning messages from vfio warning: DEV-NAME: Could not frobnicate to warning: vfio DEV-NAME: Could not frobnicate To match this change, change error messages from vfio error: DEV-NAME: On fire to vfio DEV-NAME: On fire Note the loss of "er

[Qemu-devel] [PATCH v4 24/38] vl: Clean up error reporting in device_init_func()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. device_init_func() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Philippe

[Qemu-devel] [PATCH v4 02/38] Use error_fatal to simplify obvious fatal errors (again)

2018-10-17 Thread Markus Armbruster
Add a slight improvement of the Coccinelle semantic patch from commit 007b06578ab, and use it to clean up. It leaves dead Error * variables behind, cleaned up manually. Cc: David Gibson Cc: Alexander Graf Cc: Eric Blake Cc: Paolo Bonzini Signed-off-by: Markus Armbruster Reviewed-by: Eric Bla

[Qemu-devel] [PATCH v4 21/38] vl: Clean up error reporting in machine_set_property()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. machine_set_property() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Phili

[Qemu-devel] [PATCH v4 30/38] spice: Clean up error reporting in add_channel()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. add_channel() does that, and then exit()s. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Gerd Hoffmann Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau

[Qemu-devel] [PATCH v4 22/38] vl: Clean up error reporting in mon_init_func()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. mon_init_func() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mat

[Qemu-devel] [PATCH v4 11/38] smbios: Clean up error handling in smbios_add()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. smbios_entry_add() does that, and then exit()s. It also passes &error_fatal to qemu_opts_validate(). Both wrong, but currently harmless, as its only caller passes &error_fatal. Messed up in commit 1007a37e208.

[Qemu-devel] [PATCH v4 35/38] vl: Simplify call of parse_name()

2018-10-17 Thread Markus Armbruster
main() checks for parse_name() failure even though it can't actually fail. That's okay. Simplify it to check by passing &error_fatal, like the other users of qemu_opts_foreach(). Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé --- vl.c | 6 ++ 1 file changed, 2 insert

[Qemu-devel] [PATCH v4 33/38] blockdev: Convert drive_new() to Error

2018-10-17 Thread Markus Armbruster
Calling error_report() from within a function that takes an Error ** argument is suspicious. drive_new() calls error_report() even though it can run within drive_init_func(), which takes an Error ** argument. drive_init_func()'s caller main(), via qemu_opts_foreach(), is fine with it, but clean it

[Qemu-devel] [PATCH v4 34/38] vl: Fix exit status for -drive format=help

2018-10-17 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 22beca29d1..89520d8007 100644 --- a/vl.c +++ b/vl.c @@ -4397,7 +4397,7 @@ int main(int argc, char **argv, char **envp) if (qemu_opts_foreach(qemu_find_opts("drive")

[Qemu-devel] [PATCH v4 07/38] char: Use error_printf() to print help and such

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. Convert a few that are actually help and such to error_printf(). Improves output of -chardev help from qemu-system-x86_64: -chardev help: Available chardev backend types: serial ... to Available

[Qemu-devel] [PATCH v4 15/38] numa: Fix QMP command set-numa-node error handling

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_numa_node() does that, and then exit()s. It also passes &error_fatal to machine_set_cpu_numa_node(). Both wrong. Attempting to configure numa when the machine doesn't support it kills the VM: $ qemu-sy

[Qemu-devel] [PATCH v4 09/38] pc: Fix machine property nvdimm-persistence error handling

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. pc.c's pc_machine_set_nvdimm_persistence() does that, and then exit()s. Wrong. Attempting to set machine property nvdimm-persistence to a bad value instantly kills the VM: $ qemu-system-x86_64 -nodefaults -S

[Qemu-devel] [PATCH v4 13/38] l2tpv3: Improve -netdev/netdev_add/-net/... error reporting

2018-10-17 Thread Markus Armbruster
When -netdev l2tpv3 fails, it first reports a specific error, then a generic one, like this: $ qemu-system-x86_64 -netdev l2tpv3,id=foo,src=,dst=,txsession=1 qemu-system-x86_64: -netdev l2tpv3,id=foo,src=,dst=,txsession=1: l2tpv3_open : could not resolve src, errno = Name or service not k

[Qemu-devel] [PATCH v4 32/38] vl: Assert drive_new() does not fail in default_drive()

2018-10-17 Thread Markus Armbruster
If creating (empty) default drives fails, it's a bug. Therefore, assert() is more appropriate than exit(1). Cc: Kevin Wolf Cc: Max Reitz Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- vl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --

[Qemu-devel] [PATCH v4 31/38] fsdev: Clean up error reporting in qemu_fsdev_add()

2018-10-17 Thread Markus Armbruster
Calling error_report() from within a function that takes an Error ** argument is suspicious. qemu_fsdev_add() does that, and its caller fsdev_init_func() then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Greg Kurz Signe

[Qemu-devel] [PATCH v4 26/38] ui: Convert vnc_display_init(), init_keyboard_layout() to Error

2018-10-17 Thread Markus Armbruster
From: Fei Li Signed-off-by: Fei Li Cc: Gerd Hoffmann Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé --- include/ui/console.h | 2 +- ui/curses.c | 6 +++--- ui/keymaps.c | 11 ++- ui/keymaps.h | 2 +- ui/sdl.c | 6 +++---

[Qemu-devel] [PATCH v4 29/38] tpm: Clean up error reporting in tpm_init_tpmdev()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. tpm_init_tpmdev() does that, and then fails without setting an error. Its caller main(), via tpm_init() and qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Stefan Berger Signed-off-by: Markus A

[Qemu-devel] [PATCH v4 20/38] vl: Clean up error reporting in chardev_init_func()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. chardev_init_func() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Philippe

[Qemu-devel] [PATCH v4 36/38] block: Clean up bdrv_img_create()'s error reporting

2018-10-17 Thread Markus Armbruster
bdrv_img_create() takes an Error ** argument and uses it in the conventional way, except for one place: when qemu_opts_do_parse() fails, it first reports its error to stderr or the HMP monitor with error_report_err(), then error_setg()'s a generic error. When the caller reports that second error s

[Qemu-devel] [PATCH v4 37/38] raw: Convert a warning to warn_report()

2018-10-17 Thread Markus Armbruster
Convert the warning about dangerous automatic probing of raw images to warn_report(). Split its text to conform to conventions spelled out in warn_report()'s contract. Update expected output of qemu-iotest 109 accordingly. Update qemu-iotest 099's output filtering to keep filtering out the warni

[Qemu-devel] [PATCH v4 27/38] vnc: Clean up error reporting in vnc_init_func()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. vnc_init_func() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. While there, drop a "Failed to start VNC server: " error me

[Qemu-devel] [PATCH v4 10/38] ioapic: Fix error handling in realize()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. ioapic_realize() does that, and then exit()s. Currently mostly harmless, as the device cannot be hot-plugged. Fixes: 20fd4b7b6d9282fe0cb83601f1821f31bd257458 Cc: Peter Xu Signed-off-by: Markus Armbruster Reviewe

[Qemu-devel] [PATCH v4 05/38] vfio: Use warn_report() & friends to report warnings

2018-10-17 Thread Markus Armbruster
The vfio code reports warnings like error_report(WARN_PREFIX "Could not frobnicate", DEV-NAME); where WARN_PREFIX is defined so the message comes out as vfio warning: DEV-NAME: Could not frobnicate This usage predates the introduction of warn_report() & friends in commit 97f40301f1d. I

[Qemu-devel] [PATCH v4 04/38] cpus hw target: Use warn_report() & friends to report warnings

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. Convert a few that are actually warnings to warn_report(). While there, split a warning consisting of multiple sentences to conform to conventions spelled out in warn_report()'s contract. Cc: Alex Bennée Cc: Mar

[Qemu-devel] [PATCH v4 38/38] vpc: Fail open on bad header checksum

2018-10-17 Thread Markus Armbruster
vpc_open() merely prints a warning when it finds a bad header checksum. Turn that into a hard error. Cc: Kevin Wolf Signed-off-by: Markus Armbruster --- block/vpc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index bf294abfa7..1729c0cb4

[Qemu-devel] [PATCH v4 19/38] qom: Clean up error reporting in user_creatable_add_opts_foreach()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. user_creatable_add_opts_foreach() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Daniel P. Berrangé Signed-off-by: Ma

[Qemu-devel] [PATCH 0/5] target/i386: introduce coalesced pio

2018-10-17 Thread Peng Hao
Coalesced pio is base on coalesced mmio and can be used for some port like rtc port, pci-host config port and so on. Specially in case of rtc as coalesced pio, some versions of windows guest access rtc frequently because of rtc as system tick. guest access rtc like this: write register index to 0x

[Qemu-devel] [PATCH v4 23/38] vl: Clean up error reporting in parse_fw_cfg()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_fw_cfg() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lu

[Qemu-devel] [PATCH V6 5/5] target-i386: add q35 0xcf8 port as coalesced_pio

2018-10-17 Thread Peng Hao
Signed-off-by: Peng Hao --- hw/pci-host/q35.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 02f9576..8ce1e09 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -51,6 +51,10 @@ static void q35_host_realize(DeviceState *dev, Error **errp)

[Qemu-devel] [PATCH V6 4/5] target-i386: add i440fx 0xcf8 port as coalesced_pio

2018-10-17 Thread Peng Hao
Signed-off-by: Peng Hao --- hw/pci-host/piix.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 0e60834..da73743 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix.c @@ -327,6 +327,10 @@ static void i440fx_pcihost_realize(DeviceState *dev,

[Qemu-devel] [PATCH v4 28/38] numa: Clean up error reporting in parse_numa()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_numa() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. While there, give parse_numa() internal linkage. Cc: Eduardo

[Qemu-devel] [PATCH V6 3/5] target-i386: add rtc 0x70 port as coalesced_pio

2018-10-17 Thread Peng Hao
Signed-off-by: Peng Hao --- hw/timer/mc146818rtc.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c index acee47d..808a212 100644 --- a/hw/timer/mc146818rtc.c +++ b/hw/timer/mc146818rtc.c @@ -70,6 +70,7 @@ typedef struct RTCState { I

Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/8] block: Update flags in bdrv_set_read_only()

2018-10-17 Thread Alberto Garcia
On Fri 12 Oct 2018 01:55:25 PM CEST, Kevin Wolf wrote: > To fully change the read-only state of a node, we must not only change > bs->read_only, but also update bs->open_flags. > > Signed-off-by: Kevin Wolf Reviewed-by: Alberto Garcia Berto

[Qemu-devel] [PATCH v4 25/38] ui/keymaps: Fix handling of erroneous include files

2018-10-17 Thread Markus Armbruster
While errors in the keyboard layout named with -k are fatal, errors in included files are reported, but otherwise ignored: $ cat worst include bad include worse $ ls -l bad worse ls: cannot access 'bad': No such file or directory ls: cannot access 'worse': No such file or d

[Qemu-devel] [PATCH V6 2/5] target-i386 : add coalesced_pio API

2018-10-17 Thread Peng Hao
the primary API realization. Signed-off-by: Peng Hao Reviewed-by: Eduardo Habkost --- accel/kvm/kvm-all.c | 56 --- include/exec/memory.h | 4 ++-- memory.c | 4 ++-- 3 files changed, 57 insertions(+), 7 deletions(-) diff --git a

[Qemu-devel] [PATCH v4 17/38] seccomp: Clean up error reporting in parse_sandbox()

2018-10-17 Thread Markus Armbruster
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_sandbox() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Eduardo Otubo Signed-off-by: Markus Armbruster Review

Re: [Qemu-devel] [RFC PATCH v1 1/4] VFIO KABI for migration interface

2018-10-17 Thread Christoph Hellwig
On Tue, Oct 16, 2018 at 11:42:35PM +0530, Kirti Wankhede wrote: > - Added vfio_device_migration_info structure to use interact with vendor > driver. There is no such thing as a 'vendor driver' in Linux - all drivers ate treated equal. And I don't see any single driver supporting this yet, so yo

Re: [Qemu-devel] [RFC PATCH v1 0/4] Add migration support for VFIO device

2018-10-17 Thread Cornelia Huck
On Tue, 16 Oct 2018 23:42:34 +0530 Kirti Wankhede wrote: > Add migration support for VFIO device I'd love to take a deeper look at this; but sadly, I'm currently low on spare time, and therefore will only add some general remarks. > > This Patch set include patches as below: > - Define KABI fo

[Qemu-devel] [PATCH V6 1/5] target/i386 : add coalesced pio support

2018-10-17 Thread Peng Hao
add coalesced_pio's struct and KVM_CAP_COALESCED_PIO header. Signed-off-by: Peng Hao --- accel/kvm/kvm-all.c | 4 ++-- linux-headers/linux/kvm.h | 9 - 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index de12f78..29d208d 1

[Qemu-devel] [PATCH] Revert "icount: remove obsolete warp call"

2018-10-17 Thread Paolo Bonzini
QEMU running with options "-icount,sleep=off -rtc clock=vm" doesn't execute emulation at maximum possible speed. Target virtual clock may run faster or slower than realtime clock by N times, where N value depends on various unrelated conditions (i.e. random from the user point of view), or possibly

Re: [Qemu-devel] [RFC PATCH v1 2/4] Add migration functions for VFIO devices

2018-10-17 Thread Cornelia Huck
On Tue, 16 Oct 2018 23:42:36 +0530 Kirti Wankhede wrote: > - Migration function are implemented for VFIO_DEVICE_TYPE_PCI device. > - Added SaveVMHandlers and implemented all basic functions required for live > migration. > - Added VM state change handler to know running or stopped state of VM.

Re: [Qemu-devel] [Qemu-block] [PATCH v2 2/4] Introduce attributes to qemu timer subsystem

2018-10-17 Thread Stefan Hajnoczi
On Wed, Oct 17, 2018 at 02:24:19PM +0600, Artem Pisarenko wrote: > Attributes are simple flags, associated with individual timers for their > whole lifetime. > They intended to be used to mark individual timers for special handling by > various qemu features operating at qemu core level. I'm wor

Re: [Qemu-devel] [Qemu-block] [PATCH v2 2/4] Introduce attributes to qemu timer subsystem

2018-10-17 Thread Paolo Bonzini
On 17/10/2018 11:12, Stefan Hajnoczi wrote: >> Attributes are simple flags, associated with individual timers for their >> whole lifetime. >> They intended to be used to mark individual timers for special handling by >> various qemu features operating at qemu core level. > I'm worried that this s

Re: [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices

2018-10-17 Thread Stefan Hajnoczi
On Fri, Oct 12, 2018 at 11:54:35PM -0300, Eduardo Habkost wrote: > This patch adds separate device types for each of those virtio > device flavors: > > - virtio-*-pci: the existing multi-purpose device types > - Configurable using `disable-legacy` and `disable-modern` > properties > - Lega

Re: [Qemu-devel] [PATCH v5 0/3] Bootstrap Python venv and acceptance/functional tests

2018-10-17 Thread Stefan Hajnoczi
On Tue, Oct 16, 2018 at 01:50:39PM -0400, Cleber Rosa wrote: > TL;DR > = > > Allow acceptance tests to be run with `make check-acceptance`. > > Details > === > > This introduces a Python virtual environment that will be setup within > the QEMU build directory, that will contain the exact

Re: [Qemu-devel] [PATCH] hw/acpi/nvdimm: Don't take address of fields in packed structs

2018-10-17 Thread Stefan Hajnoczi
On Tue, Oct 16, 2018 at 06:52:36PM +0100, Peter Maydell wrote: > Taking the address of a field in a packed struct is a bad idea, because > it might not be actually aligned enough for that pointer type (and > thus cause a crash on dereference on some host architectures). Newer > versions of clang wa

[Qemu-devel] [PATCH 0/1] Add PKU/OSPKE on Skylake-Server CPU model

2018-10-17 Thread Tao Xu
This patch adds PKU/OSPKE on Skylake-Server CPU model Tao Xu (1): i386: Add PKU/OSPKE on Skylake-Server CPU model target/i386/cpu.c | 4 1 file changed, 4 insertions(+) -- 2.17.1

[Qemu-devel] [PATCH 1/1] i386: Add PKU/OSPKE on Skylake-Server CPU model

2018-10-17 Thread Tao Xu
As the release document ref below link (page 13): https://software.intel.com/sites/default/files/managed/c5/15/\ architecture-instruction-set-extensions-programming-reference.pdf PKU is supported in Skylake Server (Only Server) and later, and on Intel(R) Xeon(R) Processor Scalable Family. OSPKE i

Re: [Qemu-devel] [Qemu-block] [PATCH] block/vhdx: Don't take address of fields in packed structs

2018-10-17 Thread Stefan Hajnoczi
On Tue, Oct 16, 2018 at 06:09:38PM +0100, Peter Maydell wrote: > Taking the address of a field in a packed struct is a bad idea, because > it might not be actually aligned enough for that pointer type (and > thus cause a crash on dereference on some host architectures). Newer > versions of clang wa

Re: [Qemu-devel] [Qemu-block] [PATCH] block/vdi: Don't take address of fields in packed structs

2018-10-17 Thread Stefan Hajnoczi
On Tue, Oct 16, 2018 at 06:25:03PM +0100, Peter Maydell wrote: > Taking the address of a field in a packed struct is a bad idea, because > it might not be actually aligned enough for that pointer type (and > thus cause a crash on dereference on some host architectures). Newer > versions of clang wa

Re: [Qemu-devel] [PATCH] Revert "icount: remove obsolete warp call"

2018-10-17 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > QEMU running with options "-icount,sleep=off -rtc clock=vm" doesn't > execute emulation at maximum possible speed. > Target virtual clock may run faster or slower than realtime clock by N > times, where N value depends on various unrelated condit

Re: [Qemu-devel] [PATCH] pckbd: Convert DPRINTF->trace

2018-10-17 Thread Stefan Hajnoczi
On Tue, Oct 16, 2018 at 12:22:32PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Signed-off-by: Dr. David Alan Gilbert > --- > hw/input/pckbd.c | 19 ++- > hw/input/trace-events | 7 +++ > 2 files changed, 13 insertions(+), 13 deletion

[Qemu-devel] [PATCH 0/3] Modern shell scripting (use $() instead of ``)

2018-10-17 Thread Mao Zhongyi
Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. On https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02920.html I just replaced `` in scripts dir, so this series is a thorough cleanup of all obsolete `` in the sour

[Qemu-devel] [PATCH 3/3] po/Makefile: Modern shell scripting (use $() instead of ``)

2018-10-17 Thread Mao Zhongyi
Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Cc: phi...@redhat.com Cc: peter.mayd...@linaro.org Cc: th...@redhat.com Cc: s...@weilnetz.de Signed-off-by: Mao Zhongyi --- po/Makefile | 2 +- 1 file changed, 1 insertion(

[Qemu-devel] [PATCH 2/3] debian-bootstrap.pre: Modern shell scripting (use $() instead of ``)

2018-10-17 Thread Mao Zhongyi
Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Cc: alex.ben...@linaro.org Cc: f...@redhat.com Cc: phi...@redhat.com Signed-off-by: Mao Zhongyi --- tests/docker/dockerfiles/debian-bootstrap.pre | 4 ++-- 1 file changed,

[Qemu-devel] [PATCH 1/3] qemu-iotests: Modern shellscripting (use $() instead of ``)

2018-10-17 Thread Mao Zhongyi
Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. `pwd` and `basename $0` are in 231 files under directory tests/qemu-iotests, so replaced it with the following: sed -i 's/`pwd`/$(pwd)/g' $(git grep -l "\`pwd\`") sed -i 's/`

Re: [Qemu-devel] modern virtio on HVF

2018-10-17 Thread Stefan Hajnoczi
On Tue, Oct 16, 2018 at 06:27:12PM +0300, Roman Bolshakov wrote: > Hello dear subscribers, > > I'm running Linux in QEMU on macOS with hvf accel enabled and having an > issue that is very similar to the KVM bug in nested KVM environments, > where KVM is run under another hypervisor: > https://bugs

Re: [Qemu-devel] [PATCH] hw/acpi/nvdimm: Don't take address of fields in packed structs

2018-10-17 Thread Philippe Mathieu-Daudé
On 16/10/2018 19:52, Peter Maydell wrote: > Taking the address of a field in a packed struct is a bad idea, because > it might not be actually aligned enough for that pointer type (and > thus cause a crash on dereference on some host architectures). Newer > versions of clang warn about this. Avoid

Re: [Qemu-devel] [PATCH] Revert "icount: remove obsolete warp call"

2018-10-17 Thread Artem Pisarenko
See my last comment in bug report. This kind of modification, even adapted to changed function name, doesn't solve issue. I thought long time that it does, but once I catched qemu with a hang. And of course, I wasn't able to reproduce it. So it just better hides issue. Take a look at alternative so

Re: [Qemu-devel] [Qemu-block] [PATCH] migration/block-dirty-bitmap: fix Coverity CID1390625

2018-10-17 Thread Stefan Hajnoczi
On Tue, Oct 16, 2018 at 04:20:18PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Theoretically possible that we finish the skipping loop with bs = NULL > and the following code will crash trying to dereference it. Fix that. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > migration/block-d

Re: [Qemu-devel] [PATCH 3/3] po/Makefile: Modern shell scripting (use $() instead of ``)

2018-10-17 Thread Thomas Huth
On 2018-10-17 11:44, Mao Zhongyi wrote: > Various shell files contain a mix between obsolete `` > and modern $(); It would be nice to convert to using $() > everywhere. > > Cc: phi...@redhat.com > Cc: peter.mayd...@linaro.org > Cc: th...@redhat.com > Cc: s...@weilnetz.de > > Signed-off-by: Mao Zh

Re: [Qemu-devel] [RFC 5/5] virtio-balloon: Safely handle BALLOON_PAGE_SIZE < host page size

2018-10-17 Thread David Hildenbrand
I am pretty sure that you can create misleading warnings in case you migrate at the wrong time. (migrate while half the 64k page is inflated, on the new host the other part is inflated - a warning when switching to another 64k page). >>> >>> Yes we can get bogus warnings across

Re: [Qemu-devel] When it's okay to treat OOM as fatal?

2018-10-17 Thread Stefan Hajnoczi
On Tue, Oct 16, 2018 at 03:01:29PM +0200, Markus Armbruster wrote: > Anything that pages commonly becomes unusable long before > allocations fail. Anything that overcommits will send you a (commonly > lethal) signal instead. Anything that tries handling OOM gracefully, > and manages to dodge both

[Qemu-devel] [PULL 00/15] qtest and misc patches

2018-10-17 Thread Thomas Huth
Hi Peter, the following changes since commit dddb37495b844270088e68e3bf30b764d48d863f: Merge remote-tracking branch 'remotes/awilliam/tags/vfio-updates-20181015.0' into staging (2018-10-15 18:44:04 +0100) are available in the git repository at: https://gitlab.com/huth/qemu.git tags/pull-r

[Qemu-devel] [PULL 10/15] mailmap: Fix Reimar Döffinger name

2018-10-17 Thread Thomas Huth
From: Philippe Mathieu-Daudé This probably happened when interpreting the utf8 name as latin1. Fixes dbbaaff6867 and f4e94dfefb6. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- .mailmap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.ma

Re: [Qemu-devel] [PATCH] call HotplugHandler->plug() as the last step in device realization

2018-10-17 Thread Stefan Hajnoczi
On Tue, Oct 16, 2018 at 03:33:40PM +0200, Igor Mammedov wrote: > When [2] was fixed it was agreed that adding and calling post_plug() > callback after device_reset() was low risk approach to hotfix issue > right before release. So it was merged instead of moving already > existing plug() callback a

[Qemu-devel] [PULL 04/15] tests: remove gcov-files- variables

2018-10-17 Thread Thomas Huth
From: Paolo Bonzini Commit 31d2dda ("build-system: remove per-test GCOV reporting", 2018-06-20) removed users of the variables, since those uses can be replaced by a simple overall report produced by gcovr. However, the variables were never removed. Do it now. Signed-off-by: Paolo Bonzini Revi

[Qemu-devel] [PULL 09/15] show-fixed-bugs.sh: Modern shell scripting (use $() instead of ``)

2018-10-17 Thread Thomas Huth
From: Mao Zhongyi Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Signed-off-by: Mao Zhongyi Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- scripts/show-fixed-bugs.sh | 10 +- 1 file changed, 5 insert

Re: [Qemu-devel] [PATCH] target/arm : add pvpanic mmio device

2018-10-17 Thread Philippe Mathieu-Daudé
Hi Peng, On 17/10/2018 11:23, Peng Hao wrote: > Add pvpanic mmio device that is similar to x86's pvpanic device. > > Signed-off-by: Peng Hao > --- > default-configs/arm-softmmu.mak | 2 +- > hw/arm/virt.c | 21 > hw/misc/Makefile.objs | 1 + > hw/misc

[Qemu-devel] [PULL 03/15] tests: Prevent more accidental test disabling

2018-10-17 Thread Thomas Huth
From: Eric Blake GNU make is perfectly happy to use 'check-FOO-y += bar' to initialize check-FOO-y. (GNU Automake strictly insists that you cannot use += until after an initial = per variable, but thankfully we aren't using automake). As we have had more than one instance where copy-and-paste o

[Qemu-devel] [PULL 06/15] MAINTAINERS: update block/sheepdog maintainers

2018-10-17 Thread Thomas Huth
From: Liu Yuan E-mail to one of block/sheepdog maintainers Mitake Hitoshi bounces : unknown user: "mitake.hitoshi" and no current address is known. So just remove it. Signed-off-by: Liu Yuan Reviewed-by: Markus Armbruster Signed-off-by: Thomas Huth --- MAINTAINERS | 1 - 1 file changed, 1

[Qemu-devel] [PULL 12/15] hw/core/generic-loader: Set a category for the generic-loader device

2018-10-17 Thread Thomas Huth
Each device that is instantiatable by the users should be marked with a category. Since the generic-loader does not fit anywhere else, put it into the MISC category. Reviewed-by: Alistair Francis Reviewed-by: Cornelia Huck Signed-off-by: Thomas Huth --- hw/core/generic-loader.c | 1 + 1 file c

[Qemu-devel] [PULL 15/15] configure: remove glib_subprocess check

2018-10-17 Thread Thomas Huth
From: Marc-André Lureau This should have been removed as part of commit 692fbdf9f4c6f6bafd0b3a4d4f94973effd3bbae. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- configure | 6 -- 1 file changed, 6 deletions(-)

[Qemu-devel] [PULL 11/15] qemu/compiler: Wrap __attribute__((flatten)) in a macro

2018-10-17 Thread Thomas Huth
Older versions of Clang (before 3.5) and GCC (before 4.1) do not support the "__attribute__((flatten))" yet. We don't care about such old versions of GCC anymore, but since Clang 3.4 is still used in EPEL for RHEL7 / CentOS 7, we should not use this attribute directly but with a wrapper macro inste

[Qemu-devel] [PULL 14/15] hw/core/generic-loader: Compile only once, not for each target

2018-10-17 Thread Thomas Huth
The generic-loader is currently compiled target specific due to one single "#ifdef TARGET_WORDS_BIGENDIAN" in the file. We have already a function called target_words_bigendian() for this instead, so we can put the generic-loader into common-obj to save some compilation time. Reviewed-by: Philippe

[Qemu-devel] [PULL 02/15] target/cris/translate: Get rid of qemu_log_separate()

2018-10-17 Thread Thomas Huth
The gen_BUG() function calls already cpu_abort(), which prints the information to stderr and the log already. So instead of additionally printing the dc->pc via fprintf() and qemu_log here, too, we can simply pass this information to cpu_abort() instead. Reviewed-by: Philippe Mathieu-Daudé Signed

Re: [Qemu-devel] [PATCH] Acceptance tests: host arch to target arch name mapping

2018-10-17 Thread Philippe Mathieu-Daudé
Hi Cleber, On 17/10/2018 01:22, Cleber Rosa wrote: > The host arch name is not always the target arch name, so it's > necessary to have a mapping. > > The configure scripts contains what is the authoritative and failproof > mapping, but, reusing it is not straightforward, so it's replicated in >

[Qemu-devel] [PULL 01/15] qemu-common.h: update copyright date to 2018

2018-10-17 Thread Thomas Huth
From: John Arbuckle Currently the copyright date is set to 2017. Update the date to say 2018. Signed-off-by: John Arbuckle Reviewed-by: Stefan Weil Signed-off-by: Thomas Huth --- include/qemu-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu-common.h b

[Qemu-devel] [PULL 07/15] archive-source.sh: Modern shell scripting (use $() instead of ``)

2018-10-17 Thread Thomas Huth
From: Mao Zhongyi Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Signed-off-by: Mao Zhongyi Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- scripts/archive-source.sh | 4 ++-- 1 file changed, 2 insertions(+),

[Qemu-devel] [PULL 05/15] gdbstub: Remove unused include

2018-10-17 Thread Thomas Huth
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Tested-by: Thomas Huth Signed-off-by: Thomas Huth --- gdbstub.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gdbstub.c b/gdbstub.c index c8478de..c4e4f9f 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -20,7 +20,6 @@ #include

Re: [Qemu-devel] [PATCH] Revert "icount: remove obsolete warp call"

2018-10-17 Thread Paolo Bonzini
On 17/10/2018 11:53, Artem Pisarenko wrote: > See my last comment in bug report. This kind of modification, even > adapted to changed function name, doesn't solve issue. > I thought long time that it does, but once I catched qemu with a hang. > And of course, I wasn't able to reproduce it. So it ju

  1   2   3   4   >