Re: [PATCH] hw: m68k: Add virt compat machine type for 7.0

2021-12-20 Thread Thomas Huth
On 18/12/2021 12.43, Laurent Vivier wrote: Signed-off-by: Laurent Vivier --- Based-On: <20211217143948.289995-1-coh...@redhat.com> hw/m68k/virt.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c index 0efa4a45c7f4..78e926a55457 10064

[PATCH] [RESEND] docs: Add spec of OVMF GUIDed table for SEV guests

2021-12-20 Thread Dov Murik
Add docs/specs/sev-guest-firmware.rst which describes the GUIDed table in the end of OVMF's image which is parsed by QEMU, and currently used to describe some values for SEV and SEV-ES guests. Signed-off-by: Dov Murik --- docs/specs/index.rst | 1 + docs/specs/sev-guest-firmware.r

[PULL 71/88] target/riscv: add "set round to odd" rounding mode helper function

2021-12-20 Thread Alistair Francis
From: Frank Chang helper_set_rounding_mode() is responsible for SIGILL, and "round to odd" should be an interface private to translation, so add a new independent helper_set_rod_rounding_mode(). Signed-off-by: Frank Chang Acked-by: Alistair Francis Message-Id: <20211210075704.23951-64-frank.ch

[PATCH v4 0/3] RISC-V: Populate mtval and stval

2021-12-20 Thread Alistair Francis
From: Alistair Francis Populate mtval and stval when taking an illegal instruction exception. The RISC-V spec states that "The stval register can optionally also be used to return the faulting instruction bits on an illegal instruction exception...". In this case we are always writing the value

[PULL 74/88] target/riscv: rvv-1.0: implement vstart CSR

