Re: [PATCH v4 11/19] qapi/expr.py: Modify check_keys to accept any Collection

2021-03-25 Thread Markus Armbruster
John Snow writes: > This is a minor adjustment that allows the 'required' and 'optional' > keys fields to take a default value of an empty, immutable sequence (the > empty tuple). > > This reveals a quirk of this function, which is that "a + b" is > list-specific behavior. We can accept a wider v

Re: [PATCH v2 07/10] Acceptance Tests: set up SSH connection by default after boot for LinuxTest

2021-03-25 Thread Wainer dos Santos Moschetta
On 3/25/21 11:31 AM, Wainer dos Santos Moschetta wrote: Hi, On 3/23/21 7:15 PM, Cleber Rosa wrote: The LinuxTest specifically targets users that need to interact with Linux guests.  So, it makes sense to give a connection by default, and avoid requiring it as boiler-plate code. Signed-off-b

Re: [PATCH 07/15] Hexagon (target/hexagon) use softfloat default NaN and tininess

2021-03-25 Thread Richard Henderson
On 3/24/21 8:50 PM, Taylor Simpson wrote: @@ -180,6 +183,8 @@ static FloatParts parts_silence_nan(FloatParts a, float_status *status) #if defined(TARGET_HPPA) a.frac &= ~(1ULL << (DECOMPOSED_BINARY_POINT - 1)); a.frac |= 1ULL << (DECOMPOSED_BINARY_POINT - 2); +#elif defined(TARGET_

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-25 Thread Simon Tatham
Oops – naturally, I realised just *after* hitting send that it would have been a good idea to say exactly which git commit I was testing on. It was 9e2e9fe3df9f539f8b6941ceb96d25355fdae47e . -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to Q

Re: [PATCH 08/15] Hexagon (target/hexagon) replace float32_mul_pow2 with float32_scalbn

2021-03-25 Thread Richard Henderson
On 3/24/21 8:50 PM, Taylor Simpson wrote: Address feedback from Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/arch.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 1/1] avocado_qemu: Add SMMUv3 tests

2021-03-25 Thread Auger Eric
Hi Cleber, On 3/25/21 3:36 PM, Cleber Rosa wrote: > On Thu, Mar 25, 2021 at 10:57:12AM +0100, Eric Auger wrote: >> Add new tests checking the good behavior of the SMMUv3 protecting >> 2 virtio pci devices (block and net). We check the guest boots and >> we are able to install a package. Different

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-25 Thread Simon Tatham
Firstly, I agree with Peter's comment – this test image is exactly an example of what he describes, in that it carefully doesn't make any use of the value of SP it started up with (doesn't push or pop anything, doesn't make sp-relative offsets). Very near the start, it invokes SYS_HEAPINFO to decid

Re: [PATCH] hw/arm/smmuv3: Drop unused CDM_VALID() and is_cd_valid()

2021-03-25 Thread Auger Eric
Hi Zenghui, On 3/25/21 3:27 PM, Zenghui Yu wrote: > They were introduced in commit 9bde7f0674fe ("hw/arm/smmuv3: Implement > translate callback") but never actually used. Drop them. > > Signed-off-by: Zenghui Yu > --- > hw/arm/smmuv3-internal.h | 7 --- > 1 file changed, 7 deletions(-) > >

[PATCH RESEND] docs: clarify absence of set_features in vhost-user

2021-03-25 Thread Alyssa Ross
The previous wording was (at least to me) ambiguous about whether a backend should enable features immediately after they were set using VHOST_USER_SET_PROTOCOL_FEATURES, or wait for support for protocol features to be acknowledged if it hasn't been yet before enabling those features. This patch a

Re: [PATCH] iotests: Fix typo in iotest 051

2021-03-25 Thread Max Reitz
On 24.03.21 09:43, Tao Xu wrote: There is an typo in iotest 051, correct it. Signed-off-by: Tao Xu --- tests/qemu-iotests/051| 2 +- tests/qemu-iotests/051.pc.out | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) Thanks, applied to my block branch: https://git.xanclic.mo

[RFC 0/8] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci

2021-03-25 Thread Greg Kurz
Now that virtio-scsi-pci and virtio-blk-pci map 1 virtqueue per vCPU, a serious slow down may be observed on setups with a big enough number of vCPUs. Exemple with a pseries guest on a bi-POWER9 socket system (128 HW threads): 1 0m20.922s 0m21.346s 2 0m21.230s

[RFC 2/8] virtio: Introduce virtio_bus_set_host_notifiers()

2021-03-25 Thread Greg Kurz
Multiqueue devices such as virtio-scsi or virtio-blk, all open-code the same pattern to setup/tear down host notifiers of the request virtqueues. Consolidate the pattern in a new virtio_bus_set_host_notifiers() API. Since virtio-scsi and virtio-blk both fallback to userspace if host notifiers can't

[RFC 1/8] memory: Allow eventfd add/del without starting a transaction

2021-03-25 Thread Greg Kurz
Each addition or deletion of an eventfd happens in its own MR transaction. This doesn't scale well with multiqueue devices that do 1:1 queue:vCPU mapping (e.g. virtio-scsi-pci or virtio-blk-pci) : these devices typically create at least one eventfd per queue and memory_region_transaction_commit(),

