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

2022-04-07 Thread Bin Meng
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 this bug forever. > > > > > >

Re: [PATCH v3] ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206)

2022-04-07 Thread Gerd Hoffmann
On Thu, Apr 07, 2022 at 06:46:00PM +0100, Peter Maydell wrote: > On Thu, 7 Apr 2022 at 10:21, Marc-André Lureau > wrote: > > > > > > > > On Thu, Apr 7, 2022 at 12:23 PM Mauro Matteo Cascella > > wrote: > >> > >> Prevent potential integer overflow by limiting 'width' and 'height' to > >>

[PULL 2/2] ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206)

2022-04-07 Thread Gerd Hoffmann
From: Mauro Matteo Cascella Prevent potential integer overflow by limiting 'width' and 'height' to 512x512. Also change 'datasize' type to size_t. Refer to security advisory https://starlabs.sg/advisories/22-4206/ for more information. Fixes: CVE-2021-4206 Signed-off-by: Mauro Matteo Cascella

[PULL 1/2] display/qxl-render: fix race condition in qxl_cursor (CVE-2021-4207)

2022-04-07 Thread Gerd Hoffmann
From: Mauro Matteo Cascella Avoid fetching 'width' and 'height' a second time to prevent possible race condition. Refer to security advisory https://starlabs.sg/advisories/22-4207/ for more information. Fixes: CVE-2021-4207 Signed-off-by: Mauro Matteo Cascella Reviewed-by: Marc-André Lureau

[PULL 0/2] Fixes 20220408 patches

2022-04-07 Thread Gerd Hoffmann
The following changes since commit 95a3fcc7487e5bef262e1f937ed8636986764c4e: Update version for v7.0.0-rc3 release (2022-04-06 21:26:13 +0100) are available in the Git repository at: git://git.kraxel.org/qemu tags/fixes-20220408-pull-request for you to fetch changes up to

Re: [PATCH 1/2] target/riscv: Use cpu_loop_exit_restore directly from mmu faults

2022-04-07 Thread Alistair Francis
On Fri, Apr 1, 2022 at 11:01 PM Richard Henderson wrote: > > The riscv_raise_exception function stores its argument into > exception_index and then exits to the main loop. When we > have already set exception_index, we can just exit directly. > > Signed-off-by: Richard Henderson Reviewed-by:

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

2022-04-07 Thread Sean Christopherson
On Tue, Apr 05, 2022, Michael Roth wrote: > On Thu, Mar 10, 2022 at 10:09:09PM +0800, Chao Peng wrote: > > static inline bool kvm_slot_is_private(const struct kvm_memory_slot *slot) > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > > index 67349421eae3..52319f49d58a 100644 > > ---

Re: [PATCH 4/7] virtio: don't read pending event on host notifier if disabled

2022-04-07 Thread Si-Wei Liu
On 4/7/2022 12:05 AM, Jason Wang wrote: 在 2022/4/6 上午3:18, Si-Wei Liu 写道: On 4/1/2022 7:00 PM, Jason Wang wrote: On Sat, Apr 2, 2022 at 4:37 AM Si-Wei Liu wrote: On 3/31/2022 1:36 AM, Jason Wang wrote: On Thu, Mar 31, 2022 at 12:41 AM Si-Wei Liu wrote: On 3/30/2022 2:14 AM, Jason

Re: [PATCH v7 00/12] Improve PMU support

