[PULL 1/5] target/loongarch: bstrins.w src register need EXT_NONE

2022-10-17 Thread Song Gao
use gen_bstrins/gen_bstrpic to replace gen_rr_ms_ls. Suggested-by: Richard Henderson Signed-off-by: Song Gao Reviewed-by: Richard Henderson Message-Id: <20220930024510.85-2-gaos...@loongson.cn> --- target/loongarch/insn_trans/trans_bit.c.inc | 36 + 1 file changed, 22 i

[PATCH v5 6/7] qga: Move HW address getting to a separate function

2022-10-17 Thread Alexander Ivanov
In the next patch FreeBSD support for guest-network-get-interfaces will be added. Previously move Linux-specific code of HW address getting to a separate functions and add a dumb function to commands-bsd.c. Reviewed-by: Konstantin Kostiuk Reviewed-by: Marc-André Lureau Signed-off-by: Alexander I

[PATCH v5 5/7] qga: Add support for user password setting in FreeBSD

2022-10-17 Thread Alexander Ivanov
Move qmp_guest_set_user_password() from __linux__ condition to (__linux__ || __FreeBSD__) condition. Add command and arguments for password setting in FreeBSD. Reviewed-by: Konstantin Kostiuk Reviewed-by: Marc-André Lureau Signed-off-by: Alexander Ivanov --- qga/commands-posix.c | 35 +

[PATCH v5 1/7] qga: Add initial FreeBSD support

2022-10-17 Thread Alexander Ivanov
- Fix device path. - Fix virtio-serial channel initialization. - Make the code buildable in FreeBSD. Reviewed-by: Konstantin Kostiuk Acked-by: Marc-André Lureau Signed-off-by: Alexander Ivanov --- meson.build | 2 +- qga/channel-posix.c | 19 +++ qga/commands-posix.c

[PATCH v5 7/7] qga: Add HW address getting for FreeBSD

2022-10-17 Thread Alexander Ivanov
Replace a dumb function in commands-bsd.c by the code of HW address getting. Reviewed-by: Konstantin Kostiuk Reviewed-by: Marc-André Lureau Signed-off-by: Alexander Ivanov --- qga/commands-bsd.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/qga/commands-bsd.c b/qga/comma

[PATCH v5 3/7] qga: Add UFS freeze/thaw support for FreeBSD

2022-10-17 Thread Alexander Ivanov
UFS supports FS freezing through ioctl UFSSUSPEND on /dev/ufssuspend. Frozen FS can be thawed by closing /dev/ufssuspend file descriptior. Use getmntinfo to get a list of mounted FS. Reviewed-by: Konstantin Kostiuk Reviewed-by: Marc-André Lureau Signed-off-by: Alexander Ivanov --- qga/command

Re: [PULL 0/2] M68k for 7.2 patches

2022-10-17 Thread Laurent Vivier
Le 17/10/2022 à 05:56, Jason A. Donenfeld via a écrit : On Sun, Oct 16, 2022 at 03:50:54PM -0400, Stefan Hajnoczi wrote: On Fri, 14 Oct 2022 at 03:26, Laurent Vivier wrote: The following changes since commit f1d33f55c47dfdaf8daacd618588ad3ae4c452d1: Merge tag 'pull-testing-gdbstub-plugins

[PATCH v5 2/7] qga: Move Linux-specific FS freeze/thaw code to a separate file

2022-10-17 Thread Alexander Ivanov
In the next patches we are going to add FreeBSD support for QEMU Guest Agent. In the result, code in commands-posix.c will be too cumbersome. Move Linux-specific FS freeze/thaw code to a separate file commands-linux.c keeping common POSIX code in commands-posix.c. Reviewed-by: Konstantin Kostiuk

Re: [PATCH v1] s390x/tod-kvm: don't save/restore the TOD in PV guests

2022-10-17 Thread Thomas Huth
On 12/10/2022 14.32, Nico Boehr wrote: Under PV, the guest's TOD clock is under control of the ultravisor and the hypervisor cannot change it. With upcoming kernel changes[1], the Linux kernel will reject QEMU's request to adjust the guest's clock in this case, so don't attempt to set the clock.

[PATCH v5 4/7] qga: Add shutdown/halt/reboot support for FreeBSD

2022-10-17 Thread Alexander Ivanov
Add appropriate shutdown command arguments to qmp_guest_shutdown() for FreeBSD. Reviewed-by: Konstantin Kostiuk Reviewed-by: Marc-André Lureau Signed-off-by: Alexander Ivanov --- qga/commands-posix.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/qga/commands-posix.c b/qga/commands

[PATCH v5 0/7] qga: Add FreeBSD support

2022-10-17 Thread Alexander Ivanov
Add freeze/thaw, shutdown/halt/reboot, password setting and guest-network-get-interfaces command support for FreeBSD. v5: 2: Left ga_wait_child() static in commands-posix.c. v4: 6,7: Return bool instead int in guest_get_hw_addr(). v3: 1: Add a comment about echo suppressing. 5: Replace code movi

Re: MultiFD and default channel out of order mapping on receive side.

