Re: [PATCH v5 4/9] ui/vdagent: core infrastructure

2021-05-11 Thread Gerd Hoffmann
> > +/* -- */ > > +/* send messages */ > > + > > +static void vdagent_send_buf(VDAgentChardev *vd, void *ptr, uint32_t > > msgsize) > > +{ > > +uint8_t *msgbuf = ptr; > > +

[PATCH v3 09/20] ui/pixman: Add qemu_pixman_to_drm_format()

2021-05-11 Thread Vivek Kasireddy
This new function to get the drm_format associated with a pixman format will be useful while creating a dmabuf. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/qemu-pixman.h | 1 + ui/qemu-pixman.c | 35

Re: [PATCH v2] block: Improve backing file validation

2021-05-11 Thread Daniel P . Berrangé
On Tue, May 11, 2021 at 01:55:18PM +0800, Li Zhijian wrote: > Image below user cases: > case 1: > ``` > $ qemu-img create -f raw source.raw 1G > $ qemu-img create -f qcow2 -F raw -b source.raw ./source.raw > qemu-img info source.raw > image: source.raw > file format: qcow2 > virtual size: 193K

[PATCH v3 08/20] virtio-gpu: Add virtio_gpu_resource_create_blob

2021-05-11 Thread Vivek Kasireddy
This API allows Qemu to register the blob allocated by the Guest as a new resource and map its backing storage. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu-udmabuf.c | 4 ++

Re: [PATCH] sockets: update SOCKET_ADDRESS_TYPE_FD listen(2) backlog

2021-05-11 Thread Stefan Hajnoczi
On Tue, Mar 16, 2021 at 08:35:14AM -0500, Eric Blake wrote: > On 3/16/21 4:10 AM, Stefan Hajnoczi wrote: > > On Wed, Mar 10, 2021 at 05:30:04PM +, Stefan Hajnoczi wrote: > >> socket_get_fd() fails with the error "socket_get_fd: too many > >> connections" if the given listen backlog value is

[PATCH v3 19/20] ui/gtk: Create a common release_dmabuf helper

2021-05-11 Thread Vivek Kasireddy
Since the texture release mechanism is same for both gtk-egl and gtk-glarea, move the helper from gtk-egl into common gtk area so that it can be shared by both gtk backends. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/gtk.h | 2 -- ui/gtk-egl.c | 8 ui/gtk.c

Re: [PATCH 5/6] co-shared-resource: protect with a mutex

2021-05-11 Thread Paolo Bonzini
On 10/05/21 13:40, Vladimir Sementsov-Ogievskiy wrote: co-shared-resource is currently not thread-safe, as also reported in co-shared-resource.h. Add a QemuMutex because co_try_get_from_shres can also be invoked from non-coroutine context. But it doesn't. It's called only from

[PATCH v3 05/20] virtio-gpu: Refactor virtio_gpu_set_scanout

2021-05-11 Thread Vivek Kasireddy
Store the meta-data associated with a FB in a new object (struct virtio_gpu_framebuffer) and pass the object to set_scanout. Also move code in set_scanout into a do_set_scanout function. This will be helpful when adding set_scanout_blob API. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann

[PATCH v3 20/20] virtio-gpu: Add gl_flushed callback

2021-05-11 Thread Vivek Kasireddy
Adding this callback provides a way to determine when the UI has submitted the buffer to the Host windowing system. Making the guest wait for this event will ensure that the dmabuf/buffer updates are synchronized. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c

[PATCH v3 01/20] ui: Get the fd associated with udmabuf driver

2021-05-11 Thread Vivek Kasireddy
Try to open the udmabuf dev node for the first time or return the fd if the device was previously opened. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/console.h | 3 +++ ui/meson.build | 1 + ui/udmabuf.c | 40

[PATCH v3 18/20] ui/gtk-egl: Wait for the draw signal for dmabuf blobs

2021-05-11 Thread Vivek Kasireddy
Instead of immediately drawing and submitting, queue and wait for the draw signal if the dmabuf submitted is a blob. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/gtk.h | 2 ++ ui/gtk-egl.c | 14 ++ ui/gtk.c | 2 +- 3 files changed, 17 insertions(+),

Re: [PATCH 0/3] vhost-user: warn when guest RAM is not shared

2021-05-11 Thread Stefan Hajnoczi
On Mon, Feb 22, 2021 at 04:10:14PM +, Stefan Hajnoczi wrote: > vhost-user requires -object memory-backend-*,share=on option so that QEMU uses > mmap(MAP_SHARED) on guest RAM that is shared with the vhost-user device > backend > process. This is needed so the QEMU process sees changes made by

Re: [PATCH] block/export: improve vu_blk_sect_range_ok()

2021-05-11 Thread Stefan Hajnoczi
On Wed, Mar 31, 2021 at 03:27:27PM +0100, Stefan Hajnoczi wrote: > The checks in vu_blk_sect_range_ok() assume VIRTIO_BLK_SECTOR_SIZE is > equal to BDRV_SECTOR_SIZE. This is true, but let's add a > QEMU_BUILD_BUG_ON() to make it explicit. > > We might as well check that the request buffer size is

[PATCH v3 07/20] virtio-gpu: Add initial definitions for blob resources

2021-05-11 Thread Vivek Kasireddy
Add the property bit, configuration flag and other relevant macros and definitions associated with this feature. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-base.c | 3 +++ hw/display/virtio-gpu.c| 14 ++

[PATCH v3 16/20] virtio-gpu: Add virtio_gpu_wait_flush API

2021-05-11 Thread Vivek Kasireddy
This new command can be used by the Guest Compositor as a way to synchronize its updates (repaint/redraw) with Host UI buffer submissions (redraw). In other words, the Guest can wait until the buffer it has submitted has been used by the Host before it starts it new repaint cycle. Cc: Gerd

[PATCH v3 15/20] virtio-gpu: Add dmabuf helpers for synchronization

2021-05-11 Thread Vivek Kasireddy
These helpers will be used in the next subsequent patches to wait until a dmabuf object (via a texture) has been used by the UI to render and submit its buffer. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-udmabuf.c | 42 +

Re: [PATCH 0/3] vhost-user-blk-test: add tests for the vhost-user-blk server

2021-05-11 Thread Stefan Hajnoczi
On Mon, Mar 22, 2021 at 09:23:24AM +, Stefan Hajnoczi wrote: > These patches add a qtest for the vhost-user-blk server. CI found several > issues that caused these patches to be dropped from Michael Tsirkin and Kevin > Wolf's pull requests in the past. Hopefully they will go in smoothly this

[PATCH v3 11/20] virtio-gpu: Factor out update scanout

2021-05-11 Thread Vivek Kasireddy
Creating a small helper function for updating the scanout will be useful in the next patch where this needs to be done early in do_set_scanout before returning. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 35 +++ 1 file

[PATCH v3 00/20] virtio-gpu: Add support for Blob resources

2021-05-11 Thread Vivek Kasireddy
Enabling this feature would eliminate data copies from the resource object in the Guest to the shadow resource in Qemu. This patch series however adds support only for Blobs of type VIRTIO_GPU_BLOB_MEM_GUEST with property VIRTIO_GPU_BLOB_FLAG_USE_SHAREABLE. Most of the patches in this series are

[PATCH v3 13/20] virtio-gpu: Update cursor data using blob

2021-05-11 Thread Vivek Kasireddy
If a blob is available for the cursor, copy the data from the blob. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/display/virtio-gpu.c

Re: [PATCH RFC] migrate/ram: remove "ram_bulk_stage" and "fpo_enabled"

2021-05-11 Thread David Hildenbrand
On 10.05.21 20:58, Dr. David Alan Gilbert wrote: * David Hildenbrand (da...@redhat.com) wrote: The bulk stage is kind of weird: migration_bitmap_find_dirty() will indicate a dirty page, however, ram_save_host_page() will never save it, as migration_bitmap_clear_dirty() detects that it is not

[PATCH v3 10/20] virtio-gpu: Add helpers to create and destroy dmabuf objects

2021-05-11 Thread Vivek Kasireddy
These helpers can be useful for creating dmabuf objects from blobs and submitting them to the UI. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-udmabuf.c | 74 + include/hw/virtio/virtio-gpu.h | 15 +++ 2 files changed, 89

[PATCH v3 04/20] virtio-gpu: Add virtio_gpu_find_check_resource

2021-05-11 Thread Vivek Kasireddy
Move finding the resource and validating its backing storage into one function. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 66 + 1 file changed, 47 insertions(+), 19 deletions(-) diff

[PATCH v3 12/20] virtio-gpu: Add virtio_gpu_set_scanout_blob

2021-05-11 Thread Vivek Kasireddy
This API allows Qemu to set the blob allocated by the Guest as the scanout buffer. If Opengl support is available, then the scanout buffer would be submitted as a dmabuf to the UI; if not, a pixman image is created from the scanout buffer and is submitted to the UI via the display surface.

[PATCH v3 03/20] virtio-gpu: Add udmabuf helpers

2021-05-11 Thread Vivek Kasireddy
Add helper functions to create a dmabuf for a resource and mmap it. To be able to create a dmabuf using the udmabuf driver, Qemu needs to be lauched with the memfd memory backend like this: qemu-system-x86_64 -m 8192m -object memory-backend-memfd,id=mem1,size=8192M -machine memory-backend=mem1

[PATCH v3 06/20] virtio-gpu: Refactor virtio_gpu_create_mapping_iov

2021-05-11 Thread Vivek Kasireddy
Instead of passing the attach_backing object to extract nr_entries and offset, explicitly pass these as arguments to this function. This will be helpful when adding create_blob API. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-virgl.c | 3 ++-

[PATCH v3 02/20] headers: Add udmabuf.h

2021-05-11 Thread Vivek Kasireddy
This adds udmabuf header to standard headers so that the relevant udmabuf objects can be accessed in subsequent patches. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/standard-headers/linux/udmabuf.h | 32

[PULL 30/33] migration: do not restart VM after successful snapshot-load

2021-05-11 Thread Paolo Bonzini
The HMP loadvm code is calling load_snapshot rather than qmp_snapshot_load, in order to bypass the job infrastructure. The code around it is almost the same, with one difference: hmp_loadvm is restarting the VM if load_snapshot fails, qmp_snapshot_load is doing so if load_snapshot succeeds. Fix

[PULL 29/33] main-loop: remove dead code

2021-05-11 Thread Paolo Bonzini
qemu_add_child_watch is not called anywhere since commit 2bdb920ece ("slirp: simplify fork_exec()", 2019-01-14), remove it. Signed-off-by: Paolo Bonzini --- include/qemu/main-loop.h | 18 util/main-loop.c | 61 2 files changed, 79

[PULL 33/33] coverity-scan: list components, move model to scripts/coverity-scan

2021-05-11 Thread Paolo Bonzini
Place all files that can be useful to rebuild the Coverity configuration in scripts/coverity-scan: the existing model file, and the components setup. The Markdown syntax was tested with Pandoc (but in any case is meant more as a human-readable reference than as a part of documentation).

[PULL 26/33] target/i386: extend pg_mode to more CR0 and CR4 bits

2021-05-11 Thread Paolo Bonzini
In order to unify the two stages of page table lookup, we need mmu_translate to use either the host CR0/EFER/CR4 or the guest's. To do so, make mmu_translate use the same pg_mode constants that were used for the NPT lookup. This also prepares for adding 5-level NPT support, which however does not

[PULL 21/33] accel: add init_accel_cpu for adapting accel behavior to CPU type

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana while on x86 all CPU classes can use the same set of TCGCPUOps, on ARM the right accel behavior depends on the type of the CPU. So we need a way to specialize the accel behavior according to the CPU. Therefore, add a second initialization, after the

[PULL 31/33] qemu-option: support accept-any QemuOptsList in qemu_opts_absorb_qdict

2021-05-11 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- util/qemu-option.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/qemu-option.c b/util/qemu-option.c index 9678d5b682..4944015a25 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -1056,7 +1056,8 @@ bool

[PULL 32/33] configure: fix detection of gdbus-codegen

2021-05-11 Thread Paolo Bonzini
"pkg-config --variable=gdbus_codegen gio-2.0" returns "gdbus-codegen", and it does not pass test -x (which does not walk the path). Meson 0.58.0 notices that something is iffy, as the dbus_vmstate1 assignment in tests/qtest/meson.build uses an empty string as the command, and fails very

[PULL 24/33] target/i386: extract mmu_translate

2021-05-11 Thread Paolo Bonzini
Extract the page table lookup out of handle_mmu_fault, which only has to invoke mmu_translate and either fill the TLB or deliver the page fault. Signed-off-by: Paolo Bonzini --- target/i386/tcg/sysemu/excp_helper.c | 151 +++ 1 file changed, 86 insertions(+), 65

[PULL 25/33] target/i386: pass cr3 to mmu_translate

2021-05-11 Thread Paolo Bonzini
First step in unifying the nested and regular page table walk. Signed-off-by: Paolo Bonzini --- target/i386/tcg/sysemu/excp_helper.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/excp_helper.c

[PULL 22/33] target/i386: merge SVM_NPTEXIT_* with PF_ERROR_* constants

2021-05-11 Thread Paolo Bonzini
They are the same value, and are so by design. Signed-off-by: Paolo Bonzini --- target/i386/svm.h| 5 - target/i386/tcg/sysemu/excp_helper.c | 10 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/target/i386/svm.h b/target/i386/svm.h index

[PULL 23/33] target/i386: move paging mode constants from SVM to cpu.h

2021-05-11 Thread Paolo Bonzini
We will reuse the page walker for both SVM and regular accesses. To do so we will build a function that receives the currently active paging mode; start by including in cpu.h the constants and the function to go from cr4/hflags/efer to the paging mode. Signed-off-by: Paolo Bonzini ---

[PULL 16/33] i386: split off sysemu part of cpu.c

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Message-Id: <20210322132800.7470-19-cfont...@suse.de> Signed-off-by: Paolo Bonzini --- target/i386/cpu-internal.h | 70 +++ target/i386/cpu-sysemu.c | 352 +

[PULL 20/33] accel: move call to accel_init_interfaces

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana move the call for sysemu specifically in machine_run_board_init, mirror the calling sequence for user mode too. Suggested-by: Paolo Bonzini Signed-off-by: Claudio Fontana Message-Id: <20210322132800.7470-23-cfont...@suse.de> Signed-off-by: Paolo Bonzini ---

[PULL 27/33] target/i386: allow customizing the next phase of the translation

2021-05-11 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- target/i386/tcg/sysemu/excp_helper.c | 30 +--- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/excp_helper.c index 2b7baa0193..082ddbb911 100644 ---

[PULL 13/33] i386: separate fpu_helper sysemu-only parts

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana create a separate tcg/sysemu/fpu_helper.c for the sysemu-only parts. For user mode, some small #ifdefs remain in tcg/fpu_helper.c which do not seem worth splitting into their own user-mode module. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Message-Id:

[PULL 12/33] i386: split misc helper user stubs and sysemu part

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson [claudio]: Rebased on da3f3b02("target/i386: fail if toggling LA57 in 64-bitmode") Signed-off-by: Claudio Fontana Message-Id: <20210322132800.7470-15-cfont...@suse.de> Signed-off-by: Paolo Bonzini ---

[PULL 18/33] target/i386: gdbstub: only write CR0/CR2/CR3/EFER for sysemu

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana Signed-off-by: Claudio Fontana Cc: Paolo Bonzini Reviewed-by: Richard Henderson Message-Id: <20210322132800.7470-21-cfont...@suse.de> Signed-off-by: Paolo Bonzini --- target/i386/gdbstub.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PULL 15/33] i386: split seg_helper into user-only and sysemu parts

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson [claudio]: Rebased on commit 68775856 ("target/i386: svm: do not discard high 32 bits") Signed-off-by: Claudio Fontana Message-Id: <20210322132800.7470-18-cfont...@suse.de> Signed-off-by: Paolo Bonzini ---

[PULL 28/33] target/i386: use mmu_translate for NPT walk

2021-05-11 Thread Paolo Bonzini
Unify the duplicate code between get_hphys and mmu_translate, by simply making get_hphys call mmu_translate. This also fixes the support for 5-level nested page tables. Signed-off-by: Paolo Bonzini --- target/i386/tcg/sysemu/excp_helper.c | 243 --- 1 file changed, 36

[PULL 11/33] i386: move TCG bpt_helper into sysemu/

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana for user-mode, assert that the hidden IOBPT flags are not set while attempting to generate io_bpt helpers. Signed-off-by: Claudio Fontana Cc: Paolo Bonzini Reviewed-by: Richard Henderson Message-Id: <20210322132800.7470-14-cfont...@suse.de> Signed-off-by: Paolo Bonzini

[PULL 19/33] i386: make cpu_load_efer sysemu-only

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana cpu_load_efer is now used only for sysemu code. Therefore, move this function implementation to sysemu-only section of helper.c Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Message-Id: <20210322132800.7470-22-cfont...@suse.de> Signed-off-by: Paolo

[PULL 17/33] target/i386: gdbstub: introduce aux functions to read/write CS64 regs

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana a number of registers are read as 64bit under the condition that (hflags & HF_CS64_MASK) || TARGET_X86_64) and a number of registers are written as 64bit under the condition that (hflags & HF_CS64_MASK). Provide some auxiliary functions that do that. Signed-off-by:

[PULL 10/33] i386: split tcg excp_helper into sysemu and user parts

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson [claudio]: Rebased on commit b8184135 ("target/i386: allow modifying TCG phys-addr-bits") Signed-off-by: Claudio Fontana Message-Id: <20210322132800.7470-13-cfont...@suse.de> Signed-off-by: Paolo Bonzini

[PULL 14/33] i386: split svm_helper into sysemu and stub-only user

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana For now we just copy over the previous user stubs, but really, everything that requires s->cpl == 0 should be impossible to trigger from user-mode emulation. Later on we should add a check that asserts this easily f.e.: static bool check_cpl0(DisasContext *s) { int

[PULL 05/33] accel: introduce new accessor functions

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana avoid open coding the accesses to cpu->accel_cpu interfaces, and instead introduce: accel_cpu_instance_init, accel_cpu_realizefn to be used by the targets/ initfn code, and by cpu_exec_realizefn respectively. Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée

[PULL 03/33] i386: split cpu accelerators from cpu.c, using AccelCPUClass

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana i386 is the first user of AccelCPUClass, allowing to split cpu.c into: cpu.ccpuid and common x86 cpu functionality host-cpu.c host x86 cpu functions and "host" cpu type kvm/kvm-cpu.cKVM x86 AccelCPUClass hvf/hvf-cpu.cHVF x86 AccelCPUClass

[PULL 09/33] i386: split smm helper (sysemu)

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana smm is only really useful for sysemu, split in two modules around the CONFIG_USER_ONLY, in order to remove the ifdef and use the build system instead. add cpu_abort() when detecting attempts to enter SMM mode via SMI interrupt in user-mode, and assert that the cpu is not

[PULL 07/33] accel-cpu: make cpu_realizefn return a bool

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana overall, all devices' realize functions take an Error **errp, but return void. hw/core/qdev.c code, which realizes devices, therefore does: local_err = NULL; dc->realize(dev, _err); if (local_err != NULL) { goto fail; } However, we can improve at least accel_cpu to

[PULL 08/33] i386: split off sysemu-only functionality in tcg-cpu

2021-05-11 Thread Paolo Bonzini
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Message-Id: <20210322132800.7470-11-cfont...@suse.de> Signed-off-by: Paolo Bonzini --- target/i386/meson.build| 2 + target/i386/tcg/meson.build| 3 ++ target/i386/tcg/sysemu/meson.build | 3 ++

[PULL 06/33] target/i386: fix host_cpu_adjust_phys_bits error handling

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana move the check for phys_bits outside of host_cpu_adjust_phys_bits, because otherwise it is impossible to return an error condition explicitly. Signed-off-by: Claudio Fontana Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson

[PULL 01/33] target/i386: Rename helper_fldt, helper_fstt

2021-05-11 Thread Paolo Bonzini
From: Richard Henderson Change the prefix from "helper" to "do". The former should be reserved for those functions that are called from TCG; the latter is in use within the file already for those functions that are called from the helper functions, adding a "retaddr" argument. Signed-off-by:

Re: [PATCH v6 04/82] target/arm: Implement SVE2 integer unary operations (predicated)

2021-05-11 Thread Peter Maydell
On Fri, 30 Apr 2021 at 21:30, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > v2: Fix sqabs, sqneg (laurent desnogues) > --- > target/arm/helper-sve.h| 13 +++ > target/arm/sve.decode | 7 ++ > target/arm/sve_helper.c| 29 +++ >

[PULL 02/33] target/i386: Split out do_fsave, do_frstor, do_fxsave, do_fxrstor

2021-05-11 Thread Paolo Bonzini
From: Richard Henderson The helper_* functions must use GETPC() to unwind from TCG. The cpu_x86_* functions cannot, and directly calling the helper_* functions is a bug. Split out new functions that perform the work and can be used by both. Signed-off-by: Richard Henderson Reviewed-by:

[PULL 04/33] cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn

2021-05-11 Thread Paolo Bonzini
From: Claudio Fontana move the call to accel_cpu->cpu_realizefn to the general cpu_exec_realizefn from target/i386, so it does not need to be called for every target explicitly as we enable more targets. Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson

[PULL 00/33] Misc (mostly i386) patches for 2021-05-11

2021-05-11 Thread Paolo Bonzini
The following changes since commit e58c7a3bba3076890592f02d2b0e596bf191b5c2: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210510-1' into staging (2021-05-10 17:28:11 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git

[Bug 1893003] Re: qemu linux-user doesn't translate host/target data for iovec I/O

2021-05-11 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then

[Bug 1892604] Re: qemu-system-arm: ../hw/usb/hcd-dwc2.c:666: dwc2_glbreg_read: Assertion `addr <= GINTSTS2' failed.

2021-05-11 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then

Re: [PATCH] hw/block/nvme: re-enable NVMe PCI hotplug

2021-05-11 Thread Philippe Mathieu-Daudé
Cc'ing Klaus (maintainer) On 5/11/21 9:35 AM, Hannes Reinecke wrote: > Ever since commit e570768566 ("hw/block/nvme: support for shared > namespace in subsystem") NVMe PCI hotplug is broken, as the PCI > hotplug infrastructure will only work for the nvme devices (which > are PCI devices), but not

Re: [PATCH v6 03/82] target/arm: Implement SVE2 integer pairwise add and accumulate long

2021-05-11 Thread Peter Maydell
On Fri, 30 Apr 2021 at 21:26, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/helper-sve.h| 14 > target/arm/sve.decode | 5 + > target/arm/sve_helper.c| 44 ++ > target/arm/translate-sve.c | 39

Re: [PATCH v6 02/82] target/arm: Implement SVE2 Integer Multiply - Unpredicated

2021-05-11 Thread Peter Maydell
On Fri, 30 Apr 2021 at 21:29, Richard Henderson wrote: > > For MUL, we can rely on generic support. For SMULH and UMULH, > create some trivial helpers. For PMUL, back in a21bb78e5817, > we organized helper_gvec_pmul_b in preparation for this use. > > Signed-off-by: Richard Henderson > --- >

Re: [PATCH v6 01/82] target/arm: Add ID_AA64ZFR0 fields and isar_feature_aa64_sve2

2021-05-11 Thread Peter Maydell
On Fri, 30 Apr 2021 at 21:26, Richard Henderson wrote: > > Will be used for SVE2 isa subset enablement. > > Reviewed-by: Alex Bennée > Signed-off-by: Richard Henderson > --- > v2: Do not read zfr0 from kvm unless sve is available. > --- > diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c >

Re: [PATCH] hw/block/nvme: re-enable NVMe PCI hotplug

2021-05-11 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210511073511.32511-1-h...@suse.de/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210511073511.32511-1-h...@suse.de Subject: [PATCH] hw/block/nvme: re-enable NVMe PCI hotplug

Re: [PATCH 0/2] SEV firmware error list touchups

2021-05-11 Thread Philippe Mathieu-Daudé
On Mon, Mar 22, 2021 at 5:43 PM Eduardo Habkost wrote: > On Mon, Mar 22, 2021 at 09:09:44AM -0500, Connor Kuehl wrote: > > On 3/22/21 5:18 AM, Philippe Mathieu-Daudé wrote: > > > On 3/15/21 3:08 PM, Connor Kuehl wrote: > > > > On 2/18/21 9:16 AM, Connor Kuehl wrote: > > > > > Connor Kuehl (2): >

[PATCH v2 09/10] gitlab-ci: Extract core container jobs to container-core.yml

2021-05-11 Thread Philippe Mathieu-Daudé
It is not possible to use the previously extracted templates without this set of core containers. Extract them into a new file (container-core.yml) to be able to build them without having to build all the other containers by default. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé

Re: [PULL 0/9] scripts/simplebench patches

2021-05-11 Thread Peter Maydell
On Tue, 11 May 2021 at 06:59, Vladimir Sementsov-Ogievskiy wrote: > > Hi! > > Kindly ping, or what's wrong with it? You've never sent me a pullreq before. Pull requests from new people are a pain and take more time to deal with, so I only look at them when I have the time to do that. Pull

[PATCH v2 07/10] gitlab-ci: Extract default build/test jobs templates

2021-05-11 Thread Philippe Mathieu-Daudé
To be able to reuse the mainstream build/test jobs templates, extract them into a new file (buildtest-template.yml). Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/buildtest-template.yml | 69 .gitlab-ci.yml | 71

Re: [Bug 1925496] Re: nvme disk cannot be hotplugged after removal

2021-05-11 Thread Hannes Reinecke
On 5/3/21 9:27 AM, Klaus Jensen wrote: > On Apr 28 15:00, Max Reitz wrote: >> On 28.04.21 12:12, Klaus Jensen wrote: >>> On Apr 28 09:31, Oguz Bektas wrote: > My understanding is that this is the expected behavior. The reason is > that the drive cannot be deleted immediately when the

Re: [PULL 0/6] Usb 20210505 patches

2021-05-11 Thread Peter Maydell
On Wed, 5 May 2021 at 14:09, Gerd Hoffmann wrote: > > The following changes since commit 15106f7dc3290ff3254611f265849a314a93eb0e: > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-hex-20210502' > into staging (2021-05-02 16:23:05 +0100) > > are available in the Git repository at:

[PATCH v2 06/10] gitlab-ci: Extract build stages to stages.yml

2021-05-11 Thread Philippe Mathieu-Daudé
Extract the build stages used by our job templates to a new file (stages.yml) to be able to include it with the other templates, without having to run all the jobs included in the default .gitlab-ci.yml, which are mainly useful for mainstream CI. Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH] hw/block/nvme: re-enable NVMe PCI hotplug

