Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd.

2021-06-09 Thread Yuri Benditovich
On Thu, Jun 10, 2021 at 9:41 AM Jason Wang wrote: > > > 在 2021/6/9 下午6:04, Andrew Melnychenko 写道: > > Libvirt usually launches qemu with strict permissions. > > To enable eBPF RSS steering, qemu-ebpf-rss-helper was added. > > > A silly question: > > Kernel had the following permission checks in bp

[PATCH 10/11] target/i386/monitor: Move SEV specific commands to sev.c

2021-06-09 Thread Philippe Mathieu-Daudé
Having the HMP/QMP commands defined in monitor.c makes the stubs rather complicated when SEV is not built in. To simplify, move the SEV functions to sev.c, and remove a layer of stubs. Also make it clearer when SEV is not built in, so developers don't try to enable it when it is not enablable: -

[PATCH 06/11] target/i386/sev: Remove sev_get_me_mask()

2021-06-09 Thread Philippe Mathieu-Daudé
Unused dead code makes review harder, so remove it. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/sev_i386.h | 1 - target/i386/sev-stub.c | 5 - target/i386/sev.c | 9 - 3 files changed, 15 deletions(-) diff --git a/target/i386/sev_i386.h b/target/i386/sev_i386.h index

[PATCH 08/11] target/i386/sev: sev_get_attestation_report use g_autofree

2021-06-09 Thread Philippe Mathieu-Daudé
From: "Dr. David Alan Gilbert" Removes a whole bunch of g_free's and a goto. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Connor Kuehl Reviewed-by: Brijesh Singh Message-Id: <20210603113017.34922-1-dgilb...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- target/i386/sev.c | 11 +

[PATCH 11/11] monitor: Restrict 'info sev' to x86 targets

2021-06-09 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/monitor/hmp-target.h | 1 + include/monitor/hmp.h | 1 - target/i386/sev-sysemu-stub.c | 2 +- target/i386/sev.c | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/monitor/hmp-target.h b/include/mon

[PATCH 09/11] target/i386/sev: Restrict SEV to system emulation

2021-06-09 Thread Philippe Mathieu-Daudé
SEV is irrelevant on user emulation, so restrict it to sysemu. Some stubs are still required because used in cpu.c by x86_register_cpudef_types(), so move the sysemu specific stubs to sev-sysemu-stub.c instead. This will allow us to simplify monitor.c (which is not available in user emulation) in t

[PATCH 07/11] target/i386/sev: Mark unreachable code with g_assert_not_reached()

2021-06-09 Thread Philippe Mathieu-Daudé
The unique sev_encrypt_flash() invocation (in pc_system_flash_map) is protected by the "if (sev_enabled())" check, so is not reacheable. Replace the abort() call in sev_es_save_reset_vector() by g_assert_not_reached() which meaning is clearer. Signed-off-by: Philippe Mathieu-Daudé --- target/i38

[PATCH 04/11] target/i386/cpu: Add missing 'qapi/error.h' header

2021-06-09 Thread Philippe Mathieu-Daudé
Commit 00b81053244 ("target-i386: Remove assert_no_error usage") forgot to add the "qapi/error.h", add it now. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a9fe1662d39..694031e4aec 1006

[PATCH 05/11] target/i386/sev_i386.h: Remove unused headers

2021-06-09 Thread Philippe Mathieu-Daudé
Declarations don't require these headers, remove them. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/sev_i386.h | 4 target/i386/sev-stub.c | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/target/i386/sev_i386.h b/target/i386/sev_i386.h index ae6d8404787..f4223f1

[PATCH 03/11] target/i386/monitor: Return QMP error when SEV is disabled in build

2021-06-09 Thread Philippe Mathieu-Daudé
If the management layer tries to inject a secret, it gets an empty response in case the binary built without SEV: { "execute": "sev-inject-launch-secret", "arguments": { "packet-header": "mypkt", "secret": "mypass", "gpa": 4294959104 } } { "return": { } } Make it clearer

[PATCH 02/11] qapi/misc-target: Group SEV QAPI definitions

2021-06-09 Thread Philippe Mathieu-Daudé
There is already a section with various SEV commands / types, so move the SEV guest attestation together. Signed-off-by: Philippe Mathieu-Daudé --- qapi/misc-target.json | 75 +-- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/qapi/misc-ta

[PATCH 01/11] MAINTAINERS: Add Connor Kuehl as reviewer for AMD SEV

2021-06-09 Thread Philippe Mathieu-Daudé
From: Connor Kuehl It may not be appropriate for me to take over as a maintainer at this time, but I would consider myself familiar with AMD SEV and what this code is meant to be doing as part of a VMM for launching SEV-protected guests. To that end, I would be happy to volunteer as a reviewer f

[PATCH 00/11] target/i386/sev: Housekeeping helping using SEV-disabled binaries