2022-10-17 Thread manish.mishra
Hi Daniel, I was thinking for some solutions for this so wanted to discuss that before going ahead. Also added Juan and Peter in loop. 1. Earlier i was thinking, on destination side as of now for default and multi-FD channel first data to be sent is MAGIC_NUMBER and VERSION so may be we can d

Re: [PATCH V3 4/4] intel-iommu: PASID support

2022-10-17 Thread Jason Wang
On Sat, Oct 15, 2022 at 12:17 AM Peter Xu wrote: > > On Sun, Oct 09, 2022 at 01:48:35PM +0800, Jason Wang wrote: > > This patch introduce ECAP_PASID via "x-pasid-mode". Based on the > > existing support for scalable mode, we need to implement the following > > missing parts: > > > > 1) tag VTDAddr

[PATCH 1/2] multifd: Fix a race on reading MultiFDPages_t.block

2022-10-17 Thread Zhenzhong Duan
In multifd_queue_page() MultiFDPages_t.block is checked twice. Between the two checks, MultiFDPages_t.block may be reset to NULL by multifd thread. This lead to the 2nd check always true then a redundant page submitted to multifd thread again. Signed-off-by: Zhenzhong Duan --- migration/multifd.

[PATCH 2/2] multifd: Fix flush of zero copy page send request

2022-10-17 Thread Zhenzhong Duan
Make IO channel flush call after the inflight request has been drained in multifd thread, or else we may missed to flush the inflight request. Signed-off-by: Zhenzhong Duan --- migration/multifd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/migration/multifd.

Re: [PATCH] s390x/pv: remove semicolon from macro definition

2022-10-17 Thread Thomas Huth
On 10/10/2022 17.10, Claudio Imbrenda wrote: Remove spurious semicolon at the end of the macro s390_pv_cmd Signed-off-by: Claudio Imbrenda --- hw/s390x/pv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c index 401b63d6cb..9bcd5d829f 100644 -

Re: [PATCH] hw/virtio/virtio-iommu-pci: Enforce the device is plugged on the root bus

2022-10-17 Thread Andrea Bolognani
On Wed, Oct 12, 2022 at 12:34:48PM -0400, Eric Auger wrote: > In theory the virtio-iommu-pci could be plugged anywhere in the PCIe > topology and as long as the dt/acpi info are properly built this should > work. However at the moment we fail to do that because the > virtio-iommu-pci BDF is not com

[PATCH v6 03/10] dump: Reorder struct DumpState

2022-10-17 Thread Janosch Frank
Let's move ELF related members into one block and guest memory related ones into another to improve readability. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson Reviewed-by: Marc-André Lureau --- include/sysemu/dump.h | 16 +--- 1 file changed, 9 insertions(+), 7 deleti

[PATCH v6 06/10] s390x: Add protected dump cap

2022-10-17 Thread Janosch Frank
Add a protected dump capability for later feature checking. Signed-off-by: Janosch Frank Reviewed-by: Steffen Eiden Reviewed-by: Thomas Huth Reviewed-by: Janis Schoetterl-Glausch --- target/s390x/kvm/kvm.c | 7 +++ target/s390x/kvm/kvm_s390x.h | 1 + 2 files changed, 8 insertions(+)

[PATCH v6 08/10] RFC: elf.h changes