2021-05-11 Thread Hannes Reinecke
Ever since commit e570768566 ("hw/block/nvme: support for shared namespace in subsystem") NVMe PCI hotplug is broken, as the PCI hotplug infrastructure will only work for the nvme devices (which are PCI devices), but not for any attached namespaces. So when re-adding the NVMe PCI device via

Re: [PATCH 0/2] [RESEND] SEV firmware error list touchups

2021-05-11 Thread Philippe Mathieu-Daudé
Cc'ing qemu-trivial@ On 4/30/21 3:48 PM, Connor Kuehl wrote: > Connor Kuehl (2): > sev: use explicit indices for mapping firmware error codes to strings > sev: add missing firmware error conditions > > target/i386/sev.c | 48 --- > 1 file changed,

[PATCH v2 10/10] gitlab-ci: Move current job set to qemu-project.yml

2021-05-11 Thread Philippe Mathieu-Daudé
To allow forks to easily decide which jobs they want to run, but without disrupting the current default, move the current set of jobs to a new file corresponding to the jobs run by the mainstream project CI: https://gitlab.com/qemu-project/qemu/-/pipelines Signed-off-by: Philippe Mathieu-Daudé

[PATCH v2 04/10] gitlab-ci: Extract crossbuild job templates to crossbuild-template.yml

