Re: [PATCH] target/riscv: replace TARGET_LONG_BITS in gdbstub

2022-04-12 Thread Frédéric Pétrot
Le 09/04/2022 à 17:39, Richard Henderson a écrit : On 4/9/22 02:46, Frédéric Pétrot wrote: Now that we have misa xlen, use that in riscv gdbstub.c instead of the TARGET_LONG_BITS define, and use riscv_cpu_mxl_bits to provide the number of bits in a consistent way. Signed-off-by: Frédéric Pét

Re: [PATCH] Warn user if the vga flag is passed but no vga device is created

2022-04-12 Thread Thomas Huth
Hi, On 12/04/2022 22.25, Gautam Agrawal wrote: [...]>> On 08/04/2022 12.45, Gautam Agrawal wrote: This patch is in regards to this issue:https://gitlab.com/qemu-project/qemu/-/issues/581#. Better write this right in front of your Signed-off-by line: Resolves: https://gitlab.com/qemu-project

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

2022-04-12 Thread Alexey Kardashevskiy
On 4/13/22 14:56, Alexey Kardashevskiy wrote: On 3/17/22 06:16, Cédric Le Goater wrote: Timothy, On 3/16/22 17:29, Cédric Le Goater wrote: Hello, 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 mo

Re: [Qemu-devel] [PATCH 6/8] i386/kvm: hv-stimer requires hv-time and hv-synic

2022-04-12 Thread Divya Garg
On 12/04/22 8:46 pm, Vitaly Kuznetsov wrote: Divya Garg writes: On 12/04/22 6:18 pm, Vitaly Kuznetsov wrote: Divya Garg writes: Hi Vitaly Kuznetsov ! I was working on hyperv flags and saw that we introduced new dependencies some time back (https://urldefense.proofpoint.com/v2/url?u=https

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

2022-04-12 Thread Alexey Kardashevskiy
On 3/17/22 06:16, Cédric Le Goater wrote: Timothy, On 3/16/22 17:29, Cédric Le Goater wrote: Hello, 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 ex

[PATCH] docs: Correct the default thread-pool-size

2022-04-12 Thread Liu Yiding
Refer to 26ec190964 virtiofsd: Do not use a thread pool by default Signed-off-by: Liu Yiding --- docs/tools/virtiofsd.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tools/virtiofsd.rst b/docs/tools/virtiofsd.rst index 0c0560203c..33fed08c6f 100644 --- a/docs/tools/v

Re: [RFC PATCH 0/4] 9pfs: Add 9pfs support for Windows host

2022-04-12 Thread Bin Meng
+Guohuai On Tue, Apr 12, 2022 at 8:27 PM Christian Schoenebeck wrote: > > On Freitag, 8. April 2022 19:10:09 CEST Bin Meng wrote: > > At present there is no Windows support for 9p file system. > > This series adds initial Windows support for 9p file system. > > Nice! > > > Only 'local' file syste

Re: [PATCH 0/5] target/arm: Support variable sized coprocessor registers

2022-04-12 Thread Gavin Shan
Hi Peter, On 4/11/22 8:10 PM, Peter Maydell wrote: On Mon, 11 Apr 2022 at 13:02, Andrew Jones wrote: On Mon, Apr 11, 2022 at 10:22:59AM +0100, Peter Maydell wrote: Also, we support SVE today, and we don't have variable size coprocessor registers. Is there a bug here that we would be fixing ?

Re: [PATCH v5 4/4] hw/acpi/aml-build: Use existing CPU topology to build PPTT table

2022-04-12 Thread Gavin Shan
Hi Jonathan, On 4/12/22 11:40 PM, Jonathan Cameron wrote: On Sun, 3 Apr 2022 22:59:53 +0800 Gavin Shan wrote: When the PPTT table is built, the CPU topology is re-calculated, but it's unecessary because the CPU topology has been populated in virt_possible_cpu_arch_ids() on arm/virt machine.

[ANNOUNCE] QEMU 7.0.0-rc4 is now available

2022-04-12 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the fifth release candidate for the QEMU 7.0 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-7.0.0-rc4.tar.xz http://downlo

[PATCH] net/vhost-user: Save ack_features to net_clients during vhost_user_start

2022-04-12 Thread Yi Wang
From: Liu Xiangyu During vhost_user_start, if openvswitch.service restart, cause the final features not expected. Because qemu not save the ack_features promptly. Signed-off-by: Liu Xiangyu Signed-off-by: Yi Wang --- net/vhost-user.c | 4 1 file changed, 4 insertions(+) diff --git a/ne

[PATCH v3 for 7.1 1/1] block: add 'force' parameter to 'blockdev-change-medium' command

2022-04-12 Thread Denis V. Lunev
'blockdev-change-medium' is a convinient wrapper for the following sequence of commands: * blockdev-open-tray * blockdev-remove-medium * blockdev-insert-medium * blockdev-close-tray and should be used f.e. to change ISO image inside the CD-ROM tray. Though the guest could lock the tray and some

Re: [PATCH for-7.1 1/8] nbd: actually implement reply_possible safeguard

2022-04-12 Thread Eric Blake
On Tue, Apr 12, 2022 at 09:41:57PM +0200, Paolo Bonzini wrote: > The .reply_possible field of s->requests is never set to false. This is > not a big problem as it is only a safeguard to detect protocol errors, > but fix it anyway. > > Signed-off-by: Paolo Bonzini > --- > block/nbd.c | 9 +--

Re: [PATCH v5 04/13] mm/shmem: Restrict MFD_INACCESSIBLE memory against RLIMIT_MEMLOCK

2022-04-12 Thread Andy Lutomirski
On Tue, Apr 12, 2022, at 7:36 AM, Jason Gunthorpe wrote: > On Fri, Apr 08, 2022 at 08:54:02PM +0200, David Hildenbrand wrote: > >> RLIMIT_MEMLOCK was the obvious candidate, but as we discovered int he >> past already with secretmem, it's not 100% that good of a fit (unmovable >> is worth than mlock

Re: [PATCH v2 04/39] util/log: Pass Error pointer to qemu_set_log

2022-04-12 Thread Alex Bennée
Richard Henderson writes: > Do not force exit within qemu_set_log; return bool and pass > an Error value back up the stack as per usual. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v2 07/39] util/log: Rename qemu_log_lock to qemu_log_trylock

