[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 ---

[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 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 |

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

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

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

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

[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: [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 > --- >

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.

[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

[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);

[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

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

[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

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")

[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

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,

[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

[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 +++---

[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

[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

[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

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

[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

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

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: [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

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: > > >

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

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'

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

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

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

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 >>

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

[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

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

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 :/

[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 ---

[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

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).

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

[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

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

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

[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

[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

[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

[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

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

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

[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

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

[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

[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 +++---

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

[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

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

[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,

[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 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:

[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 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.

[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 ++--

[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 ++

[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 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

[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

[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

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

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

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: [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

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,

[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 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

[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 |

[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,

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 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 @@

[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 +++

[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 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

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 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 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

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 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

[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 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,

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

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: [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

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

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

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

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

Re: [PATCH] MAINTAINERS: change Vladimir's email address

2022-03-14 Thread Vladimir Sementsov-Ogievskiy
14.03.2022 19:40, Vladimir Sementsov-Ogievskiy wrote: 14.03.2022 18:16, Vladimir Sementsov-Ogievskiy wrote: 14.03.2022 17:47, Eric Blake wrote: On Mon, Mar 14, 2022 at 02:04:15PM +0300, Vladimir Sementsov-Ogievskiy wrote: Old vsement...@virtuozzo.com is not accessible anymore. Signed-off-by:

Re: [PULL 00/18] migration queue

2022-03-14 Thread Dr. David Alan Gilbert
* 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 investigation trickier, incidentally, > > > is that the migration-test code seems to depend

  1   2   3   4   >