2021-05-11 Thread Philippe Mathieu-Daudé
Extract the crossbuild job templates to a new file (crossbuild-template.yml) to be able to reuse them without having to run all the jobs included, which are mainly useful for mainstream CI. Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/crossbuild-template.yml | 41

[PATCH v2 08/10] gitlab-ci: Extract all default build/test jobs to buildtest.yml

2021-05-11 Thread Philippe Mathieu-Daudé
Extract the build/test jobs run by default on the mainstream CI into a new file (buildtest.yml). Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/buildtest.yml | 726 + .gitlab-ci.yml | 726 + 2 files

[PATCH v2 03/10] gitlab-ci: Extract container job template to container-template.yml

2021-05-11 Thread Philippe Mathieu-Daudé
Extract the container job template to a new file (container-template.yml) to be able to reuse it without having to run all the jobs included, which are mainly useful for mainstream CI. Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/container-template.yml | 22 ++

[PATCH v2 05/10] gitlab-ci: Extract DCO/style check jobs to static_checks.yml

2021-05-11 Thread Philippe Mathieu-Daudé
Extract the DCO / checkpatch jobs to a new file (static_checks.yml) to be able to run them without having to run all the jobs included in the default .gitlab-ci.yml, which are mainly useful for the mainstream CI. Signed-off-by: Philippe Mathieu-Daudé --- v2: - renamed static_checks.yml (Wainer)