2021-06-09 Thread Philippe Mathieu-Daudé
Hi, I wasted some time trying to figure out how OVMF was supposed to behave until realizing the binary I was using was built without SEV support... Then wrote this series to help other developers to not hit the same problem. Some SEV patches I was following have been queued on Eduardo's 'x86-next'

Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd.

2021-06-09 Thread Jason Wang
在 2021/6/9 下午6:04, Andrew Melnychenko 写道: Libvirt usually launches qemu with strict permissions. To enable eBPF RSS steering, qemu-ebpf-rss-helper was added. A silly question: Kernel had the following permission checks in bpf syscall:    if (sysctl_unprivileged_bpf_disabled && !bpf_cap

Re: [PATCH v4 00/13] [RfC] fix tracing for modules

2021-06-09 Thread Gerd Hoffmann
On Wed, Jun 09, 2021 at 04:14:12PM +0100, Stefan Hajnoczi wrote: > On Tue, Jun 01, 2021 at 03:24:01PM +0200, Gerd Hoffmann wrote: > > First version that actually works. Only qxl covered for this RfC, > > other modules will follow once the basics are hashed out. > > > > v4: > > - rebase to latest

Re: [PATCH v2 18/18] [fixup] module_load_modinfo

2021-06-09 Thread Gerd Hoffmann
On Thu, Jun 10, 2021 at 07:57:55AM +0200, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Oops. That should have been squashed into patch #13. take care, Gerd

Re: [PATCH v6 3/4] Jobs based on custom runners: docs and gitlab-runner setup playbook

2021-06-09 Thread Thomas Huth
On 08/06/2021 05.14, Cleber Rosa wrote: To have the jobs dispatched to custom runners, gitlab-runner must be installed, active as a service and properly configured. The variables file and playbook introduced here should help with those steps. The playbook introduced here covers the Linux distri

[Bug 1921948] Re: MTE tags not checked properly for unaligned accesses at EL1

2021-06-09 Thread Thomas Huth
Thanks for opening the new ticket. I'm closing this one here on Launchpad now so that we don't accidentally migrate it later automatically. ** Changed in: qemu Status: Confirmed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subs

Re: [PATCH v6 4/4] Jobs based on custom runners: add job definitions for QEMU's machines

2021-06-09 Thread Thomas Huth
On 08/06/2021 05.14, Cleber Rosa wrote: The QEMU project has two machines (aarch64 and s390x) that can be used for jobs that do build and run tests. This introduces those jobs, which are a mapping of custom scripts used for the same purpose. Signed-off-by: Cleber Rosa --- .gitlab-ci.d/custom

Re: [RFC PATCH 2/4] target/ppc: divided mmu_helper.c in 2 files

2021-06-09 Thread David Gibson
On Mon, Jun 07, 2021 at 03:35:06PM -0300, Lucas Mateus Martins Araujo e Castro wrote: > > On 06/06/2021 23:31, David Gibson wrote: > > On Wed, Jun 02, 2021 at 04:26:02PM -0300, Lucas Mateus Castro (alqotel) > > wrote: > > > Moved functions in mmu_helper.c that should be compiled in build to > >

[PATCH v2 18/18] [fixup] module_load_modinfo

2021-06-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- util/module.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/module.c b/util/module.c index 564b8e3da760..4f98cc74ae37 100644 --- a/util/module.c +++ b/util/module.c @@ -158,7 +158,7 @@ static void module_load_modinfo(void) {

[PATCH v2 16/18] modules: use modinfo for qemu opts load

2021-06-09 Thread Gerd Hoffmann
Use module database to figure which module adds given QemuOpts group. Signed-off-by: Gerd Hoffmann --- softmmu/vl.c| 17 - stubs/module-opts.c | 4 util/module.c | 19 +++ 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/softmmu

[PATCH v2 12/18] modules: add module_load_path_init helper

2021-06-09 Thread Gerd Hoffmann
Factor out module search path initialization to the new module_load_path_init() helper. Also store the search path in global variables and keep it so we have to do it only once. Signed-off-by: Gerd Hoffmann --- util/module.c | 58 ++- 1 file chang

[PATCH v2 13/18] modules: load modinfo.json

2021-06-09 Thread Gerd Hoffmann
Load and parse the module info database. Signed-off-by: Gerd Hoffmann --- util/module.c | 54 +++ util/trace-events | 3 +++ 2 files changed, 57 insertions(+) diff --git a/util/module.c b/util/module.c index 3a2d6dde9734..b0ea8c57d438 100644 ---

[PATCH v2 15/18] modules: use modinfo for qom load

2021-06-09 Thread Gerd Hoffmann
Use module database to figure which module implements a given QOM type. Drop hard-coded object list. Signed-off-by: Gerd Hoffmann --- util/module.c | 83 +++ 1 file changed, 30 insertions(+), 53 deletions(-) diff --git a/util/module.c b/util/modul

[PATCH v2 08/18] modules: add ccid module annotations

2021-06-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/ccid-card-emulated.c | 1 + hw/usb/ccid-card-passthru.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index 5c76bed77aa0..6c8c0355e099 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/cc

[PATCH v2 14/18] modules: use modinfo for dependencies

2021-06-09 Thread Gerd Hoffmann
Use module database for module dependencies. Drop hard-coded dependency list. Signed-off-by: Gerd Hoffmann --- util/module.c | 55 --- 1 file changed, 21 insertions(+), 34 deletions(-) diff --git a/util/module.c b/util/module.c index b0ea8c57d438.

[PATCH v2 10/18] modules: add s390x module annotations

2021-06-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/s390x/virtio-ccw-gpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c index 75a9e4bb3908..5868a2a07093 100644 --- a/hw/s390x/virtio-ccw-gpu.c +++ b/hw/s390x/virtio-ccw-gpu.c @@ -59,6 +59,7 @@ static

[PATCH v2 04/18] modules: add virtio-gpu module annotations

2021-06-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/display/vhost-user-gpu-pci.c | 1 + hw/display/vhost-user-gpu.c | 1 + hw/display/vhost-user-vga.c | 1 + hw/display/virtio-gpu-base.c| 1 + hw/display/virtio-gpu-gl.c | 3 +++ hw/display/virtio-gpu-pci-gl.c | 3 +++ hw/display/virtio-gpu-pci.

[PATCH v2 09/18] modules: add ui module annotations

2021-06-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- ui/egl-headless.c | 4 ui/gtk.c | 4 ui/sdl2.c | 4 ui/spice-app.c| 3 +++ ui/spice-core.c | 5 + 5 files changed, 20 insertions(+) diff --git a/ui/egl-headless.c b/ui/egl-headless.c index da377a74af69..75404e0e8700 10064

[PATCH v2 11/18] modules: add block module annotations

2021-06-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- block/iscsi-opts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/iscsi-opts.c b/block/iscsi-opts.c index afaf8837d6c1..4f2da405e645 100644 --- a/block/iscsi-opts.c +++ b/block/iscsi-opts.c @@ -68,3 +68,4 @@ static void iscsi_block_opts_init(void) }

[PATCH v2 03/18] modules: add qemu-modinfo utility

2021-06-09 Thread Gerd Hoffmann
Scan .modinfo sections of qemu modules, write module metadata to modinfo.json. Signed-off-by: Gerd Hoffmann --- qemu-modinfo.c | 270 + meson.build| 11 ++ 2 files changed, 281 insertions(+) create mode 100644 qemu-modinfo.c diff --git a/qem

[PATCH v2 07/18] modules: add usb-redir module annotations

2021-06-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/redirect.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 6a75b0dc4ab2..4ec9326e0582 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -2608,6 +2608,7 @@ static const TypeInfo usbredir_dev_info = {

[PATCH v2 06/18] modules: add audio module annotations

2021-06-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- audio/spiceaudio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c index 999bfbde47c5..a8d370fe6f31 100644 --- a/audio/spiceaudio.c +++ b/audio/spiceaudio.c @@ -317,3 +317,5 @@ static void register_audio_spice(void)

[PATCH v2 17/18] modules: check arch and block load on mismatch

2021-06-09 Thread Gerd Hoffmann
Add module_allow_arch() to set the target architecture. In case a module is limited to some arch verify arches match and ignore the module if not. Signed-off-by: Gerd Hoffmann --- include/qemu/module.h | 1 + softmmu/vl.c | 3 +++ util/module.c | 15 +++ 3 files ch

[PATCH v2 01/18] modules: add metadata macros, add qxl module annotations

2021-06-09 Thread Gerd Hoffmann
Stealing an idea from the linux kernel: Place module metadata in an .modinfo elf section. This patch adds macros and qxl module annotations as example. Signed-off-by: Gerd Hoffmann --- include/qemu/module.h | 22 ++ hw/display/qxl.c | 4 2 files changed, 26 inser

[PATCH v2 05/18] modules: add chardev module annotations

2021-06-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- chardev/baum.c | 1 + chardev/spice.c | 4 2 files changed, 5 insertions(+) diff --git a/chardev/baum.c b/chardev/baum.c index 5deca778bc44..79d618e35045 100644 --- a/chardev/baum.c +++ b/chardev/baum.c @@ -680,6 +680,7 @@ static const TypeInfo char_braille

[PATCH v2 02/18] qapi: add ModuleInfo schema

2021-06-09 Thread Gerd Hoffmann
Add QAPI schema for the module info database. Signed-off-by: Gerd Hoffmann --- qapi/meson.build | 1 + qapi/modules.json | 36 qapi/qapi-schema.json | 1 + 3 files changed, 38 insertions(+) create mode 100644 qapi/modules.json diff --git a/qapi/m

[PATCH v2 00/18] modules: add metadata database

2021-06-09 Thread Gerd Hoffmann
This patch series adds support for module metadata. Here are the pieces of the puzzle: (1) Macros are added to store metadata in a .modinfo elf section (idea stolen from the linux kernel). (2) A utility to scan modules, collect metadata from the .modinfo sections, store it in a fi

Re: [PULL 00/12] Machine and OS X changes for 2021-06-08

2021-06-09 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Jun 08, 2021 at 11:40:05AM +0200, Paolo Bonzini wrote: >> The following changes since commit 6f398e533f5e259b4f937f4aa9de970f7201d166: >> >> Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210604' >> into staging (2021-06-05 11:25:52 +0100

Re: [PATCH 1/1] hw/nvme: namespace parameter for EUI64

2021-06-09 Thread Klaus Jensen
On Jun 9 22:15, Heinrich Schuchardt wrote: Am 9. Juni 2021 21:57:26 MESZ schrieb Klaus Jensen : On Jun 9 20:13, Heinrich Schuchardt wrote: Am 9. Juni 2021 16:39:20 MESZ schrieb "Daniel P. Berrangé" : On Wed, Jun 09, 2021 at 02:33:08PM +0200, Klaus Jensen wrote: On Jun 9 14:21, Heinrich Sc

Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional

2021-06-09 Thread Thomas Huth
On 09/06/2021 14.50, Gerd Hoffmann wrote: Hi, The #if CONFIG_SDL approach will not work because qemu will continue to report sdl as supported even when the sdl module is not installed any more. I guess we'd need a separate QMP command to fix that, which tries to load the modules first when

Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional

2021-06-09 Thread Markus Armbruster
Gerd Hoffmann writes: > Hi, > >> > The #if CONFIG_SDL approach will not work because qemu will continue to >> > report sdl as supported even when the sdl module is not installed any >> > more. >> >> I guess we'd need a separate QMP command to fix that, which tries to load >> the modules first

Re: [PATCH 53/55] target/arm: Implement MVE VHCADD

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: +#define DO_HADD(N, M) (((int64_t)(N) + (int64_t)(M)) >> 1) +#define DO_HSUB(N, M) (((int64_t)(N) - (int64_t)(M)) >> 1) You've already got do_vhadd_[us] defined from vadd[su]... r~

[Bug 1921948] Re: MTE tags not checked properly for unaligned accesses at EL1

2021-06-09 Thread Peter Collingbourne
I happened to notice that you're moving your bug tracker to gitlab so I refiled this issue over there: https://gitlab.com/qemu- project/qemu/-/issues/403 ** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #403 https://gitlab.com/qemu-project/qemu/-/issues/403 -- You received this bug n

Re: [PATCH V2 0/2] vhost-vDPA: vq notification map support

2021-06-09 Thread Jason Wang
在 2021/6/2 下午4:41, Jason Wang 写道: Hi All: This series tries to implement doorbell mapping support for vhost-vDPA. Tested with virtio-pci vDPA driver. Please review. Changes since V1: - use dev->vq_index to calculate the virtqueue index - remove the unused host_notifier_set Jason Wang (2):

Re: [PATCH] vl: Fix an assert failure in error path

2021-06-09 Thread Peng Liang
On 6/9/2021 8:15 PM, Daniel P. Berrangé wrote: > On Wed, Jun 09, 2021 at 02:09:47PM +0200, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> On 10/06/21 10:47, Zhenzhong Duan wrote: Based on the description of error_setg(), the local variable err in qemu_maybe_daemonize() should b

Re: TCG op for 32 bit only cpu on qemu-riscv64

2021-06-09 Thread LIU Zhiwei
On 6/7/21 11:52 PM, Richard Henderson wrote: On 6/6/21 8:07 PM, LIU Zhiwei wrote: Hi Alistair, As I see,  we are moving  on to remove TARGET_RISCV64 macro. I have some questions: 1) Which tcg op should use when translate an instruction for 32bit cpu. The tcg_*_i64, tcg_*_i32 or tcg_*_tl?

Re: [PATCH v7 0/4] Add support for ipv6 host forwarding

2021-06-09 Thread Doug Evans
Ping. On Fri, May 28, 2021 at 4:53 PM Doug Evans wrote: > This patchset takes the original patch from Maxim, > https://www.mail-archive.com/qemu-devel@nongnu.org/msg569573.html > and updates it. > > Option hostfwd is extended to support ipv6 addresses. > Commands hostfwd_add, hostfwd_remove are

[RFC v1] virtio/vsock: add two more queues for datagram types

2021-06-09 Thread Jiang Wang
Datagram sockets are connectionless and unreliable. The sender does not know the capacity of the receiver and may send more packets than the receiver can handle. Add two more dedicate virtqueues for datagram sockets, so that it will not unfairly steal resources from stream and future connection-or

[PATCH 1/2] tests: migration-test: Still run the rest even if uffd missing

2021-06-09 Thread Peter Xu
Currently we'll skip the whole migration-test if uffd missing. It's a bit harsh - we can still run the rest besides postcopy! Enable them when we still can. It'll happen more frequently now after kernel UFFD_USER_MODE_ONLY introduced in commit 37cd0575b8510159, as qemu test normally requires ker

[PATCH 0/2] tests: migration-test: Fix agressive test skip, add dirty ring test

2021-06-09 Thread Peter Xu
Based-on: <20210609014355.217110-1-pet...@redhat.com> Patch 1 is a fix for migration test not really running on new kernels. The problem is uffd check now will constantly fail after upstream commit 37cd0575b8510159 - that means any host kernel newer than 5.11. Patch 1 makes it slightly better by

[PATCH 2/2] tests: migration-test: Add dirty ring test

2021-06-09 Thread Peter Xu
Add dirty ring test if kernel supports it. Add the dirty ring parameter on source should be mostly enough, but let's change the dest too to make them match always. Signed-off-by: Peter Xu --- tests/qtest/migration-test.c | 51 +--- 1 file changed, 48 insertions(+

Re: [PATCH 2/2] nbd: Add new qemu:joint-allocation metadata context

2021-06-09 Thread Nir Soffer
On Wed, Jun 9, 2021 at 9:01 PM Eric Blake wrote: > > When trying to reconstruct a qcow2 chain using information provided > over NBD, ovirt had been relying on an unsafe assumption that any > portion of the qcow2 file advertised as sparse would defer to the > backing image; this worked with what qe

Re: [RFC libnbd PATCH] info: Add support for new qemu:joint-allocation

2021-06-09 Thread Nir Soffer
On Thu, Jun 10, 2021 at 12:32 AM Eric Blake wrote: > > Qemu is adding qemu:joint-allocation as a single context combining the > two bits of base:allocation and a compression of qemu:allocation-depth > into two bits [1]. Decoding the bits makes it easier for humans to > see the result of that cont

[RFC libnbd PATCH] info: Add support for new qemu:joint-allocation

2021-06-09 Thread Eric Blake
Qemu is adding qemu:joint-allocation as a single context combining the two bits of base:allocation and a compression of qemu:allocation-depth into two bits [1]. Decoding the bits makes it easier for humans to see the result of that context. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-0

Re: [PATCH 52/55] target/arm: Implement MVE VCADD

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: +#define DO_VCADD(OP, ESIZE, TYPE, H, FN0, FN1) \ +void HELPER(glue(mve_, OP))(CPUARMState *env, void *vd, void *vn, void *vm) \ +{ \ +TYPE *d = vd,

Re: [PATCH 51/55] target/arm: Implement MVE VADC, VSBC

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: +#define DO_VADC(OP, INV)\ +uint32_t HELPER(glue(mve_, OP))(CPUARMState *env, void *vd, \ +void *vn, void *vm, uint32_t nzcv) \ +{

Re: [PATCH 4/4] Jobs based on custom runners: add CentOS Stream 8

2021-06-09 Thread Cleber Rosa Junior
On Tue, Jun 8, 2021 at 10:10 AM Cleber Rosa wrote: > > This introduces three different parts of a job designed to run > on a custom runner managed by Red Hat. The goals include: > > a) serve as a model for other organizations that want to onboard > their own runners, with their specific plat