2022-10-17 Thread Janosch Frank
Adding two s390x note types Signed-off-by: Janosch Frank --- include/elf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/elf.h b/include/elf.h index 3d6b9062c0..8bf1e72720 100644 --- a/include/elf.h +++ b/include/elf.h @@ -1650,6 +1650,8 @@ typedef struct elf64_shdr { #define NT

[PATCH v6 07/10] s390x: Introduce PV query interface

2022-10-17 Thread Janosch Frank
Introduce an interface over which we can get information about UV data. Signed-off-by: Janosch Frank Reviewed-by: Steffen Eiden Reviewed-by: Janis Schoetterl-Glausch Acked-by: Thomas Huth --- hw/s390x/pv.c | 61 ++ hw/s390x/s390-virtio-ccw.c |

[PATCH v6 01/10] dump: Use a buffer for ELF section data and headers

2022-10-17 Thread Janosch Frank
Currently we're writing the NULL section header if we overflow the physical header number in the ELF header. But in the future we'll add custom section headers AND section data. To facilitate this we need to rearange section handling a bit. As with the other ELF headers we split the code into a pr

[PATCH v6 02/10] dump: Write ELF section headers right after ELF header

2022-10-17 Thread Janosch Frank
Let's start bundling the writes of the headers and of the data so we have a clear ordering between them. Since the ELF header uses offsets to the headers we can freely order them. Signed-off-by: Janosch Frank --- dump/dump.c | 31 ++- 1 file changed, 14 insertions(+),

[PATCH v6 04/10] dump: Reintroduce memory_offset and section_offset

2022-10-17 Thread Janosch Frank
section_offset will later be used to store the offset to the section data which will be stored last. For now memory_offset is only needed to make section_offset look nicer. Signed-off-by: Janosch Frank --- dump/dump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dump/dump.c b/dump/dump.

[PATCH v6 00/10] dump: Add arch section and s390x PV dump

2022-10-17 Thread Janosch Frank
Previously this series was two separate series: * Arch section support Adds the possibility for arch code to add custom section data. * s390 PV dump support Adds PV dump data to the custom arch sections. I've chosen to merge them so it's easier to understand why the arch section support h

[PATCH v6 10/10] s390x: pv: Add dump support

2022-10-17 Thread Janosch Frank
Sometimes dumping a guest from the outside is the only way to get the data that is needed. This can be the case if a dumping mechanism like KDUMP hasn't been configured or data needs to be fetched at a specific point. Dumping a protected guest from the outside without help from fw/hw doesn't yield

[PATCH v6 05/10] dump: Add architecture section and section string table support

2022-10-17 Thread Janosch Frank
Add hooks which architectures can use to add arbitrary data to custom sections. Also add a section name string table in order to identify section contents Signed-off-by: Janosch Frank --- dump/dump.c| 190 +++-- include/sysemu/dump-arch.h | 3 +

[PATCH v6 09/10] s390x: Add KVM PV dump interface

2022-10-17 Thread Janosch Frank
Let's add a few bits of code which hide the new KVM PV dump API from us via new functions. Signed-off-by: Janosch Frank Reviewed-by: Janis Schoetterl-Glausch --- hw/s390x/pv.c | 51 +++ include/hw/s390x/pv.h | 9 2 files changed, 60 inse

Re: [PATCH v3 4/7] util: Add write-only "node-affinity" property for ThreadContext

2022-10-17 Thread Markus Armbruster
David Hildenbrand writes: > Let's make it easier to pin threads created via a ThreadContext to > all host CPUs currently belonging to a given set of host NUMA nodes -- > which is the common case. > > "node-affinity" is simply a shortcut for setting "cpu-affinity" manually > to the list of host CP

Re: [BUG] Xen build error - undefined reference to bpf_program__set_socket_filter

2022-10-17 Thread Jan Beulich
On 17.10.2022 10:12, Arthur Borsboom wrote: > Xen 4.16.1, 4.16.2 and 4.17.0-rc1 don't build anymore in Arch Linux. That is, qemu doesn't build. That's something to be taken care of there, not in Xen, I think. Jan > I believe it is caused by the missing function > bpf_program__set_socket_filter p

[PATCH v6 15/15] virtio-net: enable vq reset feature

2022-10-17 Thread Xuan Zhuo
Add virtqueue reset feature for virtio-net Signed-off-by: Xuan Zhuo --- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index f5adba45d5..975bbc22f9 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -788,6 +788,7 @@ st

[PATCH v6 07/15] vhost: expose vhost_virtqueue_start()

2022-10-17 Thread Xuan Zhuo
From: Kangjie Xu Expose vhost_virtqueue_start(), we need to use it when restarting a virtqueue. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- hw/virtio/vhost.c | 8 include/hw/virtio/vhost.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions

[PATCH v6 01/15] virtio: introduce __virtio_queue_reset()

2022-10-17 Thread Xuan Zhuo
Separate the logic of vq reset. This logic will be called directly later. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- hw/virtio/virtio.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c inde

[PATCH v6 08/15] vhost: expose vhost_virtqueue_stop()

2022-10-17 Thread Xuan Zhuo
From: Kangjie Xu Expose vhost_virtqueue_stop(), we need to use it when resetting a virtqueue. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- hw/virtio/vhost.c | 8 include/hw/virtio/vhost.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-)

[PATCH v6 11/15] virtio-net: introduce flush_or_purge_queued_packets()

2022-10-17 Thread Xuan Zhuo
From: Kangjie Xu Introduce the fucntion flush_or_purge_queued_packets(), it will be used in device reset and virtqueue reset. Therefore, we extract the common logic as a new function. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- hw/net/virtio-net.c | 17 +++

[PATCH v6 13/15] virtio-net: support queue_enable

2022-10-17 Thread Xuan Zhuo
From: Kangjie Xu Support queue_enable in vhost-kernel scenario. It can be called when a vq reset operation has been performed and the vq is restared. It should be noted that we can restart the vq when the vhost has already started. When launching a new vhost device, the vhost is not started and

[PATCH v6 02/15] virtio: introduce virtio_queue_reset()

2022-10-17 Thread Xuan Zhuo
Introduce a new interface function virtio_queue_reset() to implement reset for vq. Add a new callback to VirtioDeviceClass for queue reset operation for each child device. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- hw/virtio/virtio.c | 11 +++ include/hw/virtio/virtio.h

[PATCH v6 04/15] virtio: core: vq reset feature negotation support

2022-10-17 Thread Xuan Zhuo
From: Kangjie Xu A a new command line parameter "queue_reset" is added. Meanwhile, the vq reset feature is disabled for pre-7.2 machines. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- hw/core/machine.c | 4 +++- include/hw/virtio/virtio.h | 4 +++- 2 f

[PATCH v6 00/15] Support VIRTIO_F_RING_RESET for virtio-net, vhost-net kernel in virtio pci-modern

2022-10-17 Thread Xuan Zhuo
The virtio queue reset function has already been defined in the virtio spec 1.2. The relevant virtio spec information is here: https://github.com/oasis-tcs/virtio-spec/issues/124 https://github.com/oasis-tcs/virtio-spec/issues/139 This patch set is to support this function in QEMU. It con