[PATCH v2 01/10] gitlab-ci: Replace YAML anchors by extends (acceptance_test_job)

2021-05-11 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé 'extends' is an alternative to using YAML anchors and is a little more flexible and readable. See: https://docs.gitlab.com/ee/ci/yaml/#extends Reviewed-by: Wainer dos Santos Moschetta Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.yml | 30

[PATCH v2 02/10] gitlab-ci: Rename acceptance_test_job -> integration_test_job

2021-05-11 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé The acceptance tests aren't accepting anything, rename them as integration tests. Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Acked-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.yml | 20 ++-- 1

[PATCH v2 00/10] gitlab-ci: Ease forks pipeline workflow

2021-05-11 Thread Philippe Mathieu-Daudé
Hi, Gitlab recommends to use job templates. To be able to re-use / include templates, they can not use YAML anchors. All current jobs has first to be converted to use the 'extends' keyworkd. This is the first part of this series (already reviewed). The second part extracts various generic jobs

Re: [PATCH 10/15] gitlab-ci: Extract all default build/test jobs to buildtest.yml

2021-05-11 Thread Philippe Mathieu-Daudé
Hi Alex, On 4/19/21 5:11 PM, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > >> Extract the build/test jobs run by default on the mainstream >> CI into a new file (buildtest.yml) and their templates into >> (buildtest-template.yml), to be able to reuse the templates >> without having