[RFC 8/8] virtio-scsi: Use virtio_bus_set_host_notifiers()

2021-03-25 Thread Greg Kurz
This allows the virtio-scsi-pci device to batch additions and deletions of host notifiers. This significantly improves boot time of VMs with a high number of vCPUs, e.g. from 6m13.969s down to 1m4.268s for a pseries machine with 384 vCPUs. Signed-off-by: Greg Kurz --- hw/scsi/virtio-scsi-datapla

[RFC 6/8] virtio-blk: Use virtio_bus_set_host_notifiers()

2021-03-25 Thread Greg Kurz
This allows the virtio-blk-pci device to batch additions and deletions of host notifiers. This significantly improves boot time of VMs with a high number of vCPUs, e.g. from 3m26.408s down to 0m59.923s for a pseries machine with 384 vCPUs. Signed-off-by: Greg Kurz --- hw/block/dataplane/virtio-b

[RFC 3/8] virtio: Add API to batch set host notifiers

2021-03-25 Thread Greg Kurz
Introduce VirtioBusClass methods to begin and commit a transaction of setting/unsetting host notifiers. These handlers will be implemented by virtio-pci to batch addition and deletion of ioeventfds for multiqueue devices like virtio-scsi-pci or virtio-blk-pci. Convert virtio_bus_set_host_notifiers

[RFC 4/8] virtio-pci: Batch add/del ioeventfds in a single MR transaction

2021-03-25 Thread Greg Kurz
Implement the ioeventfd_assign_begin() and ioeventfd_assign_commit() handlers of VirtioBusClass. Basically track that a transaction was already requested by the device and use this information to prevent the memory code to generate a transaction for each individual eventfd. Devices that want to be

[PATCH v3 2/3] vhost-user-blk: perform immediate cleanup if disconnect on initialization

2021-03-25 Thread Denis Plotnikov
Commit 4bcad76f4c39 ("vhost-user-blk: delay vhost_user_blk_disconnect") introduced postponing vhost_dev cleanup aiming to eliminate qemu aborts because of connection problems with vhost-blk daemon. However, it introdues a new problem. Now, any communication errors during execution of vhost_dev_ini

[RFC 7/8] virtio-scsi: Set host notifiers and callbacks separately

2021-03-25 Thread Greg Kurz
Host notifiers are guaranteed to be idle until the callbacks are hooked up with virtio_queue_aio_set_host_notifier_handler(). They thus don't need to be set or unset with the AioContext lock held. Do this outside the critical section, like virtio-blk already does : basically splitting virtio_scsi_

[RFC 5/8] virtio-blk: Fix rollback path in virtio_blk_data_plane_start()

2021-03-25 Thread Greg Kurz
When dataplane multiqueue support was added in QEMU 2.7, the path that would rollback guest notifiers assignment in case of error simply got dropped. Later on, when Error was added to blk_set_aio_context() in QEMU 4.1, another error path was introduced, but it ommits to rollback both host and gues

[PATCH v3 1/3] vhost-user-blk: use different event handlers on initialization

2021-03-25 Thread Denis Plotnikov
It is useful to use different connect/disconnect event handlers on device initialization and operation as seen from the further commit fixing a bug on device initialization. This patch refactors the code to make use of them: we don't rely any more on the VM state for choosing how to cleanup the de

[PATCH v3 0/3] vhost-user-blk: fix bug on device disconnection during initialization

2021-03-25 Thread Denis Plotnikov
v3: * 0003: a new patch added fixing the problem on vm shutdown I stumbled on this bug after v2 sending. * 0001: gramma fixing (Raphael) * 0002: commit message fixing (Raphael) v2: * split the initial patch into two (Raphael) * rename init to realized (Raphael) * remove unrelated c

Re: [RFC v11 32/55] target/arm: move kvm-const.h, kvm.c, kvm64.c, kvm_arm.h to kvm/

2021-03-25 Thread Claudio Fontana
On 3/24/21 11:35 PM, Richard Henderson wrote: > On 3/23/21 9:46 AM, Claudio Fontana wrote: >> target/arm/kvm-stub.c | 24 > > Can you really get rid of this? calls in machine.c are protected by if (kvm_enabled()), so as long as the proto is in sight we can r

Re: [PATCH v3 6/7] hw/arm/smmuv3: Fix SMMU_CMD_CFGI_STE_RANGE handling

2021-03-25 Thread Auger Eric
Hi Zenghui, On 3/25/21 3:18 PM, Zenghui Yu wrote: > On 2021/3/9 18:27, Eric Auger wrote: >> If the whole SID range (32b) is invalidated (SMMU_CMD_CFGI_ALL), >> @end overflows and we fail to handle the command properly. >> >> Once this gets fixed, the current code really is awkward in the >> sense

Re: [PATCH v4 13/19] qapi/expr.py: Consolidate check_if_str calls in check_if

2021-03-25 Thread Markus Armbruster
John Snow writes: > This is a small rewrite to address some minor style nits. > > Don't compare against the empty list to check for the empty condition, and > move the normalization forward to unify the check on the now-normalized > structure. > > With the check unified, the local nested function

[PATCH v3 3/3] vhost-user-blk: add immediate cleanup on shutdown