2022-04-07 Thread Atish Patra
On Wed, Mar 30, 2022 at 5:01 PM Atish Patra wrote: > > The latest version of the SBI specification includes a Performance Monitoring > Unit(PMU) extension[1] which allows the supervisor to start/stop/configure > various PMU events. The Sscofpmf ('Ss' for Privileged arch and > Supervisor-level >

Re: [PATCH v9 33/45] cxl/cxl-host: Add memops for CFMWS region.

2022-04-07 Thread Tong Zhang
On 4/4/22 08:14, Jonathan Cameron wrote: > From: Jonathan Cameron > > > +static MemTxResult cxl_read_cfmws(void *opaque, hwaddr addr, uint64_t *data, > + unsigned size, MemTxAttrs attrs) > +{ > +CXLFixedWindow *fw = opaque; > +PCIDevice *d; > + > +d =

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

2022-04-07 Thread Denis V. Lunev
On 08.04.2022 00:51, 'Vladimir Sementsov-Ogievskiy' via den wrote: 07.04.2022 23:48, 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   *

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

2022-04-07 Thread Vladimir Sementsov-Ogievskiy
07.04.2022 23:48, 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

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

2022-04-07 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

[PATCH] target/riscv/pmp: simplify NAPOT address range computation

2022-04-07 Thread Nicolas Pitre
No need for ctz64() nor special case for -1. Signed-off-by: Nicolas Pitre diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index 81b61bb65c..151da3fa08 100644 --- a/target/riscv/pmp.c +++ b/target/riscv/pmp.c @@ -141,17 +141,9 @@ static void pmp_decode_napot(target_ulong a, target_ulong

Re: [PATCH qemu] ppc/spapr/ddw: Add 2M pagesize

2022-04-07 Thread Daniel Henrique Barboza
On 3/21/22 04:19, Alexey Kardashevskiy wrote: Recently the LoPAPR spec got a new 2MB pagesize to support in Dynamic DMA Windows API (DDW), this adds the new flag. Linux supports it since https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=38727311871 Signed-off-by:

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

2022-04-07 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Dave, please have a look at the HMP compatibility issue in > hmp-command.hx below. > > Kshitij Suri writes: > > > Currently screendump only supports PPM format, which is un-compressed and > > not > > standard. > > If "standard" means "have to

Re: [PATCH v3] ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206)

2022-04-07 Thread Peter Maydell
On Thu, 7 Apr 2022 at 10:21, Marc-André Lureau wrote: > > > > On Thu, Apr 7, 2022 at 12:23 PM Mauro Matteo Cascella > wrote: >> >> Prevent potential integer overflow by limiting 'width' and 'height' to >> 512x512. Also change 'datasize' type to size_t. Refer to security >> advisory

Re: [PATCH] x86: Implement Linear Address Masking support

2022-04-07 Thread Kirill A. Shutemov
On Thu, Apr 07, 2022 at 06:38:40PM +0200, Paolo Bonzini wrote: > On 4/7/22 17:27, Kirill A. Shutemov wrote: > > On Thu, Apr 07, 2022 at 07:28:54AM -0700, Richard Henderson wrote: > > > On 4/7/22 06:18, Kirill A. Shutemov wrote: > > > > > The new hook is incorrect, in that it doesn't apply to

Re: [PATCH v4 02/19] migration: Drop multifd tls_hostname cache

2022-04-07 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > The hostname is cached N times, N equals to the multifd channels. > > Drop that cache because after previous patch we've got s->hostname > being alive for the whole lifecycle of migration procedure. > > Cc: Juan Quintela > Cc: Daniel P. Berrange >

Re: [PATCH v4 01/19] migration: Postpone releasing MigrationState.hostname

2022-04-07 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > We used to release it right after migrate_fd_connect(). That's not good > enough when there're more than one socket pair required, because it'll be > needed to establish TLS connection for the rest channels. > > One example is multifd, where we copied over

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

2022-04-07 Thread Andy Lutomirski
On Thu, Apr 7, 2022, at 9:05 AM, Sean Christopherson wrote: > On Thu, Mar 10, 2022, Chao Peng wrote: >> Since page migration / swapping is not supported yet, MFD_INACCESSIBLE >> memory behave like longterm pinned pages and thus should be accounted to >> mm->pinned_vm and be restricted by

Re: [PATCH] x86: Implement Linear Address Masking support

2022-04-07 Thread Paolo Bonzini
On 4/7/22 17:27, Kirill A. Shutemov wrote: On Thu, Apr 07, 2022 at 07:28:54AM -0700, Richard Henderson wrote: On 4/7/22 06:18, Kirill A. Shutemov wrote: The new hook is incorrect, in that it doesn't apply to addresses along the tlb fast path. I'm not sure what you mean by that. tlb_hit()

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

2022-04-07 Thread Sean Christopherson
On Thu, Mar 10, 2022, Chao Peng wrote: > Since page migration / swapping is not supported yet, MFD_INACCESSIBLE > memory behave like longterm pinned pages and thus should be accounted to > mm->pinned_vm and be restricted by RLIMIT_MEMLOCK. > > Signed-off-by: Chao Peng > --- > mm/shmem.c | 25

Re: [PATCH] x86: Implement Linear Address Masking support

2022-04-07 Thread Kirill A. Shutemov
On Thu, Apr 07, 2022 at 07:28:54AM -0700, Richard Henderson wrote: > On 4/7/22 06:18, Kirill A. Shutemov wrote: > > > The new hook is incorrect, in that it doesn't apply to addresses along > > > the tlb fast path. > > > > I'm not sure what you mean by that. tlb_hit() mechanics works. We strip > >

[RFC PATCH] tests/qtest: pass stdout/stderr down to subtests

2022-04-07 Thread Alex Bennée
When trying to work out what the virtio-net-tests where doing it was hard because the g_test_trap_subprocess redirects all output to /dev/null. Lift this restriction by using the appropriate flags so you can see something similar to what the vhost-user-blk tests show when running. While we are at

Re: [PATCH for-7.0] virtio-iommu: use-after-free fix

2022-04-07 Thread Michael S. Tsirkin
On Thu, Apr 07, 2022 at 11:03:16AM +0100, Peter Maydell wrote: > On Thu, 7 Apr 2022 at 10:52, Michael S. Tsirkin wrote: > > > > From: Wentao Liang > > > > A potential Use-after-free was reported in virtio_iommu_handle_command > > when using virtio-iommu: > > > > > I find a potential

Re: [PATCH] x86: Implement Linear Address Masking support

2022-04-07 Thread Richard Henderson
On 4/7/22 06:18, Kirill A. Shutemov wrote: The new hook is incorrect, in that it doesn't apply to addresses along the tlb fast path. I'm not sure what you mean by that. tlb_hit() mechanics works. We strip the tag bits before tlb lookup. Could you elaborate? The fast path does not clear the

RE: [PATCH v1 4/4] hw/arm: versal: Connect the CRL

2022-04-07 Thread Frederic Konrad
> -Original Message- > From: Edgar E. Iglesias > Sent: 06 April 2022 18:43 > To: qemu-devel@nongnu.org > Cc: qemu-...@nongnu.org; peter.mayd...@linaro.org; > richard.hender...@linaro.org; alist...@alistair23.me; l...@lmichel.fr; > f4...@amsat.org; frasse.igles...@gmail.com; Francisco

RE: [PATCH v1 3/4] hw/misc: Add a model of the Xilinx Versal CRL

2022-04-07 Thread Frederic Konrad
> -Original Message- > From: Edgar E. Iglesias > Sent: 06 April 2022 18:43 > To: qemu-devel@nongnu.org > Cc: qemu-...@nongnu.org; peter.mayd...@linaro.org; > richard.hender...@linaro.org; alist...@alistair23.me; l...@lmichel.fr; > f4...@amsat.org; frasse.igles...@gmail.com; Francisco

RE: [PATCH v1 2/4] hw/arm: versal: Add the Cortex-R5Fs

2022-04-07 Thread Frederic Konrad
-Original Message- From: Edgar E. Iglesias Sent: 06 April 2022 18:43 To: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org; peter.mayd...@linaro.org; richard.hender...@linaro.org; alist...@alistair23.me; l...@lmichel.fr; f4...@amsat.org; frasse.igles...@gmail.com; Francisco Eduardo

RE: [PATCH v1 1/4] hw/arm: versal: Create an APU CPU Cluster

2022-04-07 Thread Frederic Konrad
-Original Message- From: Edgar E. Iglesias Sent: 06 April 2022 18:43 To: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org; peter.mayd...@linaro.org; richard.hender...@linaro.org; alist...@alistair23.me; l...@lmichel.fr; f4...@amsat.org; frasse.igles...@gmail.com; Francisco Eduardo

Re: [PATCH 1/1] qemu-img: properly list formats which have consistency check implemented

2022-04-07 Thread Eric Blake
On Thu, Apr 07, 2022 at 11:39:32AM +0300, Denis V. Lunev wrote: > Simple grep for the .bdrv_co_check callback presence gives the following > list of block drivers > * QED > * VDI > * VHDX > * VMDK > * Parallels > which have this callback. The presense of the callback means that > consistency check

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

2022-04-07 Thread Claudio Fontana
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: >>> * Claudio Fontana (cfont...@suse.de) wrote: On 3/28/22 10:31 AM, Daniel P. Berrangé wrote: > On Sat, Mar 26, 2022 at 04:49:46PM +0100,

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

2022-04-07 Thread Dr. David Alan Gilbert
* Claudio Fontana (cfont...@suse.de) wrote: > On 4/5/22 10:35 AM, Dr. David Alan Gilbert wrote: > > * Claudio Fontana (cfont...@suse.de) wrote: > >> On 3/28/22 10:31 AM, Daniel P. Berrangé wrote: > >>> On Sat, Mar 26, 2022 at 04:49:46PM +0100, Claudio Fontana wrote: > On 3/25/22 12:29 PM,

[PATCH 1/3] docs/vhost-user: Clarifications for VHOST_USER_ADD/REM_MEM_REG

2022-04-07 Thread Kevin Wolf
The specification for VHOST_USER_ADD/REM_MEM_REG messages is unclear in several points, which has led to clients having incompatible implementations. This changes the specification to be more explicit about them: * VHOST_USER_ADD_MEM_REG is not specified as receiving a file descriptor, though

Re: [PATCH v2 0/6] hw/riscv: Add TPM support to the virt board

2022-04-07 Thread Edgar E. Iglesias
On Thu, Apr 07, 2022 at 12:04:26PM +1000, Alistair Francis wrote: > From: Alistair Francis > > This series adds support for connecting TPM devices to the RISC-V virt > board. This is similar to how it works for the ARM virt board. > > This was tested by first creating an emulated TPM device: >

[PATCH 3/3] vhost-user: Don't pass file descriptor for VHOST_USER_REM_MEM_REG

2022-04-07 Thread Kevin Wolf
The spec clarifies now that QEMU should not send a file descriptor in a request to remove a memory region. Change it accordingly. For libvhost-user, this is a bug fix that makes it compatible with rust-vmm's implementation that doesn't send a file descriptor. Keep accepting, but ignoring a file

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

2022-04-07 Thread Kevin Wolf
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 you can use REM_MEM_REG or SET_MEM_TABLE to unmap a memory region

[PATCH v4 7/7] iotests: copy-before-write: add cases for cbw-timeout option

2022-04-07 Thread Vladimir Sementsov-Ogievskiy
Add two simple test-cases: timeout failure with break-snapshot-on-cbw-error behavior and similar with break-guest-write-on-cbw-error behavior. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/copy-before-write| 81 +++

[PATCH 2/3] libvhost-user: Fix extra vu_add/rem_mem_reg reply

2022-04-07 Thread Kevin Wolf
Outside of postcopy mode, neither VHOST_USER_ADD_MEM_REG nor VHOST_USER_REM_MEM_REG are supposed to send a reply unless explicitly requested with the need_reply flag. Their current implementation always sends a reply, even if it isn't requested. This confuses the master because it will interpret

[PATCH v4 4/7] util: add qemu-co-timeout

2022-04-07 Thread Vladimir Sementsov-Ogievskiy
Add new API, to make a time limited call of the coroutine. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- include/qemu/coroutine.h | 13 ++ util/qemu-co-timeout.c | 89 util/meson.build | 1 + 3 files changed,

[PATCH v4 6/7] block/copy-before-write: implement cbw-timeout option

2022-04-07 Thread Vladimir Sementsov-Ogievskiy
In some scenarios, when copy-before-write operations lasts too long time, it's better to cancel it. Most useful would be to use the new option together with on-cbw-error=break-snapshot: this way if cbw operation takes too long time we'll just cancel backup process but do not disturb the guest too

[PATCH v4 2/7] block/copy-before-write: add on-cbw-error open parameter

2022-04-07 Thread Vladimir Sementsov-Ogievskiy
Currently, behavior on copy-before-write operation failure is simple: report error to the guest. Let's implement alternative behavior: break the whole copy-before-write process (and corresponding backup job or NBD client) but keep guest working. It's needed if we consider guest stability as more

[PATCH v4 3/7] iotests: add copy-before-write: on-cbw-error tests

2022-04-07 Thread Vladimir Sementsov-Ogievskiy
Add tests for new option of copy-before-write filter: on-cbw-error. Note that we use QEMUMachine instead of VM class, because in further commit we'll want to use throttling which doesn't work with -accel qtest used by VM. We also touch pylintrc to not break iotest 297. Signed-off-by: Vladimir

[PATCH v4 1/7] block/copy-before-write: refactor option parsing

2022-04-07 Thread Vladimir Sementsov-Ogievskiy
We are going to add one more option of enum type. Let's refactor option parsing so that we can simply work with BlockdevOptionsCbw object. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- block/copy-before-write.c | 56 --- 1 file

[PATCH v4 0/7] copy-before-write: on-cbw-error and cbw-timeout

2022-04-07 Thread Vladimir Sementsov-Ogievskiy
Hi all! v4: Now based on master 01: add assertion and r-b 02: s/7.0/7.1/ and r-b 03: switch to QEMUMachine, touch-up pylintrc, drop r-b 04,05,06: add r-b 07: switch to QEMUMachine Here are two new options for copy-before-write filter: on-cbw-error allows to alter the behavior on

[PATCH v4 5/7] block/block-copy: block_copy(): add timeout_ns parameter

2022-04-07 Thread Vladimir Sementsov-Ogievskiy
Add possibility to limit block_copy() call in time. To be used in the next commit. As timed-out block_copy() call will continue in background anyway (we can't immediately cancel IO operation), it's important also give user a possibility to pass a callback, to do some additional actions on

Re: [PATCH] x86: Implement Linear Address Masking support

2022-04-07 Thread Kirill A. Shutemov
On Wed, Apr 06, 2022 at 10:34:41PM -0500, Richard Henderson wrote: > On 4/6/22 20:01, Kirill A. Shutemov wrote: > > Linear Address Masking feature makes CPU ignore some bits of the virtual > > address. These bits can be used to encode metadata. > > > > The feature is enumerated with

Re: [PULL 09/12] virtiofsd: Create new file with security context

2022-04-07 Thread Vivek Goyal
On Thu, Apr 07, 2022 at 01:44:35PM +0100, Dr. David Alan Gilbert wrote: > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > On Thu, 17 Feb 2022 at 17:40, Dr. David Alan Gilbert (git) > > wrote: > > > > > > From: Vivek Goyal > > > > > > This patch adds support for creating new file with

Re: [PATCH v2 5/5] machine: remove temporary inline functions

2022-04-07 Thread Edgar E. Iglesias
On Thu, Mar 31, 2022 at 01:53:12PM +0200, Damien Hedde wrote: > Now we have renamed all calls to these old functions, we > can delete the temporary inline we've defined. > > Signed-off-by: Damien Hedde > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias > --- >

Re: [PATCH v2 4/5] rename machine_class_allow_dynamic_sysbus_dev

2022-04-07 Thread Edgar E. Iglesias
On Thu, Mar 31, 2022 at 01:53:11PM +0200, Damien Hedde wrote: > All callsite are updated to the new function name > "machine_class_allow_dynamic_device" > > Signed-off-by: Damien Hedde > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias > --- > hw/arm/virt.c

Re: [PATCH v2 3/5] qdev-monitor: use the new user_creatable_requires_machine_allowance

2022-04-07 Thread Edgar E. Iglesias
On Thu, Mar 31, 2022 at 01:53:10PM +0200, Damien Hedde wrote: > Instead of checking if the device is a sysbus device, just check > the newly added flag in device class. > > Signed-off-by: Damien Hedde Reviewed-by: Edgar E. Iglesias > --- > > v2: update the flag name > --- >

Re: [PATCH v2 2/5] machine: update machine allowed list related functions/fields

2022-04-07 Thread Edgar E. Iglesias
On Thu, Mar 31, 2022 at 01:53:09PM +0200, Damien Hedde wrote: > The list will now accept any device (not only sysbus devices) so > we rename the related code and documentation. > > Create some temporary inline functions with old names until > we've udpated callsites as well. > > Signed-off-by:

Re: [PATCH v2 1/5] qdev: add user_creatable_requires_machine_allowance class flag

2022-04-07 Thread Edgar E. Iglesias
On Thu, Mar 31, 2022 at 01:53:08PM +0200, Damien Hedde wrote: > This flag will be used in device_add to check if > the device needs special allowance from the machine > model. > > It will replace the current check based only on the > device being a TYPE_SYB_BUS_DEVICE. > Looks good to me!

Re: [PULL 09/12] virtiofsd: Create new file with security context

2022-04-07 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Thu, 17 Feb 2022 at 17:40, Dr. David Alan Gilbert (git) > wrote: > > > > From: Vivek Goyal > > > > This patch adds support for creating new file with security context > > as sent by client. It basically takes three paths. > > > > - If no

Re: [Qemu-devel] [PULL 28/30] introduce xlnx-dp

2022-04-07 Thread Peter Maydell
On Thu, 7 Apr 2022 at 12:28, Frederic Konrad wrote: > So I'm not totally sure.. do you need a patch for 7.0.0? It's not a regression, so we can fix this for 7.1. thanks -- PMM

Re: [PATCH for-7.1 02/18] hw/intc/exynos4210_gic: Remove unused TYPE_EXYNOS4210_IRQ_GATE

2022-04-07 Thread Francisco Iglesias
On [2022 Apr 04] Mon 16:46:42, Peter Maydell wrote: > Now we have removed the only use of TYPE_EXYNOS4210_IRQ_GATE we can > delete the device entirely. > > Signed-off-by: Peter Maydell Reviewed-by: Francisco Iglesias > --- > hw/intc/exynos4210_gic.c | 107

Re: [Qemu-devel] [PULL 28/30] introduce xlnx-dp

2022-04-07 Thread Frederic Konrad
Le 4/7/22 à 12:32, Peter Maydell a écrit : On Tue, 14 Jun 2016 at 15:40, Peter Maydell wrote: From: KONRAD Frederic This is the implementation of the DisplayPort. It has an aux-bus to access dpcd and edid. Graphic plane is connected to the channel 3. Video plane is connected to the

Re: [PATCH 12/32] qga: replace deprecated g_get_current_time()

2022-04-07 Thread Marc-André Lureau
Hi On Thu, Apr 7, 2022 at 9:54 AM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > According to GLib API: > > g_get_current_time has been deprecated since version 2.62 and should not > > be used in newly-written code. GTimeVal is not

Re: [PATCH v3 7/7] iotests: copy-before-write: add cases for cbw-timeout option

2022-04-07 Thread Vladimir Sementsov-Ogievskiy
07.04.2022 12:19, Hanna Reitz wrote: On 06.04.22 20:08, Vladimir Sementsov-Ogievskiy wrote: Add two simple test-cases: timeout failure with break-snapshot-on-cbw-error behavior and similar with break-guest-write-on-cbw-error behavior. Signed-off-by: Vladimir Sementsov-Ogievskiy ---  

Re: [PATCH 1/2] block/throttle-groups: use QEMU_CLOCK_REALTIME for qtest too

2022-04-07 Thread Vladimir Sementsov-Ogievskiy
Thanks for explanation! 07.04.2022 09:42, Hanna Reitz wrote: On 06.04.22 17:32, Vladimir Sementsov-Ogievskiy wrote: Virtual clock just doesn't tick for iotests, and throttling just not work. Let's use realtime clock. It does tick when you make it take, specifically with the clock_step qtest

Re: [Qemu-devel] [PULL 28/30] introduce xlnx-dp

2022-04-07 Thread Peter Maydell
On Tue, 14 Jun 2016 at 15:40, Peter Maydell wrote: > > From: KONRAD Frederic > > This is the implementation of the DisplayPort. > It has an aux-bus to access dpcd and edid. > > Graphic plane is connected to the channel 3. > Video plane is connected to the channel 0. > Audio stream are connected

Re: [PULL 09/12] virtiofsd: Create new file with security context

2022-04-07 Thread Peter Maydell
On Thu, 17 Feb 2022 at 17:40, Dr. David Alan Gilbert (git) wrote: > > From: Vivek Goyal > > This patch adds support for creating new file with security context > as sent by client. It basically takes three paths. > > - If no security context enabled, then it continues to create files without >

Re: [PATCH for-7.0] virtio-iommu: use-after-free fix

2022-04-07 Thread Peter Maydell
On Thu, 7 Apr 2022 at 10:52, Michael S. Tsirkin wrote: > > From: Wentao Liang > > A potential Use-after-free was reported in virtio_iommu_handle_command > when using virtio-iommu: > > > I find a potential Use-after-free in QEMU 6.2.0, which is in > > virtio_iommu_handle_command()

Re: [PULL 0/3] virtio,pc: bugfixes

2022-04-07 Thread Michael S. Tsirkin
On Thu, Apr 07, 2022 at 10:18:24AM +0100, Peter Maydell wrote: > On Wed, 6 Apr 2022 at 22:11, Michael S. Tsirkin wrote: > > > > The following changes since commit 128e050d41794e61e5849c6c507160da5556ea61: > > > > hw/acpi/microvm: turn on 8042 bit in FADT boot architecture flags if > > present

[PATCH for-7.0] virtio-iommu: use-after-free fix

2022-04-07 Thread Michael S. Tsirkin
From: Wentao Liang A potential Use-after-free was reported in virtio_iommu_handle_command when using virtio-iommu: > I find a potential Use-after-free in QEMU 6.2.0, which is in > virtio_iommu_handle_command() (./hw/virtio/virtio-iommu.c). > > > Specifically, in the loop body, the variable

[PATCH v4] dump: Remove the sh_info variable

2022-04-07 Thread Janosch Frank
There's no need to have phdr_num and sh_info at the same time. We can make phdr_num 32 bit and set PN_XNUM when we write the header if phdr_num >= PN_XNUM. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson --- A question out of general curiosity: Is PN_XNUM a real concern anyway? Are

Re: [PATCH v1 4/4] hw/arm: versal: Connect the CRL

2022-04-07 Thread Francisco Iglesias
On Wed, Apr 06, 2022 at 06:43:03PM +0100, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Connect the CRL (Clock Reset LPD) to the Versal SoC. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- > hw/arm/xlnx-versal.c | 54

Re: [PATCH v1 3/4] hw/misc: Add a model of the Xilinx Versal CRL

2022-04-07 Thread Francisco Iglesias
On Wed, Apr 06, 2022 at 06:43:02PM +0100, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add a model of the Xilinx Versal CRL. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- > hw/misc/meson.build | 1 + > hw/misc/xlnx-versal-crl.c

Re: [PATCH v3] ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206)

2022-04-07 Thread Mauro Matteo Cascella
On Thu, Apr 7, 2022 at 11:17 AM Marc-André Lureau wrote: > > > > On Thu, Apr 7, 2022 at 12:23 PM Mauro Matteo Cascella > wrote: >> >> Prevent potential integer overflow by limiting 'width' and 'height' to >> 512x512. Also change 'datasize' type to size_t. Refer to security >> advisory

Re: [PATCH v1 2/4] hw/arm: versal: Add the Cortex-R5Fs

2022-04-07 Thread Francisco Iglesias
On Wed, Apr 06, 2022 at 06:43:01PM +0100, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add the Cortex-R5Fs of the Versal RPU (Real-time Processing Unit) > subsystem. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- > hw/arm/xlnx-versal-virt.c| 6

Re: [PULL 0/3] virtio,pc: bugfixes

2022-04-07 Thread Michael S. Tsirkin
On Thu, Apr 07, 2022 at 10:18:24AM +0100, Peter Maydell wrote: > On Wed, 6 Apr 2022 at 22:11, Michael S. Tsirkin wrote: > > > > The following changes since commit 128e050d41794e61e5849c6c507160da5556ea61: > > > > hw/acpi/microvm: turn on 8042 bit in FADT boot architecture flags if > > present

Re: [PATCH v3 6/7] block/copy-before-write: implement cbw-timeout option

2022-04-07 Thread Hanna Reitz
On 06.04.22 20:08, Vladimir Sementsov-Ogievskiy wrote: In some scenarios, when copy-before-write operations lasts too long time, it's better to cancel it. Most useful would be to use the new option together with on-cbw-error=break-snapshot: this way if cbw operation takes too long time we'll

Re: [PATCH v1 1/4] hw/arm: versal: Create an APU CPU Cluster

2022-04-07 Thread Francisco Iglesias
On Wed, Apr 06, 2022 at 06:43:00PM +0100, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Create an APU CPU Cluster. This is in preparation to add the RPU. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- > hw/arm/xlnx-versal.c | 9 - >

Re: [PATCH v3 5/7] block/block-copy: block_copy(): add timeout_ns parameter

2022-04-07 Thread Hanna Reitz
On 06.04.22 20:07, Vladimir Sementsov-Ogievskiy wrote: Add possibility to limit block_copy() call in time. To be used in the next commit. As timed-out block_copy() call will continue in background anyway (we can't immediately cancel IO operation), it's important also give user a possibility to

Re: [PATCH v3 4/7] util: add qemu-co-timeout

2022-04-07 Thread Hanna Reitz
On 06.04.22 20:07, Vladimir Sementsov-Ogievskiy wrote: Add new API, to make a time limited call of the coroutine. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/coroutine.h | 13 ++ util/qemu-co-timeout.c | 89 util/meson.build

Re: [PULL 0/3] virtio,pc: bugfixes

2022-04-07 Thread Peter Maydell
On Wed, 6 Apr 2022 at 22:11, Michael S. Tsirkin wrote: > > The following changes since commit 128e050d41794e61e5849c6c507160da5556ea61: > > hw/acpi/microvm: turn on 8042 bit in FADT boot architecture flags if > present (2022-03-07 17:43:14 -0500) > > are available in the Git repository at: > >

Re: [PATCH v3 7/7] iotests: copy-before-write: add cases for cbw-timeout option

2022-04-07 Thread Hanna Reitz
On 06.04.22 20:08, Vladimir Sementsov-Ogievskiy wrote: Add two simple test-cases: timeout failure with break-snapshot-on-cbw-error behavior and similar with break-guest-write-on-cbw-error behavior. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/copy-before-write

Re: [PATCH v3] ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206)

2022-04-07 Thread Marc-André Lureau
On Thu, Apr 7, 2022 at 12:23 PM Mauro Matteo Cascella wrote: > Prevent potential integer overflow by limiting 'width' and 'height' to > 512x512. Also change 'datasize' type to size_t. Refer to security > advisory https://starlabs.sg/advisories/22-4206/ for more information. > > Fixes:

Re: [PATCH v2] display/qxl-render: fix race condition in qxl_cursor (CVE-2021-4207)

2022-04-07 Thread Marc-André Lureau
On Thu, Apr 7, 2022 at 12:11 PM Mauro Matteo Cascella wrote: > Avoid fetching 'width' and 'height' a second time to prevent possible > race condition. Refer to security advisory > https://starlabs.sg/advisories/22-4207/ for more information. > > Fixes: CVE-2021-4207 > Signed-off-by: Mauro Matteo

[PATCH 1/1] qemu-img: properly list formats which have consistency check implemented

2022-04-07 Thread Denis V. Lunev
Simple grep for the .bdrv_co_check callback presence gives the following list of block drivers * QED * VDI * VHDX * VMDK * Parallels which have this callback. The presense of the callback means that consistency check is supported. The patch updates documentation accordingly. Signed-off-by: Denis

Re: [RFC PATCH] tests/qtest: properly initialise the vring used idx

2022-04-07 Thread Eric Auger
Hi Alex, On 4/6/22 7:33 PM, Alex Bennée wrote: > Eric noticed while attempting to enable the vhost-user-blk-test for > Aarch64 that that things didn't work unless he put in a dummy > guest_malloc() at the start of the test. Without it > qvirtio_wait_used_elem() would assert when it reads a junk

Re: [PATCH v3 4/5] tests/qtest/vhost-user-blk-test: Temporary hack to get tests passing on aarch64

2022-04-07 Thread Eric Auger
Hi Alex, On 4/6/22 7:34 PM, Alex Bennée wrote: > Eric Auger writes: > >> When run on ARM, basic and indirect tests currently fail with the >> following error: >> >> ERROR:../tests/qtest/libqos/virtio.c:224:qvirtio_wait_used_elem: >> assertion failed (got_desc_idx == desc_idx): (50331648 == 0) >>

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

2022-04-07 Thread Kevin Wolf
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 geschrieben: > > > > libblkio (https://gitlab.com/libblkio/libblkio/) is a

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

2022-04-07 Thread Kevin Wolf
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 geschrieben: > > > libblkio (https://gitlab.com/libblkio/libblkio/) is a library for > > > high-performance disk I/O. It currently

Re: [PATCH v3 2/7] block/copy-before-write: add on-cbw-error open parameter

2022-04-07 Thread Hanna Reitz
On 06.04.22 20:07, Vladimir Sementsov-Ogievskiy wrote: Currently, behavior on copy-before-write operation failure is simple: report error to the guest. Let's implement alternative behavior: break the whole copy-before-write process (and corresponding backup job or NBD client) but keep guest

Re: [RFC PATCH] tests/qtest: properly initialise the vring used idx

2022-04-07 Thread Alex Bennée
Peter Maydell writes: > On Wed, 6 Apr 2022 at 21:07, Alex Bennée wrote: >> >> >> Peter Maydell writes: >> > Guest memory is generally zero at startup. Do we manage to >> > hit the bit of memory at the start of the virt machine's RAM >> > where we store the DTB ? (As you say, initializing the

[PATCH v3] ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206)

2022-04-07 Thread Mauro Matteo Cascella
Prevent potential integer overflow by limiting 'width' and 'height' to 512x512. Also change 'datasize' type to size_t. Refer to security advisory https://starlabs.sg/advisories/22-4206/ for more information. Fixes: CVE-2021-4206 Signed-off-by: Mauro Matteo Cascella --- v3: - fix CVE id

[PATCH v2] display/qxl-render: fix race condition in qxl_cursor (CVE-2021-4207)

2022-04-07 Thread Mauro Matteo Cascella
Avoid fetching 'width' and 'height' a second time to prevent possible race condition. Refer to security advisory https://starlabs.sg/advisories/22-4207/ for more information. Fixes: CVE-2021-4207 Signed-off-by: Mauro Matteo Cascella --- v2: - fix CVE id (CVE-2021-4207 instead of CVE-2022-4207)

[PATCH] hw/arm/smmuv3: Pass the real perm to returned IOMMUTLBEntry in smmuv3_translate()

2022-04-07 Thread chenxiang via
From: Xiang Chen In function memory_region_iommu_replay(), it decides to notify() or not according to the perm of returned IOMMUTLBEntry. But for smmuv3, the returned perm is always IOMMU_NONE even if the translation success. Pass the real perm to returned IOMMUTLBEntry to avoid the issue.

Re: [PATCH v4] vdpa: reset the backend device in the end of vhost_net_stop()

2022-04-07 Thread Jason Wang
在 2022/4/2 上午11:53, Michael Qiu 写道: On 2022/4/2 10:20, Jason Wang wrote: Adding Michael. On Sat, Apr 2, 2022 at 7:08 AM Si-Wei Liu wrote: On 3/31/2022 7:53 PM, Jason Wang wrote: On Fri, Apr 1, 2022 at 9:31 AM Michael Qiu wrote: Currently, when VM poweroff, it will trigger vdpa

Re: [PATCH v4] vdpa: reset the backend device in the end of vhost_net_stop()

2022-04-07 Thread Jason Wang
在 2022/4/6 上午8:56, Si-Wei Liu 写道: On 4/1/2022 7:20 PM, Jason Wang wrote: Adding Michael. On Sat, Apr 2, 2022 at 7:08 AM Si-Wei Liu wrote: On 3/31/2022 7:53 PM, Jason Wang wrote: On Fri, Apr 1, 2022 at 9:31 AM Michael Qiu wrote: Currently, when VM poweroff, it will trigger vdpa

Re: [PATCH 1/3] vhost: Refactor vhost_reset_device() in VhostOps

2022-04-07 Thread Jason Wang
在 2022/4/2 下午1:14, Michael Qiu 写道: On 2022/4/2 10:38, Jason Wang wrote: 在 2022/4/1 下午7:06, Michael Qiu 写道: Currently in vhost framwork, vhost_reset_device() is misnamed. Actually, it should be vhost_reset_owner(). In vhost user, it make compatible with reset device ops, but vhost kernel

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

2022-04-07 Thread Stefan Hajnoczi
On Wed, Apr 06, 2022 at 07:32:04PM +0200, Kevin Wolf wrote: > Am 05.04.2022 um 17:33 hat Stefan Hajnoczi geschrieben: > > libblkio (https://gitlab.com/libblkio/libblkio/) is a library for > > high-performance disk I/O. It currently supports io_uring with > > additional drivers planned. > > > >

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

2022-04-07 Thread Claudio Fontana
On 4/5/22 10:35 AM, Dr. David Alan Gilbert wrote: > * Claudio Fontana (cfont...@suse.de) wrote: >> On 3/28/22 10:31 AM, Daniel P. Berrangé wrote: >>> On Sat, Mar 26, 2022 at 04:49:46PM +0100, Claudio Fontana wrote: On 3/25/22 12:29 PM, Daniel P. Berrangé wrote: > On Fri, Mar 18, 2022 at

Re: [PATCH v3 1/7] block/copy-before-write: refactor option parsing

2022-04-07 Thread Hanna Reitz
On 06.04.22 20:07, Vladimir Sementsov-Ogievskiy wrote: We are going to add one more option of enum type. Let's refactor option parsing so that we can simply work with BlockdevOptionsCbw object. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 55

Re: [PATCH 4/7] virtio: don't read pending event on host notifier if disabled

2022-04-07 Thread Jason Wang
在 2022/4/6 上午3:18, Si-Wei Liu 写道: On 4/1/2022 7:00 PM, Jason Wang wrote: On Sat, Apr 2, 2022 at 4:37 AM Si-Wei Liu wrote: On 3/31/2022 1:36 AM, Jason Wang wrote: On Thu, Mar 31, 2022 at 12:41 AM Si-Wei Liu wrote: On 3/30/2022 2:14 AM, Jason Wang wrote: On Wed, Mar 30, 2022 at 2:33

Re: [RFC PATCH] tests/qtest: properly initialise the vring used idx

2022-04-07 Thread Stefan Hajnoczi
On Wed, Apr 06, 2022 at 06:33:56PM +0100, Alex Bennée wrote: > Eric noticed while attempting to enable the vhost-user-blk-test for > Aarch64 that that things didn't work unless he put in a dummy > guest_malloc() at the start of the test. Without it > qvirtio_wait_used_elem() would assert when it

Re: [PATCH 1/2] block/throttle-groups: use QEMU_CLOCK_REALTIME for qtest too

2022-04-07 Thread Hanna Reitz
On 06.04.22 17:32, Vladimir Sementsov-Ogievskiy wrote: Virtual clock just doesn't tick for iotests, and throttling just not work. Let's use realtime clock. It does tick when you make it take, specifically with the clock_step qtest command.  093 does this, and so with this patch, it fails,

[ANNOUNCE] QEMU 7.0.0-rc3 is now available

2022-04-07 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the fourth 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-rc3.tar.xz

  1   2   >