[PATCH v2 27/32] i386: Add sgx_get_info() interface

2021-05-11 Thread Yang Zhong
Add the sgx_get_info() interface for hmp and QMP usage, which will get the SGX info from this API. Signed-off-by: Yang Zhong --- hw/i386/sgx-epc.c | 22 ++ include/hw/i386/pc.h | 1 + include/hw/i386/sgx-epc.h | 1 + monitor/hmp-cmds.c| 20

Re: [RFC PATCH 14/15] gitlab-ci: Allow forks to use different set of jobs

2021-05-11 Thread Philippe Mathieu-Daudé
+Stefan/Peter On 4/19/21 12:59 PM, Thomas Huth wrote: > On 19/04/2021 12.51, Daniel P. Berrangé wrote: >> On Mon, Apr 19, 2021 at 12:48:25PM +0200, Thomas Huth wrote: >>> On 19/04/2021 12.36, Daniel P. Berrangé wrote: On Mon, Apr 19, 2021 at 12:20:55PM +0200, Thomas Huth wrote: > On

[PATCH v2 31/32] sgx-epc: Add the fill_device_info() callback support

2021-05-11 Thread Yang Zhong
Since there is no fill_device_info() callback support, and when we execute "info memory-devices" command in the monitor, the segfault will be found. This patch will add this callback support and "info memory-devices" will show sgx epc memory exposed to guest. The result as below: qemu) info