Re: [PATCH v2 2/2] tpm: Return QMP error when TPM is disabled in build

2021-06-09 Thread Eric Blake
On Wed, Jun 09, 2021 at 08:49:55PM +0200, Philippe Mathieu-Daudé wrote: > When the management layer queries a binary built using --disable-tpm > for TPM devices, it gets confused by getting empty responses: > ... > > To make it clearer by returning an error: > - Make the TPM QAPI schema condition

Re: [PATCH v3 00/19] Python: move /scripts/qmp/qom* to /python/qemu/qmp/qom*

2021-06-09 Thread John Snow
On 6/2/21 8:37 PM, John Snow wrote: Closes: https://gitlab.com/qemu-project/qemu/-/issues/202 GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-package-qom CI: https://gitlab.com/jsnow/qemu/-/pipelines/313932818 Hello! -- This series applies the usual linting cleanups to modernize the

Re: [RFC PATCH v2 1/2] qapi: Inline qmp_marshal_output() functions

2021-06-09 Thread Eric Blake
On Wed, Jun 09, 2021 at 08:49:54PM +0200, Philippe Mathieu-Daudé wrote: > In case we need to use QAPI types but no QAPI command / QAPI event > actually use them, the generated qmp_marshal_output() function will > trigger the compiler 'unused-function' warnings. > To prevent that, emit these functio