2022-04-12 Thread Alex Bennée
Richard Henderson writes: > This function can fail, which makes it more like ftrylockfile > or pthread_mutex_trylock than flockfile or pthread_mutex_lock, > so rename it. > > To closer match the other trylock functions, release rcu_read_lock > along the failure path, so that qemu_log_unlock nee

Re: [PATCH] hw/nvme: fix narrowing conversion

2022-04-12 Thread Klaus Jensen
On Apr 12 11:59, Dmitry Tikhov wrote: > Since nlbas is of type int, it does not work with large namespace size > values, e.g., 9 TB size of file backing namespace and 8 byte metadata > with 4096 bytes lbasz gives negative nlbas value, which is later > promoted to negative int64_t type value and res

Re: [PATCH v2 03/39] util/log: Return bool from qemu_set_log_filename

2022-04-12 Thread Alex Bennée
Richard Henderson writes: > Per the recommendations in qapi/error.h, return false on failure. > > Use the return value in the monitor, the only place we aren't > already passing error_fatal or error_abort. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH] Warn user if the vga flag is passed but no vga device is created

2022-04-12 Thread Gautam Agrawal
hi, > thanks for your patch, looks pretty good already, but there is a small > issue: Try for example: > > ./qemu-system-s390x -vga none > > ... and it will print the warning "qemu-system-s390x: warning: No vga device > is created", though the user only asked for no VGA device. This seems to > h

Re: [PATCH v5 00/13] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-04-12 Thread Kirill A. Shutemov
On Mon, Mar 28, 2022 at 01:16:48PM -0700, Andy Lutomirski wrote: > On Thu, Mar 10, 2022 at 6:09 AM Chao Peng wrote: > > > > This is the v5 of this series which tries to implement the fd-based KVM > > guest private memory. The patches are based on latest kvm/queue branch > > commit: > > > > d5089

[PATCH for-7.1 8/8] nbd: document what is protected by the CoMutexes