2021-03-25 Thread Denis Plotnikov
Qemu crashes on shutdown if the chardev used by vhost-user-blk has been finalized before the vhost-user-blk. This happens with char-socket chardev operating in the listening mode (server). The char-socket chardev emits "close" event at the end of finalizing when its internal data is destroyed. Thi

Re: [PATCH 0/1] iotests: fix 051.out expected output after error

2021-03-25 Thread Max Reitz
On 18.03.21 21:09, Connor Kuehl wrote: Oops, sorry about the churn. I can see why this would have caused a failure but I'm surprised I can't reproduce this when I run the test locally. Christian, would you be willing to test this patch out as a quick sanity check too? Connor Kuehl (1): iotes

Re: [PATCH v4 02/19] flake8: Enforce shorter line length for comments and docstrings

2021-03-25 Thread Markus Armbruster
John Snow writes: > PEP8's BDFL writes: "For flowing long blocks of text with fewer > structural restrictions (docstrings or comments), the line length should > be limited to 72 characters." > > I do not like this patch. I have included it explicitly to recommend we > do not pay any further heed

Re: [PATCH v4 17/19] qapi/expr.py: Use tuples instead of lists for static data

2021-03-25 Thread Markus Armbruster
John Snow writes: > It is -- maybe -- possibly -- three nanoseconds faster. > > Signed-off-by: John Snow > Reviewed-by: Eduardo Habkost > Reviewed-by: Cleber Rosa > > --- > > This can be dropped if desired; it has no real functional impact I could > defend in code review court. I just happened

[PATCH for-6.0 0/4] Don't treat all sysbus devices as hotpluggable

2021-03-25 Thread Peter Maydell
On the two machines which have the "platform bus" (ppc e500 and arm virt) we currently treat all TYPE_SYS_BUS_DEVICE devices as being hotpluggable in the device callbacks, and try to plug those devices into the platform bus. This is far too broad, because only a handful of devices are actually val

[PATCH for-6.0 4/4] hw/ppc/e500plat: Only try to add valid dynamic sysbus devices to platform bus

2021-03-25 Thread Peter Maydell
The e500plat machine device plug callback currently calls platform_bus_link_device() for any sysbus device. This is overly broad, because platform_bus_link_device() will unconditionally grab the IRQs and MMIOs of the device it is passed, whether it was intended for the platform bus or not. Restri

[PATCH for-6.0 3/4] hw/arm/virt: Only try to add valid dynamic sysbus devices to platform bus

2021-03-25 Thread Peter Maydell
The virt machine device plug callback currently calls platform_bus_link_device() for any sysbus device. This is overly broad, because platform_bus_link_device() will unconditionally grab the IRQs and MMIOs of the device it is passed, whether it was intended for the platform bus or not. Restrict h

[PATCH v5 1/7] net/tap: Added TUNSETSTEERINGEBPF code.

2021-03-25 Thread Andrew Melnychenko
From: Andrew Additional code that will be used for eBPF setting steering routine. Signed-off-by: Andrew Melnychenko --- net/tap-linux.h | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tap-linux.h b/net/tap-linux.h index 2f36d100fc..1d06fe0de6 100644 --- a/net/tap-linux.h +++ b/net/tap-

[PATCH for-6.0 1/4] include/hw/boards.h: Document machine_class_allow_dynamic_sysbus_dev()

2021-03-25 Thread Peter Maydell
The function machine_class_allow_dynamic_sysbus_dev() is currently undocumented; add a doc comment. Signed-off-by: Peter Maydell --- include/hw/boards.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/hw/boards.h b/include/hw/boards.h index 4a90549ad85..27106abc11d 10

[PATCH v5 3/7] ebpf: Added eBPF RSS program.

2021-03-25 Thread Andrew Melnychenko
From: Andrew RSS program and Makefile to build it. The bpftool used to generate '.h' file. The data in that file may be loaded by libbpf. EBPF compilation is not required for building qemu. You can use Makefile if you need to regenerate rss.bpf.skeleton.h. Signed-off-by: Yuri Benditovich Signed

[PATCH for-6.0 2/4] machine: Provide a function to check the dynamic sysbus whitelist

2021-03-25 Thread Peter Maydell
Provide a new function dynamic_sysbus_dev_allowed() which checks the per-machine whitelist of dynamic sysbus devices and returns a boolean result indicating whether the device is whitelisted. We can use this in the implementation of validate_sysbus_device(), but we will also need it so that machine

[PATCH v5 5/7] virtio-net: Added eBPF RSS to virtio-net.

2021-03-25 Thread Andrew Melnychenko
From: Andrew When RSS is enabled the device tries to load the eBPF program to select RX virtqueue in the TUN. If eBPF can be loaded the RSS will function also with vhost (works with kernel 5.8 and later). Software RSS is used as a fallback with vhost=off when eBPF can't be loaded or when hash pop

[PATCH v5 7/7] MAINTAINERS: Added eBPF maintainers information.

2021-03-25 Thread Andrew Melnychenko
From: Andrew Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5e4be6b667..0f74778ed7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3304,6 +3304,14 @@ F: include/hw/remo

[PATCH v5 0/7] eBPF RSS support for virtio-net