Re: [PATCH 50/55] target/arm: Implement MVE VRHADD

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the MVE VRHADD insn, which performs a rounded halving addition. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 8 target/arm/mve.decode | 3 +++ target/arm/mve_helper.c| 6 ++ target/arm/translate-mve.c |

Re: [PATCH v2 2/2] hw/nvme: documentation fix

2021-06-09 Thread Klaus Jensen
On Jun 1 20:32, Gollu Appalanaidu wrote: In the documentation of the '-detached' param "be" and "not" has been used side by side, fix that. Signed-off-by: Gollu Appalanaidu --- hw/nvme/ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c ind

Re: [PATCH v2 1/2] hw/nvme: fix endianess conversion and add controller list

2021-06-09 Thread Klaus Jensen
On Jun 1 20:32, Gollu Appalanaidu wrote: Add the controller identifiers list CNS 0x13, available list of ctrls in NVM Subsystem that may or may not be attached to namespaces. In Identify Ctrl List of the CNS 0x12 and 0x13 no endian conversion for the nsid field. Signed-off-by: Gollu Appalanaid

Re: [PATCH 49/55] target/arm: Implement MVE VQDMULL (vector)

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: +++ b/target/arm/mve.decode @@ -39,6 +39,8 @@ @1op_nosz &1op qd=%qd qm=%qm size=0 @2op .. size:2 &2op qd=%qd qm=%qm qn=%qn @2op_nosz &2o

