Re: [PATCH 1/2] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 18:18, Andrew Deason wrote: > > On Mon, 14 Mar 2022 16:36:00 + > Peter Maydell wrote: > > > On Mon, 14 Mar 2022 at 16:12, Andrew Deason wrote: > > > #ifdef CONFIG_SOLARIS > > > #include > > > +#ifndef HAVE_MADVISE_PROTO > > > /* See MySQL bug #7156 (http://bugs.mys

Re: [PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Philippe Mathieu-Daudé
Hi Christian, On 14/3/22 17:42, Christian Schoenebeck wrote: On Montag, 14. März 2022 17:01:07 CET Markus Armbruster wrote: g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than

Time to introduce a migration protocol negotiation (Re: [PATCH v2 00/25] migration: Postcopy Preemption)

2022-03-14 Thread Daniel P . Berrangé
On Tue, Mar 01, 2022 at 04:51:09PM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Mar 01, 2022 at 10:27:10AM +, Daniel P. Berrangé wrote: > > > > I also didn't know whether there's other limitations of it. For > > > > example, > > > > will a new socke

Re: [PATCH] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Richard Henderson
On 3/14/22 11:06, Peter Maydell wrote: I have a custom distro building with Yocto which is using musl C library instead of glibc. Ah, musl. I found this gcc mailing list post from one of the musl upstream developers: https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg281012.html where he

Re: [PULL 00/18] migration queue

2022-03-14 Thread Daniel P . Berrangé
On Mon, Mar 14, 2022 at 06:20:54PM +, Dr. David Alan Gilbert wrote: > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > On Mon, 14 Mar 2022 at 17:55, Dr. David Alan Gilbert > > wrote: > > > > > > Peter Maydell (peter.mayd...@linaro.org) wrote: > > > > One thing that makes this bug investig

Re: [PULL 00/18] migration queue

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 17:15, Peter Maydell wrote: > > On Mon, 14 Mar 2022 at 17:07, Daniel P. Berrangé wrote: > > So the test harness is waiting for a reply to 'query-migrate'. > > > > This should be fast unless QEMU has hung in the main event > > loop servicing monitor commands, or stopped. > >

Re: [PATCH 1/2] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Daniel P . Berrangé
On Mon, Mar 14, 2022 at 01:18:00PM -0500, Andrew Deason wrote: > On Mon, 14 Mar 2022 16:36:00 + > Peter Maydell wrote: > > > On Mon, 14 Mar 2022 at 16:12, Andrew Deason wrote: > > > #ifdef CONFIG_SOLARIS > > > #include > > > +#ifndef HAVE_MADVISE_PROTO > > > /* See MySQL bug #7156 (http:

Re: [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Daniel P . Berrangé
On Mon, Mar 14, 2022 at 06:06:40PM +, Peter Maydell wrote: > On Mon, 14 Mar 2022 at 17:59, Daniel Henrique Barboza > wrote: > > I am intrigued about why we didn't hit this before, especially considering > > that ppc64 header is just a > > pointer to this file. > > It's specific to musl, whic

[PATCH] 9pfs: fix inode sequencing in 'synth' driver

2022-03-14 Thread Christian Schoenebeck
The 'synth' driver's root node and the 'synth' driver's first subdirectory node falsely share the same inode number (zero), which makes it impossible for 9p clients (i.e. 9p test cases) to distinguish root node and first subdirectory from each other by comparing their QIDs (which are derived by 9p

Re: [PATCH 1/3] scripts/coccinelle: New use-g_new-etc.cocci

2022-03-14 Thread Richard Henderson
On 3/14/22 09:01, Markus Armbruster wrote: This is the semantic patch from commit b45c03f585 "arm: Use g_new() & friends where that makes obvious sense". Signed-off-by: Markus Armbruster --- scripts/coccinelle/use-g_new-etc.cocci | 75 ++ 1 file changed, 75 insertions(

Re: [PATCH v2 1/6] block: Support passing NULL ops to blk_set_dev_ops()

2022-03-14 Thread John Snow
On Mon, Mar 14, 2022 at 1:23 PM Stefan Hajnoczi wrote: > > On Tue, Feb 15, 2022 at 06:59:38PM +0800, Xie Yongji wrote: > > This supports passing NULL ops to blk_set_dev_ops() > > so that we can remove stale ops in some cases. > > > > Signed-off-by: Xie Yongji > > --- > > block/block-backend.c |

Re: [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Richard Henderson
On 3/14/22 10:25, Khem Raj wrote: Fixes ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs' return uc->uc_mcontext.regs->nip; ^ Signed-off-by: Khem Raj Cc: Peter Maydell Cc: Philippe Mathieu-D

[PATCH v16 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-03-14 Thread Vladislav Yaroshchuk
vmnet.framework supports iov, but writing more than one iov into vmnet interface fails with 'VMNET_INVALID_ARGUMENT'. Collecting provided iovs into one and passing it to vmnet works fine. That's the reason why receive_iov() left unimplemented. But it still works with good enough performance having

Re: [PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Christian Schoenebeck
On Montag, 14. März 2022 19:46:59 CET Philippe Mathieu-Daudé wrote: > Hi Christian, Hi Philippe, > On 14/3/22 17:42, Christian Schoenebeck wrote: > > On Montag, 14. März 2022 17:01:07 CET Markus Armbruster wrote: > >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > >> for

[PATCH v16 0/7] Add vmnet.framework based network backend

2022-03-14 Thread Vladislav Yaroshchuk
macOS provides networking API for VMs called 'vmnet.framework': https://developer.apple.com/documentation/vmnet We can provide its support as the new QEMU network backends which represent three different vmnet.framework interface usage modes: * `vmnet-shared`: allows the guest to communicat

[PATCH v16 1/7] net/vmnet: add vmnet dependency and customizable option

2022-03-14 Thread Vladislav Yaroshchuk
vmnet.framework dependency is added with 'vmnet' option to enable or disable it. Default value is 'auto'. vmnet features to be used are available since macOS 11.0, corresponding probe is created into meson.build. Signed-off-by: Vladislav Yaroshchuk --- meson.build | 16 +++

[PATCH v16 5/7] net/vmnet: implement bridged mode (vmnet-bridged)

2022-03-14 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- net/vmnet-bridged.m | 134 ++-- 1 file changed, 129 insertions(+), 5 deletions(-) diff --git a/net/vmnet-bridged.m b/net/vmnet-bridged.m index c735901666..a23e03c40d 100644 --- a/net/vmnet-bridged.m +++ b/net/vmnet-b

[PATCH v16 4/7] net/vmnet: implement host mode (vmnet-host)

2022-03-14 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- net/vmnet-host.c | 116 --- 1 file changed, 110 insertions(+), 6 deletions(-) diff --git a/net/vmnet-host.c b/net/vmnet-host.c index 32dc437037..15a832701a 100644 --- a/net/vmnet-host.c +++ b/net/vmnet-host.c @@

Re: [PATCH 1/3] scripts/coccinelle: New use-g_new-etc.cocci

2022-03-14 Thread Alex Bennée
Markus Armbruster writes: > This is the semantic patch from commit b45c03f585 "arm: Use g_new() & > friends where that makes obvious sense". > > Signed-off-by: Markus Armbruster Reviewed-by: Alex Bennée -- Alex Bennée

[PATCH v16 6/7] net/vmnet: update qemu-options.hx

2022-03-14 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- qemu-options.hx | 25 + 1 file changed, 25 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 5ce0ada75e..ea00d0eeb6 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2743,6 +2743,25 @@ DEF("netdev", HAS_ARG, QE

[PATCH v16 2/7] net/vmnet: add vmnet backends to qapi/net

2022-03-14 Thread Vladislav Yaroshchuk
Create separate netdevs for each vmnet operating mode: - vmnet-host - vmnet-shared - vmnet-bridged Signed-off-by: Vladislav Yaroshchuk --- net/clients.h | 11 net/meson.build | 7 +++ net/net.c | 10 net/vmnet-bridged.m | 25 + net/vmnet-common.m | 20

Re: [PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Alex Bennée
Markus Armbruster writes: > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > for two reasons. One, it catches multiplication overflowing size_t. > Two, it returns T * rather than void *, which lets the compiler catch > more type errors. > > This commit only touches alloc

[PATCH v16 7/7] net/vmnet: update hmp-commands.hx

2022-03-14 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- hmp-commands.hx | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 8476277aa9..8f3d78f177 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1265,7 +1265,11 @@ ERST { .name

Re: [PATCH] target/arm: Fix handling of LPAE block descriptors

2022-03-14 Thread Richard Henderson
On 3/4/22 08:56, Peter Maydell wrote: LPAE descriptors come in three forms: * table descriptors, giving the address of the next level page table * page descriptors, which occur only at level 3 and describe the mapping of one page (which might be 4K, 16K or 64K) * block descriptors, whi

Re: [PATCH] target/arm: Fix handling of LPAE block descriptors

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 19:29, Richard Henderson wrote: > > On 3/4/22 08:56, Peter Maydell wrote: > > page_size = (1ULL << ((stride * (4 - level)) + 3)); > > +descaddr &= ~(page_size - 1); > > descaddr |= (address & (page_size - 1)); > > As is, > Reviewed-by: Richard Hen

Re: [PATCH experiment 14/16] util: introduce C++ stackless coroutine backend

2022-03-14 Thread Paolo Bonzini
Il lun 14 mar 2022, 15:37 Stefan Hajnoczi ha scritto: > On Mon, Mar 14, 2022 at 10:32:01AM +0100, Paolo Bonzini wrote: > > +// > > + > > +// CoroutineFn does not even need anything more than what > > +// BaseCoroutine provides, so it's just a type alias. The magic > > +/

Re: [PULL 00/18] migration queue

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 18:58, Peter Maydell wrote: > > On Mon, 14 Mar 2022 at 17:15, Peter Maydell wrote: > > > > On Mon, 14 Mar 2022 at 17:07, Daniel P. Berrangé > > wrote: > > > So the test harness is waiting for a reply to 'query-migrate'. > > > > > > This should be fast unless QEMU has hung

Re: [PATCH v16 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-03-14 Thread Akihiko Odaki
On 2022/03/15 4:15, Vladislav Yaroshchuk wrote: vmnet.framework supports iov, but writing more than one iov into vmnet interface fails with 'VMNET_INVALID_ARGUMENT'. Collecting provided iovs into one and passing it to vmnet works fine. That's the reason why receive_iov() left unimplemented. But i

[PATCH v4 02/11] vfio: handle KVM-owned IOMMU requests

2022-03-14 Thread Matthew Rosato
s390x PCI devices need to use a special KVM-managed IOMMU domain as part of zPCI interpretation. To facilitate this, let a vfio device indicate that it wishes to use a KVM-managed IOMMU so that it can be reflected by the group and, ultimately, trigger a KVM-managed argument for the VFIO_SET_IOMMU

[PATCH v4 00/11] s390x/pci: zPCI interpretation support

2022-03-14 Thread Matthew Rosato
For QEMU, the majority of the work in enabling instruction interpretation is handled via a new KVM ioctls to enable interpretation, interrupt forwarding and registration of the guest IOAT tables. In order to make use of the KVM-managed IOMMU domain operations on the ho

[PATCH v4 11/11] s390x/pci: let intercept devices have separate PCI groups

2022-03-14 Thread Matthew Rosato
Let's use the reserved pool of simulated PCI groups to allow intercept devices to have separate groups from interpreted devices as some group values may be different. If we run out of simulated PCI groups, subsequent intercept devices just get the default group. Furthermore, if we encounter any PCI

[PATCH v4 07/11] s390x/pci: enable adapter event notification for interpreted devices

2022-03-14 Thread Matthew Rosato
Use the associated kvm ioctl operation to enable adapter event notification and forwarding for devices when requested. This feature will be set up with or without firmware assist based upon the 'forwarding_assist' setting. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-bus.c | 20 +

[PATCH v4 01/11] Update linux headers

2022-03-14 Thread Matthew Rosato
This is a placeholder that pulls in 5.17-rc7 + unmerged kernel changes required by this item. A proper header sync can be done once the associated kernel code merges. Signed-off-by: Matthew Rosato --- linux-headers/asm-s390/kvm.h| 1 + linux-headers/asm-x86/kvm.h | 3 ++ linux-headers

[PATCH v4 04/11] s390x/pci: add routine to get host function handle from CLP info

2022-03-14 Thread Matthew Rosato
In order to interface with the underlying host zPCI device, we need to know it's function handle. Add a routine to grab this from the vfio CLP capabilities chain. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-vfio.c | 83 ++-- include/hw/s390x/s390-pci-

[PATCH v4 08/11] s390x/pci: use KVM-managed IOMMU for interpretation

2022-03-14 Thread Matthew Rosato
When interpreting zPCI instructions, KVM will control the IOMMU mappings in response to RPCIT instructions rather than relying on mapping ioctls from userspace. Mark the vfio device in pre_plug so that the appropriate iommu domain will be allocated on the host during VFIO_SET_IOMMU. Signed-off-by

[PATCH v4 03/11] target/s390x: add zpci-interp to cpu models

2022-03-14 Thread Matthew Rosato
The zpci-interp feature is used to specify whether zPCI interpretation is to be used for this guest. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 1 + target/s390x/cpu_features_def.h.inc | 1 + target/s390x/gen-features.c | 2 ++ target/s390x/kvm/kvm.c

[PATCH v4 06/11] s390x/pci: don't fence interpreted devices without MSI-X

2022-03-14 Thread Matthew Rosato
Lack of MSI-X support is not an issue for interpreted passthrough devices, so let's let these in. This will allow, for example, ISM devices to be passed through -- but only when interpretation is available and being used. Reviewed-by: Thomas Huth Reviewed-by: Pierre Morel Signed-off-by: Matthew

[PATCH v4 09/11] s390x/pci: use I/O Address Translation assist when interpreting

2022-03-14 Thread Matthew Rosato
Allow the underlying kvm host to handle the Refresh PCI Translation instruction intercepts. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-bus.c | 6 ++--- hw/s390x/s390-pci-inst.c | 42 +--- hw/s390x/s390-pci-kvm.c | 21 +++

[PATCH v4 05/11] s390x/pci: enable for load/store intepretation

2022-03-14 Thread Matthew Rosato
Use the associated kvm ioctl to enable interpretation for devices when requested. As part of this process, we must use the host function handle rather than a QEMU-generated one -- we use an initial value from vfio CLP and maintain an updated fh value from kvm ioctl response info. By default, unle

Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-14 Thread Richard Henderson
On 3/14/22 09:21, Paolo Bonzini wrote: But perhaps someone will try to use templates to replace repeated inclusion (which is common in hw/display) and others will follow suit. The code in fpu/ desperately calls out for overloading and templates. At present it is a tangle of _Generic and multi

[PATCH v4 10/11] s390x/pci: use dtsm provided from vfio capabilities for interpreted devices

2022-03-14 Thread Matthew Rosato
When using the IOAT assist via interpretation, we should advertise what the host driver supports, not QEMU. Reviewed-by: Pierre Morel Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-vfio.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/s390x/s390-pci-vfio.c b/hw

Re: [PATCH v16 4/7] net/vmnet: implement host mode (vmnet-host)

2022-03-14 Thread Akihiko Odaki
On 2022/03/15 4:15, Vladislav Yaroshchuk wrote: Signed-off-by: Vladislav Yaroshchuk --- net/vmnet-host.c | 116 --- 1 file changed, 110 insertions(+), 6 deletions(-) diff --git a/net/vmnet-host.c b/net/vmnet-host.c index 32dc437037..15a832701a 1006

[PATCH 1/3] qapi: rename BlockDirtyBitmapMergeSource to BlockDirtyBitmapOrStr

2022-03-14 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Rename the type to be reused. Old name is "what is it for". To be natively reused for other needs, let's name it exactly "what is it". Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/monitor/bitmap-qmp-cmds.c| 6 +++--- include/block/block_int-g

[PATCH for-7.1 0/3] qapi: nbd-export: select bitmap by node/name pair

2022-03-14 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here is small improvement for bitmap exporting interface. Vladimir Sementsov-Ogievskiy (3): qapi: rename BlockDirtyBitmapMergeSource to BlockDirtyBitmapOrStr qapi: nbd-export: allow select bitmaps by node/name pair iotests/223: check new possibility of exporting bitmaps by node/name

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Alex Bennée
Markus Armbruster writes: > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > for two reasons. One, it catches multiplication overflowing size_t. > Two, it returns T * rather than void *, which lets the compiler catch > more type errors. > > This commit only touches alloc

[PATCH] MAINTAINERS: Volunteer to maintain Darwin-based hosts support

2022-03-14 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé While I am not an experienced Darwin OS user, I now have to use a macOS based workstation and alike CI, meaning I should easily spot regressions and test fixes. I therefore volunteer to collect Darwin related patches and keep QEMU in good state on macOS, and to some e

Re: How to backtrace an separate stack?

2022-03-14 Thread Tom Tromey
Tom> IMO this is just a longstanding hole in GDB. Green threads exist, Tom> so it would be good for GDB to have a way to inspect them. I took a stab at implementing this recently. It's still very rough but it's good enough to discuss whether it's something I should try to polish. For testing th

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Christian Schoenebeck
On Montag, 14. März 2022 20:48:47 CET Alex Bennée wrote: > Markus Armbruster writes: > > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > > for two reasons. One, it catches multiplication overflowing size_t. > > Two, it returns T * rather than void *, which lets the compile

[PATCH v3 0/3] nbd: MULTI_CONN for shared writable exports

2022-03-14 Thread Eric Blake
v2 was here: https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg03314.html Since then: - expose the knob through 'qemu-nbd -m on|off|auto' - reuse QAPI OnOffAuto type instead of rolling my own - rewrite the iotest from bash into python (thanks: Nir, Vladimir) - split out easy preliminary fix

[PATCH v3 2/3] qemu-nbd: Pass max connections to blockdev layer

2022-03-14 Thread Eric Blake
The next patch wants to adjust whether the NBD server code advertises MULTI_CONN based on whether it is known if the server limits to exactly one client. For a server started by QMP, this information is obtained through nbd_server_start (which can support more than one export); but for qemu-nbd (w

[PATCH v3 1/3] docs: Consistent typography for options of qemu-nbd

2022-03-14 Thread Eric Blake
Prefer the :option:`--name` form when cross-referencing other options from the qemu-nbd documentation. Signed-off-by: Eric Blake --- docs/tools/qemu-nbd.rst | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/tools/qemu-nbd.rst b/docs/tools/qemu-nbd.rst index 2b

[PATCH v3 3/3] nbd/server: Allow MULTI_CONN for shared writable exports

2022-03-14 Thread Eric Blake
According to the NBD spec, a server that advertises NBD_FLAG_CAN_MULTI_CONN promises that multiple client connections will not see any cache inconsistencies: when properly separated by a single flush, actions performed by one client will be visible to another client, regardless of which client did

Re: [PATCH] MAINTAINERS: Volunteer to maintain Darwin-based hosts support

2022-03-14 Thread Christian Schoenebeck
On Montag, 14. März 2022 21:27:38 CET Philippe Mathieu-Daudé wrote: > From: Philippe Mathieu-Daudé > > While I am not an experienced Darwin OS user, I now have to > use a macOS based workstation and alike CI, meaning I should > easily spot regressions and test fixes. I therefore volunteer > to co

Re: [PATCH] hw/nvram: Add at24c-eeprom support for small eeproms

2022-03-14 Thread Patrick Venture
On Mon, Mar 14, 2022 at 2:12 PM Patrick Venture wrote: > Tested: Verified at24c02 driver happy and contents matched > expectations. > > Signed-off-by: Patrick Venture > Reviewed-by: Hao Wu > --- > hw/nvram/eeprom_at24c.c | 52 +++-- > 1 file changed, 35 inse

[PATCH] hw/nvram: Add at24c-eeprom support for small eeproms

2022-03-14 Thread Patrick Venture
Tested: Verified at24c02 driver happy and contents matched expectations. Signed-off-by: Patrick Venture Reviewed-by: Hao Wu --- hw/nvram/eeprom_at24c.c | 52 +++-- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/hw/nvram/eeprom_at24c.c b/hw/nv

Re: [PATCH 1/2] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Andrew Deason
On Mon, 14 Mar 2022 19:01:06 + Daniel P. Berrangé wrote: > We have a general purpose platform support policy > > https://www.qemu.org/docs/master/about/build-platforms.html > > where the common rule ends up being "the current major release, > and the previous major release for 2 years ove

qemu-binfmt-conf.sh: mips improvements

2022-03-14 Thread Andreas K . Hüttel
Two patches; the first one has been under review before, the second builds on it and extends the binfmt-misc magic to differentiate between o32 and n32 binaries (see also issue 843).

[PATCH v3 1/2] qemu-binfmt-conf.sh: allow elf EI_ABIVERSION=1 for mips

2022-03-14 Thread Andreas K . Hüttel
With the command line flag -mplt and a recent toolchain, ELF binaries generated by gcc can obtain EI_ABIVERSION=1, see below, which makes, e.g., gcc three-stage bootstrap in a mips-unknown-linux-gnu qemu-user chroot fail since the binfmt-misc magic does not match anymore. qemu executes these binar

[PATCH v3 2/2] qemu-binfmt-conf.sh: Extend magic to distinguish mips o32 and n32 ABI

2022-03-14 Thread Andreas K . Hüttel
This information is given by the EF_MIPS_ABI2 (0x20) bit in the e_flags field of the ELF header (a 4-byte value at offset 0x24 for the here applicable ELFCLASS32). See-also: https://www.mail-archive.com/qemu-devel@nongnu.org/msg732572.html Signed-off-by: Andreas K. Hüttel --- scripts/qemu-binfmt

Re: [PATCH v2 for-7.1 0/3] qapi: nbd-export: select bitmap by node/name pair

2022-03-14 Thread Vladimir Sementsov-Ogievskiy
15.03.2022 00:32, Vladimir Sementsov-Ogievskiy wrote: From: Vladimir Sementsov-Ogievskiy Hi all! Here is small improvement for bitmap exporting interface. v2: Sorry for the noise, me trying to find a email service, that don't consider sending patch series by git-send-email as as spam :/ Aha

Re: [PATCH v16 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-03-14 Thread Vladislav Yaroshchuk
Thank you, Akihiko On Mon, Mar 14, 2022 at 10:46 PM Akihiko Odaki wrote: > On 2022/03/15 4:15, Vladislav Yaroshchuk wrote: > > vmnet.framework supports iov, but writing more than > > one iov into vmnet interface fails with > > 'VMNET_INVALID_ARGUMENT'. Collecting provided iovs into > > one and p

[PATCH v3] ppc64: Avoid pt_regs struct definition

2022-03-14 Thread Khem Raj
Remove pt_regs indirection and instead reference gp_regs directly, this makes it portable across musl/glibc Move the file to ppc64 subdir and leave ppc empty Fixes ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs' return uc-

Re: XIVE VFIO kernel resample failure in INTx mode under heavy load

2022-03-14 Thread Alex Williamson
[Cc +Alexey] On Fri, 11 Mar 2022 12:35:45 -0600 (CST) Timothy Pearson wrote: > All, > > I've been struggling for some time with what is looking like a > potential bug in QEMU/KVM on the POWER9 platform. It appears that in > XIVE mode, when the in-kernel IRQ chip is enabled, an external device

Re: [RFC PATCH 1/2] spapr: Report correct GTSE support via ov5

2022-03-14 Thread Fabiano Rosas
David Gibson writes: > On Tue, Mar 08, 2022 at 10:23:59PM -0300, Fabiano Rosas wrote: >> QEMU reports MMU support to the guest via the ibm,architecture-vec-5 >> property of the /chosen node. Byte number 26 specifies Radix Table >> Expansions, currently only GTSE (Guest Translation Shootdown >> En

Re: [PATCH 2/4] intel_iommu: Support IR-only mode without DMA translation

2022-03-14 Thread Michael S. Tsirkin
On Mon, Mar 14, 2022 at 03:45:47PM +, David Woodhouse wrote: > On Mon, 2022-03-14 at 11:24 -0400, Michael S. Tsirkin wrote: > > On Mon, Mar 14, 2022 at 02:25:42PM +, David Woodhouse wrote: > > > From: David Woodhouse > > > > > > By setting none of the SAGAW bits we can indicate to a guest

Re: [PATCH v16 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-03-14 Thread Akihiko Odaki
On 2022/03/15 6:50, Vladislav Yaroshchuk wrote: Thank you, Akihiko On Mon, Mar 14, 2022 at 10:46 PM Akihiko Odaki > wrote: On 2022/03/15 4:15, Vladislav Yaroshchuk wrote: > vmnet.framework supports iov, but writing more than > one iov into vmnet in

Re: [PATCH v16 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-03-14 Thread Akihiko Odaki
On 2022/03/15 7:34, Akihiko Odaki wrote: On 2022/03/15 6:50, Vladislav Yaroshchuk wrote: Thank you, Akihiko On Mon, Mar 14, 2022 at 10:46 PM Akihiko Odaki mailto:akihiko.od...@gmail.com>> wrote:     On 2022/03/15 4:15, Vladislav Yaroshchuk wrote: > vmnet.framework supports iov, but writ

Re: [RFC PATCH] mailmap/gitdm: more fixes for bad tags and authors

2022-03-14 Thread Michael Ellerman
Alex Bennée writes: > I was running some historical tags for the last 10 years and got the > following warnings: > > git log --use-mailmap --numstat --since "June 2010" | ~/src/gitdm.git/gitdm > -n -l 5 > alar...@ddci.com is an author name, probably not what you want > bad utf-8 ('utf-8' co

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Alex Bennée
Markus Armbruster writes: > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > for two reasons. One, it catches multiplication overflowing size_t. > Two, it returns T * rather than void *, which lets the compiler catch > more type errors. > > diff --git a/semihosting/conf

Re: [PATCH v16 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-03-14 Thread Vladislav Yaroshchuk
вт, 15 мар. 2022 г., 1:34 AM Akihiko Odaki : > On 2022/03/15 6:50, Vladislav Yaroshchuk wrote: > > Thank you, Akihiko > > > > On Mon, Mar 14, 2022 at 10:46 PM Akihiko Odaki > > wrote: > > > > On 2022/03/15 4:15, Vladislav Yaroshchuk wrote: > > > vmnet.fram

Re: [PATCH v16 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-03-14 Thread Akihiko Odaki
On 2022/03/15 8:02, Vladislav Yaroshchuk wrote: вт, 15 мар. 2022 г., 1:34 AM Akihiko Odaki >: On 2022/03/15 6:50, Vladislav Yaroshchuk wrote: > Thank you, Akihiko > > On Mon, Mar 14, 2022 at 10:46 PM Akihiko Odaki mailto:akihiko.od...@gma

Re: [PATCH v16 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-03-14 Thread Vladislav Yaroshchuk
вт, 15 мар. 2022 г., 2:06 AM Akihiko Odaki : > On 2022/03/15 8:02, Vladislav Yaroshchuk wrote: > > > > > > вт, 15 мар. 2022 г., 1:34 AM Akihiko Odaki > >: > > > > On 2022/03/15 6:50, Vladislav Yaroshchuk wrote: > > > Thank you, Akihiko > > > > >

Re: [RFC PATCH] mailmap/gitdm: more fixes for bad tags and authors

2022-03-14 Thread alarson
>Alex Bennée writes: > I was running some historical tags for the last 10 years and got the > following warnings: > > git log --use-mailmap --numstat --since "June 2010" | ~/src/gitdm.git/gitdm > -n -l 5 > alar...@ddci.com is an author name, probably not what you want > ... > The following

[PATCH v5] target/riscv: Add isa extenstion strings to the device tree

2022-03-14 Thread Atish Patra
The Linux kernel parses the ISA extensions from "riscv,isa" DT property. It used to parse only the single letter base extensions until now. A generic ISA extension parsing framework was proposed[1] recently that can parse multi-letter ISA extensions as well. Generate the extended ISA string by app

Re: [PATCH v3] ppc64: Avoid pt_regs struct definition

2022-03-14 Thread Richard Henderson
On 3/14/22 14:51, Khem Raj wrote: +static inline uintptr_t host_signal_pc(host_sigcontext *uc) +{ +return uc->uc_mcontext.gp_regs[32]; +} + +static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc) +{ +uc->uc_mcontext.gp_regs[32] = pc; +} + +static inline void *host_signal

[PATCH] accel/tcg: Fix cpu_ldq_be_mmu typo

2022-03-14 Thread Richard Henderson
In the conversion to cpu_ld_*_mmu, the retaddr parameter was corrupted in the one case of cpu_ldq_be_mmu. Cc: Thomas Huth Resolves: https://gitlab.com/qemu-project/qemu/-/issues/902 Fixes: f83bcecb1 ("accel/tcg: Add cpu_{ld,st}*_mmu interfaces") Signed-off-by: Richard Henderson --- This really

[PATCH v2 2/3] qapi: nbd-export: allow select bitmaps by node/name pair

2022-03-14 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Hi all! Current logic of relying on search through backing chain is not safe neither convenient. Sometimes it leads to necessity of extra bitmap copying. Also, we are going to add "snapshot-access" driver, to access some snapshot state through NBD. And this dri

[PATCH v2 for-7.1 0/3] qapi: nbd-export: select bitmap by node/name pair

2022-03-14 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Hi all! Here is small improvement for bitmap exporting interface. v2: Sorry for the noise, me trying to find a email service, that don't consider sending patch series by git-send-email as as spam :/ Vladimir Sementsov-Ogievskiy (3): qapi: rename BlockDirtyB

[PATCH v2 1/3] qapi: rename BlockDirtyBitmapMergeSource to BlockDirtyBitmapOrStr

2022-03-14 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Rename the type to be reused. Old name is "what is it for". To be natively reused for other needs, let's name it exactly "what is it". Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/monitor/bitmap-qmp-cmds.c| 6 +++--- include/block/block_int-g

[PATCH v2 3/3] iotests/223: check new possibility of exporting bitmaps by node/name

2022-03-14 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Add simple test that new interface introduced in previous commit works. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/223 | 16 + tests/qemu-iotests/223.out | 47 -- 2 files changed, 61

Re: [PATCH v3] ppc64: Avoid pt_regs struct definition

2022-03-14 Thread Khem Raj
On Mon, Mar 14, 2022 at 5:13 PM Richard Henderson wrote: > > On 3/14/22 14:51, Khem Raj wrote: > > +static inline uintptr_t host_signal_pc(host_sigcontext *uc) > > +{ > > +return uc->uc_mcontext.gp_regs[32]; > > +} > > + > > +static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t

[PATCH v4] ppc64: Avoid pt_regs struct definition

2022-03-14 Thread Khem Raj
Remove pt_regs indirection and instead reference gp_regs directly, this makes it portable across musl/glibc Use PT_* constants defined in asm/ptrace.h Move the file to ppc64 subdir and leave ppc empty Fixes ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete defini

Re: [PATCH] accel/tcg: Fix cpu_ldq_be_mmu typo

2022-03-14 Thread Philippe Mathieu-Daudé
On 15/3/22 01:25, Richard Henderson wrote: In the conversion to cpu_ld_*_mmu, the retaddr parameter was corrupted in the one case of cpu_ldq_be_mmu. Cc: Thomas Huth Resolves: https://gitlab.com/qemu-project/qemu/-/issues/902 Fixes: f83bcecb1 ("accel/tcg: Add cpu_{ld,st}*_mmu interfaces") Signed

[PATCH] target/arm: Fix pauth_check_trap vs SEL2

2022-03-14 Thread Richard Henderson
When arm_is_el2_enabled was introduced, we missed updating pauth_check_trap. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/788 Fixes: e6ef0169264b ("target/arm: use arm_is_el2_enabled() where applicable") Signed-off-by: Richard Henderson --- target/arm/pauth_helper.c | 2 +- 1 file cha

Re: [PATCH v4] ppc64: Avoid pt_regs struct definition

2022-03-14 Thread Richard Henderson
On 3/14/22 18:57, Khem Raj wrote: Remove pt_regs indirection and instead reference gp_regs directly, this makes it portable across musl/glibc Use PT_* constants defined in asm/ptrace.h Move the file to ppc64 subdir and leave ppc empty Fixes ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signa

[PATCH v2 0/3] Fixes for building on Solaris 11.4.42 CBE

2022-03-14 Thread Andrew Deason
With these minor fixes, I can build qemu on Solaris 11.4.42 CBE (Oracle's new rolling release thing), using '--disable-rdma --enable-modules --disable-dbus-display --target-list=x86_64-softmmu'. I'm just interested in the guest agent right now, so that's all I've tested (briefly), but the rest of t

[PATCH v2 1/3] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Andrew Deason
On older Solaris releases, we didn't get a protype for madvise, and so util/osdep.c provides its own prototype. Some time between the public Solaris 11.4 release and Solaris 11.4.42 CBE, we started getting an madvise prototype that looks like this: extern int madvise(void *, size_t, int); whi

[PATCH v2 3/3] util/osdep: Remove some early cruft

2022-03-14 Thread Andrew Deason
The include for statvfs.h has not been needed since all statvfs calls were removed in commit 4a1418e07bdc ("Unbreak large mem support by removing kqemu"). The comment mentioning CONFIG_BSD hasn't made sense since an include for config-host.h was removed in commit aafd75841001 ("util: Clean up incl

Re: [PATCH v2 1/3] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Andrew Deason
On Mon, 14 Mar 2022 21:20:23 -0500 Andrew Deason wrote: > #ifdef CONFIG_SOLARIS > #include > +#endif > + > +#ifdef HAVE_MADVISE_MISSING_PROTOTYPE Oh goodness, that's not the right name is it. I'll wait a little bit to see if there are any other comments, but clearly that needs to be fixed. (

Re: [PATCH v2 2/3] hw/i386/acpi-build: Avoid 'sun' identifier

2022-03-14 Thread Ani Sinha
On Mon, 14 Mar 2022, Andrew Deason wrote: > On Solaris, 'sun' is #define'd to 1, which causes errors if a variable > is named 'sun'. Slightly change the name of the var for the Slot User > Number so we can build on Solaris. > > Signed-off-by: Andrew Deason Reviewed-by: Ani Sinha > --- > hw

[PATCH v2 2/3] hw/i386/acpi-build: Avoid 'sun' identifier

2022-03-14 Thread Andrew Deason
On Solaris, 'sun' is #define'd to 1, which causes errors if a variable is named 'sun'. Slightly change the name of the var for the Slot User Number so we can build on Solaris. Signed-off-by: Andrew Deason --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

Re: [PULL 00/18] migration queue

2022-03-14 Thread Peter Xu
On Mon, Mar 14, 2022 at 06:53:29PM +, Daniel P. Berrangé wrote: > On Mon, Mar 14, 2022 at 06:20:54PM +, Dr. David Alan Gilbert wrote: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > On Mon, 14 Mar 2022 at 17:55, Dr. David Alan Gilbert > > > wrote: > > > > > > > > Peter Maydell

Lost patch, hw/sensor: enable adm1272 temp with qmp

2022-03-14 Thread Patrick Venture
I'm going through my team's spreadsheet for our upstreaming efforts to try to make sure things weren't lost, as sometimes a reply will go into my spam folder, and I saw this patch also fell under the radar: https://lists.gnu.org/archive/html/qemu-devel/2022-01/msg01310.html If you want, I can als

Re: [PATCH v1 1/1] hw: aspeed_scu: Add AST2600 hpll calculation function

2022-03-14 Thread Steven Lee
The 03/14/2022 20:21, Cédric Le Goater wrote: > Hello Steven, > > On 3/14/22 10:54, Steven Lee wrote: > > AST2600's HPLL register offset and bit definition are different from > > AST2500. Add a hpll calculation function for ast2600 and modify apb > > frequency > > calculation function based on SC

Re: [PATCH v2 2/2] Added parameter to take screenshot with screendump as PNG.

2022-03-14 Thread Kshitij Suri
On 11/03/22 5:50 pm, Markus Armbruster wrote: Kshitij Suri writes: Currently screendump only supports PPM format, which is un-compressed and not standard. Added a "format" parameter to qemu monitor screendump capabilites to support PNG image capture using libpng. The param was added in QAPI

[PATCH v2 1/2] Replacing CONFIG_VNC_PNG with CONFIG_PNG

2022-03-14 Thread Kshitij Suri
Libpng is only detected if VNC is enabled currently. This patch adds a generalised png option in the meson build which is aimed to replace use of CONFIG_VNC_PNG with CONFIG_PNG. Signed-off-by: Kshitij Suri --- meson.build| 9 - meson_options.txt | 4 ++-- ui/vnc-enc-tight.c |

[PATCH v2 2/2] Added parameter to take screenshot with screendump as

2022-03-14 Thread Kshitij Suri
From: "kshitij.suri" Currently screendump only supports PPM format, which is un-compressed and not standard. Added a "format" parameter to qemu monitor screendump capabilites to support PNG image capture using libpng. The param was added in QAPI schema of screendump present in ui.json along with

[PATCH] target/ppc: Replicate double->int32 result for some vector insns

2022-03-14 Thread Richard Henderson
Power ISA v3.1 formalizes the previously undefined result in words 1 and 3 to be a copy of the result in words 0 and 2. This affects: xscvdpsxws, xscvdpuxws, xvcvdpsxws, xvcvdpuxws. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/852 Signed-off-by: Richard Henderson --- target/ppc/fpu_h

[PULL V3 00/15] Net patches

2022-03-14 Thread Jason Wang
The following changes since commit 352998df1c53b366413690d95b35f76d0721ebed: Merge tag 'i2c-20220314' of https://github.com/philmd/qemu into staging (2022-03-14 14:39:33 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request

[PULL V3 01/15] virtio-net: fix map leaking on error during receive

2022-03-14 Thread Jason Wang
Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg") tries to fix the use after free of the sg by caching the virtqueue elements in an array and unmap them at once after receiving the packets, But it forgot to unmap the cached elements on error which will lead to leaking of mapping

<    1   2   3   4   >