Re: [PATCH v1] docs/devel: Add VFIO device migration documentation

2020-11-03 Thread Kirti Wankhede
On 11/4/2020 1:57 AM, Alex Williamson wrote: On Wed, 4 Nov 2020 01:18:12 +0530 Kirti Wankhede wrote: On 10/30/2020 12:35 AM, Alex Williamson wrote: On Thu, 29 Oct 2020 23:11:16 +0530 Kirti Wankhede wrote: +System memory dirty pages tracking +-- +

Re: VFIO Migration

2020-11-03 Thread Michael S. Tsirkin
On Mon, Nov 02, 2020 at 11:11:53AM +, Stefan Hajnoczi wrote: > Device States > - > The details of the device state representation are not covered in this > document > but the general requirements are discussed here. > > The device state consists of data accessible through the

Re: [PATCH v2 1/3] softmmu: Do not use C99 // comments

2020-11-03 Thread chaihaoyu
Thank you for your replay. That's OK if C99 support both kinds of comment style. > chaihaoyu writes: > >> Hi, recently I found some code style problems while using checkpatch.pl >> tool,please review. >> >> Date: Tue, 3 Nov 2020 11:01:40 +0800

Re: [PATCH v8 06/11] hw/block/nvme: Support allocated CNS command variants

2020-11-03 Thread Klaus Jensen
On Oct 30 11:32, Dmitry Fomichev wrote: > From: Niklas Cassel > > Many CNS commands have "allocated" command variants. These include > a namespace as long as it is allocated, that is a namespace is > included regardless if it is active (attached) or not. > > While these commands are optional

Re: [PATCH 0/4] qga: Fix some style problems

2020-11-03 Thread Marc-André Lureau
On Mon, Oct 26, 2020 at 1:16 PM AlexChen wrote: > Fix some error style problems found by checkpatch.pl. > > alexchen (4): > qga: Add spaces around operator > qga: Delete redundant spaces > qga: Open brace '{' following struct go on the same > qga: switch and case should be at the same

Re: [PATCH] hw/9pfs: virtio-9p: Ensure config space is a multiple of 4 bytes

2020-11-03 Thread Bin Meng
Hi Michael, On Tue, Nov 3, 2020 at 8:05 PM Michael S. Tsirkin wrote: > > On Tue, Nov 03, 2020 at 02:26:10PM +0800, Bin Meng wrote: > > Hi Michael, > > > > On Fri, Oct 30, 2020 at 5:29 PM Michael S. Tsirkin wrote: > > > > > > On Thu, Oct 29, 2020 at 04:25:41PM +0800, Bin Meng wrote: > > > >

Re: [PATCH for-5.2 3/4] qtest: escape device name in device-introspect-test

2020-11-03 Thread Thomas Huth
On 03/11/2020 16.14, Paolo Bonzini wrote: > device-introspect-test uses HMP, so it should escape the device name > properly. Because of this, a few devices that had commas in their > names were escaping testing. > > Signed-off-by: Paolo Bonzini > --- > tests/qtest/device-introspect-test.c | 9

Re: Out-of-Process Device Emulation session at KVM Forum 2020

2020-11-03 Thread Michael S. Tsirkin
On Wed, Nov 04, 2020 at 07:50:52AM +0100, Gerd Hoffmann wrote: > Hi, > > > > I think not. Obviously each firmware should have its own ABI no matter > > > whether its public or proprietary. For proprietary firmware, it should > > > be understood by the proprietary userspace counterpart. > > > >

Re: [PATCH for-5.2 1/4] ivshmem-test: do not use short-form boolean option

2020-11-03 Thread Thomas Huth
On 03/11/2020 16.14, Paolo Bonzini wrote: > This QemuOpts idiom will be deprecated, so get rid of it in the tests. > > Signed-off-by: Paolo Bonzini > --- > tests/qtest/ivshmem-test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qtest/ivshmem-test.c

Re: VFIO Migration

2020-11-03 Thread Stefan Hajnoczi
On Tue, Nov 03, 2020 at 06:49:51PM +, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > On Tue, Nov 03, 2020 at 12:17:09PM +, Dr. David Alan Gilbert wrote: > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > > Device Models > > > > - > >

Re: [PATCH v2] qapi, qemu-options: make all parsing visitors parse boolean options the same