Re: [PATCH 1/1] hw/nvme: namespace parameter for EUI64

2021-06-09 Thread Heinrich Schuchardt
Am 9. Juni 2021 21:57:26 MESZ schrieb Klaus Jensen : >On Jun 9 20:13, Heinrich Schuchardt wrote: >>Am 9. Juni 2021 16:39:20 MESZ schrieb "Daniel P. Berrangé" >: >>>On Wed, Jun 09, 2021 at 02:33:08PM +0200, Klaus Jensen wrote: On Jun 9 14:21, Heinrich Schuchardt wrote: > On 6/9/21 2:14 P

Re: [PATCH v2] hw/nvme/ctrl: fix csi field for cns 0x00 and 0x11

2021-06-09 Thread Klaus Jensen
On Apr 27 12:00, Gollu Appalanaidu wrote: As per the TP 4056d Namespace types CNS 0x00 and CNS 0x11 CSI field shouldn't use but it is being used for these two Identify command CNS values, fix that. Remove 'nvme_csi_has_nvm_support()' helper as suggested by Klaus we can safely assume NVM command

Re: [PATCH 48/55] target/arm: Implement MVE VQDMLSDH and VQRDMLSDH

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the MVE VQDMLSDH and VQRDMLSDH insns, which are like VQDMLADH and VQRDMLADH except that products are subtracted rather than added. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 16 ++ target/arm/mve.decode | 5

