[PATCH 3/3] intel-iommu: build iova tree during IOMMU translation

2022-11-29 Thread Jason Wang
The IOVA tree is only built during page walk this breaks the device that tries to use UNMAP notifier only. One example is vhost-net, it tries to use UNMAP notifier when vIOMMU doesn't support DEVIOTLB_UNMAP notifier (e.g when dt mode is not enabled). The interesting part is that it doesn't use MAP

[PATCH 1/3] intel-iommu: fail MAP notifier without caching mode

2022-11-29 Thread Jason Wang
Without caching mode, MAP notifier won't work correctly since guest won't send IOTLB update event when it establishes new mappings in the I/O page tables. Let's fail the IOMMU notifiers early instead of misbehaving silently. Signed-off-by: Jason Wang --- hw/i386/intel_iommu.c | 7 +++ 1 file

[PATCH 2/3] intel-iommu: fail DEVIOTLB_UNMAP without dt mode

2022-11-29 Thread Jason Wang
Without dt mode, device IOTLB notifier won't work since guest won't send device IOTLB invalidation descriptor in this case. Let's fail early instead of misbehaving silently. Signed-off-by: Jason Wang --- hw/i386/intel_iommu.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/i386/in

[PATCH 0/3] Fix UNMAP notifier for intel-iommu