[PATCH v6 03/15] virtio: introduce virtio_queue_enable()

2022-10-17 Thread Xuan Zhuo
From: Kangjie Xu Introduce the interface queue_enable() in VirtioDeviceClass and the fucntion virtio_queue_enable() in virtio, it can be called when VIRTIO_PCI_COMMON_Q_ENABLE is written and related virtqueue can be started. It only supports the devices of virtio 1 or later. The not-supported dev

[PATCH v6 09/15] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_reset()

2022-10-17 Thread Xuan Zhuo
From: Kangjie Xu Introduce vhost_virtqueue_reset(), which can reset the specific virtqueue in the device. Then it will unmap vrings and the desc of the virtqueue. Here we do not reuse the vhost_net_stop_one() or vhost_dev_stop(), because they work at queue pair level. We do not use vhost_virtque

[PATCH v6 14/15] vhost: vhost-kernel: enable vq reset feature

2022-10-17 Thread Xuan Zhuo
From: Kangjie Xu Add virtqueue reset feature for vhost-kernel. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- hw/net/vhost_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index d2926e2ed6..53b2fac4f6 100644 --- a/

[PATCH v6 12/15] virtio-net: support queue reset

2022-10-17 Thread Xuan Zhuo
virtio-net and vhost-kernel implement queue reset. Queued packets in the corresponding queue pair are flushed or purged. For virtio-net, userspace datapath will be disabled later in __virtio_queue_reset(). It will set addr of vring to 0 and idx to 0. Thus, virtio_net_receive() and virtio_net_flush

[PATCH v6 10/15] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_restart()

2022-10-17 Thread Xuan Zhuo
From: Kangjie Xu Introduce vhost_net_virtqueue_restart(), which can restart the specific virtqueue when the vhost net started running before. If it fails to restart the virtqueue, the device will be stopped. Here we do not reuse vhost_net_start_one() or vhost_dev_start() because they work at que

[PATCH v6 05/15] virtio-pci: support queue reset

2022-10-17 Thread Xuan Zhuo
PCI devices support vq reset. Based on this function, the driver can adjust the size of the ring, and quickly recycle the buffer in the ring. The migration of the virtio devices will not happen during a reset operation. This is becuase the global iothread lock is held. Migration thread also needs

Re: [BUG] Xen build error - undefined reference to bpf_program__set_socket_filter

2022-10-17 Thread Peter Maydell
On Mon, 17 Oct 2022 at 10:02, Jan Beulich wrote: > > On 17.10.2022 10:12, Arthur Borsboom wrote: > > Xen 4.16.1, 4.16.2 and 4.17.0-rc1 don't build anymore in Arch Linux. > > I believe it is caused by the missing function > > bpf_program__set_socket_filter provided by libbpf. > > That is, qemu does

RE: [PATCH] tests/qtest/cxl-test: Remove temporary directories after testing

2022-10-17 Thread Zhang, Chen
> -Original Message- > From: Qemu-devel > On Behalf Of Thomas Huth > Sent: Wednesday, October 12, 2022 5:15 PM > To: qemu-devel@nongnu.org; Jonathan Cameron > > Cc: Laurent Vivier ; Michael S . Tsirkin > Subject: [PATCH] tests/qtest/cxl-test: Remove temporary directories after > testi

[PATCH] target/arm: honor HCR_E2H for AT S1E2R and AT S1E2W address translation

2022-10-17 Thread Ake Koomsin
When HCR_E2H is set, AT S1E2R and AT S1E2W should translate an address based on both TTBR0_EL2 and TTBR1_EL2. Signed-off-by: Ake Koomsin --- target/arm/helper.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index dde64a487a..1

Re: [PATCH v6 02/10] dump: Write ELF section headers right after ELF header

2022-10-17 Thread Marc-André Lureau
On Mon, Oct 17, 2022 at 12:39 PM Janosch Frank wrote: > Let's start bundling the writes of the headers and of the data so we > have a clear ordering between them. Since the ELF header uses offsets > to the headers we can freely order them. > > Signed-off-by: Janosch Frank > Reviewed-by: Marc-An

Re: [PATCH v6 01/10] dump: Use a buffer for ELF section data and headers

2022-10-17 Thread Marc-André Lureau
On Mon, Oct 17, 2022 at 12:39 PM Janosch Frank wrote: > Currently we're writing the NULL section header if we overflow the > physical header number in the ELF header. But in the future we'll add > custom section headers AND section data. > > To facilitate this we need to rearange section handling

[PATCH v6 06/15] virtio-pci: support queue enable