Re: [PATCH 47/55] target/arm: Implement MVE VQDMLADH and VQRDMLADH

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: +static int32_t do_vqdmladh_w(int32_t a, int32_t b, int32_t c, int32_t d, + int round, bool *sat) +{ +int64_t m1 = (int64_t)a * b; +int64_t m2 = (int64_t)c * d; +int64_t r; +/* + * Architecturally we should do

Re: QEmu ARC port - decoder implementation feedback

2021-06-09 Thread Cupertino Miranda
Hi Richard > Why would you be maintaining another description?  Your approach below > with the simple recursive algorithm appears to be no different. We initially considered to drop our tables completely replacing it by decodetree. > >> Also that decodetree alone would not allow us to properly

Re: [PATCH 1/1] hw/nvme: namespace parameter for EUI64

2021-06-09 Thread Klaus Jensen
On Jun 9 20:13, Heinrich Schuchardt wrote: Am 9. Juni 2021 16:39:20 MESZ schrieb "Daniel P. Berrangé" : On Wed, Jun 09, 2021 at 02:33:08PM +0200, Klaus Jensen wrote: On Jun 9 14:21, Heinrich Schuchardt wrote: > On 6/9/21 2:14 PM, Klaus Jensen wrote: > > On Jun  9 13:46, Heinrich Schuchardt w

Re: [PATCH 46/55] target/arm: Implement MVE VRSHL

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the MVE VRSHL insn (vector form). Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 8 target/arm/mve.decode | 3 +++ target/arm/mve_helper.c| 36 target/arm/translate-mve.

Re: [PATCH 45/55] target/arm: Implement MVE VSHL insn

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: +static inline uint32_t do_ushl(uint32_t n, int8_t shift, int esize) +{ +if (shift >= esize || shift <= -esize) { +return 0; +} else if (shift < 0) { +return n >> -shift; +} else { +return n << shift; +} +} Current

Re: [PATCH 44/55] target/arm: Implement MVE VQRSHL

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the MV VQRSHL (vector) insn. Again, the code to perform the actual shifts is borrowed from neon_helper.c. Again, there are helpers in vec_internal.h now. Otherwise, Reviewed-by: Richard Henderson r~

Re: [PATCH 43/55] target/arm: Implement MVE VQSHL (vector)

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the MVE VQSHL insn (encoding T4, which is the vector-shift-by-vector version). The DO_SQSHL_OP and DO_UQSHL_OP macros here are derived from the neon_helper.c code for qshl_u{8,16,32} and qshl_s{8,16,32}. Ah, from before the sve2 merge, and asso

Re: [PATCH 42/55] target/arm: Implement MVE VQADD, VQSUB (vector)

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the vector forms of the MVE VQADD and VQSUB insns. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 16 target/arm/mve.decode | 5 + target/arm/mve_helper.c| 14 ++ target/arm/translate

Re: [PATCH 41/55] target/arm: Implement MVE VQDMULH, VQRDMULH (vector)

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the vector forms of the MVE VQDMULH and VQRDMULH insns. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 8 target/arm/mve.decode | 3 +++ target/arm/mve_helper.c| 27 +++ target/arm/t

Re: [PATCH 40/55] target/arm: Implement MVE VQDMULL scalar

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the MVE VQDMULL scalar insn. This multiplies the top or bottom half of each element by the scalar, doubles and saturates to a double-width result. Note that this encoding overlaps with VQADD and VQSUB; it uses what in VQADD and VQSUB would be the

[Bug 1921061] Re: Corsair iCUE Install Fails, qemu VM Reboots

2021-06-09 Thread John Snow
Hi Russel, this bug has been migrated to the new GitLab issue tracker; can you provide me with some extra information over on the new tracker, please? (I am *very* likely to miss updates here.) 1. What is your QEMU command line? (A full, working command-line, but the smallest one you can reprodu

Re: [PATCH 39/55] target/arm: Implement MVE VQDMULH and VQRDMULH (scalar)

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the MVE VQDMULH and VQRDMULH scalar insns, which multiply elements by the scalar, double, possibly round, take the high half and saturate. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 8 target/arm/mve.decode |

Re: [PATCH v6 4/4] Jobs based on custom runners: add job definitions for QEMU's machines

2021-06-09 Thread Willian Rampazzo
On Tue, Jun 8, 2021 at 12:14 AM Cleber Rosa wrote: > > The QEMU project has two machines (aarch64 and s390x) that can be used > for jobs that do build and run tests. This introduces those jobs, > which are a mapping of custom scripts used for the same purpose. > > Signed-off-by: Cleber Rosa > --

Re: [PATCH] hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds

2021-06-09 Thread Peter Xu
On Tue, Jun 08, 2021 at 08:36:23PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Jun 08, 2021 at 07:49:56PM +0100, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > These two commands are missing when adding the QMP sister c

[PATCH v2 2/2] tpm: Return QMP error when TPM is disabled in build

2021-06-09 Thread Philippe Mathieu-Daudé
When the management layer queries a binary built using --disable-tpm for TPM devices, it gets confused by getting empty responses: { "execute": "query-tpm" } { "return": [ ] } { "execute": "query-tpm-types" } { "return": [ ] } { "execute": "query-tpm-models" }

[RFC PATCH v2 1/2] qapi: Inline qmp_marshal_output() functions

2021-06-09 Thread Philippe Mathieu-Daudé
In case we need to use QAPI types but no QAPI command / QAPI event actually use them, the generated qmp_marshal_output() function will trigger the compiler 'unused-function' warnings. To prevent that, emit these functions inlined: the compiler will ignore such unused functions. Signed-off-by: Phil

[PATCH v2 0/2] tpm: Return QMP error when TPM is disabled in build

2021-06-09 Thread Philippe Mathieu-Daudé
Since v1: - make the qapi schema conditional (Marc-André) Philippe Mathieu-Daudé (2): qapi: Inline qmp_marshal_output() functions tpm: Return QMP error when TPM is disabled in build qapi/tpm.json| 9 ++--- monitor/hmp-cmds.c | 4 stubs/tpm.c | 16 ---

Re: [PATCH 38/55] target/arm: Implement MVE VQADD and VQSUB

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: +#define DO_2OP_SAT_SCALAR(OP, ESIZE, TYPE, H, FN) \ +void HELPER(glue(mve_, OP))(CPUARMState *env, void *vd, void *vn, \ +uint32_t rm)\ +{

Re: [PATCH v3 19/33] block/nbd: split nbd_handle_updated_info out of nbd_client_handshake()

2021-06-09 Thread Eric Blake
On Wed, Jun 09, 2021 at 08:23:06PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > > +if (s->x_dirty_bitmap) { > > > +if (!s->info.base_allocation) { > > > +error_setg(errp, "requested x-dirty-bitmap %s not found", > > > + s->x_dirty_bitmap); > > > +

Re: [PATCH 37/55] target/arm: Implement MVE VPST

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the MVE VPST insn, which sets the predicate mask fields in the VPR to the immediate value encoded in the insn. Signed-off-by: Peter Maydell --- target/arm/mve.decode | 4 +++ target/arm/translate-mve.c | 59 ++

Re: [PATCH v3 7/7] migration/dirtyrate: implement dirty-ring dirtyrate calculation

2021-06-09 Thread Peter Xu
On Mon, Jun 07, 2021 at 09:15:20AM +0800, huang...@chinatelecom.cn wrote: > +static void calculate_dirtyrate_vcpu(struct DirtyRateConfig config) > +{ > +CPUState *cpu; > +int64_t msec = 0; > +int64_t start_time; > +uint64_t dirtyrate = 0; > +uint64_t dirtyrate_sum = 0; > +in

Re: [PATCH 1/1] hw/nvme: namespace parameter for EUI64

2021-06-09 Thread Heinrich Schuchardt
Am 9. Juni 2021 16:39:20 MESZ schrieb "Daniel P. Berrangé" : >On Wed, Jun 09, 2021 at 02:33:08PM +0200, Klaus Jensen wrote: >> On Jun 9 14:21, Heinrich Schuchardt wrote: >> > On 6/9/21 2:14 PM, Klaus Jensen wrote: >> > > On Jun  9 13:46, Heinrich Schuchardt wrote: >> > > > The EUI64 field is the

Re: [PATCH 36/55] target/arm: Implement MVE VBRSR

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the MVE VBRSR insn, which reverses a specified number of bits in each element, setting the rest to zero. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 4 target/arm/mve.decode | 1 + target/arm/mve_helper.c| 43

Re: [PATCH 35/55] target/arm: Implement MVE VHADD, VHSUB (scalar)

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the scalar variants of the MVE VHADD and VHSUB insns. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 16 target/arm/mve.decode | 4 target/arm/mve_helper.c| 8 target/arm/translate-mve

[PATCH 2/2] nbd: Add new qemu:joint-allocation metadata context

2021-06-09 Thread Eric Blake
When trying to reconstruct a qcow2 chain using information provided over NBD, ovirt had been relying on an unsafe assumption that any portion of the qcow2 file advertised as sparse would defer to the backing image; this worked with what qemu 5.2 reports for a qcow2 BSD loaded with "backing":null.

[PATCH 1/2] iotests: Improve and rename test 309 to nbd-qemu-allocation

2021-06-09 Thread Eric Blake
Enhance the test to inspect what qemu-nbd is advertising during handshake, and rename it now that we support useful iotest names. Signed-off-by: Eric Blake --- .../qemu-iotests/{309 => tests/nbd-qemu-allocation} | 5 - .../{309.out => tests/nbd-qemu-allocation.out} | 12 +++-

[RFC PATCH 0/2] New NBD metacontext

2021-06-09 Thread Eric Blake
This is my counter-proposal to Nir's request [1] to revert a 6.0 behavior change. It does not expose any new information over NBD, but does make it easier to collect necessary information from a single context rather than requiring the client to have to request two contexts in parallel, then cross

Re: [PATCH 34/55] target/arm: Implement MVE VSUB, VMUL (scalar)

2021-06-09 Thread Richard Henderson
On 6/7/21 9:58 AM, Peter Maydell wrote: Implement the scalar forms of the MVE VSUB and VMUL insns. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 8 target/arm/mve.decode | 2 ++ target/arm/mve_helper.c| 2 ++ target/arm/translate-mve.c | 2 ++ 4 files chan

Re: [PATCH 33/55] target/arm: Implement MVE VADD (scalar)

2021-06-09 Thread Richard Henderson
On 6/7/21 9:57 AM, Peter Maydell wrote: Implement the scalar form of the MVE VADD insn. This takes the scalar operand from a general purpose register. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 4 target/arm/mve.decode | 7 ++ target/arm/mve_helper.c| 2

Re: [PATCH v6 3/4] Jobs based on custom runners: docs and gitlab-runner setup playbook

2021-06-09 Thread Willian Rampazzo
On Tue, Jun 8, 2021 at 12:14 AM Cleber Rosa wrote: > > To have the jobs dispatched to custom runners, gitlab-runner must > be installed, active as a service and properly configured. The > variables file and playbook introduced here should help with those > steps. > > The playbook introduced here

Re: [PATCH] tpm: Return QMP error when TPM is disabled in build

2021-06-09 Thread Philippe Mathieu-Daudé
On 6/9/21 7:36 PM, Daniel P. Berrangé wrote: > On Wed, Jun 09, 2021 at 07:34:32PM +0200, Philippe Mathieu-Daudé wrote: >> On 6/9/21 7:27 PM, Philippe Mathieu-Daudé wrote: >>> On 6/9/21 6:01 PM, Marc-André Lureau wrote: Hi On Wed, Jun 9, 2021 at 7:33 PM Philippe Mathieu-Daudé >>>

  1   2   3   4   >