2022-11-29 Thread Jason Wang
Hi All: According to ATS, device should work if ATS is disabled. This is not correctly implemented in the current intel-iommu since it doesn't handle the UNMAP notifier correctly. This breaks the vhost-net + vIOMMU without dt. The root casue is that the when there's a device IOTLB miss (note that

Re: [PATCH v2 for-8.0 0/5] scripts/make-release: Decrease size of the release tarballs

2022-11-29 Thread Daniel P . Berrangé
On Mon, Nov 28, 2022 at 08:25:24PM +0100, Paolo Bonzini wrote: > Il lun 28 nov 2022, 18:04 Daniel P. Berrangé ha > scritto: > > > With my distro maintainer hat I would rather QEMU ship neither the > > ROM source, nor the ROM binaries. > > > > Annd since QEMU can finally cross compile its embedde

Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt

2022-11-29 Thread Schspa Shi
Peter Maydell writes: > On Tue, 8 Nov 2022 at 02:35, Schspa Shi wrote: >> >> We use 32bit value for linux,initrd-[start/end], when we have >> loader_start > 4GB, there will be a wrong initrd_start passed >> to the kernel, and the kernel will report the following warning > >> To fix it, we can

Re: [PATCH v2] acpi/tests/avocado/bits: add SPDX license identifiers for bios bits tests

2022-11-29 Thread Markus Armbruster
Ani Sinha writes: > On Tue, Nov 29, 2022 at 10:37 AM Michael S. Tsirkin wrote: >> >> On Tue, Nov 29, 2022 at 08:02:15AM +0530, Ani Sinha wrote: >> > >> > >> > On Fri, Nov 25, 2022 at 10:11 AM Ani Sinha wrote: >> > >> > Added the SPDX license identifiers for biosbits tests. >> > Also add

[PATCH v3] hw/loongarch: Add cfi01 pflash device

2022-11-29 Thread Xiaojuan Yang
Add cfi01 pflash device for LoongArch virt machine Signed-off-by: Xiaojuan Yang --- hw/loongarch/Kconfig| 1 + hw/loongarch/acpi-build.c | 18 +++ hw/loongarch/virt.c | 62 + include/hw/loongarch/virt.h | 5 +++ 4 files changed, 86

Re: [PATCH v3 1/7] include/hw: attempt to document VirtIO feature variables

2022-11-29 Thread Stefano Garzarella
On Mon, Nov 28, 2022 at 04:40:59PM +, Alex Bennée wrote: We have a bunch of variables associated with the device and the vhost backend which are used inconsistently throughout the code base. Lets start trying to bring some order by agreeing what each variable is for. Signed-off-by: Alex Benn

Re: [PATCH] tests/tcg/s390x: Add cdsg.c

2022-11-29 Thread David Hildenbrand
On 29.11.22 00:48, Ilya Leoshkevich wrote: Add a simple test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 4 ++ tests/tcg/s390x/cdsg.c | 73 + 2 files changed, 77 insertions(+) create mode 100644 te

Re: [PATCH v3] hw/loongarch: Add cfi01 pflash device

2022-11-29 Thread Philippe Mathieu-Daudé
On 29/11/22 09:50, Xiaojuan Yang wrote: Add cfi01 pflash device for LoongArch virt machine Signed-off-by: Xiaojuan Yang --- hw/loongarch/Kconfig| 1 + hw/loongarch/acpi-build.c | 18 +++ hw/loongarch/virt.c | 62 + include/hw/l

Re: [PATCH v14 4/5] hw/riscv: virt: Add PMU DT node to the device tree

2022-11-29 Thread Atish Kumar Patra
On Mon, Nov 28, 2022 at 11:32 PM wrote: > > On 29/11/2022 07:08, Andrew Jones wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > > content is safe > > > > On Mon, Nov 28, 2022 at 09:10:03PM +, conor.doo...@microchip.com wrote: > >> On 28/11/2022 20:41, Ati

Re: [PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-29 Thread Marc Hartmayer
"Dr. David Alan Gilbert" writes: > * Marc Hartmayer (mhart...@linux.ibm.com) wrote: >> The virtiofsd currently crashes on s390x. This is because of a >> `sigreturn` system call. See audit log below: >> >> type=SECCOMP msg=audit(1669382477.611:459): auid=4294967295 uid=0 gid=0 >> ses=4294967295

Re: [PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-29 Thread Dr. David Alan Gilbert
* Marc Hartmayer (mhart...@linux.ibm.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Marc Hartmayer (mhart...@linux.ibm.com) wrote: > >> The virtiofsd currently crashes on s390x. This is because of a > >> `sigreturn` system call. See audit log below: > >> > >> type=SECCOMP msg=audit(16693

Re: [PATCH v14 4/5] hw/riscv: virt: Add PMU DT node to the device tree

2022-11-29 Thread Conor.Dooley
On 29/11/2022 09:27, Atish Kumar Patra wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On Mon, Nov 28, 2022 at 11:32 PM wrote: >> >> On 29/11/2022 07:08, Andrew Jones wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unles

Re: [PATCH for 7.2? V2] vhost: fix vq dirty bitmap syncing when vIOMMU is enabled

2022-11-29 Thread Eric Auger
Hi Jason, On 11/29/22 05:02, Jason Wang wrote: > When vIOMMU is enabled, the vq->used_phys is actually the IOVA not > GPA. So we need to translate it to GPA before the syncing otherwise we > may hit the following crash since IOVA could be out of the scope of > the GPA log size. This could be noted

Re: [PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-29 Thread Christian Borntraeger
Am 29.11.22 um 10:52 schrieb Christian Borntraeger: Am 29.11.22 um 10:42 schrieb Dr. David Alan Gilbert: * Marc Hartmayer (mhart...@linux.ibm.com) wrote: "Dr. David Alan Gilbert" writes: * Marc Hartmayer (mhart...@linux.ibm.com) wrote: The virtiofsd currently crashes on s390x. This is

Re: [PATCH v2] acpi/tests/avocado/bits: add SPDX license identifiers for bios bits tests

2022-11-29 Thread Ani Sinha
On Tue, Nov 29, 2022 at 2:18 PM Markus Armbruster wrote: > > Ani Sinha writes: > > > On Tue, Nov 29, 2022 at 10:37 AM Michael S. Tsirkin wrote: > >> > >> On Tue, Nov 29, 2022 at 08:02:15AM +0530, Ani Sinha wrote: > >> > > >> > > >> > On Fri, Nov 25, 2022 at 10:11 AM Ani Sinha wrote: > >> > > >>

[PATCH v2 for-8.0 2/2] pci: drop redundant PCIDeviceClass::is_bridge field

2022-11-29 Thread Igor Mammedov
and use cast to TYPE_PCI_BRIDGE instead. Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- v2: (Philippe Mathieu-Daudé ) - replace leftover IS_PCI_BRIDGE cast with is_bridge variable --- include/hw/pci/pci.h | 11 +-- include/hw/pci/pci_bridge.h

[PATCH v2 for-8.0 1/2] remove DEC 21154 PCI bridge

2022-11-29 Thread Igor Mammedov
Code has not been used practically since its inception (2004) f2aa58c6f4a20 UniNorth PCI bridge support or maybe even earlier, but it was consuming contributors time as QEMU was being rewritten. Drop it for now. Whomever would like to actually use the thing, can make sure it actually works/reintr

[PATCH v2 for-8.0 0/2] pci: drop redundant PCIDeviceClass::is_bridge field

2022-11-29 Thread Igor Mammedov
Changelog: - keep comment reminding that there was a bridge, so it would be easy to find removed code if someone wishes to bring it back - s/IS_PCI_BRIDGE/is_bridge/ in one instance where local is_bridge already exists Igor Mammedov (2): remove DEC 21154 PCI bridge pci: drop redu

Re: [PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-29 Thread Dr. David Alan Gilbert
* Christian Borntraeger (borntrae...@de.ibm.com) wrote: > > > Am 29.11.22 um 10:52 schrieb Christian Borntraeger: > > > > > > Am 29.11.22 um 10:42 schrieb Dr. David Alan Gilbert: > > > * Marc Hartmayer (mhart...@linux.ibm.com) wrote: > > > > "Dr. David Alan Gilbert" writes: > > > > > > > > >

Re: [PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-29 Thread Marc Hartmayer
Christian Borntraeger writes: > Am 29.11.22 um 10:52 schrieb Christian Borntraeger: >> >> >> Am 29.11.22 um 10:42 schrieb Dr. David Alan Gilbert: >>> * Marc Hartmayer (mhart...@linux.ibm.com) wrote: "Dr. David Alan Gilbert" writes: > * Marc Hartmayer (mhart...@linux.ibm.com) wrot

Re: [PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-29 Thread Christian Borntraeger
Am 29.11.22 um 10:42 schrieb Dr. David Alan Gilbert: * Marc Hartmayer (mhart...@linux.ibm.com) wrote: "Dr. David Alan Gilbert" writes: * Marc Hartmayer (mhart...@linux.ibm.com) wrote: The virtiofsd currently crashes on s390x. This is because of a `sigreturn` system call. See audit log bel

Re: [PATCH v3 12/17] vfio/migration: Implement VFIO migration protocol v2

2022-11-29 Thread Avihai Horon
On 28/11/2022 23:10, Alex Williamson wrote: External email: Use caution opening links or attachments On Mon, 28 Nov 2022 16:56:39 -0400 Jason Gunthorpe wrote: On Mon, Nov 28, 2022 at 01:36:30PM -0700, Alex Williamson wrote: On Mon, 28 Nov 2022 15:40:23 -0400 Jason Gunthorpe wrote: On M

[PATCH v2 1/1] hw/arm/boot: set initrd with #[address/size]-cells type in fdt

2022-11-29 Thread Schspa Shi
We use 32bit value for linux,initrd-[start/end], when we have loader_start > 4GB, there will be a wrong initrd_start passed to the kernel, and the kernel will report the following warning. [0.00] [ cut here ] [0.00] initrd not fully accessible via the linear

Re: [PATCH v5 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-29 Thread manish.mishra
On 23/11/22 11:34 pm, Peter Xu wrote: On Wed, Nov 23, 2022 at 05:27:34PM +, manish.mishra wrote: MSG_PEEK reads from the peek of channel, The data is treated as unread and the next read shall still return this data. This support is currently added only for socket class. Extra parameter 'fl

Re: [PATCH v2 1/1] hw/arm/boot: set initrd with #[address/size]-cells type in fdt

2022-11-29 Thread Philippe Mathieu-Daudé
On 29/11/22 11:48, Schspa Shi wrote: We use 32bit value for linux,initrd-[start/end], when we have loader_start > 4GB, there will be a wrong initrd_start passed to the kernel, and the kernel will report the following warning. [0.00] [ cut here ] [0.00] ini

[PATCH] linux-user: Emulate CLONE_PIDFD flag in clone()

2022-11-29 Thread Helge Deller
Add emulation for the CLONE_PIDFD flag of the clone() syscall. This flag was added in Linux kernel 5.2. Successfully tested on a x86-64 Linux host with hppa-linux target. Can be verified by running the testsuite of the qcoro debian package, which breaks hard and kills the currently logged-in user

Re: [PATCH 1/2] qga-win: add logging to Windows event log

2022-11-29 Thread Andrey Drobyshev
On 11/29/22 00:36, M M wrote: > > >> On 28. 11. 2022., at 21:54, Andrey Drobyshev via >> wrote: >> >> This commit allows QGA to write to Windows event log using Win32 API's >> ReportEvent() [1], much like syslog() under *nix guests. >> >> In order to generate log message definitions we use a ve

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-29 Thread Kirill A. Shutemov
On Mon, Nov 28, 2022 at 06:06:32PM -0600, Michael Roth wrote: > On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: > > From: "Kirill A. Shutemov" > > > > > > > +static struct file *restrictedmem_file_create(struct file *memfd) > > +{ > > + struct restrictedmem_data *data; > > + str

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-29 Thread David Hildenbrand
On 29.11.22 12:21, Kirill A. Shutemov wrote: On Mon, Nov 28, 2022 at 06:06:32PM -0600, Michael Roth wrote: On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: From: "Kirill A. Shutemov" +static struct file *restrictedmem_file_create(struct file *memfd) +{ + struct restricted

Re: [PATCH v2 1/1] hw/arm/boot: set initrd with #[address/size]-cells type in fdt

2022-11-29 Thread Schspa Shi
Philippe Mathieu-Daudé writes: > On 29/11/22 11:48, Schspa Shi wrote: >> We use 32bit value for linux,initrd-[start/end], when we have >> loader_start > 4GB, there will be a wrong initrd_start passed >> to the kernel, and the kernel will report the following warning. >> [0.00] -

Re: [PATCH 04/12] pci: Make query-pci stub consistent with the real one

2022-11-29 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > QMP query-pci and HMP info pci can behave differently when there are > no PCI devices. They can report nothing, like this: > > qemu-system-aarch64 -S -M spitz -display none -monitor stdio > QEMU 7.1.91 monitor - type 'help' for more informa

[PATCH v2 2/2] migration: Perform vmsd structure check during tests

2022-11-29 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Perform a check on vmsd structures during test runs in the hope of catching any missing terminators and other simple screwups. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Maydell Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migratio

[PATCH v2 1/2] migration: Add canary to VMSTATE_END_OF_LIST

2022-11-29 Thread Juan Quintela
From: "Dr. David Alan Gilbert" We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions; given that the current check is only for ->name being NULL, sometimes we get unlucky and the code apparently works and no one spots the error. Explicitly add a flag, VMS_END that should be set

[PATCH v2 0/2] Put Canary End of List in VMSTATE

2022-11-29 Thread Juan Quintela
Hi Changes from yesterday submission: - change exit by g_assert_not_reached() [Previous submission] This are a patch series from David from January. The changes that I did: - rebases - change assert() in vmstate_check() to and if and printf. Please, Review. Dr. David Alan Gilbert (2): migrati

Re: [PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-29 Thread Stefan Hajnoczi
To find out: # perf record -e signal:signal_deliver ...wait for QEMU shutdown... ^C # perf script qemu-system-x86_64 2319136 [001] 1062886.415312: signal:signal_deliver: sig=2 errno=0 code=128 sa_handler=7fc6ccfbabc0 sa_flags=1404 sig=2 is SIGINT. This is just an example, I didn't run virtiofs

Re: [PATCH 08/12] pci: Fix silent truncation of pcie_aer_inject_error argument

2022-11-29 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > PCI AER error status is 32 bit. When the HMP command's second > argument parses as a number, values greater than ULONG_MAX get > rejected, but values between UINT32_MAX+1 and ULONG_MAX get silently > truncated. Fix to reject them, too. > > While t

Re: [PATCH 1/2] qga-win: add logging to Windows event log

2022-11-29 Thread Andrey Drobyshev
On 11/29/22 09:37, Marc-André Lureau wrote: > Hi > > On Tue, Nov 29, 2022 at 12:59 AM Andrey Drobyshev via > wrote: >> >> This commit allows QGA to write to Windows event log using Win32 API's >> ReportEvent() [1], much like syslog() under *nix guests. >> >> In order to generate log message defin

Re: [PATCH v2 for-8.0 0/5] scripts/make-release: Decrease size of the release tarballs

2022-11-29 Thread Paolo Bonzini
Il mar 29 nov 2022, 09:12 Daniel P. Berrangé ha scritto: > > However some firmware sources are only available from QEMU's submodules. > So > > either we distribute those submodules as separate tarballs, or distros > > would need to use the bundled tarball as well. > > If the firmware doesn't exis

Re: KVM developers conference call

2022-11-29 Thread Philippe Mathieu-Daudé
Cc'ing the list... On Tue, 29 Nov 2022 at 14:02, Philippe Mathieu-Daudé wrote: > > Hi Juan, > > On 28/11/22 14:42, juan.quint...@gmail.com wrote: > > > KVM developers conference call > > Tuesday 2022-11-29 ⋅ 15:00 – 16:00 (Central European Time - Madrid) > > > I think that Richard and Mark wanted

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-29 Thread Chao Peng
On Tue, Nov 29, 2022 at 02:21:39PM +0300, Kirill A. Shutemov wrote: > On Mon, Nov 28, 2022 at 06:06:32PM -0600, Michael Roth wrote: > > On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: > > > From: "Kirill A. Shutemov" > > > > > > > > > > > > +static struct file *restrictedmem_file_cr

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-29 Thread Chao Peng
On Tue, Nov 29, 2022 at 12:39:06PM +0100, David Hildenbrand wrote: > On 29.11.22 12:21, Kirill A. Shutemov wrote: > > On Mon, Nov 28, 2022 at 06:06:32PM -0600, Michael Roth wrote: > > > On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: > > > > From: "Kirill A. Shutemov" > > > > > > > >

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-29 Thread Chao Peng
On Mon, Nov 28, 2022 at 06:37:25PM -0600, Michael Roth wrote: > On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: ... > > +static long restrictedmem_fallocate(struct file *file, int mode, > > + loff_t offset, loff_t len) > > +{ > > + struct restrictedmem_dat

Re: [PATCH v3 7/7] hw/virtio: generalise CHR_EVENT_CLOSED handling

2022-11-29 Thread Raphael Norwitz
> On Nov 29, 2022, at 12:30 AM, Michael S. Tsirkin wrote: > > On Tue, Nov 29, 2022 at 05:18:58AM +, Raphael Norwitz wrote: >>> On Nov 28, 2022, at 11:41 AM, Alex Bennée wrote: >>> >>> ..and use for both virtio-user-blk and virtio-user-gpio. This avoids >>> the circular close by deferring sh

Re: [PATCH for-7.2] tests/qtest: Fix two format strings

2022-11-29 Thread Juan Quintela
Stefan Weil via wrote: > Signed-off-by: Stefan Weil Reviewed-by: Juan Quintela queued

Re: [PATCH v5 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-29 Thread Peter Xu
On Tue, Nov 29, 2022 at 04:24:58PM +0530, manish.mishra wrote: > > On 23/11/22 11:34 pm, Peter Xu wrote: > > On Wed, Nov 23, 2022 at 05:27:34PM +, manish.mishra wrote: > > > MSG_PEEK reads from the peek of channel, The data is treated as > > > unread and the next read shall still return this d

Re: [PATCH] tests/tcg/s390x: Add cdsg.c

2022-11-29 Thread Ilya Leoshkevich
On Tue, Nov 29, 2022 at 09:54:13AM +0100, David Hildenbrand wrote: > On 29.11.22 00:48, Ilya Leoshkevich wrote: > > Add a simple test to prevent regressions. > > > > Signed-off-by: Ilya Leoshkevich > > --- > > tests/tcg/s390x/Makefile.target | 4 ++ > > tests/tcg/s390x/cdsg.c | 73 ++

[PATCH v2] tests/tcg/s390x: Add cdsg.c

2022-11-29 Thread Ilya Leoshkevich
Add a simple test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 4 ++ tests/tcg/s390x/cdsg.c | 84 + 2 files changed, 88 insertions(+) create mode 100644 tests/tcg/s390x/cdsg.c diff --git a/tests/tcg/s390

Re: [PATCH v5 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-29 Thread manish.mishra
On 29/11/22 7:57 pm, Peter Xu wrote: On Tue, Nov 29, 2022 at 04:24:58PM +0530, manish.mishra wrote: On 23/11/22 11:34 pm, Peter Xu wrote: On Wed, Nov 23, 2022 at 05:27:34PM +, manish.mishra wrote: MSG_PEEK reads from the peek of channel, The data is treated as unread and the next read sh

Re: [PATCH v2 1/1] hw/arm/boot: set initrd with #[address/size]-cells type in fdt

2022-11-29 Thread Peter Maydell
On Tue, 29 Nov 2022 at 10:48, Schspa Shi wrote: > > We use 32bit value for linux,initrd-[start/end], when we have > loader_start > 4GB, there will be a wrong initrd_start passed > to the kernel, and the kernel will report the following warning. > > [0.00] [ cut here ]--

Who / what uses QMP command add_client?

2022-11-29 Thread Markus Armbruster
QMP command add_client's schema: ## # @add_client: # # Allow client connections for VNC, Spice and socket based # character devices to be passed in to QEMU via SCM_RIGHTS. # # @protocol: protocol name. Valid names are "vnc", "spice", "@dbus-display" or #

Re: Who / what uses QMP command add_client?

2022-11-29 Thread Daniel P . Berrangé
On Tue, Nov 29, 2022 at 03:54:56PM +0100, Markus Armbruster wrote: > QMP command add_client's schema: > > ## > # @add_client: > # > # Allow client connections for VNC, Spice and socket based > # character devices to be passed in to QEMU via SCM_RIGHTS. > # > # @protocol

Re: [PATCH v5 0/7] Add ARM Cortex-R52 CPU

2022-11-29 Thread Peter Maydell
On Sun, 27 Nov 2022 at 13:21, wrote: > > From: Tobias Röhmel > > No worries about the delay. I'm glad you are looking at it :) > > v5: I reviewed and gave my reviewed-by tags for at least some of the patches in the previous version of this series, but they don't seem to be listed in this versio

Re: [PATCH] migration/dirtyrate: Show sample pages only in page-sampling mode

2022-11-29 Thread Peter Xu
On Tue, Nov 29, 2022 at 12:04:04PM +0800, Zhenzhong Duan wrote: > The value of "Sample Pages" is confusing in mode other than page-sampling. > See below: > > (qemu) calc_dirty_rate -b 10 520 > (qemu) info dirty_rate > Status: measuring > Start Time: 11646834 (ms) > Sample Pages: 520 (per GB) > Per

[PATCH v3] tests/tcg/s390x: Add cdsg.c

2022-11-29 Thread Ilya Leoshkevich
Add a simple test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- Sorry, I just realized that in v2 that I sent the iteration count was not increased. For v3 I've decided to bump it further to 1m, since it's still fast enough: $ time -p ./qemu-s390x ./tests/tcg/s390x-linux-user/cdsg

Re: Who / what uses QMP command add_client?

2022-11-29 Thread Marc-André Lureau
Hi On Tue, Nov 29, 2022 at 6:55 PM Markus Armbruster wrote: > QMP command add_client's schema: > > ## > # @add_client: > # > # Allow client connections for VNC, Spice and socket based > # character devices to be passed in to QEMU via SCM_RIGHTS. > # > # @protocol: pro

Re: [PATCH 1/3] intel-iommu: fail MAP notifier without caching mode

2022-11-29 Thread Peter Xu
On Tue, Nov 29, 2022 at 04:10:35PM +0800, Jason Wang wrote: > Without caching mode, MAP notifier won't work correctly since guest > won't send IOTLB update event when it establishes new mappings in the > I/O page tables. Let's fail the IOMMU notifiers early instead of > misbehaving silently. > > S

Re: [PATCH 2/3] intel-iommu: fail DEVIOTLB_UNMAP without dt mode

2022-11-29 Thread Peter Xu
On Tue, Nov 29, 2022 at 04:10:36PM +0800, Jason Wang wrote: > Without dt mode, device IOTLB notifier won't work since guest won't > send device IOTLB invalidation descriptor in this case. Let's fail > early instead of misbehaving silently. > > Signed-off-by: Jason Wang > --- > hw/i386/intel_iomm

Re: [PATCH for 7.2? V2] vhost: fix vq dirty bitmap syncing when vIOMMU is enabled

2022-11-29 Thread Michael S. Tsirkin
On Tue, Nov 29, 2022 at 10:52:29AM +0100, Eric Auger wrote: > Hi Jason, > > On 11/29/22 05:02, Jason Wang wrote: > > When vIOMMU is enabled, the vq->used_phys is actually the IOVA not > > GPA. So we need to translate it to GPA before the syncing otherwise we > > may hit the following crash since I

Re: [PATCH v3 4/7] hw/virtio: ensure a valid host_feature set for virtio-user-gpio

2022-11-29 Thread Michael S. Tsirkin
On Mon, Nov 28, 2022 at 07:39:29PM +, Alex Bennée wrote: > > Stefan Hajnoczi writes: > > > On Mon, 28 Nov 2022 at 11:42, Alex Bennée wrote: > >> > >> There was a disconnect here because vdev->host_features was set to > >> random rubbish. This caused a weird negotiation between the driver an

Re: [PATCH 3/3] intel-iommu: build iova tree during IOMMU translation

2022-11-29 Thread Peter Xu
On Tue, Nov 29, 2022 at 04:10:37PM +0800, Jason Wang wrote: > The IOVA tree is only built during page walk this breaks the device > that tries to use UNMAP notifier only. One example is vhost-net, it > tries to use UNMAP notifier when vIOMMU doesn't support DEVIOTLB_UNMAP > notifier (e.g when dt mo

[PATCH v3 1/1] hw/arm/boot: set initrd with #address-cells type in fdt

2022-11-29 Thread Schspa Shi
We use 32bit value for linux,initrd-[start/end], when we have loader_start > 4GB, there will be a wrong initrd_start passed to the kernel, and the kernel will report the following warning. [0.00] [ cut here ] [0.00] initrd not fully accessible via the linear

Re: [PATCH for 7.2? V2] vhost: fix vq dirty bitmap syncing when vIOMMU is enabled

2022-11-29 Thread Eric Auger
Hi Michael, On 11/29/22 16:44, Michael S. Tsirkin wrote: > On Tue, Nov 29, 2022 at 10:52:29AM +0100, Eric Auger wrote: >> Hi Jason, >> >> On 11/29/22 05:02, Jason Wang wrote: >>> When vIOMMU is enabled, the vq->used_phys is actually the IOVA not >>> GPA. So we need to translate it to GPA before th

Re: [PATCH v2 1/1] hw/arm/boot: set initrd with #[address/size]-cells type in fdt

2022-11-29 Thread Schspa Shi
Peter Maydell writes: > On Tue, 29 Nov 2022 at 10:48, Schspa Shi wrote: >> >> We use 32bit value for linux,initrd-[start/end], when we have >> loader_start > 4GB, there will be a wrong initrd_start passed >> to the kernel, and the kernel will report the following warning. >> >> [0.00]

Re: [PATCH for-7.2] replay: Fix declaration of replay_read_next_clock

2022-11-29 Thread Stefan Hajnoczi
On Tue, 29 Nov 2022 at 02:39, Philippe Mathieu-Daudé wrote: > > On 29/11/22 02:05, Richard Henderson wrote: > > Fixes the build with gcc 13: > > > > replay/replay-time.c:34:6: error: conflicting types for \ > >'replay_read_next_clock' due to enum/integer mismatch; \ > >have 'void(ReplayCl

[PATCH v2 1/2] qga-win: add logging to Windows event log

2022-11-29 Thread Andrey Drobyshev via
This commit allows QGA to write to Windows event log using Win32 API's ReportEvent() [1], much like syslog() under *nix guests. In order to generate log message definitions we use a very basic message text file [2], so that every QGA's message gets ID 1. The tools "windmc" and "windres" respectiv

[PATCH v2 2/2] qga: map GLib log levels to system levels

2022-11-29 Thread Andrey Drobyshev via
This patch translates GLib-specific log levels to system ones, so that they may be used by both *nix syslog() (as a "priority" argument) and Windows ReportEvent() (as a "wType" argument). Currently the only codepath to write to "syslog" domain is slog() function. However, this patch allows the in

[PATCH v2 0/2] qga: improve "syslog" domain logging

2022-11-29 Thread Andrey Drobyshev via
These patches extend QGA logging interface, primarily under Windows guests. They enable QGA to write to Windows event log, much like syslog() on *nix. In addition we get rid of hardcoded log level used by ga_log(). v2: * Close event_log handle when doing cleanup_agent() * Fix switch cases indent

[PATCH v12 4/7] s390x/cpu_topology: CPU topology migration

2022-11-29 Thread Pierre Morel
The migration can only take place if both source and destination of the migration both use or both do not use the CPU topology facility. We indicate a change in topology during migration postload for the case the topology changed between source and destination. Signed-off-by: Pierre Morel --- t

[PATCH v12 3/7] s390x/cpu_topology: resetting the Topology-Change-Report

2022-11-29 Thread Pierre Morel
During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel Reviewed-by: Nico Boehr Reviewed-by: Janis Schoetterl-Glausch --- targe

[PATCH v12 1/7] s390x/cpu topology: Creating CPU topology device

2022-11-29 Thread Pierre Morel
We will need a Topology device to transfer the topology during migration and to implement machine reset. The device creation is fenced by s390_has_topology(). Signed-off-by: Pierre Morel --- include/hw/s390x/cpu-topology.h| 44 +++ include/hw/s390x/s390-virtio-ccw.h | 1 + hw/s

[PATCH v12 0/7] s390x: CPU Topology

2022-11-29 Thread Pierre Morel
Hi, The implementation of the CPU Topology in QEMU has been modified since the last patch series. - The two preliminary patches have been accepted and are no longer part of this series. - The topology machine property has been abandoned - the topology_capable QEMU capability has been abandone

[PATCH v12 2/7] s390x/cpu topology: reporting the CPU topology to the guest

2022-11-29 Thread Pierre Morel
The guest uses the STSI instruction to get information on the CPU topology. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel --- target/s390x/cpu.h | 77 +++ hw/s390x/s390-virtio-ccw.c | 12 +-- target/s390x/cpu

[PATCH v12 5/7] s390x/cpu_topology: interception of PTF instruction

2022-11-29 Thread Pierre Morel
When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervizor activates the interpretation by using the KVM_CAP_S390_CPU_TOPOLOGY KVM extension. The PTF instructions with function code 0 and 1 are interce

[PATCH v12 7/7] docs/s390x: document s390x cpu topology

2022-11-29 Thread Pierre Morel
Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel --- docs/system/s390x/cpu-topology.rst | 80 ++ 1 file changed, 80 insertions(+) create mode 100644 docs/system/s390x/cpu-topology.rst diff --git a/docs/system/s390x/cpu

Re: [PATCH for-7.2] replay: Fix declaration of replay_read_next_clock

2022-11-29 Thread Philippe Mathieu-Daudé
On 29/11/22 17:13, Stefan Hajnoczi wrote: On Tue, 29 Nov 2022 at 02:39, Philippe Mathieu-Daudé wrote: On 29/11/22 02:05, Richard Henderson wrote: Fixes the build with gcc 13: replay/replay-time.c:34:6: error: conflicting types for \ 'replay_read_next_clock' due to enum/integer mismatch;

[PATCH v12 6/7] s390x/cpu_topology: activating CPU topology

2022-11-29 Thread Pierre Morel
The KVM capability, KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility for the guest in the case the topology is available in QEMU and in KVM. The feature is fenced for SE (secure execution). To allow smooth migration with old QEMU

Re: [PATCH v3 1/1] hw/arm/boot: set initrd with #address-cells type in fdt

2022-11-29 Thread Peter Maydell
On Tue, 29 Nov 2022 at 16:07, Schspa Shi wrote: > > We use 32bit value for linux,initrd-[start/end], when we have > loader_start > 4GB, there will be a wrong initrd_start passed > to the kernel, and the kernel will report the following warning. > > [0.00] [ cut here ]--

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-29 Thread Vishal Annapurve
On Mon, Nov 28, 2022 at 4:37 PM Michael Roth wrote: > > On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: > > From: "Kirill A. Shutemov" > > > > Introduce 'memfd_restricted' system call with the ability to create > > memory areas that are restricted from userspace access through ordinary

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-29 Thread Michael Roth
On Tue, Nov 29, 2022 at 10:06:15PM +0800, Chao Peng wrote: > On Mon, Nov 28, 2022 at 06:37:25PM -0600, Michael Roth wrote: > > On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: > ... > > > +static long restrictedmem_fallocate(struct file *file, int mode, > > > +

Re: [PATCH for-7.2] replay: Fix declaration of replay_read_next_clock

2022-11-29 Thread Stefan Hajnoczi
Merged, thanks! Stefan

Re: [PULL 0/2] Seabios 1.16.1 20221128 patches

2022-11-29 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-29 Thread Michael Roth
On Tue, Nov 29, 2022 at 01:06:58PM -0600, Michael Roth wrote: > On Tue, Nov 29, 2022 at 10:06:15PM +0800, Chao Peng wrote: > > On Mon, Nov 28, 2022 at 06:37:25PM -0600, Michael Roth wrote: > > > On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: > > ... > > > > +static long restrictedmem_fa

Re: [PATCH 12/12] pci: Improve do_pcie_aer_inject_error()'s error messages

2022-11-29 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Signed-off-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert > --- > hw/pci/pci-hmp-cmds.c | 30 +++--- > 1 file changed, 15 insertions(+), 15 deletions(-) > > diff --git a/hw/pci/pci-hmp-cmds.c b/hw/pci/pci-hmp-

Re: [PATCH 10/12] pci: Inline do_pcie_aer_inject_error() into its only caller

2022-11-29 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Signed-off-by: Markus Armbruster Yeh that seems to have simplified out; Reviewed-by: Dr. David Alan Gilbert > --- > hw/pci/pci-hmp-cmds.c | 41 ++--- > 1 file changed, 6 insertions(+), 35 deletions(-) > > di

Re: [PATCH v1 1/1] migration: Fix yank on postcopy multifd crashing guest after migration

2022-11-29 Thread Leonardo Bras Soares Passos
Hello Peter, On Thu, Nov 24, 2022 at 1:04 PM Peter Xu wrote: > > On Wed, Nov 09, 2022 at 02:56:29AM -0300, Leonardo Bras wrote: > > diff --git a/migration/savevm.c b/migration/savevm.c > > index a0cdb714f7..250caff7f4 100644 > > --- a/migration/savevm.c > > +++ b/migration/savevm.c > > @@ -1889,6

[PATCH for-7.2] target/arm: Set TCGCPUOps.restore_state_to_opc for v7m

2022-11-29 Thread Richard Henderson
This setting got missed, breaking v7m. Fixes: 56c6c98df85c ("target/arm: Convert to tcg_ops restore_state_to_opc") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1347 Signed-off-by: Richard Henderson --- The patch is unchanged from the correct suggestion in the issue. If Evgeny would li

Re: Plugin Memory Callback Debugging

2022-11-29 Thread Aaron Lindsay via
On Nov 22 10:57, Aaron Lindsay wrote: > On Nov 21 18:22, Richard Henderson wrote: > > On 11/21/22 13:51, Alex Bennée wrote: > > > > > > Aaron Lindsay writes: > > > > > > > On Nov 15 22:36, Alex Bennée wrote: > > > > > Aaron Lindsay writes: > > > > > > I believe the code *should* always reset `c

Re: [PATCH v1 1/1] migration: Fix yank on postcopy multifd crashing guest after migration

2022-11-29 Thread Peter Xu
On Tue, Nov 29, 2022 at 05:28:26PM -0300, Leonardo Bras Soares Passos wrote: > Hello Peter, Leo, > > On Thu, Nov 24, 2022 at 1:04 PM Peter Xu wrote: > > > > On Wed, Nov 09, 2022 at 02:56:29AM -0300, Leonardo Bras wrote: > > > diff --git a/migration/savevm.c b/migration/savevm.c > > > index a0cd

Re: [PATCH for-7.2] block-backend: avoid bdrv_unregister_buf() NULL pointer deref

2022-11-29 Thread Stefan Hajnoczi
On Tue, 22 Nov 2022 at 03:22, Kevin Wolf wrote: > > Am 21.11.2022 um 22:19 hat Stefan Hajnoczi geschrieben: > > bdrv_*() APIs expect a valid BlockDriverState. Calling them with bs=NULL > > leads to undefined behavior. > > > > Jonathan Cameron reported this following NULL pointer dereference when a

Re: [PATCH v2 5/8] hw/arm/virt: Fix devicetree warnings about the GPIO node

2022-11-29 Thread Rob Herring
On Tue, Sep 27, 2022 at 6:25 AM Peter Maydell wrote: > > On Tue, 27 Sept 2022 at 11:12, Jean-Philippe Brucker > wrote: > > > > Since the pl061 device can be used as interrupt controller, its node > > should contain "interrupt-controller" and "#interrupt-cells" properties. > > It *can* be, but thi

Re: [PATCH for-7.2] target/arm: Set TCGCPUOps.restore_state_to_opc for v7m

2022-11-29 Thread Stefan Hajnoczi
Waiting for Evgeny's Signed-off-by. It seems a -rc4 tag will be required anyway for vhost fixes so I'll wait. Stefan

Re: [PATCH v3 4/7] hw/virtio: ensure a valid host_feature set for virtio-user-gpio

2022-11-29 Thread Stefan Hajnoczi
Hi Alex, I'm waiting for a v4 or a confirmation that you've retested and I can just drop this patch. Thanks! Stefan

Re: [PATCH v3 4/7] hw/virtio: ensure a valid host_feature set for virtio-user-gpio

2022-11-29 Thread Michael S. Tsirkin
On Tue, Nov 29, 2022 at 04:01:25PM -0500, Stefan Hajnoczi wrote: > Hi Alex, > I'm waiting for a v4 or a confirmation that you've retested and I can > just drop this patch. > > Thanks! > > Stefan Note things need to be reordered, patch 2 should come last. So I'd really like to see v4 if possible.

Re: [PATCH for-7.2] target/arm: Set TCGCPUOps.restore_state_to_opc for v7m

2022-11-29 Thread Evgeny Ermakov
Signed-off-by: Evgeny Ermakov ---

QEMU 7.2 non-deterministic migration-test CI failure

2022-11-29 Thread Stefan Hajnoczi
Hi, The following cross-i386-tci migration-test failure was triggered by CI: >>> MALLOC_PERTURB_=133 >>> G_TEST_DBUS_DAEMON=/builds/qemu-project/qemu/tests/dbus-vmstate-daemon.sh >>> QTEST_QEMU_BINARY=./qemu-system-i386 >>> /builds/qemu-project/qemu/build/tests/qtest/migration-test --tap -k ―――

Re: [PATCH qemu.git v2 9/9] hw/timer/imx_epit: fix compare timer handling

2022-11-29 Thread Axel Heider
Peter, If you're correcting behaviour of the timer use here, you should start by fixing the way the timers are currently created with PTIMER_POLICY_LEGACY. That setting is basically "bug-for-bug-compatibility with very old QEMU, for devices where nobody really knows what the hardware behaviour s

Re: [PATCH v2 03/11] kvm-all: Do not allow reap vcpu dirty ring buffer if not ready

2022-11-29 Thread Peter Xu
Hi, Yong, On Mon, Nov 21, 2022 at 11:26:35AM -0500, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > When tested large vcpu size vm with dirtylimit feature, Qemu crashed > due to the assertion in kvm_dirty_ring_reap_one, which assert that > vcpu's kvm_dirty_gfns has been allocated and

  1   2   >