[PULL 13/20] avocado/ppc_prep_40p.py: check TCG accel in all tests

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza All tests in the file times out when running in an IBM POWER host and --disable-tcg with an error like the following: Command: ./qemu-system-ppc -display none -vga none (...) -machine 40p (...) Output: qemu-system-ppc: Register sync failed... If you'

[PULL 04/20] avocado/boot_linux_console.py: check tcg accel in test_ppc64_e500

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza Some ppc64 hosts (e.g. IBM POWER hosts) aren't able to run the e500 machine using KVM accel. Skip this test if TCG accel isn't available. Cc: Cleber Rosa Signed-off-by: Daniel Henrique Barboza Reviewed-by: Cédric Le Goater Message-Id: <20220303153517.168943-5-dan

[PULL 08/20] avocado/ppc_405.py: remove test_ppc_taihu()

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza Running this test gives us a deprecation warning telling that this machine type is no longer supported: Output: qemu-system-ppc: Machine type 'taihu' is deprecated: incomplete, use 'ref405ep' instead Moreover, this test fails to pass running in an IBM POWER

[PULL 12/20] avocado/ppc_mpc8544ds.py: check TCG accel in test_ppc_mpc8544ds()

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza This tests times out in an IBM POWER host when compiled with --disable-tcg. Signed-off-by: Daniel Henrique Barboza Message-Id: <20220310183011.110391-8-danielhb...@gmail.com> Signed-off-by: Cédric Le Goater --- tests/avocado/ppc_mpc8544ds.py | 2 ++ 1 file change

[PULL 05/20] avocado/replay_kernel.py: make tcg-icount check in run_vm()

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza The icount framework relies on TCG availability. If QEMU is built with --disable-tcg we won't have icount either, and then this test will fail with the following message in an IBM POWER9 host: tests/avocado/replay_kernel.py:ReplayKernelNormal.test_ppc64_pseries: ERR

[PULL 09/20] avocado/ppc_405.py: check TCG accel in test_ppc_ref405ep()

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza Running this test without TCG support in an IBM POWER server results in the following error: Command: ./qemu-system-ppc -display none -vga none (...) -machine ref405ep (...) Output: qemu-system-ppc: Register sync failed... If you're using kvm-hv.ko,

[PULL 06/20] avocado/boot_linux_console.py: check TCG accel in test_ppc_g3beige()

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza This test breaks when run in an IBM POWER host with a QEMU compiled with --disable-tcg and the ppc-softmmu target. One thing to note is that the error message explictly mentions kvm_pr support: Command: ./qemu-system-ppc -display none -vga none (...) -machine g3bei

[PULL 07/20] avocado/boot_linux_console.py: check TCG accel in test_ppc_mac99()

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza This test breaks when run in an IBM POWER host with a QEMU compiled with --disable-tcg and the ppc-softmmu target in a similar manner as test_ppc_g3beige did. There's also an observation made about kvm_pr in the error message: Command: ./qemu-system-ppc -display no

[PULL 15/20] target/ppc: fix ISI fault cause for Radix MMU