2020-11-03 Thread Markus Armbruster
Paolo Bonzini writes: > OptsVisitor, StringInputVisitor and the keyval visitor have > three different ideas of how a human could write the value of > a boolean option. Pay homage to the backwards-compatibility > gods and make the new common helper accept all four sets (on/off, > true/false, y/n

Re: [PATCH v8 07/11] hw/block/nvme: Support Zoned Namespace Command Set

2020-11-03 Thread Klaus Jensen
On Nov 3 21:37, Philippe Mathieu-Daudé wrote: > On 11/3/20 8:48 PM, Dmitry Fomichev wrote: > >> -Original Message- > >> From: Philippe Mathieu-Daudé > ... > >>> typedef struct QEMU_PACKED NvmeCqe { > >>> -uint32_tresult; > >>> -uint32_trsvd; > >>> +union { > >>> +

Re: [Bug 1902470] Re: migration with TLS-MultiFD is stuck when the dst-libvirtd service restarts

2020-11-03 Thread Zheng Chuan
I think i've got what Daniel point in another maillist about this problem. This is exactly due to Blocking I/O issue of TLS handshake. Src: (multifd_send_0) Dst: (multifd_recv_1) multifd_channel_connect

Re: VFIO Migration

2020-11-03 Thread Stefan Hajnoczi
On Wed, Nov 04, 2020 at 11:32:34AM +0800, Jason Wang wrote: > > On 2020/11/3 下午8:15, Stefan Hajnoczi wrote: > > On Tue, Nov 03, 2020 at 04:46:53PM +0800, Jason Wang wrote: > > > On 2020/11/2 下午7:11, Stefan Hajnoczi wrote: > > > > There is discussion about VFIO migration in the "Re: Out-of-Process

Re: [PATCH] target/openrisc: Remove dead code attempting to check "is timer disabled"

2020-11-03 Thread Stafford Horne
On Tue, Nov 03, 2020 at 11:46:54AM +, Peter Maydell wrote: > In the mtspr helper we attempt to check for "is the timer disabled" > with "if (env->ttmr & TIMER_NONE)". This is wrong because TIMER_NONE > is zero and the condition is always false (Coverity complains about > the dead code.) > >

Re: Out-of-Process Device Emulation session at KVM Forum 2020

2020-11-03 Thread Gerd Hoffmann
Hi, > > I think not. Obviously each firmware should have its own ABI no matter > > whether its public or proprietary. For proprietary firmware, it should > > be understood by the proprietary userspace counterpart. > > Userspace does not necessarily need to interpret the contents. The > vendor

Debugging with rr

2020-11-03 Thread Sai Pavan Boddu
Hi, I tired debugging QEMU with rr version 4.1.0, on ubuntu 16.04. And I see below errors, any suggestions on the issue would be helpful rr: /build/rr-jR8ti5/rr-4.1.0/src/Event.h:304: SyscallEvent& Event::Syscall(): Assertion `is_syscall_event()' failed. Regards, Sai Pavan

Re: [PATCH-for-5.2 2/3] gitlab-ci: Add a job to cover the --without-default-devices config

2020-11-03 Thread Thomas Huth
On 03/11/2020 21.41, Philippe Mathieu-Daudé wrote: > On 11/3/20 7:43 PM, Thomas Huth wrote: >> On 03/11/2020 17.46, Philippe Mathieu-Daudé wrote: [...] >>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml >>> index 3b15ae5c302..6ee098ec53c 100644 >>> --- a/.gitlab-ci.yml >>> +++ b/.gitlab-ci.yml >>>

Re: [PATCH-for-5.2 2/3] gitlab-ci: Add a job to cover the --without-default-devices config

2020-11-03 Thread Thomas Huth
On 04/11/2020 03.27, Stefano Stabellini wrote: [...] > Actually I care about Xen and 9pfs support, it is one of the few > combinations that I use regularly and it is even enabled in the Xilinx > product I look after. But admittedly I don't test QEMU master as much as > I should. With the recent

RE: [PATCH RESEND v2 0/7] some memleak trivial patchs

2020-11-03 Thread Chenqun (kuhn)
Ping! Hi Laurent, These patches have been reviewed by many people 2 months ago. Could you help add them to the trivial branch? Pan Nengyuan (6): qga/channel-posix: Plug memory leak in ga_channel_write_all() elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init elf2dmp/pdb: Plug memleak in

[PULL v2 37/38] vhost-user-blk-test: drop unused return value

2020-11-03 Thread Michael S. Tsirkin
From: Stefan Hajnoczi The sock_path return value was unused and bogus (it doesn't make sense when there are multiple drives because only the last path is arbitrarily returned). Signed-off-by: Stefan Hajnoczi Message-Id: <20201027173528.213464-12-stefa...@redhat.com> Reviewed-by: Michael S.

[PULL v2 10/38] hw/acpi : add spaces around operator

2020-11-03 Thread Michael S. Tsirkin
From: Xinhao Zhang Fix code style. Operator needs spaces both sides. Signed-off-by: Xinhao Zhang Signed-off-by: Kai Deng Message-Id: <20201103102634.273021-3-zhangxinh...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/acpi/pcihp.c | 2 +- 1 file

[PULL v2 31/38] contrib/vhost-user-blk: fix get_config() information leak

2020-11-03 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Refuse get_config() in excess of sizeof(struct virtio_blk_config). Signed-off-by: Stefan Hajnoczi Message-Id: <20201027173528.213464-6-stefa...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- contrib/vhost-user-blk/vhost-user-blk.c | 2

[PULL v2 16/38] virtio-iommu: Call memory notifiers in attach/detach

2020-11-03 Thread Michael S. Tsirkin
From: Bharat Bhushan Call the memory notifiers when attaching an endpoint to a domain, to replay existing mappings, and when detaching the endpoint, to remove all mappings. Signed-off-by: Bharat Bhushan Signed-off-by: Jean-Philippe Brucker Message-Id:

Re: [PATCH v3 2/7] target/riscv: Add a virtualised MMU Mode

2020-11-03 Thread Alistair Francis
On Tue, Nov 3, 2020 at 12:20 PM Richard Henderson wrote: > > On 11/3/20 11:50 AM, Alistair Francis wrote: > > @@ -30,6 +30,10 @@ int riscv_cpu_mmu_index(CPURISCVState *env, bool ifetch) > > #ifdef CONFIG_USER_ONLY > > return 0; > > #else > > +if (riscv_cpu_virt_enabled(env)) { > > +

[PATCH v4 4/5] target/riscv: Remove the hyp load and store functions

2020-11-03 Thread Alistair Francis
Remove the special Virtulisation load and store functions and just use the standard tcg tcg_gen_qemu_ld_tl() and tcg_gen_qemu_st_tl() functions instead. As part of this change we ensure we still run an access check to make sure we can perform the operations. Signed-off-by: Alistair Francis ---

[PULL v2 33/38] tests/qtest: add multi-queue test case to vhost-user-blk-test

2020-11-03 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Message-id: 20201001144604.559733-3-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi Message-Id: <20201027173528.213464-8-stefa...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL v2 28/38] configure: introduce --enable-vhost-user-blk-server

2020-11-03 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Make it possible to compile out the vhost-user-blk server. It is enabled by default on Linux. Note that vhost-user-server.c depends on libvhost-user, which requires CONFIG_LINUX. The CONFIG_VHOST_USER dependency was erroneous since that option controls vhost-user frontends

[PATCH v4 2/5] target/riscv: Set the virtualised MMU mode when doing hyp accesses

2020-11-03 Thread Alistair Francis
When performing the hypervisor load/store operations set the MMU mode to indicate that we are virtualised. Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson --- target/riscv/op_helper.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff

[PULL v2 14/38] virtio-iommu: Store memory region in endpoint struct

2020-11-03 Thread Michael S. Tsirkin
From: Jean-Philippe Brucker Store the memory region associated to each endpoint into the endpoint structure, to allow efficient memory notification on map/unmap. Acked-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Message-Id: <20201030180510.747225-3-jean-phili...@linaro.org>

[PULL v2 35/38] vhost-user-blk-test: rename destroy_drive() to destroy_file()

2020-11-03 Thread Michael S. Tsirkin
From: Stefan Hajnoczi The function is used not just for image files but also for UNIX domain sockets (QMP monitor and vhost-user-blk). Reflect that in the name. Signed-off-by: Stefan Hajnoczi Message-Id: <20201027173528.213464-10-stefa...@redhat.com> Reviewed-by: Michael S. Tsirkin

[PATCH v4 1/5] target/riscv: Add a virtualised MMU Mode

2020-11-03 Thread Alistair Francis
Add a new MMU mode that includes the current virt mode. Signed-off-by: Alistair Francis --- target/riscv/cpu-param.h | 11 ++- target/riscv/cpu.h| 4 +++- target/riscv/cpu_helper.c | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git

[PULL v2 11/38] hw/virtio/vhost-backend: Fix Coverity CID 1432871

2020-11-03 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé Fix uninitialized value issues reported by Coverity: Field 'msg.reserved' is uninitialized when calling write(). While the 'struct vhost_msg' does not have a 'reserved' field, we still initialize it to have the two parts of the function consistent. Reported-by:

[PULL v2 32/38] test: new qTest case to test the vhost-user-blk-server

2020-11-03 Thread Michael S. Tsirkin
From: Coiby Xu This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Since vhost-user server can only server one client one time, two instances of vhost-user-blk-server are started by qemu-storage-daemon for the hotplug test. In order to not block

[PULL v2 12/38] hw/smbios: Fix leaked fd in save_opt_one() error path

2020-11-03 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé Fix the following Coverity issue (RESOURCE_LEAK): CID 1432879: Resource leak Handle variable fd going out of scope leaks the handle. Replace a close() call by qemu_close() since the handle is opened with qemu_open(). Fixes: bb99f4772f5 ("hw/smbios: support

[PULL v2 25/38] Revert "vhost-blk: set features before setting inflight feature"

2020-11-03 Thread Michael S. Tsirkin
From: Stefan Hajnoczi This reverts commit adb29c027341ba095a3ef4beef6aaef86d3a520e. The commit broke -device vhost-user-blk-pci because the vhost_dev_prepare_inflight() function it introduced segfaults in vhost_dev_set_features() when attempting to access struct vhost_dev's vdev pointer before

[PULL v2 26/38] vhost-blk: set features before setting inflight feature

2020-11-03 Thread Michael S. Tsirkin
From: Jin Yu Virtqueue has split and packed, so before setting inflight, you need to inform the back-end virtqueue format. Signed-off-by: Jin Yu Acked-by: Raphael Norwitz Message-Id: <20201103123617.28256-1-jin...@intel.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[PULL v2 36/38] vhost-user-blk-test: close fork child file descriptors

2020-11-03 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Do not leave stdin, stdout, stderr open after fork. stdout is the tap-driver.pl pipe. If we keep the pipe open then tap-driver.pl will not detect that qos-test has terminated and it will hang. Signed-off-by: Stefan Hajnoczi Message-Id:

[PATCH v4 5/5] target/riscv: Split the Hypervisor execute load helpers

2020-11-03 Thread Alistair Francis
Split the hypervisor execute load functions into two seperate functions. This avoids us having to pass the memop to the C helper functions. Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson --- target/riscv/helper.h | 3 ++- target/riscv/op_helper.c

[PULL v2 21/38] virtio-iommu: Set supported page size mask

2020-11-03 Thread Michael S. Tsirkin
From: Bharat Bhushan The virtio-iommu device can deal with arbitrary page sizes for virtual endpoints, but for endpoints assigned with VFIO it must follow the page granule used by the host IOMMU driver. Implement the interface to set the vIOMMU page size mask, called by VFIO for each endpoint.

[PULL v2 30/38] block/export: fix vhost-user-blk get_config() information leak

2020-11-03 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Refuse get_config() requests in excess of sizeof(struct virtio_blk_config). Signed-off-by: Stefan Hajnoczi Message-Id: <20201027173528.213464-5-stefa...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL v2 20/38] vfio: Set IOMMU page size as per host supported page size

2020-11-03 Thread Michael S. Tsirkin
From: Bharat Bhushan Set IOMMU supported page size mask same as host Linux supported page size mask. Acked-by: Alex Williamson Reviewed-by: Eric Auger Signed-off-by: Bharat Bhushan Signed-off-by: Jean-Philippe Brucker Message-Id: <20201030180510.747225-9-jean-phili...@linaro.org>

[PATCH v4 3/5] target/riscv: Remove the HS_TWO_STAGE flag

2020-11-03 Thread Alistair Francis
The HS_TWO_STAGE flag is no longer required as the MMU index contains the information if we are performing a two stage access. Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson --- target/riscv/cpu.h| 3 +- target/riscv/cpu_bits.h | 1 - target/riscv/cpu_helper.c | 60

[PULL v2 19/38] memory: Add interface to set iommu page size mask

2020-11-03 Thread Michael S. Tsirkin
From: Bharat Bhushan Allow to set the page size mask supported by an iommu memory region. This enables a vIOMMU to communicate the page size granule supported by an assigned device, on hosts that use page sizes greater than 4kB. Acked-by: Peter Xu Reviewed-by: Eric Auger Signed-off-by: Bharat

[PULL v2 29/38] block/export: make vhost-user-blk config space little-endian

2020-11-03 Thread Michael S. Tsirkin
From: Stefan Hajnoczi VIRTIO 1.0 devices have little-endian configuration space. The vhost-user-blk-server.c code already uses little-endian for virtqueue processing but not for the configuration space fields. Fix this so the vhost-user-blk export works on big-endian hosts. Signed-off-by:

[PULL v2 08/38] hw/acpi : Don't use '#' flag of printf format

2020-11-03 Thread Michael S. Tsirkin
From: Xinhao Zhang Fix code style. Don't use '#' flag of printf format ('%#') in format strings, use '0x' prefix instead Signed-off-by: Xinhao Zhang Signed-off-by: Kai Deng Message-Id: <20201103102634.273021-1-zhangxinh...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[PATCH v4 0/5] Fix the Hypervisor access functions

2020-11-03 Thread Alistair Francis
Richard pointed out that the Hypervisor access functions don't work correctly, see: https://www.mail-archive.com/qemu-devel@nongnu.org/msg751540.html. This seris fixes them up by adding a new MMU index for the virtualised state. v4: - Consolidate the inline helper to a helper function - Actually

[PULL v2 17/38] virtio-iommu: Add replay() memory region callback

2020-11-03 Thread Michael S. Tsirkin
From: Bharat Bhushan Implement the replay callback to setup all mappings for a new memory region. Signed-off-by: Bharat Bhushan Signed-off-by: Jean-Philippe Brucker Message-Id: <20201030180510.747225-6-jean-phili...@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[PULL v2 05/38] memory-device: Support big alignment requirements

2020-11-03 Thread Michael S. Tsirkin
From: David Hildenbrand Let's warn instead of bailing out - the worst thing that can happen is that we'll fail hot/coldplug later. The user got warned, and this should be rare. This will be necessary for memory devices with rather big (user-defined) alignment requirements - say a virtio-mem

[PULL v2 18/38] virtio-iommu: Add notify_flag_changed() memory region callback

2020-11-03 Thread Michael S. Tsirkin
From: Bharat Bhushan Add notify_flag_changed() to notice when memory listeners are added and removed. Acked-by: Eric Auger Signed-off-by: Bharat Bhushan Signed-off-by: Jean-Philippe Brucker Message-Id: <20201030180510.747225-7-jean-phili...@linaro.org> Reviewed-by: Michael S. Tsirkin

[PULL v2 27/38] libvhost-user: follow QEMU comment style

2020-11-03 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Message-Id: <20201027173528.213464-2-stefa...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- contrib/libvhost-user/libvhost-user.h | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-)

[PULL v2 04/38] virtio-mem: Probe THP size to determine default block size

2020-11-03 Thread Michael S. Tsirkin
From: David Hildenbrand Let's allow a minimum block size of 1 MiB in all configurations. Select the default block size based on - The page size of the memory backend. - The THP size if the memory backend size corresponds to the real host page size. - The global minimum of 1 MiB. and warn if

[PULL v2 15/38] virtio-iommu: Add memory notifiers for map/unmap

2020-11-03 Thread Michael S. Tsirkin
From: Bharat Bhushan Extend VIRTIO_IOMMU_T_MAP/UNMAP request to notify memory listeners. It will call VFIO notifier to map/unmap regions in the physical IOMMU. Signed-off-by: Bharat Bhushan Signed-off-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Message-Id:

[PULL v2 24/38] net: Add vhost-vdpa in show_netdevs()

2020-11-03 Thread Michael S. Tsirkin
From: Cindy Lu Fix the bug that while Check qemu supported netdev, there is no vhost-vdpa Signed-off-by: Cindy Lu Message-Id: <20201016030909.9522-2-l...@redhat.com> Acked-by: Jason Wang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- net/net.c | 3 +++ 1 file

[PULL v2 38/38] vhost-user-blk-test: fix races by using fd passing

2020-11-03 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Pass the QMP and vhost-user-blk server sockets as file descriptors. That way the sockets are already open and in a listen state when the QEMU process is launched. This solves the race with qemu-storage-daemon startup where the UNIX domain sockets may not be ready yet when

[PULL v2 13/38] virtio-iommu: Fix virtio_iommu_mr()

2020-11-03 Thread Michael S. Tsirkin
From: Jean-Philippe Brucker Due to an invalid mask, virtio_iommu_mr() may return the wrong memory region. It hasn't been too problematic so far because the function was only used to test existence of an endpoint, but that is about to change. Fixes: cfb42188b24d ("virtio-iommu: Implement

[PULL v2 03/38] virtio-mem: Make sure "usable_region_size" is always multiples of the block size

2020-11-03 Thread Michael S. Tsirkin
From: David Hildenbrand The spec states: "The device MUST set addr, region_size, usable_region_size, plugged_size, requested_size to multiples of block_size." With block sizes > 256MB, we currently wouldn't guarantee that for the usable_region_size. Note that we cannot exceed the

[PULL v2 09/38] hw/acpi : add space before the open parenthesis '('

2020-11-03 Thread Michael S. Tsirkin
From: Xinhao Zhang Fix code style. Space required before the open parenthesis '('. Signed-off-by: Xinhao Zhang Signed-off-by: Kai Deng Message-Id: <20201103102634.273021-2-zhangxinh...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/acpi/core.c | 2 +-

[PULL v2 34/38] libqtest: add qtest_socket_server()

2020-11-03 Thread Michael S. Tsirkin
From: Stefan Hajnoczi There is a qtest_socket_client() API. Add an equivalent qtest_socket_server() API that returns a new UNIX domain socket in the listen state. The code for this was already there but only used internally in init_socket(). Signed-off-by: Stefan Hajnoczi Message-Id:

[PULL v2 06/38] memory-device: Add get_min_alignment() callback

2020-11-03 Thread Michael S. Tsirkin
From: David Hildenbrand Add a callback that can be used to express additional alignment requirements (exceeding the ones from the memory region). Will be used by virtio-mem to express special alignment requirements due to manually configured, big block sizes (e.g., 1GB with an ordinary

[PULL v2 23/38] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup

2020-11-03 Thread Michael S. Tsirkin
From: Cindy Lu fix the bug that fd will still open after the cleanup Signed-off-by: Cindy Lu Message-Id: <20201016030909.9522-1-l...@redhat.com> Acked-by: Jason Wang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- net/vhost-vdpa.c | 4 1 file changed, 4

[PULL v2 02/38] virtio-mem: Make sure "addr" is always multiples of the block size

2020-11-03 Thread Michael S. Tsirkin
From: David Hildenbrand The spec states: "The device MUST set addr, region_size, usable_region_size, plugged_size, requested_size to multiples of block_size." In some cases, we currently don't guarantee that for "addr": For example, when starting a VM with 4 GiB boot memory and a

[PULL v2 22/38] vfio: Don't issue full 2^64 unmap

2020-11-03 Thread Michael S. Tsirkin
From: Jean-Philippe Brucker IOMMUs may declare memory regions spanning from 0 to UINT64_MAX. When attempting to deal with such region, vfio_listener_region_del() passes a size of 2^64 to int128_get64() which throws an assertion failure. Even ignoring this, the VFIO_IOMMU_DMA_MAP ioctl cannot

[PULL v2 07/38] virito-mem: Implement get_min_alignment()

2020-11-03 Thread Michael S. Tsirkin
From: David Hildenbrand The block size determines the alignment requirements. Implement get_min_alignment() of the TYPE_MEMORY_DEVICE interface. This allows auto-assignment of a properly aligned address in guest physical address space. For example, when specifying a 2GB block size for a

[PULL v2 01/38] pc: comment style fixup

2020-11-03 Thread Michael S. Tsirkin
Fix up checkpatch comment style warnings. Signed-off-by: Michael S. Tsirkin Reviewed-by: Chen Qun --- hw/i386/pc.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 5e6c0023e0..17b514d1da 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c

[PULL v2 00/38] pc,pci,vhost,virtio: fixes

2020-11-03 Thread Michael S. Tsirkin
Sending v2 since v1 was borken on 32 bit. The following changes since commit c7a7a877b716cf14848f1fd5c754d293e2f8d852: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20201102' into staging (2020-11-03 10:38:05 +) are available in the Git repository at:

Re: [PATCH] hw/intc: Fix incorrect calculation of core in liointc_read() and liointc_write()

2020-11-03 Thread chen huacai
Hi, Philippe and Jiaxun, On Wed, Nov 4, 2020 at 1:17 AM Philippe Mathieu-Daudé wrote: > > On 11/3/20 4:40 PM, Jiaxun Yang wrote: > > 于 2020年11月3日 GMT+08:00 下午8:28:27, "Philippe Mathieu-Daudé" > > 写到: > >> On 11/3/20 10:32 AM, AlexChen wrote: > >>> According to the loongson spec > >>>

Re: [PATCH V16 1/6] target/mips: Fix PageMask with variable page size

2020-11-03 Thread Huacai Chen
Hi, Phillippe, On Tue, Nov 3, 2020 at 10:53 PM Philippe Mathieu-Daudé wrote: > > On 10/30/20 11:25 AM, Huacai Chen wrote: > > From: Jiaxun Yang > > > > Our current code assumed the target page size is always 4k > > when handling PageMask and VPN2, however, variable page size > > was just added

Re: [PATCH V16 5/6] hw/mips: Add Loongson-3 machine support

2020-11-03 Thread Huacai Chen
Hi, Philippe, On Wed, Nov 4, 2020 at 4:23 AM Philippe Mathieu-Daudé wrote: > > Hi Huacai, > > On 10/30/20 11:25 AM, Huacai Chen wrote: > > Add Loongson-3 based machine support, it use liointc as the interrupt > > controler and use GPEX as the pci controller. Currently it can work with > > both

Re: VFIO Migration

2020-11-03 Thread Jason Wang
On 2020/11/3 下午8:15, Stefan Hajnoczi wrote: On Tue, Nov 03, 2020 at 04:46:53PM +0800, Jason Wang wrote: On 2020/11/2 下午7:11, Stefan Hajnoczi wrote: There is discussion about VFIO migration in the "Re: Out-of-Process Device Emulation session at KVM Forum 2020" thread. The current status is

Re: [RFC PATCH 6/6] docs: Added eBPF documentation.

2020-11-03 Thread Jason Wang
On 2020/11/3 上午2:51, Andrew Melnychenko wrote: From: Andrew Also, added maintainers information. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- MAINTAINERS | 6 +++ docs/ebpf.rst | 29 +++ docs/ebpf_rss.rst | 129

Re: [RFC PATCH 5/6] virtio-net: Added eBPF RSS to virtio-net.

2020-11-03 Thread Jason Wang
On 2020/11/3 上午2:51, Andrew Melnychenko wrote: 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

RE: [PATCH 1/6] target/xtensa: fix uninitialized variable warning

2020-11-03 Thread Chenqun (kuhn)
> -Original Message- > From: Max Filippov [mailto:jcmvb...@gmail.com] > Sent: Tuesday, November 3, 2020 5:22 PM > To: Chenqun (kuhn) > Cc: qemu-devel ; QEMU Trivial > ; Zhanghailiang > ; ganqixin ; Euler > Robot > Subject: Re: [PATCH 1/6] target/xtensa: fix uninitialized variable warning

Re: [RFC PATCH 1/6] net: Added SetSteeringEBPF method for NetClientState.

2020-11-03 Thread Jason Wang
On 2020/11/3 上午2:51, Andrew Melnychenko wrote: From: Andrew For now, that method supported only by Linux TAP. Linux TAP uses TUNSETSTEERINGEBPF ioctl. TUNSETSTEERINGBPF was added 3 years ago. Qemu checks if it was defined before using. Signed-off-by: Andrew Melnychenko ---

Re: [PATCH-for-5.2 2/3] gitlab-ci: Add a job to cover the --without-default-devices config

2020-11-03 Thread Stefano Stabellini
On Tue, 3 Nov 2020, Philippe Mathieu-Daudé wrote: > I forgot to Cc the 9pfs & Xen maintainers, doing it now ;) > > On 11/3/20 6:01 PM, Philippe Mathieu-Daudé wrote: > > On 11/3/20 5:52 PM, Daniel P. Berrangé wrote: > >> On Tue, Nov 03, 2020 at 05:46:03PM +0100, Philippe Mathieu-Daudé wrote: > >>>

Re: [RFC PATCH 0/6] eBPF RSS support for virtio-net

2020-11-03 Thread Jason Wang
On 2020/11/3 下午7:56, Daniel P. Berrangé wrote: On Tue, Nov 03, 2020 at 12:32:43PM +0200, Yuri Benditovich wrote: On Tue, Nov 3, 2020 at 11:02 AM Jason Wang wrote: On 2020/11/3 上午2:51, Andrew Melnychenko wrote: Basic idea is to use eBPF to calculate and steer packets in TAP. RSS(Receive

Re: [RFC PATCH 0/6] eBPF RSS support for virtio-net

2020-11-03 Thread Jason Wang
On 2020/11/3 下午6:32, Yuri Benditovich wrote: On Tue, Nov 3, 2020 at 11:02 AM Jason Wang > wrote: On 2020/11/3 上午2:51, Andrew Melnychenko wrote: > Basic idea is to use eBPF to calculate and steer packets in TAP. > RSS(Receive Side Scaling) is used to

Re: [PATCH 00/15] python: absorb scripts/qmp/qom-* tooling

2020-11-03 Thread John Snow
On 10/21/20 2:51 PM, John Snow wrote: Based-on: <20201020193555.1493936-1-js...@redhat.com> [PATCH v3 00/15] python: create installable package Thanks for the early look. This is superseded by: [PATCH v2 00/72] python: move scripts/qmp to python/qemu/qmp This is a bit of a

[PATCH v2 70/72] scripts/qmp-shell: move to python/qemu/qmp/qmp_shell.py

2020-11-03 Thread John Snow
The script will be unavailable for a commit or two, which will help preserve development history attached to the new file. A forwarder will be added shortly afterwards. Signed-off-by: John Snow --- scripts/qmp/qmp-shell => python/qemu/qmp/qmp_shell.py | 3 --- 1 file changed, 3 deletions(-)

[PATCH v2 69/72] scripts/qmp-shell: add docstrings

2020-11-03 Thread John Snow
Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 1a8a4ba18ab4..15aedb80c2af 100755 --- a/scripts/qmp/qmp-shell +++

[PATCH v2 68/72] scripts/qmp-shell: make QMPShellError inherit QMPError

2020-11-03 Thread John Snow
This way, all exceptions from the qemu.qmp namespace all derive from QMPError. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 40ff9e0a82bd..1a8a4ba18ab4 100755 ---

[PATCH v2 57/72] scripts/qmp-shell: add mypy types

2020-11-03 Thread John Snow
As per my usual, this patch is annotations only. Any changes with side effects are done elsewhere. Note: pylint does not understand the subscripts for Collection in Python 3.6, so use the stronger Sequence type as a workaround. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 67

[PATCH v2 55/72] scripts/qmp-shell: initialize completer early

2020-11-03 Thread John Snow
Add an empty completer as a more type-safe placeholder instead of 'None'. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 73694035b203..670361322c51 100755 ---

[PATCH v2 56/72] python/qmp: add QMPObject type alias

2020-11-03 Thread John Snow
This is meant to represent any generic object seen in a QMPMessage, not just the root object itself. Signed-off-by: John Snow --- python/qemu/qmp/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/qemu/qmp/__init__.py b/python/qemu/qmp/__init__.py index

[PATCH v2 63/72] scripts/qmp-shell: remove TODO

2020-11-03 Thread John Snow
We still want to revamp qmp-shell again, but there's much more to the idea than the comment now intuits. Remove it. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index

[PATCH v2 54/72] scripts/qmp-shell: refactor QMPCompleter

2020-11-03 Thread John Snow
list is a generic type, but we expect to use strings directly. We could subclass list[str], but pylint does not presently understand that invocation. Change this class to envelop a list instead of *being* a list, for simpler typing. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 14

Re: [PATCH v2 00/16] qapi: static typing conversion, pt3

2020-11-03 Thread John Snow
On 10/26/20 5:36 PM, John Snow wrote: based-on: <20201026194251.11075-1-js...@redhat.com> [PATCH v2 00/11] qapi: static typing conversion, pt2 Ping, This series can be reviewed independently of pt2, so I encourage you to try if you have the time. Hi, this series adds static

[PATCH v2 66/72] scripts/qmp-shell: convert usage comment to docstring

2020-11-03 Thread John Snow
Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 128 -- 1 file changed, 72 insertions(+), 56 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 8d5845ab4815..82fe16cff820 100755 --- a/scripts/qmp/qmp-shell +++

[PATCH v2 41/72] scripts/qmp-shell: fix shell history exception handling

2020-11-03 Thread John Snow
We want to remove exceptions that are too broad here; we only want to catch IOErrors that get raised as a direct result of the open call. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/scripts/qmp/qmp-shell

[PATCH v2 61/72] scripts/qmp-shell: Use context manager instead of atexit

2020-11-03 Thread John Snow
We can invoke the shell history writing when we leave the QMPShell scope instead of relying on atexit. Doing so may be preferable to avoid global state being registered from within a class instead of from the application logic directly. Use QMP's context manager to hook this history saving at

[PATCH v2 64/72] scripts/qmp-shell: Fix empty-transaction invocation

2020-11-03 Thread John Snow
calling "transaction( )" is pointless, but valid. Rework the parser to allow this kind of invocation. This helps clean up exception handling later by removing accidental breakages of the parser that aren't explicitly forbidden. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 14

[PATCH v2 62/72] scripts/qmp-shell: use logging to show warnings

2020-11-03 Thread John Snow
Perfect candidate is non-fatal shell history messages. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index ec028d662e8e..0199a13a3428 100755 ---

[PATCH v2 72/72] scripts/qmp-shell: add redirection shim

2020-11-03 Thread John Snow
qmp-shell has a new home, add a redirect for a little while as the dust settles. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 11 +++ 1 file changed, 11 insertions(+) create mode 100755 scripts/qmp/qmp-shell diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell new file

[PATCH v2 71/72] python: add qmp-shell entry point

2020-11-03 Thread John Snow
now 'qmp-shell' should be available from the command line when installing the python package. Signed-off-by: John Snow --- python/setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/python/setup.cfg b/python/setup.cfg index f2f54bcaefe8..230fd870ea91 100644 --- a/python/setup.cfg +++

[PATCH v2 37/72] scripts/qmp-shell: use triple-double-quote docstring style

2020-11-03 Thread John Snow
(2014 me had never written python before.) Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 7233c4e00b89..73b2c099f0f0 100755 --- a/scripts/qmp/qmp-shell +++

[PATCH v2 60/72] python/qmp: return generic type from context manager

2020-11-03 Thread John Snow
__enter__ can be invoked from a subclass, so it needs a more specific type. Signed-off-by: John Snow --- python/qemu/qmp/__init__.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/qemu/qmp/__init__.py b/python/qemu/qmp/__init__.py index ba0d2281d678..376954cb6d27

[PATCH v2 42/72] scripts/qmp-shell: explicitly chain exception context

2020-11-03 Thread John Snow
Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 6ad9384c1804..b3ab735397d4 100755 --- a/scripts/qmp/qmp-shell +++ b/scripts/qmp/qmp-shell @@ -138,8 +138,8 @@ class

[PATCH v2 58/72] scripts/qmp-shell: Accept SocketAddrT instead of string

2020-11-03 Thread John Snow
Don't extend QEMUMonitorProtocol but change the argument types; move the string parsing just outside of the class. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell

[PATCH v2 67/72] scripts/qmp-shell: remove double-underscores

2020-11-03 Thread John Snow
They're not needed; single underscore is enough to express intent that these methods are "internal". double underscore is used as a weak name mangling, but that isn't beneficial for us here. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 52 +-- 1

[PATCH v2 53/72] scripts/qmp-shell: Fix "FuzzyJSON" parser

2020-11-03 Thread John Snow
I'm not sure when this regressed (Or maybe if it was ever working right to begin with?), but the Python AST requires you to change "Names" to "Constants" in order to truly convert `false` to `False`. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 20 ++-- 1 file changed,

  1   2   3   4   5   6   >