2021-03-25 Thread Andrew Melnychenko
This set of patches introduces the usage of eBPF for packet steering and RSS hash calculation: * RSS(Receive Side Scaling) is used to distribute network packets to guest virtqueues by calculating packet hash * Additionally adding support for the usage of RSS with vhost The eBPF works on kernels 5.

[PATCH v5 6/7] docs: Added eBPF documentation.

2021-03-25 Thread Andrew Melnychenko
From: Andrew Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- docs/devel/ebpf_rss.rst | 125 docs/devel/index.rst| 1 + 2 files changed, 126 insertions(+) create mode 100644 docs/devel/ebpf_rss.rst diff --git a/docs/devel/eb

[PATCH v5 0/5] virtiofsd: Add support to enable/disable posix acls

2021-03-25 Thread Vivek Goyal
Hi, This is V5 of the patches. Changes since V4: - Added support to clear SGID while setting posix access acl. fuse client sends this information in a flag in SETXATTR message. This also requires opting in for using SETXATTR V2. These patches have dependency on fuse kernel patches. So kerne

[PATCH v5 2/7] net: Added SetSteeringEBPF method for NetClientState.

2021-03-25 Thread Andrew Melnychenko
From: Andrew For now, that method supported only by Linux TAP. Linux TAP uses TUNSETSTEERINGEBPF ioctl. Signed-off-by: Andrew Melnychenko --- include/net/net.h | 2 ++ net/tap-bsd.c | 5 + net/tap-linux.c | 13 + net/tap-solaris.c | 5 + net/tap-stub.c| 5

[PATCH v5 3/5] virtiofsd: Add an option to enable/disable posix acls

2021-03-25 Thread Vivek Goyal
fuse has an option FUSE_POSIX_ACL which needs to be opted in by fuse server to enable posix acls. As of now we are not opting in for this, so posix acls are disabled on virtiofs by default. Add virtiofsd option "-o posix_acl/no_posix_acl" to let users enable/disable posix acl support. By default i

[PATCH v5 2/5] virtiofsd: Add capability to change/restore umask

2021-03-25 Thread Vivek Goyal
When parent directory has default acl and a file is created in that directory, then umask is ignored and final file permissions are determined using default acl instead. (man 2 umask). Currently, fuse applies the umask and sends modified mode in create request accordingly. fuse server can set FUSE

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-25 Thread Peter Maydell
Since this is an M-profile board, "SP is literally uninitialised at this point" isn't correct unless the loaded image failed to provide a valid vector table, because M-profile loads the initial SP from there. Generally for bare metal programs, the linker has a much better idea of what would be a go

[PATCH v5 4/7] ebpf: Added eBPF RSS loader.

2021-03-25 Thread Andrew Melnychenko
From: Andrew Added function that loads RSS eBPF program. Added stub functions for RSS eBPF loader. Added meson and configuration options. By default, eBPF feature enabled if libbpf is present in the build system. libbpf checked in configuration shell script and meson script. Signed-off-by: Yuri

Re: [PATCH v4 01/19] qapi/expr: Comment cleanup

2021-03-25 Thread Markus Armbruster
John Snow writes: > Fixes: 0825f62c842 For a slightly peculiar value of "fixes" ;) > Signed-off-by: John Snow > --- > scripts/qapi/expr.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py > index 540b3982b1..c207481f7e 100644

Re: [PATCH v4 00/19] qapi: static typing conversion, pt3

2021-03-25 Thread Markus Armbruster
John Snow writes: > Hi, this series adds static types to the QAPI module. > This is part three, and it focuses on expr.py. > > Environment: > - Python >= 3.6, <= 3.8 * > - mypy >= 0.770 > - pylint >= 2.6.0 > - flake8 > - isort > > Every commit should pass with (from ./scripts/): > - flake8 qapi/

Re: [RFC PATCH v2 4/5] Add migration support for KVM guest with MTE

2021-03-25 Thread Juan Quintela
Haibo Xu wrote: > To make it easier to keep the page tags sync with > the page data, tags for one page are appended to > the data during ram save iteration. > > This patch only add the pre-copy migration support. > Post-copy and compress as well as zero page saving > are not supported yet. > > Sig

[PATCH v5 4/5] virtiofsd: Add support for setxattr_v2

2021-03-25 Thread Vivek Goyal
Add the bits to enable support for setxattr_v2 if fuse offers it. Signed-off-by: Vivek Goyal --- include/standard-headers/linux/fuse.h | 12 +++- tools/virtiofsd/fuse_common.h | 6 tools/virtiofsd/fuse_lowlevel.c | 42 ++- tools/virtiofsd/fuse_lowl

[PATCH v5 1/5] virtiofsd: Add umask to seccom allow list

2021-03-25 Thread Vivek Goyal
Patches in this series are going to make use of "umask" syscall. So allow it. Signed-off-by: Vivek Goyal Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/passthrough_seccomp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virtiofsd/passthrough_seccomp.c b/tools/virtiofsd/passthrou

[PATCH v5 5/5] virtiofsd: Switch creds, drop FSETID for system.posix_acl_access xattr

2021-03-25 Thread Vivek Goyal
When posix access acls are set on a file, it can lead to adjusting file permissions (mode) as well. If caller does not have CAP_FSETID and it also does not have membership of owner group, this will lead to clearing SGID bit in mode. Current fuse code is written in such a way that it expects file s