2022-03-14 Thread Cédric Le Goater
From: Leandro Lupori Fix Instruction Storage Interrupt (ISI) fault cause for Radix MMU, when caused by missing PAGE_EXEC permission, to be SRR1_NOEXEC_GUARD instead of DSISR_PROTFAULT. This matches POWER9 hardware behavior. Fixes: d5fee0bbe68 ("target/ppc: Implement ISA V3.00 radix page fault ha

[PULL 19/20] ppc/pnv: Always create the PHB5 PEC devices

2022-03-14 Thread Cédric Le Goater
From: Frederic Barrat Always create the PECs (PCI Express Controller) for the system. The PECs host the PHBs and we try to find the matching PEC when creating a PHB, so it must exist. It also matches what we do on POWER9 Fixes: 623575e16cd5 ("ppc/pnv: Add model for POWER10 PHB5 PCIe Host bridge"

[PULL 11/20] avocado/ppc_bamboo.py: check TCG accel in test_ppc_bamboo()

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza This tests times out in an IBM POWER host when compiled with --disable-tcg. Signed-off-by: Daniel Henrique Barboza Message-Id: <20220310183011.110391-7-danielhb...@gmail.com> Signed-off-by: Cédric Le Goater --- tests/avocado/ppc_bamboo.py | 2 ++ 1 file changed,

[PULL 00/20] ppc fixes for 7.0

2022-03-14 Thread Cédric Le Goater
s/pull-ppc-20220314 for you to fetch changes up to 9c10d86fee11d96274ea6f7cda12d2471abe3c47: ppc/pnv: Remove user-created PHB{3,4,5} devices (2022-03-14 15:57:17 +0100) ppc-7.0 queue : * Removal of user-created PHB devices * Avo

[PULL 20/20] ppc/pnv: Remove user-created PHB{3,4,5} devices

2022-03-14 Thread Cédric Le Goater
On a real system with POWER{8,9,10} processors, PHBs are sub-units of the processor, they can be deactivated by firmware but not plugged in or out like a PCI adapter on a slot. Nevertheless, having user-created PHBs in QEMU seemed to be a good idea for testing purposes : 1. having a limited set o

[PULL V3 11/15] vhost: Add VhostIOVATree

2022-03-14 Thread Jason Wang
From: Eugenio Pérez This tree is able to look for a translated address from an IOVA address. At first glance it is similar to util/iova-tree. However, SVQ working on devices with limited IOVA space need more capabilities, like allocating IOVA chunks or performing reverse translations (qemu addre

[PULL 03/20] avocado/boot_linux_console.py: check for tcg in test_ppc_powernv8/9

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza The PowerNV8/9 machines does not work with KVM acceleration, meaning that boot_linux_console.py:BootLinuxConsole.test_ppc_powernv8/9 tests will always fail when QEMU is compiled with --disable-tcg: ERROR 1-tests/avocado/boot_linux_console.py:BootLinuxConsole.test_pp

[PULL 14/20] avocado/ppc_virtex_ml507.py: check TCG accel in test_ppc_virtex_ml507()

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza This test times out when running in an IBM POWER host and --disable-tcg. Signed-off-by: Daniel Henrique Barboza Message-Id: <20220310183011.110391-10-danielhb...@gmail.com> Signed-off-by: Cédric Le Goater --- tests/avocado/ppc_virtex_ml507.py | 2 ++ 1 file chang

[PULL 02/20] qtest/meson.build: check CONFIG_TCG for boot-serial-test in qtests_ppc

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza 'boot-serial-test' does not work with a QEMU built with --disable-tcg in a IBM POWER9 host. The reason is that without TCG QEMU will default to KVM acceleration, but then the KVM module in IBM POWER hosts aren't able to handle other CPUs. The result is that the test

[PULL 01/20] qtest/meson.build: check CONFIG_TCG for prom-env-test in qtests_ppc

2022-03-14 Thread Cédric Le Goater
From: Daniel Henrique Barboza 'prom-env-test' is a TCG test that will fail if QEMU is compiled with --disable-tcg: $ QTEST_QEMU_BINARY=./qemu-system-ppc64 ./tests/qtest/prom-env-test /ppc64/prom-env/mac99: qemu-system-ppc64: -accel tcg: invalid accelerator tcg (... hangs indefinitely ...) Fix i

[PULL V3 08/15] vhost: Shadow virtqueue buffers forwarding

2022-03-14 Thread Jason Wang
From: Eugenio Pérez Initial version of shadow virtqueue that actually forward buffers. There is no iommu support at the moment, and that will be addressed in future patches of this series. Since all vhost-vdpa devices use forced IOMMU, this means that SVQ is not usable at this point of the series

[PULL V3 07/15] vdpa: adapt vhost_ops callbacks to svq

2022-03-14 Thread Jason Wang
From: Eugenio Pérez First half of the buffers forwarding part, preparing vhost-vdpa callbacks to SVQ to offer it. QEMU cannot enable it at this moment, so this is effectively dead code at the moment, but it helps to reduce patch size. Signed-off-by: Eugenio Pérez Acked-by: Michael S. Tsirkin S

[PULL V3 06/15] virtio: Add vhost_svq_get_vring_addr

2022-03-14 Thread Jason Wang
From: Eugenio Pérez It reports the shadow virtqueue address from qemu virtual address space. Since this will be different from the guest's vaddr, but the device can access it, SVQ takes special care about its alignment & lack of garbage data. It assumes that IOMMU will work in host_page_size ran

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

2022-03-14 Thread Cédric Le Goater
Hello Steven, [ ... ] I was wondering if the following implementation is good to you. 1 Modify aspeed_scu_get_apb_freq() as below uint32_t aspeed_scu_get_apb_freq(AspeedSCUState *s) { return ASPEED_SCU_GET_CLASS(s)->get_apb(s); } 2. Introduce 2 APB class han

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

2022-03-14 Thread Gerd Hoffmann
On Mon, Mar 14, 2022 at 09:27:38PM +0100, 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 > t

[PULL V3 05/15] vhost: Add vhost_svq_valid_features to shadow vq

2022-03-14 Thread Jason Wang
From: Eugenio Pérez This allows SVQ to negotiate features with the guest and the device. For the device, SVQ is a driver. While this function bypasses all non-transport features, it needs to disable the features that SVQ does not support when forwarding buffers. This includes packed vq layout, in

[PULL V3 13/15] vdpa: Adapt vhost_vdpa_get_vring_base to SVQ

2022-03-14 Thread Jason Wang
From: Eugenio Pérez This is needed to achieve migration, so the destination can restore its index. Setting base as last used idx, so destination will see as available all the entries that the device did not use, including the in-flight processing ones. This is ok for networking, but other kinds

[PULL V3 03/15] vhost: Add Shadow VirtQueue kick forwarding capabilities

2022-03-14 Thread Jason Wang
From: Eugenio Pérez At this mode no buffer forwarding will be performed in SVQ mode: Qemu will just forward the guest's kicks to the device. Host memory notifiers regions are left out for simplicity, and they will not be addressed in this series. Signed-off-by: Eugenio Pérez Acked-by: Michael

[PULL V3 12/15] vdpa: Add custom IOTLB translations to SVQ

2022-03-14 Thread Jason Wang
From: Eugenio Pérez Use translations added in VhostIOVATree in SVQ. Only introduce usage here, not allocation and deallocation. As with previous patches, we use the dead code paths of shadow_vqs_enabled to avoid commiting too many changes at once. These are impossible to take at the moment. Sig

[PULL V3 15/15] vdpa: Expose VHOST_F_LOG_ALL on SVQ

2022-03-14 Thread Jason Wang
From: Eugenio Pérez SVQ is able to log the dirty bits by itself, so let's use it to not block migration. Also, ignore set and clear of VHOST_F_LOG_ALL on set_features if SVQ is enabled. Even if the device supports it, the reports would be nonsense because SVQ memory is in the qemu region. The l

[PULL V3 02/15] vhost: Add VhostShadowVirtqueue

2022-03-14 Thread Jason Wang
From: Eugenio Pérez Vhost shadow virtqueue (SVQ) is an intermediate jump for virtqueue notifications and buffers, allowing qemu to track them. While qemu is forwarding the buffers and virtqueue changes, it is able to commit the memory it's being dirtied, the same way regular qemu's VirtIO devices

[PULL V3 14/15] vdpa: Never set log_base addr if SVQ is enabled

2022-03-14 Thread Jason Wang
From: Eugenio Pérez Setting the log address would make the device start reporting invalid dirty memory because the SVQ vrings are located in qemu's memory. Signed-off-by: Eugenio Pérez Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/vhost-vdpa.c | 3 ++- 1 file changed,

[PULL V3 10/15] util: add iova_tree_find_iova

2022-03-14 Thread Jason Wang
From: Eugenio Pérez This function does the reverse operation of iova_tree_find: To look for a mapping that match a translated address so we can do the reverse. This have linear complexity instead of logarithmic, but it supports overlapping HVA. Future developments could reduce it. Signed-off-by

[PULL V3 09/15] util: Add iova_tree_alloc_map

2022-03-14 Thread Jason Wang
From: Eugenio Pérez This iova tree function allows it to look for a hole in allocated regions and return a totally new translation for a given translated address. It's usage is mainly to allow devices to access qemu address space, remapping guest's one into a new iova space where qemu can add ch

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

2022-03-14 Thread Peter Xu
On Mon, Mar 14, 2022 at 06:49:25PM +, Daniel P. Berrangé wrote: > Taking a step back here and looking at the bigger picture of > migration protocol configuration > > Almost every time we add a new feature to migration, we end up > having to define at least one new migration parameter, then

[PULL V3 04/15] vhost: Add Shadow VirtQueue call forwarding capabilities

2022-03-14 Thread Jason Wang
From: Eugenio Pérez This will make qemu aware of the device used buffers, allowing it to write the guest memory with its contents if needed. Signed-off-by: Eugenio Pérez Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/vhost-shadow-virtqueue.c | 38 +++

[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

[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

[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

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

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

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 incl

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

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] 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] 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 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 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 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 +++--- include/block/block_int-g

[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 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] 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 *host_signal

[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: [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 mailto:akihiko.od...@gma

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

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

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

[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

[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

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 ove

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

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

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

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

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

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

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

[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

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

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

[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. Signed-off-by

  1   2   3   4   >