2022-04-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/nbd.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/block/nbd.c b/block/nbd.c index 8954243f50..8297da7e89 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -82,12 +82,18 @@ typedef struct BDRVNBDState { NBDClientRequest request

[PATCH for-7.1 5/8] nbd: use a QemuMutex to synchronize reconnection with coroutines

2022-04-12 Thread Paolo Bonzini
The condition for waiting on the s->free_sema queue depends on both s->in_flight and s->state. The latter is currently using atomics, but this is quite dubious and probably wrong. Because s->state is written in the main thread too, for example by the reconnect timer callback, it cannot be protect

[PATCH for-7.1 4/8] nbd: keep send_mutex/free_sema handling outside nbd_co_do_establish_connection

2022-04-12 Thread Paolo Bonzini
Elevate s->in_flight early so that other incoming requests will wait on the CoQueue in nbd_co_send_request; restart them after getting back from nbd_reconnect_attempt. This could be after the reconnect timer or nbd_cancel_in_flight have cancelled the attempt, so there is no need anymore to cancel

[PATCH for-7.1 6/8] nbd: move s->state under requests_lock

2022-04-12 Thread Paolo Bonzini
Remove the confusing, and most likely wrong, atomics. The only function that used to be somewhat in a hot path was nbd_client_connected(), but it is not anymore after the previous patches. The function nbd_client_connecting_wait() was used mostly to check if a request had to be reissued (outside

[PATCH for-7.1 7/8] nbd: take receive_mutex when reading requests[].receiving

2022-04-12 Thread Paolo Bonzini
requests[].receiving is set by nbd_receive_replies() under the receive_mutex; Read it under the same mutex as well. Waking up receivers on errors happens after each reply finishes processing, in nbd_co_receive_one_chunk(). If there is no currently-active reply, there are two cases: * either there

[PATCH for-7.1 2/8] nbd: mark more coroutine_fns

2022-04-12 Thread Paolo Bonzini
Several coroutine functions in block/nbd.c are not marked as such. This patch adds a few more markers; it is not exhaustive, but it focuses especially on: - places that wake other coroutines, because aio_co_wake() has very different semantics inside a coroutine (queuing after yield vs. entering i

[PATCH for-7.1 1/8] nbd: actually implement reply_possible safeguard

2022-04-12 Thread Paolo Bonzini
The .reply_possible field of s->requests is never set to false. This is not a big problem as it is only a safeguard to detect protocol errors, but fix it anyway. Signed-off-by: Paolo Bonzini --- block/nbd.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/block/nbd.c

[PATCH for-7.1 0/8] nbd: actually make s->state thread-safe

2022-04-12 Thread Paolo Bonzini
The main point of this series is patch 6, which removes the dubious and probably wrong use of atomics in block/nbd.c. This in turn is enabled mostly by the cleanups in patches 3-5. Together, they introduce a QemuMutex that synchronizes the NBD client coroutines, the reconnect_delay timer and nbd_

[PATCH for-7.1 3/8] nbd: remove peppering of nbd_client_connected

2022-04-12 Thread Paolo Bonzini
It is unnecessary to check nbd_client_connected() because every time s->state is moved out of NBD_CLIENT_CONNECTED the socket is shut down and all coroutines are resumed. The only case where it was actually needed is when the NBD server disconnects and there is no reconnect-delay. In that case, n

Re: [PATCH v5 04/13] mm/shmem: Restrict MFD_INACCESSIBLE memory against RLIMIT_MEMLOCK

2022-04-12 Thread Kirill A. Shutemov
On Tue, Apr 12, 2022 at 09:39:25PM +0800, Chao Peng wrote: > On Mon, Apr 11, 2022 at 06:32:33PM +0300, Kirill A. Shutemov wrote: > > On Thu, Apr 07, 2022 at 04:05:36PM +, Sean Christopherson wrote: > > > Hmm, shmem_writepage() already handles SHM_F_INACCESSIBLE by rejecting > > > the swap, so

Re: [PULL 03/15] multifd: Make no compression operations into its own structure

2022-04-12 Thread Peter Maydell
On Fri, 28 Feb 2020 at 09:26, Juan Quintela wrote: > > It will be used later. > > Signed-off-by: Juan Quintela > Reviewed-by: Dr. David Alan Gilbert > Hi; Coverity thinks there might be a buffer overrun here. It's probably wrong, but it's not completely obvious why it can't happen, so an assert

RE: [PATCH v8 10/12] target/hexagon: import parser for idef-parser

2022-04-12 Thread Taylor Simpson
> From: Anton Johansson > Sent: Tuesday, April 12, 2022 10:11 AM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: a...@rev.ng; Brian Cain ; Michael Lambert > ; bab...@rev.ng; ni...@rev.ng; > richard.hender...@linaro.org > Subject: Re: [PATCH v8 10/12] target/hexagon: import parser for idef-

Re: [PATCH for-7.1 0/8] nbd: actually make s->state thread-safe

2022-04-12 Thread Vladimir Sementsov-Ogievskiy
12.04.2022 20:32, Paolo Bonzini wrote: The main point of this series is patch 6, which removes the dubious and probably wrong use of atomics in block/nbd.c. This in turn is enabled mostly by the cleanups in patches 3-5. Together, they introduce a QemuMutex that synchronizes the NBD client corou

[PATCH for-7.1 0/8] nbd: actually make s->state thread-safe

2022-04-12 Thread Paolo Bonzini
The main point of this series is patch 6, which removes the dubious and probably wrong use of atomics in block/nbd.c. This in turn is enabled mostly by the cleanups in patches 3-5. Together, they introduce a QemuMutex that synchronizes the NBD client coroutines, the reconnect_delay timer and nbd_

[RFC PATCH 1/3] disas: Remove old libopcode s390 disassembler

2022-04-12 Thread Thomas Huth
Capstone should be superior to the old libopcode disassembler, so we can drop the old file nowadays. Signed-off-by: Thomas Huth --- include/disas/dis-asm.h |1 - disas/s390.c| 1892 --- target/s390x/cpu.c |1 - MAINTAINERS

[RFC PATCH 0/3] Remove some of the old libopcode based disassemblers

2022-04-12 Thread Thomas Huth
Many of the disassemblers in the disas folder are based on old versions from the GNU tools (libopcode, GDB, ...) that were still licensed under the GPL v2. The GNU tools switched to GPL v3 at one point in time, so QEMU is stuck with the old versions, i.e. these files did not see much updates for ne

[PATCH for-7.1] hw/block/fdc-sysbus: Always mark sysbus floppy controllers as not having DMA

2022-04-12 Thread Peter Maydell
The sysbus floppy controllers (devices sysbus-fdc and sun-fdtwo) don't support DMA. The core floppy controller code expects this to be indicated by setting FDCtrl::dma_chann to -1. This used to be done in the device instance_init functions sysbus_fdc_initfn() and sun4m_fdc_initfn(), but in commit

Re: [PATCH v5 2/9] vfio: tolerate migration protocol v1 uapi renames

2022-04-12 Thread Matthew Rosato
On 4/12/22 11:50 AM, Pierre Morel wrote: On 4/4/22 20:17, Matthew Rosato wrote: The v1 uapi is deprecated and will be replaced by v2 at some point; this patch just tolerates the renaming of uapi fields to reflect v1 / deprecated status. Signed-off-by: Matthew Rosato ---   hw/vfio/common.c   

Re: [RFC 1/3] serial: Enable MSI capablity and option

2022-04-12 Thread Marc Zyngier
On 2022-04-12 03:10, Atish Patra wrote: The seria-pci device doesn't support MSI. Enable the device to provide MSI so that any platform with MSI support only can also use this serial device. MSI can be enabled by enabling the newly introduced device property. This will be disabled by default pres

[PATCH] vhost: Track descriptor chain in private at SVQ

2022-04-12 Thread Eugenio Pérez
Only the first one of them were properly enqueued back. While we're at it, harden SVQ: The device could have access to modify them, and it definitely have access when we implement packed vq. Harden SVQ maintaining a private copy of the descriptor chain. Other fields like buffer addresses are alrea

Re: [PATCH v5 2/9] vfio: tolerate migration protocol v1 uapi renames

2022-04-12 Thread Pierre Morel
On 4/4/22 20:17, Matthew Rosato wrote: The v1 uapi is deprecated and will be replaced by v2 at some point; this patch just tolerates the renaming of uapi fields to reflect v1 / deprecated status. Signed-off-by: Matthew Rosato --- hw/vfio/common.c| 2 +- hw/vfio/migration.c | 19 +

Re: [PATCH v5 4/4] hw/acpi/aml-build: Use existing CPU topology to build PPTT table

2022-04-12 Thread Jonathan Cameron via
On Sun, 3 Apr 2022 22:59:53 +0800 Gavin Shan wrote: > When the PPTT table is built, the CPU topology is re-calculated, but > it's unecessary because the CPU topology has been populated in > virt_possible_cpu_arch_ids() on arm/virt machine. > > This reworks build_pptt() to avoid by reusing the e

Re: [Qemu-devel] [PATCH 6/8] i386/kvm: hv-stimer requires hv-time and hv-synic

2022-04-12 Thread Vitaly Kuznetsov
Divya Garg writes: > On 12/04/22 6:18 pm, Vitaly Kuznetsov wrote: >> Divya Garg writes: >> >>> Hi Vitaly Kuznetsov ! >>> I was working on hyperv flags and saw that we introduced new >>> dependencies some >>> time back >>> (https://urldefense.proofpoint.com/v2/url?u=https-3A__sourcegraph.com_gith

Re: [PATCH v8 10/12] target/hexagon: import parser for idef-parser

2022-04-12 Thread Anton Johansson via
Very nice catch, this is the bug that plagued us a few weeks ago when rebasing, it has since been fixed. Actually the `gen_set_overflow` fucntion has been removed completely as it was only called when we handled `asl/asr_r_r_sat`. Current way we handle overflow: Overflow is now only set by sat

Re: [PULL v2 29/35] hw/intc: Add RISC-V AIA APLIC device emulation

2022-04-12 Thread Peter Maydell
On Wed, 16 Feb 2022 at 08:43, Alistair Francis wrote: > > From: Anup Patel > > The RISC-V AIA (Advanced Interrupt Architecture) defines a new > interrupt controller for wired interrupts called APLIC (Advanced > Platform Level Interrupt Controller). The APLIC is capabable of > forwarding wired int

Re: [RFC PATCH] target/i386: fix byte swap issue with XMM register access

2022-04-12 Thread Richard Henderson
On 4/12/22 01:54, Alex Bennée wrote: During the conversion to the gdb_get_reg128 helpers the high and low parts of the XMM register where inadvertently swapped. This causes reads of the register to report the incorrect value to gdb. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/971 Fix

Re: [PATCH v5 04/13] mm/shmem: Restrict MFD_INACCESSIBLE memory against RLIMIT_MEMLOCK

2022-04-12 Thread Jason Gunthorpe
On Fri, Apr 08, 2022 at 08:54:02PM +0200, David Hildenbrand wrote: > RLIMIT_MEMLOCK was the obvious candidate, but as we discovered int he > past already with secretmem, it's not 100% that good of a fit (unmovable > is worth than mlocked). But it gets the job done for now at least. No, it doesn't

Re: [PATCH for-7.1] target/mips: Remove stale TODO file

2022-04-12 Thread Richard Henderson
On 4/12/22 04:38, Thomas Huth wrote: The last change to this file has been done in 2012, so it seems like this is not really used anymore, and the content is likely very out of date now. Signed-off-by: Thomas Huth --- target/mips/TODO | 51 1 f

Re: [PATCH 14/16] target/arm: Implement ESB instruction

2022-04-12 Thread Richard Henderson
On 4/12/22 02:56, Peter Maydell wrote: On Mon, 11 Apr 2022 at 23:14, Richard Henderson wrote: On 4/11/22 09:18, Peter Maydell wrote: + ESB 0011 0010 0001 +] Why don't we decode bits [11:8] here? I see it's the same as YIELD/WFE/WFI, but I'm not sure

Re: [PATCH v2 for 7.1 1/1] block: add 'force' parameter to 'blockdev-change-medium' command

2022-04-12 Thread Denis V. Lunev
On 12.04.2022 16:17, Vladimir Sementsov-Ogievskiy wrote: 12.04.2022 12:50, Denis V. Lunev wrote: 'blockdev-change-medium' is a convinient wrapper for the following sequence of commands:   * blockdev-open-tray   * blockdev-remove-medium   * blockdev-insert-medium   * blockdev-close-tray and shoul

Re: [PATCH v5 04/13] mm/shmem: Restrict MFD_INACCESSIBLE memory against RLIMIT_MEMLOCK

2022-04-12 Thread Chao Peng
On Mon, Apr 11, 2022 at 06:32:33PM +0300, Kirill A. Shutemov wrote: > On Thu, Apr 07, 2022 at 04:05:36PM +, Sean Christopherson wrote: > > Hmm, shmem_writepage() already handles SHM_F_INACCESSIBLE by rejecting the > > swap, so > > maybe it's just the page migration path that needs to be update

Re: [PATCH v2 for 7.1 1/1] block: add 'force' parameter to 'blockdev-change-medium' command

2022-04-12 Thread Vladimir Sementsov-Ogievskiy
12.04.2022 12:50, Denis V. Lunev wrote: 'blockdev-change-medium' is a convinient wrapper for the following sequence of commands: * blockdev-open-tray * blockdev-remove-medium * blockdev-insert-medium * blockdev-close-tray and should be used f.e. to change ISO image inside the CD-ROM tray.

Re: [PATCH v5 03/13] mm/shmem: Support memfile_notifier

2022-04-12 Thread Chao Peng
On Mon, Apr 11, 2022 at 06:26:47PM +0300, Kirill A. Shutemov wrote: > On Thu, Mar 10, 2022 at 10:09:01PM +0800, Chao Peng wrote: > > diff --git a/mm/shmem.c b/mm/shmem.c > > index 9b31a7056009..7b43e274c9a2 100644 > > --- a/mm/shmem.c > > +++ b/mm/shmem.c > > @@ -903,6 +903,28 @@ static struct foli

Re: [PATCH v5 01/13] mm/memfd: Introduce MFD_INACCESSIBLE flag

2022-04-12 Thread Chao Peng
On Mon, Apr 11, 2022 at 06:10:23PM +0300, Kirill A. Shutemov wrote: > On Thu, Mar 10, 2022 at 10:08:59PM +0800, Chao Peng wrote: > > From: "Kirill A. Shutemov" > > > > Introduce a new memfd_create() flag indicating the content of the > > created memfd is inaccessible from userspace through ordina

Re: [PATCH v5 00/13] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-04-12 Thread Chao Peng
On Fri, Apr 08, 2022 at 11:35:05AM -1000, Vishal Annapurve wrote: > On Mon, Mar 28, 2022 at 10:17 AM Andy Lutomirski wrote: > > > > On Thu, Mar 10, 2022 at 6:09 AM Chao Peng > > wrote: > > > > > > This is the v5 of this series which tries to implement the fd-based KVM > > > guest private memory.

Re: [Qemu-devel] [PATCH 6/8] i386/kvm: hv-stimer requires hv-time and hv-synic

2022-04-12 Thread Divya Garg
On 12/04/22 6:18 pm, Vitaly Kuznetsov wrote: Divya Garg writes: Hi Vitaly Kuznetsov ! I was working on hyperv flags and saw that we introduced new dependencies some time back (https://urldefense.proofpoint.com/v2/url?u=https-3A__sourcegraph.com_github.com_qemu_qemu_-2D_commit_c686193072a4703

[PATCH] hw/nvme: fix narrowing conversion

2022-04-12 Thread Dmitry Tikhov
Since nlbas is of type int, it does not work with large namespace size values, e.g., 9 TB size of file backing namespace and 8 byte metadata with 4096 bytes lbasz gives negative nlbas value, which is later promoted to negative int64_t type value and results in negative ns->moff which breaks namespa

答复: [PATCH] block: fix core for unlock not permitted

2022-04-12 Thread suruifeng (A)
Hi, The recurrence probability is extremely low. I have not reproduced this in the latest version. However, after reviewing the latest code, we find that this also exists. This is my understanding of the latest code, if there is a mistake in my understanding, please tell me. bdrv_flush_all()

Re: [PATCH v5 12/13] KVM: Expose KVM_MEM_PRIVATE

2022-04-12 Thread Chao Peng
On Tue, Mar 29, 2022 at 07:13:00PM +, Sean Christopherson wrote: > On Thu, Mar 10, 2022, Chao Peng wrote: > > KVM_MEM_PRIVATE is not exposed by default but architecture code can turn > > on it by implementing kvm_arch_private_memory_supported(). > > > > Signed-off-by: Yu Zhang > > Signed-off-

Re: [BUG]QEMU jump into interrupt when single-stepping on aarch64

2022-04-12 Thread Shuai Xue
在 2022/4/7 PM12:10, Shuai Xue 写道: > 在 2022/4/7 AM12:57, Richard Henderson 写道: >> On 4/6/22 09:30, Shuai Xue wrote: >>> Dear, folks, >>> >>> I try to debug Linux kernel with QEMU in single-stepping mode on aarch64 >>> platform, >>> the added breakpoint hits but after I type `step`, the gdb always j

Re: [Qemu-devel] [PATCH 6/8] i386/kvm: hv-stimer requires hv-time and hv-synic

2022-04-12 Thread Vitaly Kuznetsov
Divya Garg writes: > Hi Vitaly Kuznetsov ! > I was working on hyperv flags and saw that we introduced new > dependencies some > time back > (https://sourcegraph.com/github.com/qemu/qemu/-/commit/c686193072a47032d83cb4e131dc49ae30f9e5d7?visible=1). > After these changes, if we try to live migrat

Re: [PATCH v5 11/13] KVM: Zap existing KVM mappings when pages changed in the private fd

2022-04-12 Thread Chao Peng
On Tue, Mar 29, 2022 at 07:23:04PM +, Sean Christopherson wrote: > On Thu, Mar 10, 2022, Chao Peng wrote: > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > > index 67349421eae3..52319f49d58a 100644 > > --- a/virt/kvm/kvm_main.c > > +++ b/virt/kvm/kvm_main.c > > @@ -841,8 +841,43 @@ s

Re: [PATCH v5 10/13] KVM: Register private memslot to memory backing store

2022-04-12 Thread Chao Peng
On Tue, Mar 29, 2022 at 07:01:52PM +, Sean Christopherson wrote: > On Thu, Mar 10, 2022, Chao Peng wrote: > > Add 'notifier' to memslot to make it a memfile_notifier node and then > > register it to memory backing store via memfile_register_notifier() when > > memslot gets created. When memslot

Re: [PATCH] Warn user if the vga flag is passed but no vga device is created

2022-04-12 Thread Peter Maydell
On Tue, 12 Apr 2022 at 13:13, Thomas Huth wrote: > On 08/04/2022 12.45, Gautam Agrawal wrote: > > +if (!vga_interface_created && !default_vga) { > > +warn_report("No vga device is created"); > > I'm not a native speaker, and maybe it's just a matter of taste, but I'd > rather say it in

Re: [PATCH v4 10/11] tests/tcg/s390x: Tests for Vector Enhancements Facility 2

2022-04-12 Thread David Hildenbrand
On 05.04.22 19:03, David Miller wrote: > Recommendation for comment? > > /* vri-d encoding matches vrr for 4b imm. > .insn does not handle this encoding variant. > */ > Sorry for the late reply. ".insn doesn't handle vri-d properly. So instead, we use vrr, which matches vri-d with a 4b imm --

Re: [RFC PATCH 0/4] 9pfs: Add 9pfs support for Windows host

2022-04-12 Thread Christian Schoenebeck
On Freitag, 8. April 2022 19:10:09 CEST Bin Meng wrote: > At present there is no Windows support for 9p file system. > This series adds initial Windows support for 9p file system. Nice! > Only 'local' file system driver backend is supported. security_model > should be 'none' due to limitations on

[RFC PATCH 4/4] net: slirp: allow CFI with libslirp >= 4.7

2022-04-12 Thread Paolo Bonzini
slirp 4.7 introduces a new CFI-friendly timer callback that does not pass function pointers within libslirp as callbacks for timers. Check the version number and, if it is new enough, allow using CFI even with a system libslirp. Signed-off-by: Paolo Bonzini --- meson.build | 24 -

[RFC PATCH 2/4] net: slirp: switch to slirp_new

2022-04-12 Thread Paolo Bonzini
Replace slirp_init with slirp_new, so that a more recent cfg.version can be specified. Signed-off-by: Paolo Bonzini --- net/slirp.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/net/slirp.c b/net/slirp.c index f1e25d741f..b3a92d6e38 100644 --- a

Re: [PATCH v9 09/11] 9p: darwin: Implement compatibility for mknodat

2022-04-12 Thread Christian Schoenebeck
On Freitag, 8. April 2022 17:00:59 CEST Greg Kurz wrote: > On Fri, 08 Apr 2022 15:52:25 +0200 > > Christian Schoenebeck wrote: > > On Sonntag, 27. Februar 2022 23:35:20 CEST Will Cohen wrote: > > > From: Keno Fischer > > > > > > Darwin does not support mknodat. However, to avoid race conditions

[RFC PATCH 3/4] net: slirp: add support for CFI-friendly timer API

2022-04-12 Thread Paolo Bonzini
libslirp 4.7 introduces a CFI-friendly version of the .timer_new callback. The new callback replaces the function pointer with an enum; invoking the callback is done with a new function slirp_handle_timer. Support the new API so that CFI can be made compatible with using a system libslirp. Signed

[RFC PATCH 1/4] net: slirp: introduce a wrapper struct for QemuTimer

2022-04-12 Thread Paolo Bonzini
This struct will be extended in the next few patches to support the new slirp_handle_timer() call. For that we need to store an additional "int" for each SLIRP timer, in addition to the cb_opaque. Signed-off-by: Paolo Bonzini --- net/slirp.c | 19 ++- 1 file changed, 14 insertio

Re: [PATCH] Warn user if the vga flag is passed but no vga device is created

2022-04-12 Thread Thomas Huth
Hi, thanks for your patch, looks pretty good already, but there is a small issue: Try for example: ./qemu-system-s390x -vga none ... and it will print the warning "qemu-system-s390x: warning: No vga device is created", though the user only asked for no VGA device. This seems to happen i

[RFC PATCH 0/4] net: support for CFI with libslirp >= 4.7

2022-04-12 Thread Paolo Bonzini
A system libslirp (either static or dynamic) cannot be used with QEMU if QEMU is compiled with control-flow instrumentation, because of the way timers are implemented in libslirp. libslirp passes a function pointer to the timer_new callback but the type information for the callback is missing; in

Re: [PATCH v5 09/13] KVM: Handle page fault for private memory

2022-04-12 Thread Chao Peng
On Tue, Mar 29, 2022 at 01:07:18AM +, Sean Christopherson wrote: > On Thu, Mar 10, 2022, Chao Peng wrote: > > @@ -3890,7 +3893,59 @@ static bool kvm_arch_setup_async_pf(struct kvm_vcpu > > *vcpu, gpa_t cr2_or_gpa, > > kvm_vcpu_gfn_to_hva(vcpu, gfn), &arch); > > }

Re: [PATCH for-7.1] target/i386: Remove unused XMMReg, YMMReg types and CPUState fields

2022-04-12 Thread Paolo Bonzini
Queued, thanks. Paolo

[PATCH for-7.1] target/mips: Remove stale TODO file

2022-04-12 Thread Thomas Huth
The last change to this file has been done in 2012, so it seems like this is not really used anymore, and the content is likely very out of date now. Signed-off-by: Thomas Huth --- target/mips/TODO | 51 1 file changed, 51 deletions(-) delete mod

Re: [RFC PATCH] gdb/gic: expose cpu_index via MxTxAttrs

2022-04-12 Thread Alex Bennée
Peter Maydell writes: > On Tue, 12 Apr 2022 at 11:45, Alex Bennée wrote: >> >> When accessing HW via the gdbstub we can't easily figure out what the >> cpu_index is. The canonical case is current_cpu but for some cases >> that will be NULL. For debug accesses we can overload requester_id and >

[Qemu-devel] [PATCH 6/8] i386/kvm: hv-stimer requires hv-time and hv-synic

2022-04-12 Thread Divya Garg
Hi Vitaly Kuznetsov ! I was working on hyperv flags and saw that we introduced new dependencies some time back (https://sourcegraph.com/github.com/qemu/qemu/-/commit/c686193072a47032d83cb4e131dc49ae30f9e5d7?visible=1). After these changes, if we try to live migrate a vm from older qemu to newer

Re: [PATCH V6 21/27] vfio-pci: cpr part 3 (intx)

2022-04-12 Thread Fam Zheng
On 2022-04-11 12:23, Steven Sistare wrote: > On 3/29/2022 7:03 AM, Fam Zheng wrote: > > On 2021-08-06 14:43, Steve Sistare wrote: > >> Preserve vfio INTX state across cpr restart. Preserve VFIOINTx fields as > >> follows: > >> pin : Recover this from the vfio config in kernel space > >> interr

Re: [RFC PATCH] gdb/gic: expose cpu_index via MxTxAttrs

2022-04-12 Thread Peter Maydell
On Tue, 12 Apr 2022 at 11:45, Alex Bennée wrote: > > When accessing HW via the gdbstub we can't easily figure out what the > cpu_index is. The canonical case is current_cpu but for some cases > that will be NULL. For debug accesses we can overload requester_id and > make the GIC a bit smarter abou

Re: [PATCH] block: fix core for unlock not permitted

2022-04-12 Thread Paolo Bonzini
On 4/12/22 09:13, suruifeng via wrote: qemu coredump: 0x7f9e7205c81b in raise () from /usr/lib64/libc.so.6 0x7f9e7205db41 in abort () from /usr/lib64/libc.so.6 0x7f9e71ddbe94 in error_exit (err=, msg=msg@entry=0x7f9e71ec1b50 <__func__.20287> "qemu_mutex_unlock_impl") at

[PATCH for-7.1] target/i386: Remove unused XMMReg, YMMReg types and CPUState fields

2022-04-12 Thread Peter Maydell
In commit b7711471f5 in 2014 we refactored the handling of the x86 vector registers so that instead of separate structs XMMReg, YMMReg and ZMMReg for representing the 16-byte, 32-byte and 64-byte width vector registers and multiple fields in the CPU state, we have a single type (XMMReg, later renam

Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write

2022-04-12 Thread Alex Bennée
Bin Meng writes: > On Sat, Apr 2, 2022 at 7:20 PM Bin Meng wrote: >> >> On Tue, Mar 29, 2022 at 12:43 PM Bin Meng wrote: >> > >> > On Mon, Mar 28, 2022 at 5:10 PM Peter Maydell >> > wrote: >> > > >> > > On Mon, 28 Mar 2022 at 03:10, Bin Meng wrote: >> > > > IMHO it's too bad to just ignore

[RFC PATCH] gdb/gic: expose cpu_index via MxTxAttrs

2022-04-12 Thread Alex Bennée
When accessing HW via the gdbstub we can't easily figure out what the cpu_index is. The canonical case is current_cpu but for some cases that will be NULL. For debug accesses we can overload requester_id and make the GIC a bit smarter about fishing that out. [AJB: very much a PoC hack for now but

Re: [PATCH v2 for 7.1 1/1] block: add 'force' parameter to 'blockdev-change-medium' command

2022-04-12 Thread Dr. David Alan Gilbert
* Denis V. Lunev (d...@openvz.org) wrote: > 'blockdev-change-medium' is a convinient wrapper for the following > sequence of commands: > * blockdev-open-tray > * blockdev-remove-medium > * blockdev-insert-medium > * blockdev-close-tray > and should be used f.e. to change ISO image inside the CD

Re: Re: [PATCH v4 0/8] Introduce akcipher service for virtio-crypto

2022-04-12 Thread zhenwei pi
On 4/12/22 17:47, Paolo Bonzini wrote: In our plan, the feature is designed for HTTPS offloading case and other applications which use kernel RSA/ecdsa by keyctl syscall. Hi Zhenwei, what is the % of time spent doing asymmetric key operations in your benchmark?  I am not very familiar wit

Re: [PATCH 14/16] target/arm: Implement ESB instruction

2022-04-12 Thread Peter Maydell
On Mon, 11 Apr 2022 at 23:14, Richard Henderson wrote: > > On 4/11/22 09:18, Peter Maydell wrote: > >> + ESB 0011 0010 0001 > >> +] > > > > Why don't we decode bits [11:8] here? I see it's the same > > as YIELD/WFE/WFI, but I'm not sure why we're not decodi

[PATCH v2 for 7.1 1/1] block: add 'force' parameter to 'blockdev-change-medium' command

2022-04-12 Thread Denis V. Lunev
'blockdev-change-medium' is a convinient wrapper for the following sequence of commands: * blockdev-open-tray * blockdev-remove-medium * blockdev-insert-medium * blockdev-close-tray and should be used f.e. to change ISO image inside the CD-ROM tray. Though the guest could lock the tray and some

Re: [PATCH v4 0/8] Introduce akcipher service for virtio-crypto

2022-04-12 Thread Paolo Bonzini
In our plan, the feature is designed for HTTPS offloading case and other applications which use kernel RSA/ecdsa by keyctl syscall. Hi Zhenwei, what is the % of time spent doing asymmetric key operations in your benchmark? I am not very familiar with crypto acceleration but my understanding

Re: Procedures adding new CPUs in sbsa-ref

2022-04-12 Thread Itaru Kitayama
On Tue, Apr 12, 2022 at 0:22 Alex Bennée wrote: > > Itaru Kitayama writes: > > > Good point; however per the SBSA specification, DEN0029F, there's the > > PE architecture requirement at > > each level from 1 to 7, so now I am wondering whether supporting > > cortex-a57 and a72 are good enough to

[PATCH] block: fix core for unlock not permitted

2022-04-12 Thread suruifeng via
qemu coredump: 0x7f9e7205c81b in raise () from /usr/lib64/libc.so.6 0x7f9e7205db41 in abort () from /usr/lib64/libc.so.6 0x7f9e71ddbe94 in error_exit (err=, msg=msg@entry=0x7f9e71ec1b50 <__func__.20287> "qemu_mutex_unlock_impl") at /usr/src/debug/qemu-4.1.0-170.x86_64/util/qe

Re: [libvirt RFC] virFile: new VIR_FILE_WRAPPER_BIG_PIPE to improve performance

2022-04-12 Thread Claudio Fontana
On 4/11/22 8:53 PM, Dr. David Alan Gilbert wrote: > * Claudio Fontana (cfont...@suse.de) wrote: >> On 4/7/22 3:57 PM, Claudio Fontana wrote: >>> On 4/7/22 3:53 PM, Dr. David Alan Gilbert wrote: * Claudio Fontana (cfont...@suse.de) wrote: > On 4/5/22 10:35 AM, Dr. David Alan Gilbert wrote:

[RFC PATCH] target/i386: fix byte swap issue with XMM register access

2022-04-12 Thread Alex Bennée
During the conversion to the gdb_get_reg128 helpers the high and low parts of the XMM register where inadvertently swapped. This causes reads of the register to report the incorrect value to gdb. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/971 Fixes: b7b8756a9c (target/i386: use gdb_ge

Re: [RFC v2 1/8] blkio: add io_uring block driver using libblkio

2022-04-12 Thread Stefan Hajnoczi
On Thu, Apr 07, 2022 at 10:34:07AM +0200, Kevin Wolf wrote: > Am 07.04.2022 um 10:25 hat Kevin Wolf geschrieben: > > Am 07.04.2022 um 09:22 hat Stefan Hajnoczi geschrieben: > > > On Wed, Apr 06, 2022 at 07:32:04PM +0200, Kevin Wolf wrote: > > > > Am 05.04.2022 um 17:33 hat Stefan Hajnoczi geschrieb

Re: [PATCH 0/3] vhost-user: Fixes for VHOST_USER_ADD/REM_MEM_REG

2022-04-12 Thread Stefan Hajnoczi
On Thu, Apr 07, 2022 at 03:36:54PM +0200, Kevin Wolf wrote: > While implementing a vhost-user-blk driver for libblkio, I found some > problems with VHOST_USER_ADD/REM_MEM_REG both in the spec and in the > implementations in QEMU and libvhost-user that this series addresses. > > I also noticed that

Re: [PATCH] contrib/vhost-user-blk: add missing GOptionEntry NULL terminator

2022-04-12 Thread Stefan Hajnoczi
On Mon, Apr 11, 2022 at 04:00:57PM +0100, Stefan Hajnoczi wrote: > The GLib documentation says "a NULL-terminated array of GOptionEntrys" > so we'd better make sure there is a terminator that lets > g_option_context_add_main_entries() know when the end of the array has > been reached. > > Signed-o

Re: [libvirt] [PATCH RESEND v2 0/4] re-introduce

2022-04-12 Thread Michael S. Tsirkin
On Tue, Apr 12, 2022 at 09:52:26AM +0530, Ani Sinha wrote: > On Tue, Apr 12, 2022 at 9:50 AM Ani Sinha wrote: > > > > On Tue, Mar 8, 2022 at 10:28 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Mar 08, 2022 at 10:15:49PM +0530, Ani Sinha wrote: > > > > > > > > Change log: > > > > v2: rebased th

[PATCH 2/2] acpi/nvdimm: Fix aml_or() and aml_and() in if clause

2022-04-12 Thread Robert Hoo
It should be some typo originally, where in If condition, using bitwise and/or, rather than logical and/or. The resulting change in AML code: If (((Local6 == Zero) | (Arg0 != Local0))) ==> If (((Local6 == Zero) || (Arg0 != Local0))) If (((ObjectType (Arg3) == 0x04) & (SizeOf (Arg3) == One))) ==>

Re: [libvirt] [PATCH RESEND v2 0/4] re-introduce

2022-04-12 Thread Michael S. Tsirkin
On Tue, Apr 12, 2022 at 09:50:15AM +0530, Ani Sinha wrote: > On Tue, Mar 8, 2022 at 10:28 PM Michael S. Tsirkin wrote: > > > > On Tue, Mar 08, 2022 at 10:15:49PM +0530, Ani Sinha wrote: > > > > > > Change log: > > > v2: rebased the patchset. Laine's response is appended at the end. > > > > > > I a

[PATCH 1/2] acpi/nvdimm: Create _LS{I,R,W} method for NVDIMM device

2022-04-12 Thread Robert Hoo
Since ACPI 6.2, previous NVDIMM/_DSM funcions "Get Namespace Label Data Size (function index 4)", "Get Namespace Label Data (function index 5)", "Set Namespace Label Data (function index 6)" has been deprecated by ACPI standard method _LSI, _LSR, _LSW respectively. Functions semantics are almost id

  1   2   >