[PATCH v2 25/32] qmp: Add query-sgx command

2021-05-11 Thread Yang Zhong
This QMP query command can be used by some userspaces to retrieve the SGX information when SGX is enabled on Intel platform. Signed-off-by: Yang Zhong v1-->v2: - "Since: 5.1" to "Since: 6.1", and grammar error(Eric Blake). --- monitor/qmp-cmds.c | 6 ++ qapi/misc.json

[PATCH v2 22/32] i440fx: Add support for SGX EPC

2021-05-11 Thread Yang Zhong
From: Sean Christopherson Enable SGX EPC virtualization, which is currently only support by KVM. Signed-off-by: Sean Christopherson Signed-off-by: Yang Zhong --- hw/i386/pc_piix.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index

[PATCH v2 29/32] qmp: Add the qmp_query_sgx_capabilities()

2021-05-11 Thread Yang Zhong
Libvirt can use qmp_query_sgx_capabilities() to get the host sgx capabilities. Signed-off-by: Yang Zhong v1-->v2: - Changed the blurb error and "Since: 5.1" to "Since: 6.1"(Eric Blake). --- hw/i386/sgx-epc.c | 66 ++ include/hw/i386/pc.h |

[PATCH v2 21/32] q35: Add support for SGX EPC

2021-05-11 Thread Yang Zhong
From: Sean Christopherson Enable SGX EPC virtualization, which is currently only support by KVM. Signed-off-by: Sean Christopherson Signed-off-by: Yang Zhong --- hw/i386/pc_q35.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index