Re: [PATCH V4] file-posix: allow -EBUSY error during ioctl(fd, BLKZEROOUT, range) on block

2021-03-25 Thread Nir Soffer
On Thu, Mar 25, 2021 at 8:07 AM ChangLimin wrote: > >On Wed, Mar 24, 2021 at 4:52 PM Max Reitz wrote: > >On 22.03.21 10:25, ChangLimin wrote: > >> For Linux 5.10/5.11, qemu write zeros to a multipath device using > >> ioctl(fd, BLKZEROOUT, range) with cache none or directsync return -EBUSY > >>

Re: [PATCH v5 0/7] eBPF RSS support for virtio-net

2021-03-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210325153529.75831-1-and...@daynix.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210325153529.75831-1-and...@daynix.com Subject: [PATCH v5 0/7] eBPF RSS support for virtio

Re: [PATCH v3 0/4] yank: Add chardev tests and fixes

2021-03-25 Thread Lukas Straub
On Tue, 23 Mar 2021 18:57:32 +0100 Lukas Straub wrote: > Hello Everyone, > These patches increase test coverage for yank, add tests and fix bugs and > crashes in yank in combination with chardev-change. > Please Review. > > Regards, > Lukas Straub > > Changes: > -v3: > -Base on > ([PATCH 0/

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-25 Thread Simon Tatham
Yes, fair enough. I suppose what I meant was that that particular part of the startup code was *regarding* SP as being uninitialised: it didn't read it, or use it, or set it on purpose to any kind of interim temp value before calling SYS_HEAPINFO. It's true, of course, that this particular image d

Re: [PATCH 09/15] Hexagon (target/hexagon) use softfloat for float-to-int conversions

2021-03-25 Thread Richard Henderson
On 3/25/21 10:09 AM, Richard Henderson wrote: On 3/24/21 8:50 PM, Taylor Simpson wrote: @@ -451,16 +456,28 @@ int32_t HELPER(conv_sf2w)(CPUHexagonState *env, float32 RsV)   {   int32_t RdV;   arch_fpop_start(env); -    RdV = conv_sf_to_4s(RsV, &env->fp_status); +    /* Hexagon returns -

Re: [PATCH v5 0/5] virtiofsd: Add support to enable/disable posix acls

2021-03-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210325153852.572927-1-vgo...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210325153852.572927-1-vgo...@redhat.com Subject: [PATCH v5 0/5] virtiofsd: Add support to

Re: [PATCH 10/15] Hexagon (target/hexagon) instructions with multiple definitions

2021-03-25 Thread Richard Henderson
On 3/24/21 8:50 PM, Taylor Simpson wrote: Instructions with multiple definitions require special handling because the generator wants to create a helper, but helpers can only return a single result. Therefore, we must override the generated code. The following instructions are added A4_add

Re: [PATCH 09/15] Hexagon (target/hexagon) use softfloat for float-to-int conversions

2021-03-25 Thread Richard Henderson
On 3/24/21 8:50 PM, Taylor Simpson wrote: @@ -451,16 +456,28 @@ int32_t HELPER(conv_sf2w)(CPUHexagonState *env, float32 RsV) { int32_t RdV; arch_fpop_start(env); -RdV = conv_sf_to_4s(RsV, &env->fp_status); +/* Hexagon returns -1 for NaN */ +if (float32_is_any_nan(RsV))

Re: [PULL 0/2] Block patches

2021-03-25 Thread Stefan Hajnoczi
On Thu, Mar 25, 2021 at 01:17:50PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 25.03.2021 12:56, Stefan Hajnoczi wrote: > > On Wed, Mar 24, 2021 at 08:42:27PM +, Peter Maydell wrote: > > > On Wed, 24 Mar 2021 at 20:18, Vladimir Sementsov-Ogievskiy > > > wrote: > > > > > > > > 24.03.2021 21:0

Re: [PATCH 3/5] tools/vhost-user-i2c: Add backend driver

2021-03-25 Thread Arnd Bergmann
On Wed, Mar 24, 2021 at 8:33 AM Viresh Kumar wrote: > +static uint8_t vi2c_xfer(VuDev *dev, struct i2c_msg *msg) > +{ > +VuI2c *i2c = container_of(dev, VuI2c, dev.parent); > +struct i2c_rdwr_ioctl_data data; > +VI2cAdapter *adapter; > + > +adapter = vi2c_find_adapter(i2c, msg->add

Re: [PATCH 11/15] Hexagon (target/hexagon) circular addressing

2021-03-25 Thread Richard Henderson
On 3/24/21 8:50 PM, Taylor Simpson wrote: +/* + * Many instructions will work with just macro redefinitions + * with the caveat that they need a tmp variable to carry a + * value between them. + */ +#define fGEN_TCG_tmp(SHORTCODE) \ +do { \ +TCGv tmp = tcg_temp_new(); \ +SHORT

Re: [PATCH 4/6] hw/ide/via: Replace magic 2 value by ARRAY_SIZE / MAX_IDE_DEVS

2021-03-25 Thread John Snow
On 3/24/21 1:54 PM, Philippe Mathieu-Daudé wrote: +for (i = 0; i < ARRAY_SIZE(d->bus); i++) { +ide_bus_new(&d->bus[i], sizeof(d->bus[i]), ds, i, MAX_IDE_DEVS); I bet nothing good happens if this value is ever not 2, but I bet that's no worse than the current reality. :) ACK

Re: [PATCH 12/15] Hexagon (target/hexagon) bit reverse (brev) addressing

2021-03-25 Thread Richard Henderson
On 3/24/21 8:50 PM, Taylor Simpson wrote: +static inline void gen_fbrev(TCGv result, TCGv src) +{ +/* + * Bit reverse the low 16 bits of the address + */ +TCGv tmp = tcg_temp_new(); +tcg_gen_andi_tl(result, src, 0x); +for (int i = 0; i < 16; i++) { +tcg_ge

Re: [PATCH 5/6] hw/ide/via: Connect IDE function output IRQs to the ISA function input

2021-03-25 Thread John Snow
On 3/24/21 1:54 PM, Philippe Mathieu-Daudé wrote: To avoid abusing isa_get_irq(NULL) using a hidden ISA bridge under the hood, let the IDE function expose 2 output IRQs, and connect them to the ISA function inputs when creating the south bridge chipset model in vt82c686b_southbridge_init. Signed

[PATCH v2 for-6.0?] hw/pci-host/gpex: Don't fault for unmapped parts of MMIO and PIO windows

2021-03-25 Thread Peter Maydell
Currently the gpex PCI controller implements no special behaviour for guest accesses to areas of the PIO and MMIO where it has not mapped any PCI devices, which means that for Arm you end up with a CPU exception due to a data abort. Most host OSes expect "like an x86 PC" behaviour, where bad acces

Re: [PATCH 14/15] Hexagon (target/hexagon) load into shifted register instructions

2021-03-25 Thread Richard Henderson
On 3/24/21 8:50 PM, Taylor Simpson wrote: +tcg_gen_shli_i64(tmp_i64, tmp_i64, 48); \ +tcg_gen_shri_i64(RyyV, RyyV, 16); \ +tcg_gen_or_i64(RyyV, RyyV, tmp_i64); \ shr + deposit. r~

Re: [PULL 0/2] Block patches

2021-03-25 Thread Peter Maydell
On Thu, 25 Mar 2021 at 16:28, Stefan Hajnoczi wrote: > > On Thu, Mar 25, 2021 at 01:17:50PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > Thanks! My path modifies migration/block-dirty-bitmap.c. qsd-jobs runs > > block-commit and block-stream jobs and don't start any kind of migration or > > sn

Re: [PATCH v2] piix: fix regression during unplug in Xen HVM domUs

2021-03-25 Thread Paolo Bonzini
On 25/03/21 12:12, Olaf Hering wrote: Am Mon, 22 Mar 2021 18:09:17 -0400 schrieb John Snow : My understanding is that XEN has some extra disks that it unplugs when it later figures out it doesn't need them. How exactly this works is something I've not looked into too closely. It has no extra

Re: [PATCH 15/15] Hexagon (target/hexagon) CABAC decode bin

2021-03-25 Thread Richard Henderson
On 3/24/21 8:50 PM, Taylor Simpson wrote: +#define fINSERT_RANGE(INREG, HIBIT, LOWBIT, INVAL) \ +INREG = (((HIBIT) - (LOWBIT) - 1) ? \ +deposit64((INREG), (LOWBIT), ((HIBIT) - (LOWBIT) + 1), (INVAL)) : \ +INREG) The -1 and +1 on the length of the field doesn't look right. Wh

[Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing

2021-03-25 Thread Peter Maydell
Could you provide an example QEMU command line and guest image file which you were having this problem with, please? That would save me figuring out how to build zephyr binaries :-) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. http

qemu-system-aarch64 crashes with device ich9-usb-ehci1

2021-03-25 Thread Thomas Huth
In case anybody is interested, ich9-usb-ehci1 can be used to crash QEMU: $ ./qemu-system-aarch64 -M virt -device ich9-usb-ehci1,help qemu-system-aarch64: ../../devel/qemu/softmmu/physmem.c:1154: phys_section_add: Assertion `map->sections_nb < TARGET_PAGE_SIZE' failed. Aborted (core dumped)

Re: [RFC 0/8] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci

2021-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2021 at 04:07:27PM +0100, Greg Kurz wrote: > Now that virtio-scsi-pci and virtio-blk-pci map 1 virtqueue per vCPU, > a serious slow down may be observed on setups with a big enough number > of vCPUs. > > Exemple with a pseries guest on a bi-POWER9 socket system (128 HW threads): >

Re: [PATCH v2 for-6.0?] hw/pci-host/gpex: Don't fault for unmapped parts of MMIO and PIO windows

2021-03-25 Thread Richard Henderson
On 3/25/21 10:33 AM, Peter Maydell wrote: Currently the gpex PCI controller implements no special behaviour for guest accesses to areas of the PIO and MMIO where it has not mapped any PCI devices, which means that for Arm you end up with a CPU exception due to a data abort. Most host OSes expect

Re: [PATCH v2 for-6.0?] hw/pci-host/gpex: Don't fault for unmapped parts of MMIO and PIO windows

2021-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2021 at 04:33:15PM +, Peter Maydell wrote: > Currently the gpex PCI controller implements no special behaviour for > guest accesses to areas of the PIO and MMIO where it has not mapped > any PCI devices, which means that for Arm you end up with a CPU > exception due to a data ab

Re: qemu-system-aarch64 crashes with device ich9-usb-ehci1

2021-03-25 Thread Richard Henderson
On 3/25/21 10:58 AM, Thomas Huth wrote: In case anybody is interested, ich9-usb-ehci1 can be used to crash QEMU: $ ./qemu-system-aarch64 -M virt -device ich9-usb-ehci1,help qemu-system-aarch64: ../../devel/qemu/softmmu/physmem.c:1154: phys_section_add: Assertion `map->sections_nb < TARGET_PAGE

[PATCH v2] qapi: introduce 'query-cpu-model-cpuid' action

2021-03-25 Thread Valeriy Vdovin
Introducing new qapi method 'query-cpu-model-cpuid'. This method can be used to get virtualized cpu model info generated by QEMU during VM initialization in the form of cpuid representation. Diving into more details about virtual cpu generation: QEMU first parses '-cpu' command line option. From t

Re: [PATCH v1 1/8] hw/intc: GICv3 ITS initial framework

2021-03-25 Thread Alex Bennée
Shashi Mallela writes: > Added register definitions relevant to ITS,implemented overall > ITS device framework with stubs for ITS control and translater > regions read/write,extended ITS common to handle mmio init between > existing kvm device and newer qemu device. > > Signed-off-by: Shashi Ma

Re: [PATCH v1 1/8] hw/intc: GICv3 ITS initial framework

2021-03-25 Thread Alex Bennée
Shashi Mallela writes: > Added register definitions relevant to ITS,implemented overall > ITS device framework with stubs for ITS control and translater > regions read/write,extended ITS common to handle mmio init between > existing kvm device and newer qemu device. > > Signed-off-by: Shashi Ma

Bug with Windows tap network when running qemu-system-ppc with Mac OS 9 guest

2021-03-25 Thread Howard Spoelstra
Hi, When running qemu-system-ppc with Mac OS guest, the guest crashes when using a tap network connection. Openvpn 2.4.9-I601-win10 is installed with TAP-Windows 9.24.2. A tap connection called TapQemu is bridged with the default ethernet connection. It gets activated when I start qemu. To reprod

Re: [PATCH for-6.0 0/4] Don't treat all sysbus devices as hotpluggable

2021-03-25 Thread Richard Henderson
On 3/25/21 9:33 AM, Peter Maydell wrote: On the two machines which have the "platform bus" (ppc e500 and arm virt) we currently treat all TYPE_SYS_BUS_DEVICE devices as being hotpluggable in the device callbacks, and try to plug those devices into the platform bus. This is far too broad, because

Re: Bug with Windows tap network when running qemu-system-ppc with Mac OS 9 guest

2021-03-25 Thread Peter Maydell
(adding the relevant people to the cc list) On Thu, 25 Mar 2021 at 17:26, Howard Spoelstra wrote: > > Hi, > > When running qemu-system-ppc with Mac OS guest, the guest crashes when > using a tap network connection. Openvpn 2.4.9-I601-win10 is installed > with TAP-Windows 9.24.2. A tap connection

RE: [PATCH 11/15] Hexagon (target/hexagon) circular addressing

2021-03-25 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Thursday, March 25, 2021 11:34 AM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: phi...@redhat.com; a...@rev.ng; Brian Cain > Subject: Re: [PATCH 11/15] Hexagon (target/hexagon) circular addressing > > On 3/24/21 8:50 PM, Taylor

Re: [PULL 0/2] Block patches

2021-03-25 Thread Stefan Hajnoczi
On Thu, Mar 25, 2021 at 04:36:43PM +, Peter Maydell wrote: > On Thu, 25 Mar 2021 at 16:28, Stefan Hajnoczi wrote: > > > > On Thu, Mar 25, 2021 at 01:17:50PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > Thanks! My path modifies migration/block-dirty-bitmap.c. qsd-jobs runs > > > block

Re: [RFC 0/8] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci

2021-03-25 Thread Stefan Hajnoczi
On Thu, Mar 25, 2021 at 01:05:16PM -0400, Michael S. Tsirkin wrote: > On Thu, Mar 25, 2021 at 04:07:27PM +0100, Greg Kurz wrote: > > Now that virtio-scsi-pci and virtio-blk-pci map 1 virtqueue per vCPU, > > a serious slow down may be observed on setups with a big enough number > > of vCPUs. > > >

Re: [PATCH v2 04/10] Acceptance Tests: move useful ssh methods to base class

2021-03-25 Thread Wainer dos Santos Moschetta
Hi, On 3/25/21 9:50 AM, Auger Eric wrote: Hi Cleber, On 3/24/21 11:23 PM, Cleber Rosa wrote: On Wed, Mar 24, 2021 at 10:07:31AM +0100, Auger Eric wrote: Hi Cleber, On 3/23/21 11:15 PM, Cleber Rosa wrote: Both the virtiofs submounts and the linux ssh mips malta tests contains useful methods

Re: [PATCH 10/28] qapi: Rework name checking in preparation of stricter checking

2021-03-25 Thread John Snow
On 3/25/21 2:18 AM, Markus Armbruster wrote: John Snow writes: On 3/24/21 1:57 AM, Markus Armbruster wrote: John Snow writes: On 3/23/21 5:40 AM, Markus Armbruster wrote: Naming rules differ for the various kinds of names. To prepare enforcing them, define functions to check them: check_

Re: [PATCH 13/28] qapi: Enforce event naming rules

2021-03-25 Thread John Snow
On 3/25/21 2:22 AM, Markus Armbruster wrote: John Snow writes: On 3/24/21 2:22 AM, Markus Armbruster wrote: John Snow writes: On 3/23/21 5:40 AM, Markus Armbruster wrote: Event names should be ALL_CAPS with words separated by underscore. Enforce this. The only offenders are in tests/. F

[PATCH for-6.0 1/2] docs/system/gdb.rst: Add some more heading structure

2021-03-25 Thread Peter Maydell
We're about to add a new section to gdb.rst. In preparation, add some more headings so it isn't just one huge run-on section. Signed-off-by: Peter Maydell --- docs/system/gdb.rst | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/system/gdb.rst b/docs/system/gdb.rst

[PATCH for-6.0 2/2] docs/system/gdb.rst: Document how to debug multicore machines

2021-03-25 Thread Peter Maydell
Document how multicore machines appear to GDB when debugged via the debug stub. This is particularly non-intuitive for the "multiple heterogenous clusters" case, but unfortunately as far as I know there is no way with the remote protocol for the stub to tell gdb "I have 2 inferiors, please connect

[PATCH for-6.0 0/2] document gdbstub debugging of multicore machines

2021-03-25 Thread Peter Maydell
The way gdb and our gdbstub handle multicore and multicluster machines is not very obvious. This patchset adds some documentation of how to do it. In particular it gives the necessary runes for how to get gdb to work with machines which have multiple clusters of heterogenous CPUs (that's the sifiv

Re: [PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by default

2021-03-25 Thread Wainer dos Santos Moschetta
Hi, On 3/24/21 6:10 AM, Auger Eric wrote: Hi Cleber, On 3/23/21 11:15 PM, Cleber Rosa wrote: For users of the LinuxTest class, let's set up the VM with the port redirection for SSH, instead of requiring each test to set the same also sets the network device to virtio-net. This may be worth me

Re: [PATCH v1 0/8] GICv3 LPI and ITS feature implementation

2021-03-25 Thread Alex Bennée
Shashi Mallela writes: > This patchset implements qemu device model for enabling physical > LPI support and ITS functionality in GIC as per GICv3 specification. > Both flat table and 2 level tables are implemented.The ITS commands > for adding/deleting ITS table entries,trigerring LPI interrupts

Re: [RFC 0/8] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci

2021-03-25 Thread Greg Kurz
On Thu, 25 Mar 2021 13:05:16 -0400 "Michael S. Tsirkin" wrote: > On Thu, Mar 25, 2021 at 04:07:27PM +0100, Greg Kurz wrote: > > Now that virtio-scsi-pci and virtio-blk-pci map 1 virtqueue per vCPU, > > a serious slow down may be observed on setups with a big enough number > > of vCPUs. > > > > E

[Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing

2021-03-25 Thread Martin Schönstedt
qemu-system-arm -cpu cortex-m33 -machine mps2-an521 -nographic -m 16 -vga none -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -icount shift=7,align=off,sleep=off -rtc clock=vm -device loader,file=/zephyr.elf -s -S -kernel /zephyr.elf i've included both .e

Re: [PATCH v2 03/10] Python: add utility function for retrieving port redirection

2021-03-25 Thread John Snow
On 3/23/21 6:15 PM, Cleber Rosa wrote: Slightly different versions for the same utility code are currently present on different locations. This unifies them all, giving preference to the version from virtiofs_submounts.py, because of the last tweaks added to it. While at it, this adds a "qemu.u

Re: [PATCH v4 09/10] Add the function of colo_bitmap_clear_diry.

2021-03-25 Thread Dr. David Alan Gilbert
* leirao (lei@intel.com) wrote: > From: "Rao, Lei" > > When we use continuous dirty memory copy for flushing ram cache on > secondary VM, we can also clean up the bitmap of contiguous dirty > page memory. This also can reduce the VM stop time during checkpoint. > > Signed-off-by: Lei Rao >

Re: [PATCH v2 for-6.0?] hw/pci-host/gpex: Don't fault for unmapped parts of MMIO and PIO windows

2021-03-25 Thread Philippe Mathieu-Daudé
Hi Peter, On 3/25/21 5:33 PM, Peter Maydell wrote: > Currently the gpex PCI controller implements no special behaviour for > guest accesses to areas of the PIO and MMIO where it has not mapped > any PCI devices, which means that for Arm you end up with a CPU > exception due to a data abort. > > M

Re: [PATCH v2 0/5] qemu-iotests: quality of life improvements

2021-03-25 Thread Max Reitz
On 23.03.21 19:19, Paolo Bonzini wrote: This series adds a few usability improvements to qemu-iotests, in particular: - arguments can be passed to Python unittests scripts, for example to run only a subset of the test cases (patches 1-2) - it is possible to do "./check -- ../../../tests/qemu

<    1   2   3   >