[PATCH RESEND v3 1/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-10 Thread xiaoqiang zhao
unix_listen/connect_saddr now support abstract address types two aditional BOOL switches are introduced: tight: whether to set @addrlen to the minimal string length, or the maximum sun_path length. default is TRUE abstract: whether we use abstract address. default is FALSE cli example: -mo

[PATCH RESEND v3 3/3] qemu-options: updates for abstract unix sockets

2020-05-10 Thread xiaoqiang zhao
add options documents changes for -chardev Signed-off-by: xiaoqiang zhao --- qemu-options.hx | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 292d4e7c0c..ce73014f8e 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2930,7 +

[PATCH RESEND v3 0/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-10 Thread xiaoqiang zhao
Resend this patch series as it does not meet patchew last time. By default qemu does not support abstract UNIX domain socket address. Add this ability to make qemu handy when abstract address is needed. Changes since v2: * reorganize code to cover both connect and listen * qapi related changes *

[PATCH RESEND v3 2/3] tests/util-sockets: add abstract unix socket cases

2020-05-10 Thread xiaoqiang zhao
add cases to test tight and non-tight for abstract address type Signed-off-by: xiaoqiang zhao --- tests/test-util-sockets.c | 83 +++ 1 file changed, 83 insertions(+) diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c index 5fd947c7bf..8042fb9

[Bug 1877794] Re: Constant Folding on 64-bit Subtraction causes SIGILL on linux-user glxgears ppc64le to x86_64 by way of generating bad shift instruction with c=-1

2020-05-10 Thread Laurent Vivier
** Tags added: linux-user ppc64le ** Tags added: tcg ** Tags removed: ppc64le ** Tags added: ppc64 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1877794 Title: Constant Folding on 64-bit Subtract

is there any way to make qemu stop at the very first instruction of the emulation process and wait for gdb connect?

2020-05-10 Thread tugouxp
is there any way to make qemu stop at the very first instruction of the emulation process and wait for gdb connect? for i want to know the boot sequence of the first instrction of the target system, how to get this? thank you .

[Bug 1877794] Re: Constant Folding on 64-bit Subtraction causes SIGILL on linux-user glxgears ppc64le to x86_64 by way of generating bad shift instruction with c=-1

2020-05-10 Thread Laurent Vivier
Which version of qemu and glxgears do you use? Tested with qemu-4.2 and qemu-5.0 and debian/sid mesa-utils-8.4.0-1+b1 and it works fine. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1877794 Title:

Re: Emulating Solaris 10 on SPARC64 sun4u

2020-05-10 Thread Mark Cave-Ayland
On 10/05/2020 03:46, jasper.low...@bt.com wrote: > Good idea. > > The ESCC device looks like it's written as a sysbus device. I think the > Ultra 5 has no devices on the root sabre bus. The serial controller is > behind the ebus (essentially isa). I'm guessing I would need to write a > wrapper de

[Bug 1868221] Re: /usr/share/applications/qemu.desktop should have an "Exec=" key.

2020-05-10 Thread Michael Tokarev
What's the actual problem we're trying to solve here? What needs to be tested? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1868221 Title: /usr/share/applications/qemu.desktop should have an "Exec

Re: [PATCH 01/11] plugins: Restrict functions handling hwaddr to system-mode

2020-05-10 Thread Philippe Mathieu-Daudé
On 5/9/20 3:09 PM, Philippe Mathieu-Daudé wrote: Restrict qemu_plugin_hwaddr_is_io() and qemu_plugin_hwaddr_device_offset() to system-mode. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/qemu-plugin.h | 2 ++ plugins/api.c | 17 ++--- 2 files changed, 4 ins

[PATCH] hw/sparc64/sun4u: Use memdev backend for main RAM

2020-05-10 Thread Philippe Mathieu-Daudé
TYPE_SUN4U_MEMORY does not do anything special. Replace it by the generic memdev allocated MemoryRegion and remove it. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc64/sun4u.c | 65 +++--- 1 file changed, 3 insertions(+), 62 deletions(-) diff --git a/

[RFC PATCH] hw/sparc/sun4m: Use memdev backend for main RAM

2020-05-10 Thread Philippe Mathieu-Daudé
Since commit 82b911aaff3, machine_run_board_init() checks for ram_memdev_id and consume it. As TYPE_SUN4M_MEMORY is no more needed, replace it by the generic memdev allocated MemoryRegion and remove it. This completes commit b2554752b1da7c8f. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/su

[PATCH v6 00/14] LUKS: encryption slot management using amend interface

2020-05-10 Thread Maxim Levitsky
Hi! Here is the updated series of my patches, incorporating all the feedback I received. This implements the API interface that we agreed upon except that I merged the LUKSKeyslotActive/LUKSKeyslotInactive union into a struct because otherwise I need nested unions which are not supported currentl

[PATCH v6 13/14] block/qcow2: implement blockdev-amend

2020-05-10 Thread Maxim Levitsky
Currently the implementation only supports amending the encryption options, unlike the qemu-img version Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/qcow2.c| 39 +++ qapi/block-core.json | 16 +++- 2 files change

[PATCH v6 03/14] block/amend: add 'force' option

2020-05-10 Thread Maxim Levitsky
'force' option will be used for some unsafe amend operations. This includes things like erasing last keyslot in luks based formats (which destroys the data, unless the master key is backed up by external means), but that _might_ be desired result. Signed-off-by: Maxim Levitsky Reviewed-by: Danie

[PATCH v6 01/14] qcrypto/core: add generic infrastructure for crypto options amendment

2020-05-10 Thread Maxim Levitsky
This will be used first to implement luks keyslot management. block_crypto_amend_opts_init will be used to convert qemu-img cmdline to QCryptoBlockAmendOptions Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/crypto.c | 17 + block/crypto.h

[PATCH v6 04/14] block/amend: separate amend and create options for qemu-img

2020-05-10 Thread Maxim Levitsky
Some options are only useful for creation (or hard to be amended, like cluster size for qcow2), while some other options are only useful for amend, like upcoming keyslot management options for luks Since currently only qcow2 supports amend, move all its options to a common macro and then include i

[PATCH v6 05/14] block/amend: refactor qcow2 amend options

2020-05-10 Thread Maxim Levitsky
Some qcow2 create options can't be used for amend. Remove them from the qcow2 create options and add generic logic to detect such options in qemu-img Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/qcow2.c | 108 ++--- qemu-img.c

[PATCH v6 07/14] block/crypto: implement the encryption key management

2020-05-10 Thread Maxim Levitsky
This implements the encryption key management using the generic code in qcrypto layer and exposes it to the user via qemu-img This code adds another 'write_func' because the initialization write_func works directly on the underlying file, and amend works on instance of luks device. This commit al

[PATCH v6 02/14] qcrypto/luks: implement encryption key management

2020-05-10 Thread Maxim Levitsky
Next few patches will expose that functionality to the user. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- crypto/block-luks.c | 395 +++- qapi/crypto.json| 61 ++- 2 files changed, 452 insertions(+), 4 deletions(-) diff --gi

[PATCH v6 08/14] block/qcow2: extend qemu-img amend interface with crypto options

2020-05-10 Thread Maxim Levitsky
Now that we have all the infrastructure in place, wire it in the qcow2 driver and expose this to the user. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/qcow2.c | 72 +- tests/qemu-iotests/082.out | 45 ++

[PATCH v6 09/14] iotests: filter few more luks specific create options

2020-05-10 Thread Maxim Levitsky
This allows more tests to be able to have same output on both qcow2 luks encrypted images and raw luks images Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- tests/qemu-iotests/087.out | 6 ++--- tests/qemu-iotests/134.out | 2 +- tests/qemu-iotests/158.out

[PATCH v6 14/14] iotests: add tests for blockdev-amend

2020-05-10 Thread Maxim Levitsky
This commit adds two tests that cover the new blockdev-amend functionality of luks and qcow2 driver Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- tests/qemu-iotests/295 | 279 + tests/qemu-iotests/295.out | 40 ++ tests/qemu-iotes

[PATCH v6 06/14] block/crypto: rename two functions

2020-05-10 Thread Maxim Levitsky
rename the write_func to create_write_func, and init_func to create_init_func. This is preparation for other write_func that will be used to update the encryption keys. No functional changes Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/crypto.c | 25

[PATCH v6 10/14] iotests: qemu-img tests for luks key management

2020-05-10 Thread Maxim Levitsky
This commit adds two tests, which test the new amend interface of both luks raw images and qcow2 luks encrypted images. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- tests/qemu-iotests/293 | 207 + tests/qemu-iotests/293.out | 99

[PATCH v6 12/14] block/crypto: implement blockdev-amend

2020-05-10 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/crypto.c | 72 qapi/block-core.json | 14 - 2 files changed, 66 insertions(+), 20 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index b14cb0ff06..61cbe4

[PATCH v6 11/14] block/core: add generic infrastructure for x-blockdev-amend qmp command

2020-05-10 Thread Maxim Levitsky
blockdev-amend will be used similiar to blockdev-create to allow on the fly changes of the structure of the format based block devices. Current plan is to first support encryption keyslot management for luks based formats (raw and embedded in qcow2) Signed-off-by: Maxim Levitsky Reviewed-by: Dan

Re: [PATCH v6 00/14] LUKS: encryption slot management using amend interface

2020-05-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200510134037.18487-1-mlevi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200510134037.18487-1-mlevi...@redhat.com Subject: [PATCH v6 00/14] LUKS: encryption slot management

Re: [PATCH v6 00/14] LUKS: encryption slot management using amend interface

2020-05-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200510134037.18487-1-mlevi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200510134037.18487-1-mlevi...@redhat.com Subject: [PATCH v6 00/14] LUKS: encryption slot management

[PATCH 1/7] hw/sparc/sun4m: Use UnimplementedDevice for I/O devices

2020-05-10 Thread Philippe Mathieu-Daudé
These devices are not slots on a bus, but real I/O devices that we do not implement. As the ISDN ROM would be a ROMD device, also model it as UnimplementedDevice. Reviewed-by: Artyom Tarasenko Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/sun4m.c | 11 +++ 1 file changed, 7 inserti

[PATCH 0/7] hw/misc/empty_slot: Spring cleaning

2020-05-10 Thread Philippe Mathieu-Daudé
New Spring, new opportunity to clean this device :) (v1 was in 2018, v2 in 2019). - lower device priority - follow qdev model and use properties - convert to trace events - describe with slot name - move under hw/misc/ and cover in MAINTAINERS Peter, I hope you are OK adding it wit UNIMP device,

[PATCH 7/7] hw/misc/empty_slot: Name the slots when created

2020-05-10 Thread Philippe Mathieu-Daudé
Directly set the slot name when creating the device, to display the device name in trace events. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/misc/empty_slot.h | 2 +- hw/mips/mips_malta.c | 2 +- hw/misc/empty_slot.c | 2 +- hw/sparc/sun4m.c | 10 +++--

[PATCH 6/7] hw/misc/empty_slot: Move the 'hw/misc' and cover in MAINTAINERS

2020-05-10 Thread Philippe Mathieu-Daudé
As this device model is very similar to the UnimplementedDevice, maintain them altogether. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/empty_slot.h| 9 - include/hw/misc/empty_slot.h | 19 +++ hw/mips/mips_malta.c | 2 +- hw/{core => misc}/e

[PATCH 2/7] hw/misc/empty_slot: Lower address space priority

2020-05-10 Thread Philippe Mathieu-Daudé
Empty slots model RAZ/WI access on a bus. Since we can still (hot) plug devices on the bus, lower the slot priority, so device added later is accessed first. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/empty_slot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core

[PATCH 3/7] hw/misc/empty_slot: Convert 'size' field as qdev property

2020-05-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/core/empty_slot.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c index 5ab426e965..0df086fe98 100644 --- a/hw/core/empty_slot.c +++ b/hw/core/empty_slot.c @@ -12,6 +12,7 @

[PATCH 4/7] hw/misc/empty_slot: Add a 'name' qdev property

2020-05-10 Thread Philippe Mathieu-Daudé
Add a 'name' qdev property so when multiple slots are accessed, we can notice which one is accessed. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/empty_slot.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c index 0df086fe

[PATCH 5/7] hw/misc/empty_slot: Convert debug printf() to trace event

2020-05-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/core/empty_slot.c | 19 --- hw/core/trace-events | 4 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c index 576b276c4b..d28f7f99c9 100644 --- a/hw/core/empty_slot.c +++

some fun with -vga virtio or -display gtk,gl=on

2020-05-10 Thread Michael Tokarev
Hi! I'm seeing somewhat strange behavior of the mentioned options. First is -vga virtio and regular gtk display - qemu opens initial window of size 640x480 (I think anyway), and this window stays of that size, at least while booting windows 10 (it uses stdvga driver), - it is not being resized wh

[PATCH 2/3] qemu/plugin: Move !CONFIG_PLUGIN stubs altogether

2020-05-10 Thread Philippe Mathieu-Daudé
Simplify the ifdef'ry by moving all stubs together. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/plugin.h | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index e45f950fe3..ab790ad105 1

[PATCH 0/3] plugins: Move declarations around and rename 'hwaddr' argument

2020-05-10 Thread Philippe Mathieu-Daudé
Rename qemu_plugin_hwaddr_is_io() 'hwaddr' argument to later allow declaration of the 'hwaddr' type to be poisoned (see [*]). [*] https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg02254.html "exec/cpu: Poison 'hwaddr' type in user-mode emulation" Philippe Mathieu-Daudé (3): qemu/plug

[PATCH 3/3] qemu/qemu-plugin: Make qemu_plugin_hwaddr_is_io() hwaddr argument const

2020-05-10 Thread Philippe Mathieu-Daudé
Rename qemu_plugin_hwaddr_is_io() address argument 'haddr' similarly to qemu_plugin_hwaddr_device_offset(), and make it const. Signed-off-by: Philippe Mathieu-Daudé --- Having the variable named similarly to the 'hwaddr' typedef is slighly confusing. Also if we declare 'hwaddr' typedef poisoned,

[PATCH 1/3] qemu/plugin: Trivial code movement

2020-05-10 Thread Philippe Mathieu-Daudé
Move the qemu_plugin_event enum declaration earlier. This will make the next commit easier to review. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/plugin.h | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/include/qemu/plugin.h b/inc

Re: [PATCH] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-05-10 Thread Ani Sinha
> On Apr 29, 2020, at 9:02 PM, Igor Mammedov wrote: > > On Fri, 24 Apr 2020 14:44:48 -0400 > Eduardo Habkost wrote: > >> On Fri, Apr 24, 2020 at 03:23:56PM +, Ani Sinha wrote: >>> >>> On Apr 22, 2020, at 4:15 PM, Ani Sinha wrote: > On Apr 21, 2020, at 8:32 PM

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-05-10 Thread Damir
Hello, I took a look today at the layouts when using 1950X (which previously worked, and yes, admittedly, I am using Windows / coreinfo), and any basic config (previously something simple as Sockets=1,Cores=8, Theads=1 (now also Dies=1) worked, but now, the topology presents as if all cores share

[PATCH 2/2] 9pfs: fix init_in_iov_from_pdu truncating size

2020-05-10 Thread Christian Schoenebeck
Commit SHA-1 16724a173049ac29c7b5ade741da93a0f46edff7 introduced truncating the response to the currently available transport buffer size, which was supposed to fix an 9pfs error on Xen boot where transport buffer might still be smaller than required for response. Unfortunately this change broke s

[PATCH 0/2] 9pfs: regression init_in_iov_from_pdu truncating size

2020-05-10 Thread Christian Schoenebeck
Stefano, looks like your original patch needs some more fine tuning: https://bugs.launchpad.net/bugs/1877688 Please check if the assumptions I made about Xen are correct, and please also test whether these changes still work for you with Xen as intended by you. Christian Schoenebeck (2): xen-9

[PATCH 1/2] xen-9pfs: Fix log messages of reply errors

2020-05-10 Thread Christian Schoenebeck
If delivery of some 9pfs response fails for some reason, log the error message by mentioning the 9P protocol reply type, not by client's request type. The latter could be misleading that the error occurred already when handling the request input. Signed-off-by: Christian Schoenebeck --- hw/9pfs/

Patches for ui/gtk and ui/sdl

2020-05-10 Thread Volker Rümelin
It's rather difficult to test qemu patches in guests on Windows with important keys missing. These patches mainly fix the guest keyboard on Windows. With best regards, Volker

[PATCH 03/10] ui/gkt: release all keys on grab-broken-event

2020-05-10 Thread Volker Rümelin
There is no way to grab the Ctrl-Alt-Del key combination on Windows. This key combination will leave all three keys in a stuck condition. This patch uses the grab-broken-event to release the keys. Signed-off-by: Volker Rümelin --- ui/gtk.c | 16 1 file changed, 16 insertions(+)

[PATCH 05/10] ui/gtk: remove unused variable ignore_keys

2020-05-10 Thread Volker Rümelin
Since the removal of GTK2 code the code around ignore_keys is unused. See commit 1a01716a30 "gtk: Avoid accel key leakage into guest on console switch" why it was needed before. Signed-off-by: Volker Rümelin --- ui/gtk.c | 9 - 1 file changed, 9 deletions(-) diff --git a/ui/gtk.c b/ui/g

[PATCH 01/10] ui/win32-kbd-hook: handle AltGr in a hook procedure

2020-05-10 Thread Volker Rümelin
Import win32 keyboard hooking code from project spice-gtk. This patch removes the extra left control key up/down input events inserted by Windows for the right alt key up/down input events with international keyboard layouts. Additionally there's some code to grab the keyboard. The next patches wi

[PATCH 02/10] ui/gtk: fix handling of AltGr key on Windows

2020-05-10 Thread Volker Rümelin
Wire up the keyboard hooking code on Windows to fix the AltGr key and improve keyboard grabbing. Signed-off-by: Volker Rümelin --- ui/gtk.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 83f2f5d49b..68c63532b1 100644 -

[PATCH 07/10] ui/sdl2: start in full screen with grab enabled

2020-05-10 Thread Volker Rümelin
To do it's work the sdl_grab_start() function needs a pointer to a sdl2_console structure. Signed-off-by: Volker Rümelin --- ui/sdl2.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index ec1cb8131f..c88ac97a79 100644 --- a/ui/sdl2.c +++ b/ui/s

Re: [PATCH 2/2] 9pfs: fix init_in_iov_from_pdu truncating size

2020-05-10 Thread Christian Schoenebeck
On Sonntag, 10. Mai 2020 19:18:21 CEST Christian Schoenebeck wrote: > Commit SHA-1 16724a173049ac29c7b5ade741da93a0f46edff7 introduced > truncating the response to the currently available transport buffer > size, which was supposed to fix an 9pfs error on Xen boot where > transport buffer might sti

[PATCH 06/10] ui/sdl2: fix handling of AltGr key on Windows

2020-05-10 Thread Volker Rümelin
Wire up the keyboard hooking code on Windows to fix the AltGr key and improve keyboard grabbing. Signed-off-by: Volker Rümelin --- ui/sdl2.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index 3c9424eb42..ec1cb8131f 100644 --- a/ui/sdl2.c +

[Bug 1877794] Re: Constant Folding on 64-bit Subtraction causes SIGILL on linux-user glxgears ppc64le to x86_64 by way of generating bad shift instruction with c=-1

2020-05-10 Thread Catherine A. Frederick
I'm on 5.0-rc4 add a few patches implementing a subset of drm/amdgpu support, with mesa-utils 8.4.0-1. Important note I guess: I can't get the crash to trigger under llvmpipe/softrast, I can only get it on RadeonSI. I valgrind'd qemu only to not find anything on the host-side. I'm 99% sure this isn

[PATCH 04/10] ui/gtk: remove unused code

2020-05-10 Thread Volker Rümelin
This code was last used before commit 2ec78706d1 "ui: convert GTK and SDL1 frontends to keycodemapdb". Signed-off-by: Volker Rümelin --- ui/gtk.c | 9 - 1 file changed, 9 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 5de2a75691..c70bfc2be4 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -

[PATCH 08/10] ui/sdl2-input: use trace-events to debug key events

2020-05-10 Thread Volker Rümelin
Signed-off-by: Volker Rümelin --- ui/sdl2-input.c | 3 +++ ui/trace-events | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ui/sdl2-input.c b/ui/sdl2-input.c index 1f9fe831b3..f068382209 100644 --- a/ui/sdl2-input.c +++ b/ui/sdl2-input.c @@ -27,6 +27,7 @@ #include "ui/console.h" #include

[PATCH 09/10] ui/gtk: don't pass on win keys without keyboard grab

2020-05-10 Thread Volker Rümelin
This patch applies commit c68f74b02e "win32: do not handle win keys when the keyboard is not grabbed" from project spice-gtk to ui/gtk.c. Signed-off-by: Volker Rümelin --- ui/gtk.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 5a25e3fa4c..a

[PATCH 10/10] ui/gtk: use native keyboard scancodes on Windows

2020-05-10 Thread Volker Rümelin
Since GTK 3.22 the function gdk_event_get_scancode() is available. On Windows this function returns keyboard scancodes and some extended flags. These raw keyboard scancodes are much better suited for this use case than the half-cooked win32 virtual-key codes because scancodes report the key positio

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-05-10 Thread Heiko Sieger
I upgraded to QEMU emulator version 5.0.50 Using q35-5.1 (the latest) and the following libvirt configuration: 50331648 50331648 24 hvm /usr/sha

Re: [PATCH 0/3] plugins: Move declarations around and rename 'hwaddr' argument

2020-05-10 Thread Emilio G. Cota
On Sun, May 10, 2020 at 19:11:16 +0200, Philippe Mathieu-Daudé wrote: > Rename qemu_plugin_hwaddr_is_io() 'hwaddr' argument to later > allow declaration of the 'hwaddr' type to be poisoned (see [*]). > > [*] https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg02254.html > "exec/cpu: Poiso

Re: [PATCH v4 08/10] hw/core/resettable: add support for warm reset

2020-05-10 Thread Philippe Mathieu-Daudé
Hi Damien, On 8/21/19 6:33 PM, Damien Hedde wrote: Add the RESET_TYPE_WARM reset type. Expand the actual implementation to support several types. I used values which can be or'ed together. This way we can what reset has been triggered. Documentation is added in a following patch. Signed-off-b

[PATCH] hw/registerfields: Prefix local variables with underscore in macros

2020-05-10 Thread Philippe Mathieu-Daudé
One can name a local variable holding a value as 'v', but it currently clashes with the registerfields macros. To save others to debug the same mistake, prefix the macro's local variables with an underscore. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/registerfields.h | 40 +

[PATCH 00/12] hw/mips/fuloong2e: PoC to fix hang after reboot

2020-05-10 Thread Philippe Mathieu-Daudé
The PMON firmware behave differently regarding it is run after a cold/warm reset. A simple bit flip fix the issue, however we need to know the type of reset to set it. Currently QEMU only supports COLD reset. This series contains various of my current Fuloong queue, - Welcome Huacai Chen as co-mai

[PATCH 03/12] hw/mips/fuloong2e: Move code and update a comment

2020-05-10 Thread Philippe Mathieu-Daudé
Move the RAM-related call closer to the RAM creation block, rename the ROM comment. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mips_fulong2e.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index f067fa9720..4e1a3

[PATCH 05/12] hw/pci-host: Use CONFIG_PCI_BONITO to select the Bonito North Bridge

2020-05-10 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Ease the kconfig selection by introducing CONFIG_PCI_BONITO to select the Bonito North Bridge. Reviewed-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/Kconfig | 1 + hw/pci-host/Kconfig | 4 hw/pci-host/Makefile.objs

[PATCH 01/12] MAINTAINERS: Add Huacai Chen as fuloong2e co-maintainer

2020-05-10 Thread Philippe Mathieu-Daudé
From: Huacai Chen I submitted the MIPS/fuloong2e support about ten years ago, and after that I became a MIPS kernel developer. Last year, Philippe Mathieu- Daudé asked me that whether I can be a reviewer of MIPS/fuloong2e, and I promised that I will do some QEMU work in the next year (i.e., 2020

[PATCH 02/12] hw/mips/fuloong2e: Rename PMON BIOS name

2020-05-10 Thread Philippe Mathieu-Daudé
I'm not sure where 'pmon_fulong2e.bin' comes from. As I always found this bios named 'pmon_2e.bin', rename the definition. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mips_fulong2e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_

[PATCH 08/12] hw/pci-host/bonito: Map all the Bonito64 I/O range

2020-05-10 Thread Philippe Mathieu-Daudé
To ease following guest accesses to the Bonito64 chipset, map its I/O range as UnimplementedDevice. We can now see the accesses to unimplemented peripheral using the '-d unimp' command line option. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 3 +++ hw/pci-host/Kconfig | 1 +

[PATCH 04/12] hw/mips/fuloong2e: Fix typo in Fuloong machine name

2020-05-10 Thread Philippe Mathieu-Daudé
We always miswrote the Fuloong machine... Fix its name. Add an machine alias to the previous name for backward compatibility. Suggested-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- docs/system/target-mips.rst | 2 +- default-configs/mips64el-softmmu.mak |

[PATCH 06/12] hw/pci-host/bonito: Fix DPRINTF() format strings

2020-05-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index b9bfe3c417..10ead31e4f 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -239,7 +239,7 @@ static

[PATCH 07/12] hw/pci-host/bonito: Map peripheral using physical address

2020-05-10 Thread Philippe Mathieu-Daudé
Peripherals are mapped at physical address on busses. Only CPU/IOMMU can use virtual addresses. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 10ead31e4f..7ed

[PATCH 09/12] hw/pci-host/bonito: Map the different PCI ranges more detailled

2020-05-10 Thread Philippe Mathieu-Daudé
Better describe the Bonito64 MEM HI/LO and I/O PCI ranges, add more PCI regions as unimplemented. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/

[PATCH 10/12] hw/pci-host/bonito: Better describe the I/O CS regions

2020-05-10 Thread Philippe Mathieu-Daudé
Better describe the I/O CS regions, add the ROMCS region. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 90a6c52a38..335c7787eb 100644 --- a/hw/pci

[PATCH 11/12] hw/pci-host/bonito: Set the Config register reset value with FIELD_DP32

2020-05-10 Thread Philippe Mathieu-Daudé
Describe some Config registers fields with the registerfields API. Use the FIELD_DP32() macro to set the BONGENCFG register bits at reset. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/hw/p

[NOTFORMERGE PATCH 12/12] POC hw/pci-host/bonito: Fix BONGENCFG value after a warm-reset

2020-05-10 Thread Philippe Mathieu-Daudé
The CPUSELFRESET bit should only be set on COLD reset. To have the PMON firmware behave correctly after WARM reset, we need to clear this bit. Signed-off-by: Philippe Mathieu-Daudé --- Cc: Damien Hedde --- hw/pci-host/bonito.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-10 Thread Raphael Norwitz
On Thu, May 7, 2020 at 11:35 AM Dima Stepanov wrote: > > What do you think? > Apologies - I tripped over the if (dev->started && r < 0) check. Never-mind my point with race conditions and failing migrations. Rather than modifying vhost_dev_set_log(), it may be clearer to put a check after vhost_

Re: [PATCH 02/12] hw/mips/fuloong2e: Rename PMON BIOS name

2020-05-10 Thread chen huacai
Hi, Philippe, On Mon, May 11, 2020 at 5:05 AM Philippe Mathieu-Daudé wrote: > > I'm not sure where 'pmon_fulong2e.bin' comes from. As I always > found this bios named 'pmon_2e.bin', rename the definition. > The Fuloong BIOS doesn't integrated in QEMU, so its name can be anything. So, let's keep

Re: [PATCH 03/12] hw/mips/fuloong2e: Move code and update a comment

2020-05-10 Thread chen huacai
Reviewed-by: Huacai Chen On Mon, May 11, 2020 at 5:03 AM Philippe Mathieu-Daudé wrote: > > Move the RAM-related call closer to the RAM creation block, > rename the ROM comment. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/mips/mips_fulong2e.c | 5 ++--- > 1 file changed, 2 insertions(+

Re: [PATCH 04/12] hw/mips/fuloong2e: Fix typo in Fuloong machine name

2020-05-10 Thread chen huacai
Hi, Philippe, On Mon, May 11, 2020 at 5:06 AM Philippe Mathieu-Daudé wrote: > > We always miswrote the Fuloong machine... Fix its name. > Add an machine alias to the previous name for backward > compatibility. > > Suggested-by: Aleksandar Markovic > Signed-off-by: Philippe Mathieu-Daudé > --- >

Re: [PATCH 05/12] hw/pci-host: Use CONFIG_PCI_BONITO to select the Bonito North Bridge

2020-05-10 Thread chen huacai
Reviewed-by: Huacai Chen On Mon, May 11, 2020 at 5:03 AM Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > Ease the kconfig selection by introducing CONFIG_PCI_BONITO to select > the Bonito North Bridge. > > Reviewed-by: Aleksandar Markovic > Signed-off-by: Philippe Mathieu-Da

Re: [PATCH 06/12] hw/pci-host/bonito: Fix DPRINTF() format strings

2020-05-10 Thread chen huacai
Reviewed-by: Huacai Chen On Mon, May 11, 2020 at 5:07 AM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/pci-host/bonito.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c > index b9bfe

Re: [PATCH 05/11] target/ppc: Restrict PPCVirtualHypervisorClass to system-mode

2020-05-10 Thread David Gibson
On Sat, May 09, 2020 at 03:09:04PM +0200, Philippe Mathieu-Daudé wrote: > The code related to PPC Virtual Hypervisor is pointless in user-mode. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > target/ppc/cpu.h| 4 ++-- > target/ppc/kvm_ppc.h

Re: [PATCH 09/11] target/cpu: Restrict handlers using hwaddr type to system-mode

2020-05-10 Thread David Gibson
On Sat, May 09, 2020 at 03:09:08PM +0200, Philippe Mathieu-Daudé wrote: > Restrict the following handlers to system-mode: > - do_unaligned_access > - do_transaction_failed > - get_phys_page_debug > - get_phys_page_attrs_debug > > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David G

Re: [PATCH v3 08/10] target/ppc: Use tcg_gen_gvec_rotlv

2020-05-10 Thread David Gibson
On Fri, May 08, 2020 at 08:10:53AM -0700, Richard Henderson wrote: > Cc: David Gibson > Signed-off-by: Richard Henderson Acked-by: David Gibson > --- > target/ppc/helper.h | 4 > target/ppc/int_helper.c | 17 - > target/ppc/translate/vmx-impl.

Re: [PATCH] ppc/pnv: Fix NMI system reset SRR1 value

2020-05-10 Thread David Gibson
On Fri, May 08, 2020 at 10:43:05AM +0200, Greg Kurz wrote: > On Thu, 7 May 2020 23:51:54 +1000 > David Gibson wrote: > > > On Thu, May 07, 2020 at 09:48:24PM +1000, Nicholas Piggin wrote: > > > Commit a77fed5bd926 ("ppc/pnv: Add support for NMI interface") got the > > Please note that the culpri

Re: [PATCH 0/6] target/ppc: Various clean-up and fixes for radix64

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:26:32PM +0200, Greg Kurz wrote: > First three patches of this series are simple cleanups. The other > ones fix some regressions introduced by Cedric's recent addition > of partition-scoped translation. 1-5/6 applied to ppc-for-5.1. I have some comments on 6/6. -- Davi

Re: [PATCH 10/10] exec: Move cpu_physical_memory_* functions to 'exec/memory-internal.h'

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:39:58PM +0200, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David Gibson > --- > include/exec/memory-internal.h | 305 - > include/exec/ram_addr.h| 303 +-

Re: [PATCH 07/10] exec: Move all RAMBlock functions to 'exec/ramblock.h'

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:39:55PM +0200, Philippe Mathieu-Daudé wrote: > The RAMBlock API was dispersed in 3 different headers. > One of these headers, "exec/ram_addr.h", is restricted > to target dependent code. However these functions are > not target specific. Move all functions into a single >

Re: [PATCH 05/10] exec: Move qemu_minrampagesize/qemu_maxrampagesize to 'qemu-common.h'

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:39:53PM +0200, Philippe Mathieu-Daudé wrote: > Move these generic functions to a more common place, with other > functions related to host page size. Document a little. > > Cc: Alexey Kardashevskiy > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David Gibs

Re: [PATCH] target/ppc: Add support for scv and rfscv instructions

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 09:53:28PM +1000, Nicholas Piggin wrote: > POWER9 adds scv and rfscv instructions and the system call vectored > interrupt. Linux does not support this instruction yet but it has > been tested with a modified kernel that runs on real hardware. > > Signed-off-by: Nicholas Pi

Re: [PATCH 6/6] target/ppc: Don't update radix PTE R/C bits with gdbstub

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:27:15PM +0200, Greg Kurz wrote: > gdbstub shouldn't silently change guest visible state when doing address > translation. While here drop a not very useful comment. > > This was found while reading the code. I could verify that this affects > both powernv and pseries, bu

Assertion Failure in virtio_net_reset

2020-05-10 Thread Alexander Bulekov
Hello, While fuzzing, I found an input that triggers an assertion failure in virtio-net.c: hw/net/virtio-net.c:533: void virtio_net_reset(VirtIODevice *): Assertion `!virtio_net_get_subqueue(nc)->async_tx.elem' failed. #9 0x55a33fa31b78 in virtio_net_reset hw/net/virtio-net.c:533:13 #10 0x55a33f

Re: [PATCH v2 2/5] vhost: introduce wrappers to set guest notifiers for virtio device

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: Introduce new wrappers to set/reset guest notifiers for the virtio device in the vhost device module: vhost_dev_assign_guest_notifiers ->set_guest_notifiers(..., ..., true); vhost_dev_drop_guest_notifiers ->set_guest_notifiers(..., ...,

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: Since disconnect can happen at any time during initialization not all vring buffers (for instance used vring) can be intialized successfully. If the buffer was not initialized then vhost_memory_unmap call will lead to SIGSEGV. Add checks for the vring a

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: If vhost-user daemon is used as a backend for the vhost device, then we should consider a possibility of disconnect at any moment. If such disconnect happened in the vhost_migration_log() routine the vhost device structure will be clean up. At the start

Assertion failure through virtio_lduw_phys_cached

2020-05-10 Thread Alexander Bulekov
Hello, While fuzzing, I found an input that triggers an assertion failure in address_space_lduw_le_cached: void address_space_stw_le_cached(MemoryRegionCache *, hwaddr, uint32_t, MemTxAttrs, MemTxResult *): Assertion `addr < cache->len && 2 <= cache->len - addr' failed. #8 0x7f53dabda091 in __as

Assertion failure through vring_split_desc_read

2020-05-10 Thread Alexander Bulekov
Hello, While fuzzing, I found an input that triggers an assertion failure through virtio-rng -> vring_split_desc_read. Maybe this is related to: Message-ID: <20200511033001.dzvtbdhl3oz5p...@mozz.bu.edu> Assertion failure through virtio_lduw_phys_cached #8 0x7fe6a9acf091 in __assert_fail /build/g

[PATCH] net: use peer when purging queue in qemu_flush_or_purge_queue_packets()

2020-05-10 Thread Jason Wang
The sender of packet will be checked in the qemu_net_queue_purge() but we use NetClientState not its peer when trying to purge the incoming queue in qemu_flush_or_purge_packets(). This will trigger the assert in virtio_net_reset since we can't pass the sender check. Fix by using the peer. Reporte

  1   2   >