2022-10-17 Thread Xuan Zhuo
From: Kangjie Xu PCI devices support device specific vq enable. Based on this function, the driver can re-enable the virtqueue after the virtqueue is reset. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- hw/virtio/virtio-pci.c | 1 + 1 file changed, 1 insertion(

Re: [PATCH v4 09/10] acpi/tests/avocado/bits: add a README file to describe the test

2022-10-17 Thread Ani Sinha
On Fri, Oct 14, 2022 at 11:06 PM Ani Sinha wrote: > > Add a README file that describes the purpose of the various test files and > gives > guidance to developers on where and how to make changes. > > Cc: Daniel P. Berrange" > Cc: Paolo Bonzini > Cc: Maydell Peter > Cc: John Snow > Cc: Thomas

Re: [PATCH v6 05/10] dump: Add architecture section and section string table support

2022-10-17 Thread Marc-André Lureau
Hi On Mon, Oct 17, 2022 at 12:39 PM Janosch Frank wrote: > Add hooks which architectures can use to add arbitrary data to custom > sections. > > Also add a section name string table in order to identify section > contents > > Signed-off-by: Janosch Frank > --- > dump/dump.c| 19

Re: [PATCH v6 04/10] dump: Reintroduce memory_offset and section_offset

2022-10-17 Thread Marc-André Lureau
On Mon, Oct 17, 2022 at 12:39 PM Janosch Frank wrote: > section_offset will later be used to store the offset to the section > data which will be stored last. For now memory_offset is only needed > to make section_offset look nicer. > > Signed-off-by: Janosch Frank > Reviewed-by: Marc-André Lur

Question about TCG backend correctness

2022-10-17 Thread LIU Zhiwei
Hi folks,     For TCG front end, we can test it with tools, such as RISU. But I don't know if  there are some tools that can help to verify the correctness of a TCG backend.     Can someone share the tools or the experience to debug RISC-V backend?  Thanks very much. Best Regards, Zhiwei

Re: [PATCH v4 07/24] target/arm: Split out S1Translate type

2022-10-17 Thread Peter Maydell
On Tue, 11 Oct 2022 at 04:27, Richard Henderson wrote: > > Consolidate most of the inputs and outputs of S1_ptw_translate > into a single structure. Plumb this through arm_ld*_ptw from > the controlling get_phys_addr_* routine. > > Signed-off-by: Richard Henderson > --- > v4: Replaces a differen

RE: [PATCH v2] migration/channel-block: fix return value for qio_channel_block_{readv, writev}

2022-10-17 Thread Zhang, Chen
> -Original Message- > From: Qemu-devel > On Behalf Of Fiona Ebner > Sent: Thursday, October 13, 2022 4:41 PM > To: qemu-devel@nongnu.org > Cc: dgilb...@redhat.com; quint...@redhat.com; berra...@redhat.com > Subject: [PATCH v2] migration/channel-block: fix return value for > qio_channel

[PATCH] target/arm: honor HCR_E2H and HCR_TGE in arm_excp_unmasked()

2022-10-17 Thread Ake Koomsin
An exception targeting EL2 from lower EL is actually maskable when HCR_E2H and HCR_TGE are both set. This applies to both secure and non-secure Security state. Signed-off-by: Ake Koomsin --- target/arm/cpu.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --

Re: [PATCH v4 13/24] target/arm: Add ptw_idx to S1Translate

2022-10-17 Thread Peter Maydell
On Tue, 11 Oct 2022 at 04:30, Richard Henderson wrote: > > Hoist the computation of the mmu_idx for the ptw up to > get_phys_addr_with_struct and get_phys_addr_twostage. > This removes the duplicate check for stage2 disabled > from the middle of the walk, performing it only once. > > Signed-off-by

Re: [PATCH v8 5/8] KVM: Register/unregister the guest private memory regions

2022-10-17 Thread Fuad Tabba
Hi, > > > +#ifdef CONFIG_HAVE_KVM_PRIVATE_MEM > > > +#define KVM_MEM_ATTR_SHARED0x0001 > > > +static int kvm_vm_ioctl_set_mem_attr(struct kvm *kvm, gpa_t gpa, gpa_t > > > size, > > > +bool is_private) > > > +{ > > > > I wonder if this ioctl should be implem

[PATCH 00/11] x86: clean up ACPI PCI code part 2

2022-10-17 Thread Igor Mammedov
Series continues refactoring started at recently merged [1]. It replaces special cases/quirks for ISA/SMB bridges and PCI attached VGA devices with generic AcpiDevAmlIf interface, which allows device to provide its own AML description without need for adhoc plumbing in generic DSDT or PCI enumerati

[PATCH 05/11] tests: acpi: whitelist DSDT before generating ICH9_SMB AML automatically

2022-10-17 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 21 + 1 file changed, 21 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..fd5852776c 100644 --- a/tests/qtest/

[PATCH 01/11] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors

2022-10-17 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/display/vga_int.h | 2 ++ hw/display/acpi-vga-stub.c | 7 +++ hw/display/acpi-vga.c | 26 ++ hw/display/meson.build | 17 + hw/display/vga-pci.c | 4 hw/i386/acpi-build.c | 26 +-

[PATCH 04/11] tests: acpi: update expected DSDT after ISA bridge is moved directly under PCI host bridge

2022-10-17 Thread Igor Mammedov
example of the change for PC machine with hotplug disabled on root buss (no BSEL case): -Field (PCI0.ISA.P40C, ByteAcc, NoLock, Preserve) +Field (S08.P40C, ByteAcc, NoLock, Preserve) === -Scope (_SB.PCI0) -{ -Device (ISA) -{ -Name (_ADR

[PATCH 03/11] acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML

2022-10-17 Thread Igor Mammedov
PCI-ISA bridges that are built in PIIX/Q35 are building its own AML using AcpiDevAmlIf interface. Now build_append_pci_bus_devices() gained AcpiDevAmlIf interface support to get AML of devices atached to PCI slots. So drop ad-hoc build_q35_isa_bridge()/build_piix4_isa_bridge() and let PCI bus enume

[PATCH 10/11] acpi: pc/35: sanitize _GPE declaration order

2022-10-17 Thread Igor Mammedov
Move _GPE block declaration before it gets referenced by other hotplug handlers. While at it move PCI hotplug (_E01) handler after PCI tree description to avoid forward reference to to not yet declared methods/devices. PS: Forward 'usage' usualy is fine as long as it's hidden within method, howeve

[PATCH 08/11] tests: acpi: update expected blobs

2022-10-17 Thread Igor Mammedov
Expected change in q35 tests: @@ -2797,14 +2797,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x0001) } } -Scope (_SB.PCI0) -{ -Device (SMB0) -{ -Name (_ADR, 0x001F00

[PATCH 09/11] tests: acpi: pc/q35 whitelist DSDT before \_GPE cleanup

2022-10-17 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 34 + 1 file changed, 34 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..725a1dc798 100644 --- a/tests/qtest/

[PATCH 02/11] tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML automatically

2022-10-17 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 34 + 1 file changed, 34 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..570b17478e 100644 --- a/tests/qtest/

[PATCH 07/11] acpi: enumerate SMB bridge automatically along with other PCI devices

2022-10-17 Thread Igor Mammedov
to make that happen (bridge sits at _ADR: 0x001F0003), relax PCI enumeration logic to include devices with *function* > 0 if device has something to say about itself (i.e. has build_dev_aml callback set). Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 27 +++ 1 f

[PATCH 06/11] acpi: add get_dev_aml_func() helper

2022-10-17 Thread Igor Mammedov
It will be used in followup commits to figure out if device has it's own, device specific AML block. Signed-off-by: Igor Mammedov --- include/hw/acpi/acpi_aml_interface.h | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/include/hw/acpi/acpi_aml_interface.h b/in

Re: [PATCH v1] s390x/tod-kvm: don't save/restore the TOD in PV guests

2022-10-17 Thread Nico Boehr
Quoting Thomas Huth (2022-10-17 09:30:04) [...] > I know it's annoying when switching between kernel coding style and QEMU > coding style, but please use curly braces when doing QEMU patches. I wonder > why checkpatch.pl does not print any warnings here...? Ooops, sorry for the oversight. You ar

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-10-17 Thread Fuad Tabba
Hi, > > > > Actually, for pKVM, there is no need for the guest memory to be > > GUP'able at all if we use the new inaccessible_get_pfn(). > > If pKVM can use inaccessible_get_pfn() to get pfn and can avoid GUP (I > think that is the major concern?), do you see any other gap from > existing API? A

[PATCH 11/11] tests: acpi: update expected blobs

2022-10-17 Thread Igor Mammedov
Expected changes are: 1) Moving _GPE scope declaration achec of all _E0x methods +Scope (_GPE) +{ +Name (_HID, "ACPI0006" /* GPE Block Device */) // _HID: Hardware ID +} + Scope (_SB) { Device (\_SB.PCI0.PRES)

Re: [PATCH] tests/qtest/tpm: Clean up remainders of swtpm

2022-10-17 Thread Stefan Berger
On 10/12/22 04:43, Thomas Huth wrote: After running "make check", there are remainders of the tpm tests left in the /tmp directory, slowly filling it up. Seems like "swtpm" leaves a ".lock" and a "tpm2-00.permall" file behind, so that the g_rmdir() calls on the temporary directories fail. Intr

Re: [PATCH] tests/qtest/cxl-test: Remove temporary directories after testing

2022-10-17 Thread Jonathan Cameron via
On Mon, 17 Oct 2022 09:28:49 + "Zhang, Chen" wrote: > > -Original Message- > > From: Qemu-devel > > On Behalf Of Thomas Huth > > Sent: Wednesday, October 12, 2022 5:15 PM > > To: qemu-devel@nongnu.org; Jonathan Cameron > > > > Cc: Laurent Vivier ; Michael S . Tsirkin > > > > Subje

Re: Question about TCG backend correctness

2022-10-17 Thread Alex Bennée
LIU Zhiwei writes: > Hi folks, > >     For TCG front end, we can test it with tools, such as RISU. But I > don't know if  there are some tools that can help > to verify the correctness of a TCG backend. > >     Can someone share the tools or the experience to debug RISC-V > backend?  Thanks ver

Re: [PATCH v4 22/24] target/arm: Implement FEAT_HAFDBS, access flag portion

2022-10-17 Thread Peter Maydell
On Tue, 11 Oct 2022 at 04:43, Richard Henderson wrote: > > Perform the atomic update for hardware management of the access flag. > > Signed-off-by: Richard Henderson > --- > v4: Raise permission fault if pte read-only and atomic update reqd. > Split out dirty bit portion. > Prepare for a

[PATCH] tests/qtest/migration-test: Do not try to print NULL pointer string

2022-10-17 Thread Thomas Huth
If tmpfs is NULL, we should not try to print it as a string. Reported-by: shengjiangwuqq on github.com Fixes: e5553c1b8d ("tests/qtest: migration-test: Avoid using hardcoded /tmp") Signed-off-by: Thomas Huth --- tests/qtest/migration-test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

Re: [PATCH v4 23/24] target/arm: Implement FEAT_HAFDBS, dirty bit portion

2022-10-17 Thread Peter Maydell
On Tue, 11 Oct 2022 at 04:41, Richard Henderson wrote: > > Perform the atomic update for hardware management of the dirty bit. > > Signed-off-by: Richard Henderson > --- > target/arm/cpu64.c | 2 +- > target/arm/ptw.c | 20 > 2 files changed, 21 insertions(+), 1 deletion(

[PATCH 3/4] vfio: Add 'group' property to 'vfio-pci' device

2022-10-17 Thread Andrey Ryabinin
Add 'group' properties to 'vfio-pci' device. This allows to add vfio-pci device using precreated vfio container and group, e.g. -object vfio-container,id=ct,fd=5 \ -object vfio-group,id=grp,fd=6,container=ct \ -device vfio-pci,host=05:00.0,group=grp Signed-off-by: Andrey R

[PATCH 4/4] tests/avocado/vfio: add test for vfio devices

2022-10-17 Thread Andrey Ryabinin
Add avocado test for vfio subsystem. The test uses pci-tesdev as a source PCI device for vfio. So the test supposed to be launched inside QEMU guest launched with '-device pci-testdev' devices. The test creates VFIO container&group, launches QEMU and passes container/group/device to it. Signed-of

[PATCH 0/4] Allow to pass pre-created VFIO container/group to QEMU

2022-10-17 Thread Andrey Ryabinin
These patches add possibility to pass VFIO device to QEMU using file descriptors of VFIO container/group, instead of creating those by QEMU. This allows to take away permissions to open /dev/vfio/* from QEMU and delegate that to managment layer like libvirt. The VFIO API doen't allow to pass just

Re: [PATCH 0/4] Allow to pass pre-created VFIO container/group to QEMU

2022-10-17 Thread Daniel P . Berrangé
On Mon, Oct 17, 2022 at 01:54:03PM +0300, Andrey Ryabinin wrote: > These patches add possibility to pass VFIO device to QEMU using file > descriptors of VFIO container/group, instead of creating those by QEMU. > This allows to take away permissions to open /dev/vfio/* from QEMU and > delegate that

[PATCH 1/4] vfio: add vfio-container user createable object

2022-10-17 Thread Andrey Ryabinin
Add vfio-container type and allow user to create vfio-container object via '-object' command line argument or 'object-add' qmp command. Add 'fd' parameter to this type to allow user provide file descriptor of a vfio-container. E.g. -object vfio-container,id=ct,fd=5 Signed-off-by: Andrey Ryabinin

Re: [PATCH 01/11] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors

2022-10-17 Thread Ani Sinha
On Mon, Oct 17, 2022 at 3:52 PM Igor Mammedov wrote: > I would add a comment that we do not expect any functional change in any ACPI tables with this change. It's only a refactoring. > Signed-off-by: Igor Mammedov Other than the comment above, Reviewed-by: Ani Sinha > --- > hw/display/vga_i

Re: [PATCH 06/11] acpi: add get_dev_aml_func() helper

2022-10-17 Thread Ani Sinha
On Mon, Oct 17, 2022 at 3:52 PM Igor Mammedov wrote: > > It will be used in followup commits to figure out if > device has it's own, device specific AML block. > > Signed-off-by: Igor Mammedov Reviewed-by: Ani Sinha > --- > include/hw/acpi/acpi_aml_interface.h | 13 +++-- > 1 file cha

[PATCH 2/4] vfio: add vfio-group user createable object

2022-10-17 Thread Andrey Ryabinin
Add vfio-group type and allow user to create such object via '-object' command line argument or 'object-add' qmp command. Parameters are: - @fd - file descriptor - @container - id of vfio-container object which will be used for this VFIO group - @groupid - number representing IOMMU group

Re: [PATCH v3 4/7] util: Add write-only "node-affinity" property for ThreadContext

2022-10-17 Thread David Hildenbrand
On 17.10.22 10:56, Markus Armbruster wrote: David Hildenbrand writes: Let's make it easier to pin threads created via a ThreadContext to all host CPUs currently belonging to a given set of host NUMA nodes -- which is the common case. "node-affinity" is simply a shortcut for setting "cpu-affin

[PATCH v7] dump: Add architecture section and section string table support

2022-10-17 Thread Janosch Frank
Add hooks which architectures can use to add arbitrary data to custom sections. Also add a section name string table in order to identify section contents Signed-off-by: Janosch Frank Reviewed-by: Marc-André Lureau --- @Marc-André: Is this ok for picking or do you want a full v7 with all patch

Re: MultiFD and default channel out of order mapping on receive side.

2022-10-17 Thread Daniel P . Berrangé
On Mon, Oct 17, 2022 at 01:06:00PM +0530, manish.mishra wrote: > Hi Daniel, > > I was thinking for some solutions for this so wanted to discuss that before > going ahead. Also added Juan and Peter in loop. > > 1. Earlier i was thinking, on destination side as of now for default > and multi-FD ch

Re: [RFC PATCH] MAINTAINERS: add entries for the key build bits

2022-10-17 Thread Paolo Bonzini
On Fri, Oct 14, 2022 at 3:57 PM Alex Bennée wrote: > I'm going to nominate Paolo for meson stuff given the conversion was > his passion project. It wasn't my passion project, it was my secret project to stop having to fix bugs in the makefiles. :) > Build System > > +Meson > +M: P

[PATCH 2/2] tests/qtest: vhost-user-test: Fix [-Werror=format-overflow=] build warning

2022-10-17 Thread Bin Meng
From: Bin Meng When tmpfs is NULL, a build warning is seen with GCC 9.3.0. It's strange that GCC 11.2.0 on Ubuntu 22.04 does not catch this, neither did the QEMU CI. Reported-by: Shengjiang Wu Fixes: e6efe236c1d1 ("tests/qtest: vhost-user-test: Avoid using hardcoded /tmp") Signed-off-by: Bin Me

Re: [PATCH] tests/qtest/migration-test: Do not try to print NULL pointer string

2022-10-17 Thread Markus Armbruster
Thomas Huth writes: > If tmpfs is NULL, we should not try to print it as a string. > > Reported-by: shengjiangwuqq on github.com > Fixes: e5553c1b8d ("tests/qtest: migration-test: Avoid using hardcoded /tmp") > Signed-off-by: Thomas Huth > --- > tests/qtest/migration-test.c | 3 +-- > 1 file ch

[PATCH 1/2] tests/qtest: migration-test: Fix [-Werror=format-overflow=] build warning

2022-10-17 Thread Bin Meng
From: Bin Meng When tmpfs is NULL, a build warning is seen with GCC 9.3.0. It's strange that GCC 11.2.0 on Ubuntu 22.04 does not catch this, neither did the QEMU CI. Reported-by: Shengjiang Wu Fixes: e5553c1b8d28 ("tests/qtest: migration-test: Avoid using hardcoded /tmp") Signed-off-by: Bin Men

Re: [PATCH 49/51] io/channel-watch: Fix socket watch on Windows

2022-10-17 Thread Bin Meng
+more people On Tue, Oct 11, 2022 at 6:42 PM Bin Meng wrote: > > Hi Paolo, > > On Thu, Oct 6, 2022 at 11:03 AM Bin Meng wrote: > > > > Hi Paolo, > > > > On Wed, Sep 28, 2022 at 2:10 PM Bin Meng wrote: > > > > > > Hi Paolo, > > > > > > On Wed, Sep 21, 2022 at 9:02 AM Bin Meng wrote: > > > > > >

Re: [PATCH 1/2] tests/qtest: migration-test: Fix [-Werror=format-overflow=] build warning

2022-10-17 Thread Markus Armbruster
Bin Meng writes: > From: Bin Meng > > When tmpfs is NULL, a build warning is seen with GCC 9.3.0. > It's strange that GCC 11.2.0 on Ubuntu 22.04 does not catch this, > neither did the QEMU CI. > > Reported-by: Shengjiang Wu > Fixes: e5553c1b8d28 ("tests/qtest: migration-test: Avoid using hardco

Re: [PATCH 1/2] tests/qtest: migration-test: Fix [-Werror=format-overflow=] build warning

2022-10-17 Thread Markus Armbruster
Markus Armbruster writes: > Bin Meng writes: > >> From: Bin Meng >> >> When tmpfs is NULL, a build warning is seen with GCC 9.3.0. >> It's strange that GCC 11.2.0 on Ubuntu 22.04 does not catch this, >> neither did the QEMU CI. >> >> Reported-by: Shengjiang Wu >> Fixes: e5553c1b8d28 ("tests/qt

Re: [PATCH 2/2] tests/qtest: vhost-user-test: Fix [-Werror=format-overflow=] build warning

2022-10-17 Thread Markus Armbruster
Bin Meng writes: > From: Bin Meng > > When tmpfs is NULL, a build warning is seen with GCC 9.3.0. > It's strange that GCC 11.2.0 on Ubuntu 22.04 does not catch this, > neither did the QEMU CI. > > Reported-by: Shengjiang Wu > Fixes: e6efe236c1d1 ("tests/qtest: vhost-user-test: Avoid using hardc

Re: [PATCH 48/51] io/channel-watch: Drop a superfluous '#ifdef WIN32'

2022-10-17 Thread Daniel P . Berrangé
On Wed, Aug 24, 2022 at 05:40:26PM +0800, Bin Meng wrote: > From: Bin Meng > > In the win32 version qio_channel_create_socket_watch() body there is > no need to do a '#ifdef WIN32'. > > Signed-off-by: Bin Meng > --- > > io/channel-watch.c | 2 -- > 1 file changed, 2 deletions(-) Reviewed-by:

  1   2   3   >