2021-12-20 Thread Alistair Francis
From: Frank Chang * Update and check vstart value for vector instructions. * Add whole register move instruction helper functions as we have to call helper function for case where vstart is not zero. * Remove probe_pages() calls in vector load/store instructions (except fault-only-first loads

Re: [PATCH qemu] s390x/css: fix PMCW invalid mask

2021-12-20 Thread Pierre Morel
On 12/17/21 20:28, Halil Pasic wrote: On Fri, 17 Dec 2021 18:13:47 +0100 Pierre Morel wrote: Previously, we required bits 5, 6 and 7 to be zero (0x07 == 0b111). But, as per the principles of operation, bit 5 is ignored in MSCH and bits 0, 1, 6 and 7 need to be zero. On a second thought, d

Re: [PATCH 0/2] hw/nvme: Fix CVE-2021-3929 (DMA re-entrancy exploitation)

2021-12-20 Thread Klaus Jensen
On Dec 16 20:55, Klaus Jensen wrote: > On Dec 16 20:13, Klaus Jensen wrote: > > On Dec 16 18:55, Philippe Mathieu-Daudé wrote: > > > Now that the DMA API allow passing MemTxAttrs argument and > > > returning MemTxResult (with MEMTX_BUS_ERROR in particular), > > > we can restrict the NVMe controller

[PULL 69/88] target/riscv: rvv-1.0: floating-point/integer type-convert instructions

2021-12-20 Thread Alistair Francis
From: Frank Chang Add the following instructions: * vfcvt.rtz.xu.f.v * vfcvt.rtz.x.f.v Also adjust GEN_OPFV_TRANS() to accept multiple floating-point rounding modes. Signed-off-by: Frank Chang Reviewed-by: Alistair Francis Message-Id: <20211210075704.23951-62-frank.ch...@sifive.com> Signed-o

Re: [PULL 00/16] qtest and gitlab-CI improvements

2021-12-20 Thread Thomas Huth
On 20/12/2021 10.24, Philippe Mathieu-Daudé wrote: +Alex & Paolo On 12/20/21 07:52, Thomas Huth wrote: On 18/12/2021 17.33, Philippe Mathieu-Daudé wrote: Hi, On 12/15/21 08:33, Thomas Huth wrote: * Add virtio-net failover test

[PULL 70/88] target/riscv: rvv-1.0: widening floating-point/integer type-convert

2021-12-20 Thread Alistair Francis
From: Frank Chang Add the following instructions: * vfwcvt.rtz.xu.f.v * vfwcvt.rtz.x.f.v Also adjust GEN_OPFV_WIDEN_TRANS() to accept multiple floating-point rounding modes. Signed-off-by: Frank Chang Acked-by: Alistair Francis Message-Id: <20211210075704.23951-63-frank.ch...@sifive.com> Sig

Re: [PULL 09/11] ui/vnc: clipboard support

2021-12-20 Thread Vladimir Sementsov-Ogievskiy
21.05.2021 15:51, Gerd Hoffmann wrote: This patch adds support for cut+paste to the qemu vnc server, which allows the vnc client exchange clipbaord data with qemu and other peers like the qemu vdagent implementation. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 20210

[PATCH v2 2/8] migration: Don't return for postcopy_chunk_hostpages()

2021-12-20 Thread Peter Xu
It always return zero, because it just can't go wrong so far. Simplify the code with no functional change. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/ram.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration

[PATCH v4 1/3] target/riscv: Set the opcode in DisasContext

2021-12-20 Thread Alistair Francis
From: Alistair Francis Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson --- target/riscv/translate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 1d57bc97b5..24251bc8cc 100644 --- a/target/riscv/translate.c +++ b/

Re: Virtio-GPU Xres and Yres seettings

2021-12-20 Thread Philippe Mathieu-Daudé
Cc'ing Gerd & Marc-André. On 12/20/21 05:26, Pratik Parvati wrote: > Hi Team, > > I am working on a Virtio-GPU device (backend) for one of our customer > projects - we are using the Virtio-GPU driver (frontend) to drive our > device. Our device code has been written using Qemu virtio-gpu device >

Re: [PATCH v4 4/7] iotests.py: add qemu_tool_popen()

2021-12-20 Thread Nikta Lapshin
On 12/13/21 18:32, Vladimir Sementsov-Ogievskiy wrote: Split qemu_tool_popen() from qemu_tool_pipe_and_status() to be used separately. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin

[PATCH v2 4/8] migration: Do chunk page in postcopy_each_ram_send_discard()

2021-12-20 Thread Peter Xu
Right now we loop ramblocks for twice, the 1st time chunk the dirty bits with huge page information; the 2nd time we send the discard ranges. That's not necessary - we can do them in a single loop. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/ram.c | 20 ++-

Re: [PATCH 07/10] configure: unify x86_64 and x32

2021-12-20 Thread Philippe Mathieu-Daudé
On 12/17/21 22:48, Richard Henderson wrote: > On 12/16/21 7:30 AM, Paolo Bonzini wrote: >> On 12/16/21 10:10, Philippe Mathieu-Daudé wrote: >>> On 12/16/21 09:51, Paolo Bonzini wrote: The only difference between the two, as far as either configure or Meson are concerned, is in the multili

Re: [PATCH qemu] s390x/css: fix PMCW invalid mask

2021-12-20 Thread Halil Pasic
On Mon, 20 Dec 2021 11:44:44 +0100 Pierre Morel wrote: > > > > The PoP says that the machine shall ignore other fields > > of the PMCW when an MSCH is performed. I.e. we should not update > > "our" pmcw.flags bit 5 from 0 to 1 even if 1 was supplied, and > > thus STSCH should keep storing the bi

[PATCH v4 3/3] target/riscv: Implement the stval/mtval illegal instruction

2021-12-20 Thread Alistair Francis
From: Alistair Francis The stval and mtval registers can optionally contain the faulting instruction on an illegal instruction exception. This patch adds support for setting the stval and mtval registers. The RISC-V spec states that "The stval register can optionally also be used to return the f

Re: Warnings during the virtio-net-failover test

2021-12-20 Thread Laurent Vivier
On 20/12/2021 11:16, Thomas Huth wrote:  Hi Laurent, today I noticed that there are quite a bunch of warnings during the virtio-net-failover test: $ QTEST_QEMU_BINARY=./qemu-system-x86_64 tests/qtest/virtio-net-failover /x86_64/failover-virtio-net/hotplug_1: qemu-system-x86_64: warning: Prim

Re: [PATCH v4 6/7] Add qemu-io Popen constructor wrapper. To be used in the following new test commit.

2021-12-20 Thread Nikta Lapshin
On 12/13/21 18:32, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin

Re: [PULL 00/16] qtest and gitlab-CI improvements

2021-12-20 Thread Thomas Huth
On 18/12/2021 17.33, Philippe Mathieu-Daudé wrote: Hi, On 12/15/21 08:33, Thomas Huth wrote: * Add virtio-net failover test * Make qtests a little bit more flexible with regards to reduced configs * Move libssh setup from configu

Re: [PATCH v4 7/7] iotests: add nbd-reconnect-on-open test

2021-12-20 Thread Nikta Lapshin
On 12/13/21 18:32, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin

RE: [PATCH v2 06/12] target/riscv: Support start kernel directly by KVM

2021-12-20 Thread Jiangyifei via
> -Original Message- > From: Anup Patel [mailto:a...@brainfault.org] > Sent: Monday, December 13, 2021 12:21 PM > To: Jiangyifei > Cc: QEMU Developers ; open list:RISC-V > ; kvm-ri...@lists.infradead.org; KVM General > ; libvir-l...@redhat.com; Anup Patel > ; Palmer Dabbelt ; Alistair > F

Re: Virtio-GPU Xres and Yres seettings

2021-12-20 Thread Pratik Parvati
> > Cc'ing Gerd & Marc-André. > > > > On 12/20/21 05:26, Pratik Parvati wrote: > > > Hi Team, > > > > > > I am working on a Virtio-GPU device (backend) for one of our customer > > > projects - we are using the Virtio-GPU driver (frontend) to drive our > > > device. Our device code has been written

[PATCH v2 0/8] migration: Postcopy cleanup on ram disgard

2021-12-20 Thread Peter Xu
v2: - add r-bs for Dave - move mig_cmd_args reference later than index bound check [Dave] - use chars in tracepoints instead of number of steps [Dave] - add one patch for postcopy-run tracing Some queued patches for ram disgard cleanup, and some debug probes. QEMU's ram disgard logic is probably

[PATCH v2] docs: Add measurement calculation details to amd-memory-encryption.txt

2021-12-20 Thread Dov Murik
Add a section explaining how the Guest Owner should calculate the expected guest launch measurement for SEV and SEV-ES. Also update the name and link to the SEV API Spec document. Signed-off-by: Dov Murik Suggested-by: Daniel P. Berrangé --- v2: - Explain that firmware must be built without N

Re: [PATCH] schemas: add missing vim modeline

2021-12-20 Thread Markus Armbruster
Victor Toso writes: > Similar to f7160f3218 "schemas: Add vim modeline" > > Signed-off-by: Victor Toso Acked-by: Markus Armbruster

[PATCH] schemas: add missing vim modeline

2021-12-20 Thread Victor Toso
Similar to f7160f3218 "schemas: Add vim modeline" Signed-off-by: Victor Toso --- qapi/audio.json | 1 + qapi/compat.json | 1 + qapi/replay.json | 1 + qapi/trace.json | 1 + 4 files changed, 4 insertions(+) diff --git a/qapi/audio.json b/qapi/audio.json index 9cba0df8a4..fe3b506ec3 100644 --

[PATCH v2 1/8] migration: Drop dead code of ram_debug_dump_bitmap()

2021-12-20 Thread Peter Xu
I planned to add "#ifdef DEBUG_POSTCOPY" around the function too because otherwise it'll be compiled into qemu binary even if it'll never be used. Then I found that maybe it's easier to just drop it for good.. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/ram.c | 39

RE: [PATCH v2 12/12] target/riscv: Support virtual time context synchronization

2021-12-20 Thread Jiangyifei via
> -Original Message- > From: Richard Henderson [mailto:richard.hender...@linaro.org] > Sent: Monday, December 13, 2021 11:22 PM > To: Jiangyifei ; qemu-devel@nongnu.org; > qemu-ri...@nongnu.org > Cc: kvm-ri...@lists.infradead.org; k...@vger.kernel.org; > libvir-l...@redhat.com; anup.pa...@

Re: [PATCH] tests/qtest/virtio-net-failover: Use g_random_int() instead of g_test_rand_int()

2021-12-20 Thread Laurent Vivier
On 20/12/2021 11:27, Thomas Huth wrote: g_test_rand_int() must not be called before g_test_init(), otherwise the glib will show a "g_rand_int: assertion 'rand != NULL' failed" message in the log. So we could change the order here, but actually, g_test_rand_int() seems also the wrong choice here,

Re: [PATCH v2 00/15] hw/nvme: SR-IOV with Virtualization Enhancements

2021-12-20 Thread Klaus Jensen
On Nov 25 15:15, Łukasz Gieryk wrote: > On Wed, Nov 24, 2021 at 09:03:06AM +0100, Klaus Jensen wrote: > > Hi Lukasz, > > > > I've been through this. I have a couple of review comments, but overall > > looks good for inclusion in nvme-next. Would be nice to get this in > > early in the cycle so it

Re: [PATCH] hw/nvram: at24 return 0xff if 1 byte address

2021-12-20 Thread Philippe Mathieu-Daudé
Hi Patrick, On 12/20/21 01:32, Patrick Venture wrote: > The at24 eeproms are 2 byte devices that return 0xff when they are read > from with a partial (1-byte) address written. This distinction was > found comparing model behavior to real hardware testing. > > Tested: `i2ctransfer -f -y 45 w1@85

[PATCH RFC] MAINTAINERS: split out s390x sections

2021-12-20 Thread Cornelia Huck
Split out some more specialized devices etc., so that we can build smarter lists of people to be put on cc: in the future. Signed-off-by: Cornelia Huck --- As discussed offlist. Some notes: - The new sections have inherited the maintainers of the sections they have been split out of (except wh

[PATCH] failover: Silence warning messages during qtest

2021-12-20 Thread Laurent Vivier
virtio-net-failover test tries several device combinations that produces some expected warnings. These warning can be confusing, so we disable them during the qtest sequence. Reported-by: Thomas Huth Signed-off-by: Laurent Vivier --- hw/net/virtio-net.c | 3 ++- migration/migration.c | 4 +++-

Re: [RFC PATCH v2 05/14] block/mirror.c: use of job helpers in drivers to avoid TOC/TOU

2021-12-20 Thread Vladimir Sementsov-Ogievskiy
20.12.2021 13:34, Emanuele Giuseppe Esposito wrote: On 18/12/2021 12:53, Vladimir Sementsov-Ogievskiy wrote: 04.11.2021 17:53, Emanuele Giuseppe Esposito wrote: Once job lock is used and aiocontext is removed, mirror has to perform job operations under the same critical section, using the hel

[PATCH v3 09/12] target/riscv: Add host cpu type

2021-12-20 Thread Yifei Jiang via
'host' type cpu is set isa to RV32 or RV64 simply, more isa info will obtain from KVM in kvm_arch_init_vcpu() Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- target/riscv/cpu.c | 15 +++ target/riscv/cpu.h | 1 + 2 f

[PATCH v3 12/12] target/riscv: Support virtual time context synchronization

2021-12-20 Thread Yifei Jiang via
Add virtual time context description to vmstate_kvmtimer. After cpu being loaded, virtual time context is updated to KVM. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Anup Patel --- target/riscv/machine.c | 30 ++ 1 file changed, 30 insertions(

[PATCH v2 8/8] migration: Tracepoint change in postcopy-run bottom half

2021-12-20 Thread Peter Xu
Remove the old two tracepoints and they're even near each other: trace_loadvm_postcopy_handle_run_cpu_sync() trace_loadvm_postcopy_handle_run_vmstart() Add trace_loadvm_postcopy_handle_run_bh() with a finer granule trace. Signed-off-by: Peter Xu --- migration/savevm.c | 12

Re: [PATCH] hw: m68k: Add virt compat machine type for 7.0

2021-12-20 Thread Laurent Vivier
Le 20/12/2021 à 09:17, Cornelia Huck a écrit : On Sat, Dec 18 2021, Laurent Vivier wrote: Signed-off-by: Laurent Vivier --- Based-On: <20211217143948.289995-1-coh...@redhat.com> hw/m68k/virt.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) Oh, I didn't realize we do it fo

Re: [PATCH v4 5/7] For qemu_io* functions support --image-opts argument, which conflicts with -f argument from qemu_io_args.

2021-12-20 Thread Nikta Lapshin
On 12/13/21 18:32, Vladimir Sementsov-Ogievskiy wrote: For QemuIoInteractive use new wrapper as well, which allows relying on default format. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin

Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2021-12-20 Thread Emanuele Giuseppe Esposito
On 17/12/2021 17:38, Emanuele Giuseppe Esposito wrote: On 17/12/2021 12:04, Hanna Reitz wrote: On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: bdrv_co_invalidate_cache is special: it is an I/O function, I still don’t believe it is, but well. (Yes, it is called by a test in an iothr

[PATCH v2 6/8] migration: Dump sub-cmd name in loadvm_process_command tp

2021-12-20 Thread Peter Xu
It'll be easier to read the name rather than index of sub-cmd when debugging. Signed-off-by: Peter Xu --- migration/savevm.c | 3 ++- migration/trace-events | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 0bef031acb..7f7af6

Re: [PATCH] hw/nvram: at24 return 0xff if 1 byte address

2021-12-20 Thread Patrick Venture
On Mon, Dec 20, 2021 at 1:12 AM Philippe Mathieu-Daudé wrote: > Hi Patrick, > > On 12/20/21 01:32, Patrick Venture wrote: > > The at24 eeproms are 2 byte devices that return 0xff when they are read > > from with a partial (1-byte) address written. This distinction was > > found comparing model b

Re: [RFC PATCH v2 03/14] job.h: define locked functions

2021-12-20 Thread Emanuele Giuseppe Esposito
On 16/12/2021 18:11, Vladimir Sementsov-Ogievskiy wrote: 16.12.2021 19:48, Stefan Hajnoczi wrote: On Thu, Nov 04, 2021 at 10:53:23AM -0400, Emanuele Giuseppe Esposito wrote:   /** Returns whether the job is ready to be completed. */   bool job_is_ready(Job *job); +/** Same as job_is_ready(),

Re: [RFC] vhost-vdpa-net: add vhost-vdpa-net host device support

2021-12-20 Thread Stefan Hajnoczi
On Mon, Dec 20, 2021 at 09:17:40AM +, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > -Original Message- > > From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > > Sent: Monday, December 20, 2021 4:11 PM > > To: Jason Wang > > Cc: Michael S. Tsirkin ; Longpeng (

RE: [RFC] vhost-vdpa-net: add vhost-vdpa-net host device support

2021-12-20 Thread longpeng2--- via
> -Original Message- > From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > Sent: Monday, December 20, 2021 4:11 PM > To: Jason Wang > Cc: Michael S. Tsirkin ; Longpeng (Mike, Cloud Infrastructure > Service Product Dept.) ; pa...@nvidia.com; > xieyon...@bytedance.com; sgarz...@redhat.co

[PATCH v3 05/12] target/riscv: Implement kvm_arch_put_registers

2021-12-20 Thread Yifei Jiang via
Put GPR CSR and FP registers to kvm by KVM_SET_ONE_REG ioctl Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- target/riscv/kvm.c | 104 - 1 file changed, 103 insertions(+), 1 deletion(-)

Re: [PATCH] hw: m68k: Add virt compat machine type for 7.0

2021-12-20 Thread Cornelia Huck
On Mon, Dec 20 2021, Laurent Vivier wrote: > Le 20/12/2021 à 09:17, Cornelia Huck a écrit : >> On Sat, Dec 18 2021, Laurent Vivier wrote: >> >>> Signed-off-by: Laurent Vivier >>> --- >>> Based-On: <20211217143948.289995-1-coh...@redhat.com> >>> >>> hw/m68k/virt.c | 9 - >>> 1 file c

[PATCH v2 3/8] migration: Drop postcopy_chunk_hostpages()

2021-12-20 Thread Peter Xu
This function calls three functions: - postcopy_discard_send_init(ms, block->idstr); - postcopy_chunk_hostpages_pass(ms, block); - postcopy_discard_send_finish(ms); However only the 2nd function call is meaningful. It's major role is to make sure dirty bits are applied in host-page-size gr

Re: [PULL 00/16] qtest and gitlab-CI improvements

2021-12-20 Thread Philippe Mathieu-Daudé
On 12/20/21 10:53, Thomas Huth wrote: > On 20/12/2021 10.24, Philippe Mathieu-Daudé wrote: >> +Alex & Paolo >> >> On 12/20/21 07:52, Thomas Huth wrote: >>> On 18/12/2021 17.33, Philippe Mathieu-Daudé wrote: Hi, On 12/15/21 08:33, Thomas Huth wrote: >

[PATCH 2/4] tests/qtest: Improve endianness-test to work with missing machines and devices

2021-12-20 Thread Thomas Huth
The users might have built QEMU with less machines or without the i82378 superio device. Add some checks to the endianess-test so that it is able to deal with such stripped down QEMU versions, too. Signed-off-by: Thomas Huth --- tests/qtest/endianness-test.c | 5 - 1 file changed, 4 insertio

[PATCH v3 00/12] Add riscv kvm accel support

2021-12-20 Thread Yifei Jiang via
This series adds both riscv32 and riscv64 kvm support, and implements migration based on riscv. Because of RISC-V KVM has been merged into the Linux master, so this series are changed from RFC to patch. Several steps to use this: 1. Build emulation $ ./configure --target-list=riscv64-softmmu $ ma

[PATCH v2 5/8] migration: Drop return code for disgard ram process

2021-12-20 Thread Peter Xu
It will just never fail. Drop those return values where they're constantly zeros. A tiny touch-up on the tracepoint so trace_ram_postcopy_send_discard_bitmap() is called after the logic itself (which sounds more reasonable). Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migr

Re: [PATCH v2] audio: Add sndio backend

2021-12-20 Thread Christian Schoenebeck
On Freitag, 17. Dezember 2021 10:38:32 CET Alexandre Ratchov wrote: > sndio is the native API used by OpenBSD, although it has been ported to > other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). > > Signed-off-by: Brad Smith > Signed-off-by: Alexandre Ratchov > --- > > Than

Re: [PATCH v2 00/15] hw/nvme: SR-IOV with Virtualization Enhancements

2021-12-20 Thread Łukasz Gieryk
On Mon, Dec 20, 2021 at 08:12:06AM +0100, Klaus Jensen wrote: > On Nov 25 15:15, Łukasz Gieryk wrote: > > On Wed, Nov 24, 2021 at 09:03:06AM +0100, Klaus Jensen wrote: > > > Hi Lukasz, > > > > > > I've been through this. I have a couple of review comments, but overall > > > looks good for inclusio

Re: [PATCH] tests/qtest/virtio-net-failover: Use g_random_int() instead of g_test_rand_int()

2021-12-20 Thread Philippe Mathieu-Daudé
On 12/20/21 11:27, Thomas Huth wrote: > g_test_rand_int() must not be called before g_test_init(), otherwise > the glib will show a "g_rand_int: assertion 'rand != NULL' failed" > message in the log. So we could change the order here, but actually, > g_test_rand_int() seems also the wrong choice he

[PATCH 0/2] qapi/ui: add change-vnc-listen

2021-12-20 Thread Vladimir Sementsov-Ogievskiy
Hi all! Recently our customer requested a possibility to change VNC listen port dynamically. Happily in Rhel7-based Qemu we already have this possibility: through deprecated "change" qmp command. But since 6.0 "change" qmp command was removed, with recommendation to use change-vnc-password or bl

[PATCH v2 7/8] migration: Finer grained tracepoints for POSTCOPY_LISTEN

2021-12-20 Thread Peter Xu
The enablement of postcopy listening has a few steps, add a few tracepoints to be there ready for some basic measurements for them. Signed-off-by: Peter Xu --- migration/savevm.c | 9 - migration/trace-events | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/migr

Re: [RFC PATCH v3 14/27] hw/pci-host: Add ls7a1000 PCIe Host bridge support for Loongson3 Platform

2021-12-20 Thread yangxiaojuan
Hi, Mark On 12/18/2021 07:39 AM, Mark Cave-Ayland wrote: > On 04/12/2021 12:07, Xiaojuan Yang wrote: > >> This is a model of the PCIe Host Bridge found on a Loongson-5000 >> processor. It includes a interrupt controller, some interface for >> pci and nonpci devices. Mainly emulate part of it that

Re: [PATCH v5 30/31] crypto: delegate permission functions to JobDriver .pre_run

2021-12-20 Thread Emanuele Giuseppe Esposito
On 17/12/2021 13:29, Hanna Reitz wrote: On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: block_crypto_amend_options_generic_luks uses the block layer permission API, therefore it should be called with the BQL held. However, the same function is being called ib two BlockDriver s/ ib / b

RE: [PATCH v2 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer

2021-12-20 Thread Jiangyifei via
> -Original Message- > From: Richard Henderson [mailto:richard.hender...@linaro.org] > Sent: Monday, December 13, 2021 11:20 PM > To: Anup Patel ; Jiangyifei > Cc: Bin Meng ; open list:RISC-V > ; limingwang (A) ; KVM > General ; libvir-l...@redhat.com; Anup Patel > ; QEMU Developers ; > w

RE: [PATCH v2 07/12] target/riscv: Support setting external interrupt by KVM

2021-12-20 Thread Jiangyifei via
> -Original Message- > From: Anup Patel [mailto:a...@brainfault.org] > Sent: Monday, December 13, 2021 12:33 PM > To: Jiangyifei > Cc: QEMU Developers ; open list:RISC-V > ; kvm-ri...@lists.infradead.org; KVM General > ; libvir-l...@redhat.com; Anup Patel > ; Palmer Dabbelt ; Alistair > F

Re: [RFC 1/2] migration: Introduce ram_transferred_add()

2021-12-20 Thread David Edmondson
On Friday, 2021-12-17 at 20:09:12 +01, Philippe Mathieu-Daudé wrote: > On 12/16/21 13:34, David Edmondson wrote: >> ...and use it. >> >> Signed-off-by: David Edmondson >> --- >> migration/ram.c | 23 ++- >> migration/ram.h | 1 + >> 2 files changed, 15 insertions(+), 9 dele

Re: build qemu on Monterey?

2021-12-20 Thread Thomas Huth
On 18/12/2021 15.38, Ani Sinha wrote: Hi : Has anyone tried this? Yes, I know about https://wiki.qemu.org/Hosts/Mac but I am getting $ ./configure --target-list=x86_64-softmmu Using './build' as the directory for build output Disabling PIE due to missing toolchain support ERROR: glib-2.56 gthr

[RFC v2 1/2] migration: Introduce ram_transferred_add()

2021-12-20 Thread David Edmondson
...and use it. Signed-off-by: David Edmondson --- migration/ram.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 57efa67f20..bd53e50a7f 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -386,6 +386,11 @@ ui

[PATCH] tests/qtest/virtio-net-failover: Use g_random_int() instead of g_test_rand_int()

2021-12-20 Thread Thomas Huth
g_test_rand_int() must not be called before g_test_init(), otherwise the glib will show a "g_rand_int: assertion 'rand != NULL' failed" message in the log. So we could change the order here, but actually, g_test_rand_int() seems also the wrong choice here, since we're using it to create a temporary

Re: [PATCH v4 07/14] vfio-user: run vfio-user context

2021-12-20 Thread Stefan Hajnoczi
On Fri, Dec 17, 2021 at 05:59:48PM +, Jag Raman wrote: > > > > On Dec 16, 2021, at 6:17 AM, Stefan Hajnoczi wrote: > > > > On Wed, Dec 15, 2021 at 10:35:31AM -0500, Jagannathan Raman wrote: > >> @@ -114,6 +118,62 @@ static void vfu_object_set_device(Object *obj, const > >> char *str, Error

Re: [PATCH v2 4/4] intel_iommu: Fix irqchip / X2APIC configuration checks

2021-12-20 Thread Peter Xu
On Fri, Dec 17, 2021 at 04:51:20PM +, David Woodhouse wrote: > On Thu, 2021-12-16 at 16:47 +0800, Peter Xu wrote: > > Hi, David, > > > > On Thu, Dec 09, 2021 at 10:08:40PM +, David Woodhouse wrote: > > > We don't need to check kvm_enable_x2apic(). It's perfectly OK to support > > > interru

Re: [PATCH v2 2/2] linux-user: call set/getscheduler set/getparam directly

2021-12-20 Thread Laurent Vivier
Le 20/12/2021 à 08:21, Tonis Tiigi a écrit : There seems to be difference in syscall and libc definition of these methods and therefore musl does not implement them (1e21e78bf7). Call syscall directly to ensure the behavior of the libc of user application, not the libc that was used to build QEMU

Re: [PATCH v2 1/3] linux-user: Move target_signal.h generic definitions to generic/signal.h

2021-12-20 Thread Laurent Vivier
Le 26/11/2021 à 03:23, Song Gao a écrit : No code change Suggested-by: Richard Henderson Signed-off-by: Song Gao Reviewed-by: Laurent Vivier --- linux-user/aarch64/target_signal.h| 18 -- linux-user/arm/target_signal.h| 18 -- linux-user/cris/ta

Re: build qemu on Monterey?

2021-12-20 Thread Ani Sinha
On Mon, Dec 20, 2021 at 12:56 PM Thomas Huth wrote: > > On 18/12/2021 15.38, Ani Sinha wrote: > > Hi : > > Has anyone tried this? Yes, I know about > > https://wiki.qemu.org/Hosts/Mac > > > > but I am getting > > > > $ ./configure --target-list=x86_64-softmmu > > Using './build' as the directory f

Re: [PATCH v2 3/3] linux-user: Remove TARGET_SIGSTKSZ

2021-12-20 Thread Laurent Vivier
Le 26/11/2021 à 03:23, Song Gao a écrit : TARGET_SIGSTKSZ is not used, we should remove it. Signed-off-by: Song Gao --- linux-user/alpha/target_signal.h | 1 - linux-user/generic/signal.h | 1 - linux-user/hppa/target_signal.h | 1 - linux-user/mips/target_signal.h | 1 - linux

Re: [PATCH v2 2/3] linux-user: target_syscall.h remove definition TARGET_MINSIGSTKSZ

2021-12-20 Thread Laurent Vivier
Le 26/11/2021 à 03:23, Song Gao a écrit : TARGET_MINSIGSTKSZ has been defined in generic/signal.h or target_signal.h, We don't need to define it again. Signed-off-by: Song Gao Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé --- linux-user/aarch64/target_syscall.h| 1 -

[PATCH v3 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer

2021-12-20 Thread Yifei Jiang via
Add kvm_riscv_get/put_regs_timer to synchronize virtual time context from KVM. To set register of RISCV_TIMER_REG(state) will occur a error from KVM on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter that adaping in QEMU. Signed-off-by: Yifei Jiang Signed-off-by: Mingwan

Re: [PATCH v2 8/9] hw/riscv: virt: Allow support for 32 cores

2021-12-20 Thread Bin Meng
On Thu, Dec 16, 2021 at 12:55 PM Alistair Francis wrote: > > From: Alistair Francis > > Linux supports up to 32 cores for both 32-bit and 64-bit RISC-V, so > let's set that as the maximum for the virt board. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/435 > Signed-off-by: Alistair

[PATCH 4/4] tests/qtest/boot-order-test: Check whether machines are available

2021-12-20 Thread Thomas Huth
Machines might not always be compiled into the QEMU binary, so we should skip the test instead of failing if it is not available. Signed-off-by: Thomas Huth --- tests/qtest/boot-order-test.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qtest/boot-order-test.c b/tests/qtest/boot

[PATCH v3 07/12] target/riscv: Support setting external interrupt by KVM

2021-12-20 Thread Yifei Jiang via
When KVM is enabled, set the S-mode external interrupt through kvm_riscv_set_irq function. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 6 +- target/riscv/kvm-stub.c | 5 + target/riscv/kvm.c | 17 ++

Re: [PATCH] linux-user: Remove the deprecated ppc64abi32 target

2021-12-20 Thread Laurent Vivier
Le 15/12/2021 à 09:49, Thomas Huth a écrit : It's likely broken, and nobody cared for picking it up again during the deprecation phase, so let's remove this now. Since this is the last entry in deprecated_targets_list, remove the related code in the configure script, too. Signed-off-by: Thomas

[PATCH v3 08/12] target/riscv: Handle KVM_EXIT_RISCV_SBI exit

2021-12-20 Thread Yifei Jiang via
Use char-fe to handle console sbi call, which implement early console io while apply 'earlycon=sbi' into kernel parameters. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Anup Patel --- target/riscv/kvm.c | 43 +- target/riscv/sbi_ecall_inter

Re: [PATCH 00/15] ppc/ppc405: decade cleanup

2021-12-20 Thread Cédric Le Goater
Don't know if this is the reason of our problems but I think there is something to investigate around timer interrupts: / # cat /proc/interrupts CPU0 16: 68 UIC 1 Level serial LOC: 0 Local timer interrupts for timer event device LOC: 0 L

[PATCH v3 01/12] update-linux-headers: Add asm-riscv/kvm.h

2021-12-20 Thread Yifei Jiang via
Add asm-riscv/kvm.h for RISC-V KVM, and update linux/kvm.h Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Acked-by: Alistair Francis Reviewed-by: Anup Patel --- linux-headers/asm-riscv/kvm.h | 128 ++ 1 file changed, 128 insertions(+) create mode 100644

[RFC v2 2/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-20 Thread David Edmondson
Provide information on the number of bytes copied in the pre-copy, downtime and post-copy phases of migration. Signed-off-by: David Edmondson --- migration/migration.c | 3 +++ migration/ram.c | 7 +++ monitor/hmp-cmds.c| 12 qapi/migration.json | 13 -

[PATCH v3 11/12] target/riscv: Implement virtual time adjusting with vm state changing

2021-12-20 Thread Yifei Jiang via
We hope that virtual time adjusts with vm state changing. When a vm is stopped, guest virtual time should stop counting and kvm_timer should be stopped. When the vm is resumed, guest virtual time should continue to count and kvm_timer should be restored. Signed-off-by: Yifei Jiang Signed-off-by:

[PATCH v3 02/12] target/riscv: Add target/riscv/kvm.c to place the public kvm interface

2021-12-20 Thread Yifei Jiang via
Add target/riscv/kvm.c to place kvm_arch_* function needed by kvm/kvm-all.c. Meanwhile, add kvm support in meson.build file. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- meson.build | 2 + target/riscv/kvm.c

Re: [PATCH v2 7/9] hw/riscv: Use error_fatal for SoC realisation

2021-12-20 Thread Bin Meng
On Thu, Dec 16, 2021 at 12:55 PM Alistair Francis wrote: > > From: Alistair Francis > > When realising the SoC use error_fatal instead of error_abort as the > process can fail and report useful information to the user. > > Currently a user can see this: > >$ ../qemu/bld/qemu-system-riscv64 -M

[PATCH v3 03/12] target/riscv: Implement function kvm_arch_init_vcpu

2021-12-20 Thread Yifei Jiang via
Get isa info from kvm while kvm init. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- target/riscv/kvm.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/target/riscv/kvm.c b/ta

[PATCH v3 06/12] target/riscv: Support start kernel directly by KVM

2021-12-20 Thread Yifei Jiang via
Get kernel and fdt start address in virt.c, and pass them to KVM when cpu reset. Add kvm_riscv.h to place riscv specific interface. In addition, PLIC is created without M-mode PLIC contexts when KVM is enabled. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis

[PATCH 3/4] tests/qtest/cdrom-test: Check whether devices are available before using them

2021-12-20 Thread Thomas Huth
Downstream users might want to disable legacy devices in their binaries, so we should not blindly assume that they are available. Add some proper checks before using them. Signed-off-by: Thomas Huth --- tests/qtest/cdrom-test.c | 60 ++-- 1 file changed, 39 in

Warnings during the virtio-net-failover test

2021-12-20 Thread Thomas Huth
Hi Laurent, today I noticed that there are quite a bunch of warnings during the virtio-net-failover test: $ QTEST_QEMU_BINARY=./qemu-system-x86_64 tests/qtest/virtio-net-failover /x86_64/failover-virtio-net/hotplug_1: qemu-system-x86_64: warning: Primary device not found Virtio-net failove

Re: [PATCH] failover: Silence warning messages during qtest

2021-12-20 Thread Philippe Mathieu-Daudé
On 12/20/21 15:53, Laurent Vivier wrote: > virtio-net-failover test tries several device combinations that produces > some expected warnings. > These warning can be confusing, so we disable them during the qtest Typo "warnings". > sequence. > > Reported-by: Thomas Huth > Signed-off-by: Laurent

[PATCH v3 04/12] target/riscv: Implement kvm_arch_get_registers

2021-12-20 Thread Yifei Jiang via
Get GPR CSR and FP registers from kvm by KVM_GET_ONE_REG ioctl. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- target/riscv/kvm.c | 112 - 1 file changed, 111 insertions(+), 1 deletion

[PATCH 0/4] tests/qtest: Check for devices and machines before adding tests

2021-12-20 Thread Thomas Huth
Devices might not always be compiled into the QEMU target binaries. We already have the libqos framework that is good for handling such situations, but some of the qtests are not a real good fit for the libqos framework. This patch series adds a new function to check whether a device is available i

[RFC v2 0/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-20 Thread David Edmondson
When examining a report of poor migration behaviour, it would often be useful to understand how much data was transferred in different phases of the migration process. For example, if the downtime limit is exceeded, to know how much data was transferred during the downtime. RFC because the name "

Re: Virtio-GPU Xres and Yres seettings

2021-12-20 Thread Gerd Hoffmann
Hi, > Is it possible that EDID bytes are sent wrong to the driver (as a response > to VIRTIO_GPU_CMD_GET_EDID command)?? - I am configuring these bytes the > same way Qemu does. EDID is optional, so you can try disable the EDID feature bit and see what happens. You can also check /sys/class/dr

Re: [RFC] vhost-vdpa-net: add vhost-vdpa-net host device support

2021-12-20 Thread Stefan Hajnoczi
On Mon, Dec 20, 2021 at 10:48:09AM +0800, Jason Wang wrote: > On Fri, Dec 17, 2021 at 4:35 PM Stefan Hajnoczi wrote: > > > > On Fri, Dec 17, 2021 at 12:26:53PM +0800, Jason Wang wrote: > > > > Dave: You created the VIRTIO vmstate infrastructure in QEMU. Please see > > the bottom of this email abou

Re: [PATCH v4 11/14] vfio-user: IOMMU support for remote device

2021-12-20 Thread Stefan Hajnoczi
On Fri, Dec 17, 2021 at 08:00:35PM +, Jag Raman wrote: > > On Dec 16, 2021, at 9:40 AM, Stefan Hajnoczi wrote: > > > > On Wed, Dec 15, 2021 at 10:35:35AM -0500, Jagannathan Raman wrote: > >> Assign separate address space for each device in the remote processes. > > > > If I understand correc

Re: [PATCH] hw: m68k: Add virt compat machine type for 7.0

2021-12-20 Thread Cornelia Huck
On Sat, Dec 18 2021, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > Based-On: <20211217143948.289995-1-coh...@redhat.com> > > hw/m68k/virt.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) Oh, I didn't realize we do it for m68k as well. Reviewed-by: Cornelia Huc

Re: [PATCH] hw/nvram: at24 return 0xff if 1 byte address

2021-12-20 Thread Philippe Mathieu-Daudé
On 12/20/21 16:32, Patrick Venture wrote: > On Mon, Dec 20, 2021 at 1:12 AM Philippe Mathieu-Daudé > mailto:phi...@redhat.com>> wrote: > > Hi Patrick, > > On 12/20/21 01:32, Patrick Venture wrote: > > The at24 eeproms are 2 byte devices that return 0xff when they are > read >

  1   2   3   4   >