[PATCH v2 28/32] bitops: Support 32 and 64 bit mask macro

2021-05-11 Thread Yang Zhong
The Qemu should enable bit mask macro like Linux did in the kernel, the GENMASK(h, l) and GENMASK_ULL(h, l) will set the bit to 1 from l to h bit in the 32 bit or 64 bit long type. Signed-off-by: Yang Zhong --- include/qemu/bitops.h | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH v2 30/32] Kconfig: Add CONFIG_SGX support

2021-05-11 Thread Yang Zhong
Add new CONFIG_SGX for sgx support in the Qemu, and the Kconfig default enable sgx in the i386 platform. Signed-off-by: Yang Zhong --- backends/meson.build | 2 +- default-configs/devices/i386-softmmu.mak | 1 + hw/i386/Kconfig | 5 +

[PATCH v2 17/32] hw/i386/fw_cfg: Set SGX bits in feature control fw_cfg accordingly

2021-05-11 Thread Yang Zhong
From: Sean Christopherson Request SGX an SGX Launch Control to be enabled in FEATURE_CONTROL when the features are exposed to the guest. Our design is the SGX Launch Control bit will be unconditionally set in FEATURE_CONTROL, which is unlike host bios. Signed-off-by: Sean Christopherson

[PATCH v2 23/32] hostmem: Add the reset interface for EPC backend reset

2021-05-11 Thread Yang Zhong
Add the sgx_memory_backend_reset() interface to handle EPC backend reset when VM is reset. This reset function will destroy previous backend memory region and re-mmap the EPC section for guest. Signed-off-by: Yang Zhong --- backends/hostmem-epc.c | 16 include/hw/i386/pc.h |

[PATCH v2 19/32] i386/pc: Add e820 entry for SGX EPC section(s)

2021-05-11 Thread Yang Zhong
From: Sean Christopherson Note that SGX EPC is currently guaranteed to reside in a single contiguous chunk of memory regardless of the number of EPC sections. Signed-off-by: Sean Christopherson Signed-off-by: Yang Zhong --- hw/i386/pc.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH v2 12/32] i386: Update SGX CPUID info according to hardware/KVM/user input

2021-05-11 Thread Yang Zhong
From: Sean Christopherson Expose SGX to the guest if and only if KVM is enabled and supports virtualization of SGX. While the majority of ENCLS can be emulated to some degree, because SGX uses a hardware-based root of trust, the attestation aspects of SGX cannot be emulated in software, i.e.

<    1   2   3   4   5   6   >