Re: Plugin Register Accesses

2020-12-08 Thread Aaron Lindsay via
On Dec 08 12:17, Alex Bennée wrote: > Aaron Lindsay writes: > > > I'm trying to migrate to using the new plugin interface. I see the > > following in include/qemu/qemu-plugin.h: > > > >> enum qemu_plugin_cb_flags { > >> QEMU_PLUGIN_CB_NO_REGS, /* callback does not access the CPU's regs */ > >

Re: [PATCH v2 5/9] vnc: add pseudo encodings

2020-12-08 Thread Daniel P . Berrangé
On Tue, Dec 08, 2020 at 12:57:33PM +0100, Gerd Hoffmann wrote: > Add #defines for two new pseudo encodings: > * cursor with alpha channel. > * extended desktop resize. > > https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#pseudo-encodings > > Signed-off-by: Gerd Hoffmann > Reviewed

Re: [PATCH v2 4/9] vnc: drop unused copyrect feature

2020-12-08 Thread Daniel P . Berrangé
On Tue, Dec 08, 2020 at 12:57:32PM +0100, Gerd Hoffmann wrote: > vnc stopped using the copyrect pseudo encoding in 2017, in commit > 50628d3479e4 ("cirrus/vnc: zap bitblit support from console code.") > So we can drop the now unused copyrect feature bit. > > Signed-off-by: Gerd Hoffmann > Reviewe

Re: [PATCH v2 7/9] vnc: force initial resize message

2020-12-08 Thread Daniel P . Berrangé
On Tue, Dec 08, 2020 at 12:57:35PM +0100, Gerd Hoffmann wrote: > The vnc server should send desktop resize notifications unconditionally > on a new client connect, for feature negotiation reasons. Add a bool > flag to vnc_desktop_resize() to force sending the message even in case > there is no siz

Re: [PATCH] s390x: pv: Fence additional unavailable SCLP facilities for PV guests

2020-12-08 Thread David Hildenbrand
On 08.12.20 14:29, Christian Borntraeger wrote: > > > On 04.12.20 09:36, Janosch Frank wrote: >> There's no VSIE support for a protected guest, so let's better not >> advertise it and its support facilities. >> >> Signed-off-by: Janosch Frank > > Looks sane. Assuming that all features that depe

[Bug 1868221] Re: /usr/share/applications/qemu.desktop should have an "Exec=" key.

2020-12-08 Thread Lockywolf
I can confirm that this behaviour is still present on kde 5.20.4. You can run e.g. khelpcenter and observe: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but no Exec line kf.service.sycoca: Invalid Service : "/usr/share/applications/q

[PATCH] block/nvme: Fix possible array index out of bounds in nvme_process_completion()

2020-12-08 Thread Alex Chen
The range of 'cid' is [1, NVME_QUEUE_SIZE-1], so when 'cid' is equal to NVME_QUEUE_SIZE, it should be continued, otherwise it will lead to array index out of bounds when accessing 'q->reqs[cid-1]' Reported-by: Euler Robot Signed-off-by: Alex Chen --- block/nvme.c | 2 +- 1 file changed, 1 inser

[PATCH 5/5] contrib: Open brace '{' following struct go on the same line

2020-12-08 Thread zhouyang (T)
I found some style problems while check the code using checkpatch.pl. This commit fixs the issue below: ERROR: that open brace { should be on the previous line Signed-off-by: zhouyang (T) --- contrib/plugins/howvec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/p

[PATCH 0/5] Fix some style problems in contrib

2020-12-08 Thread zhouyang (T)
I found some style problems while check the code using checkpatch.pl and fixed them, please review. zhouyang (T) (5): contrib: Don't use '#' flag of printf format contrib: Fix some code style problems, ERROR: "foo * bar" should be "foo *bar" contrib: Add spaces around operator contrib

Re: [PATCH v1 0/2] Add timeout mechanism to qmp actions

2020-12-08 Thread Glauber Costa
On Tue, Dec 8, 2020 at 8:11 AM Stefan Hajnoczi wrote: > > On Thu, Oct 22, 2020 at 05:29:16PM +0100, Fam Zheng wrote: > > On Tue, 2020-10-20 at 09:34 +0800, Zhenyu Ye wrote: > > > On 2020/10/19 21:25, Paolo Bonzini wrote: > > > > On 19/10/20 14:40, Zhenyu Ye wrote: > > > > > The kernel backtrace fo

[PATCH 3/5] contrib: Add spaces around operator

2020-12-08 Thread zhouyang (T)
I found some style problems while check the code using checkpatch.pl. This commit fixs the issue below: ERROR: spaces required around that '*' Signed-off-by: zhouyang (T) --- contrib/ivshmem-server/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ivshmem-server/

[PATCH 2/5] contrib: Fix some code style problems, ERROR: "foo * bar" should be "foo *bar"

2020-12-08 Thread zhouyang (T)
I found some style problems while check the code using checkpatch.pl. This commit fixs the issue below: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: zhouyang (T) --- contrib/plugins/howvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/howvec.c b/

[PATCH 4/5] contrib: space required after that ','

2020-12-08 Thread zhouyang (T)
I found some style problems while check the code using checkpatch.pl. This commit fixs the issue below: ERROR: space required after that ',' Signed-off-by: zhouyang (T) --- contrib/plugins/howvec.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/plugins/h

[Bug 1868221] Re: /usr/share/applications/qemu.desktop should have an "Exec=" key.

2020-12-08 Thread Lockywolf
A bug on KDE bug tracker: https://bugs.kde.org/show_bug.cgi?id=430157 ** Bug watch added: KDE Bug Tracking System #430157 https://bugs.kde.org/show_bug.cgi?id=430157 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.l

[PATCH 1/5] contrib: Don't use '#' flag of printf format

2020-12-08 Thread zhouyang (T)
I found some style problems while check the code using checkpatch.pl. This commit fixs the misuse of '#' flag of printf format Signed-off-by: zhouyang (T) --- contrib/plugins/hotblocks.c | 2 +- contrib/plugins/hotpages.c | 2 +- contrib/plugins/howvec.c| 2 +- contrib/plugins/lockstep.c |

Re: [RFC PATCH] python: add __repr__ to ConsoleSocket to aid debugging

2020-12-08 Thread John Snow
On 12/7/20 4:35 PM, Willian Rampazzo wrote: We could use something more pythonic for this file. Instead of 3 string concatenations, my suggestion is to go with string formatting, like: s = "%s, logfile=%s, drain_thread=%s>" % (s, self._logfile, self._drain_thread) As str is immutable in Python

[Bug 1906905] Re: [PATCH] hw/timer/slavio_timer: Allow 64-bit accesses

2020-12-08 Thread Mark Cave-Ayland
On 05/12/2020 15:09, Philippe Mathieu-Daudé wrote: > Per the "NCR89C105 Chip Specification" referenced in the header: > >Chip-level Address Map > >-- >| 1D0 -> | Counter/Timers

Re: [PATCH v3 1/2] crypto: luks: Fix tiny memory leak

2020-12-08 Thread Alberto Garcia
On Tue 08 Dec 2020 03:21:58 PM CET, Maxim Levitsky wrote: > When the underlying block device doesn't support the > bdrv_co_delete_file interface, an 'Error' object was leaked. > > Signed-off-by: Maxim Levitsky Reviewed-by: Alberto Garcia Berto

Re: [PATCH] kvm: Take into account the unaligned section size when preparing bitmap

2020-12-08 Thread Peter Xu
Hi, Zenghui, On Tue, Dec 08, 2020 at 07:40:13PM +0800, Zenghui Yu wrote: > The kernel KVM_CLEAR_DIRTY_LOG interface has align requirement on both the > start and the size of the given range of pages. We have been careful to > handle the unaligned cases when performing CLEAR on one slot. But it see

Re: [PATCH v3 2/2] block: qcow2: remove the created file on initialization error

2020-12-08 Thread Maxim Levitsky
On Tue, 2020-12-08 at 16:26 +0100, Alberto Garcia wrote: > On Tue 08 Dec 2020 03:21:59 PM CET, Maxim Levitsky wrote: > > If the qcow initialization fails, we should remove the file if it was > > already created, to avoid leaving stale files around. > > > > We already do this for luks raw images. >

Re: [PATCH v3 2/2] block: qcow2: remove the created file on initialization error

2020-12-08 Thread Alberto Garcia
On Tue 08 Dec 2020 03:21:59 PM CET, Maxim Levitsky wrote: > If the qcow initialization fails, we should remove the file if it was > already created, to avoid leaving stale files around. > > We already do this for luks raw images. > > Signed-off-by: Maxim Levitsky Reviewed-by: Alberto Garcia >

Re: [PATCH 1/1] spapr.c: set a 'kvm-type' default value instead of relying on NULL

2020-12-08 Thread Daniel Henrique Barboza
On 12/8/20 11:33 AM, Greg Kurz wrote: Hi Daniel, On Tue, 8 Dec 2020 10:45:36 -0300 Daniel Henrique Barboza wrote: spapr_kvm_type() is considering 'vm_type=NULL' as a valid input, where the function returns 0. This is relying on the current QEMU machine options handling logic, where the ab

Re: [PATCH 3/3] block: Fix deadlock in bdrv_co_yield_to_drain()

2020-12-08 Thread Vladimir Sementsov-Ogievskiy
03.12.2020 20:23, Kevin Wolf wrote: If bdrv_co_yield_to_drain() is called for draining a block node that runs in a different AioContext, it keeps that AioContext locked while it yields and schedules a BH in the AioContext to do the actual drain. As long as executing the BH is the very next thing

Re: [PATCH v5 1/4] migration: introduce 'background-snapshot' migration capability

2020-12-08 Thread Peter Xu
On Fri, Dec 04, 2020 at 12:31:00PM +0300, Andrey Gruzdev wrote: > +static > +WriteTrackingSupport migrate_query_write_tracking(void) > +{ > +static WriteTrackingSupport wt_support = WT_SUPPORT_UNKNOWN; Better to be non-static - consider uncompatible memory can be hot plugged after it's once se

Re: [PATCH v3 2/2] block: qcow2: remove the created file on initialization error

2020-12-08 Thread Vladimir Sementsov-Ogievskiy
08.12.2020 17:21, Maxim Levitsky wrote: If the qcow initialization fails, we should remove the file if it was already created, to avoid leaving stale files around. We already do this for luks raw images. Signed-off-by: Maxim Levitsky --- block/qcow2.c | 13 + 1 file changed, 13

[PATCH v7] hw/i386/pc: add max combined fw size as machine configuration option

2020-12-08 Thread erich . mcmillan
From: Erich-McMillan At Hewlett Packard Inc. we have a need for increased fw size to enable testing of our custom fw. Rebase v6 patch to d73c46e4 Signed-off-by: Erich McMillan --- Changes since v6: Rebase v6 onto d73c46e4 hw/i386/pc.c | 51

Re: [PATCH v6] hw/i386/pc: add max combined fw size as machine configuration option

2020-12-08 Thread McMillan, Erich
Hi Michael, Apologies for the delay, I just sent out a rebased patch. Based on latest tags looks like release may already have been started? -Erich From: McMillan, Erich Sent: Wednesday, December 2, 2020 8:31 AM To: Michael S. Tsirkin Cc: qemu-devel@nongnu.org

Re: [PATCH] linux-user: add option to chroot before emulation

2020-12-08 Thread Matteo Croce
On Tue, Dec 8, 2020 at 9:21 AM Laurent Vivier wrote: > > Le 08/12/2020 à 01:17, Matteo Croce a écrit : > > From: Matteo Croce > > > > Add a '-c' option which does a chroot() just before starting the > > emulation. This is useful when the static QEMU user binary can't > > be copied into the target

Re: [PATCH 3/3] s390x/cpu: Use timer_free() in the finalize function to avoid memleaks

2020-12-08 Thread Cornelia Huck
On Fri, 4 Dec 2020 16:12:09 +0800 Gan Qixin wrote: > When running device-introspect-test, a memory leak occurred in the > s390_cpu_initfn > function, this patch use timer_free() in the finalize function to fix it. > > ASAN shows memory leak stack: > > Direct leak of 3552 byte(s) in 74 object(s

Re: [PATCH] s390x: pv: Fence additional unavailable SCLP facilities for PV guests

2020-12-08 Thread Christian Borntraeger
On 08.12.20 15:55, David Hildenbrand wrote: > On 08.12.20 14:29, Christian Borntraeger wrote: >> >> >> On 04.12.20 09:36, Janosch Frank wrote: >>> There's no VSIE support for a protected guest, so let's better not >>> advertise it and its support facilities. >>> >>> Signed-off-by: Janosch Frank

Re: [PATCH] target/arm: do not use cc->do_interrupt for KVM directly

2020-12-08 Thread Claudio Fontana
On 12/8/20 3:34 PM, Philippe Mathieu-Daudé wrote: > On 12/8/20 2:55 PM, Claudio Fontana wrote: >> On 12/8/20 2:51 PM, Claudio Fontana wrote: >>> On 12/8/20 2:27 PM, Philippe Mathieu-Daudé wrote: On 12/7/20 10:50 PM, Peter Maydell wrote: > On Mon, 7 Dec 2020 at 21:26, Eduardo Habkost wrote

Re: [PATCH] s390x: pv: Fence additional unavailable SCLP facilities for PV guests

2020-12-08 Thread David Hildenbrand
On 08.12.20 17:11, Christian Borntraeger wrote: > > > On 08.12.20 15:55, David Hildenbrand wrote: >> On 08.12.20 14:29, Christian Borntraeger wrote: >>> >>> >>> On 04.12.20 09:36, Janosch Frank wrote: There's no VSIE support for a protected guest, so let's better not advertise it and it

Re: [PATCH] acpi: Permit OEM ID and OEM table ID fields to be changed

2020-12-08 Thread Igor Mammedov
On Sun, 6 Dec 2020 23:28:23 +0200 Marian Posteuca wrote: > Qemu's ACPI table generation sets the fields OEM ID and OEM table ID > to "BOCHS " and "BXPC" where "" is replaced by the ACPI > table name. > > Some games like Red Dead Redemption 2 seem to check the ACPI OEM ID > and OEM table

Re: [PATCH v3 2/2] block: qcow2: remove the created file on initialization error

2020-12-08 Thread Maxim Levitsky
On Tue, 2020-12-08 at 18:47 +0300, Vladimir Sementsov-Ogievskiy wrote: > 08.12.2020 17:21, Maxim Levitsky wrote: > > If the qcow initialization fails, we should remove the file if it was > > already created, to avoid leaving stale files around. > > > > We already do this for luks raw images. > >

Re: [PATCH] target/arm: do not use cc->do_interrupt for KVM directly

2020-12-08 Thread Eduardo Habkost
On Tue, Dec 08, 2020 at 03:34:03PM +0100, Philippe Mathieu-Daudé wrote: > On 12/8/20 2:55 PM, Claudio Fontana wrote: > > On 12/8/20 2:51 PM, Claudio Fontana wrote: > >> On 12/8/20 2:27 PM, Philippe Mathieu-Daudé wrote: > >>> On 12/7/20 10:50 PM, Peter Maydell wrote: > On Mon, 7 Dec 2020 at 21:

Re: [PATCH 2/3] block: Fix locking in qmp_block_resize()

2020-12-08 Thread Kevin Wolf
Am 08.12.2020 um 15:46 hat Vladimir Sementsov-Ogievskiy geschrieben: > 03.12.2020 20:23, Kevin Wolf wrote: > > The drain functions assume that we hold the AioContext lock of the > > drained block node. Make sure to actually take the lock. > > > > Cc: qemu-sta...@nongnu.org > > Fixes: eb94b81a94bce

Re: [PATCH 00/17] target/mips: Convert MSA ASE to decodetree

2020-12-08 Thread Philippe Mathieu-Daudé
On 12/8/20 1:39 AM, Philippe Mathieu-Daudé wrote: > On Tue, Dec 8, 2020 at 1:37 AM Philippe Mathieu-Daudé wrote: >> >> Finally, we use decodetree with the MIPS target. >> >> Starting easy with the MSA ASE. 2700+ lines extracted >> from helper.h and translate.c, now built as an new >> object: mod-m

[PATCH v2 09/10] virtio-mem: Require only coordinated discards

2020-12-08 Thread David Hildenbrand
We implement the RamDiscardMgr interface and only require coordinated discarding of RAM to work. Reviewed-by: Dr. David Alan Gilbert Cc: Paolo Bonzini Cc: "Michael S. Tsirkin" Cc: Alex Williamson Cc: Dr. David Alan Gilbert Cc: Igor Mammedov Cc: Pankaj Gupta Cc: Peter Xu Cc: Auger Eric Cc:

Re: [PATCH 0/3] Fix some style problems in monitor

2020-12-08 Thread Dr. David Alan Gilbert
* Yutao Ai (aiyu...@huawei.com) wrote: > I find some style problems while using checkpatch.pl to check monitor codes. > And I fixed these style problems in the submit patches. > > Yutao Ai (3): > monitor:open brace '{' following struct go on the same line > monitor:braces {} are necessary for

[PATCH v2 01/10] memory: Introduce RamDiscardMgr for RAM memory regions

2020-12-08 Thread David Hildenbrand
We have some special RAM memory regions (managed by virtio-mem), whereby the guest agreed to only use selected memory ranges. "unused" parts are discarded so they won't consume memory - to logically unplug these memory ranges. Before the VM is allowed to use such logically unplugged memory again, c

[PATCH v2 03/10] virtio-mem: Implement RamDiscardMgr interface

2020-12-08 Thread David Hildenbrand
Let's properly notify when (un)plugging blocks, after discarding memory and before allowing the guest to consume memory. Handle errors from notifiers gracefully (e.g., no remaining VFIO mappings) when plugging, rolling back the change and telling the guest that the VM is busy. One special case to

[PATCH v2 02/10] virtio-mem: Factor out traversing unplugged ranges

2020-12-08 Thread David Hildenbrand
Let's factor out the core logic, to be reused soon. Cc: Paolo Bonzini Cc: "Michael S. Tsirkin" Cc: Alex Williamson Cc: Dr. David Alan Gilbert Cc: Igor Mammedov Cc: Pankaj Gupta Cc: Peter Xu Cc: Auger Eric Cc: Wei Yang Cc: teawater Cc: Marek Kedzierski Signed-off-by: David Hildenbrand -

[PATCH v2 04/10] vfio: Query and store the maximum number of DMA mappings

2020-12-08 Thread David Hildenbrand
Let's query the maximum number of DMA mappings by querying the available mappings when creating the container. In addition, count the number of DMA mappings and warn when we would exceed it. This is a preparation for RamDiscardMgr which might create quite some DMA mappings over time, and we at lea

[PATCH v2 08/10] softmmu/physmem: Extend ram_block_discard_(require|disable) by two discard types

2020-12-08 Thread David Hildenbrand
We want to separate the two cases whereby we discard ram - uncoordinated: e.g., virito-balloon - coordinated: e.g., virtio-mem coordinated via the RamDiscardMgr Cc: Paolo Bonzini Cc: "Michael S. Tsirkin" Cc: Alex Williamson Cc: Dr. David Alan Gilbert Cc: Igor Mammedov Cc: Pankaj Gupta Cc: Pe

[PATCH v2 00/10] virtio-mem: vfio support

2020-12-08 Thread David Hildenbrand
A virtio-mem device manages a memory region in guest physical address space, represented as a single (currently large) memory region in QEMU, mapped into system memory address space. Before the guest is allowed to use memory blocks, it must coordinate with the hypervisor (plug blocks). After a rebo

[PATCH v2 06/10] vfio: Support for RamDiscardMgr in the vIOMMU case

2020-12-08 Thread David Hildenbrand
vIOMMU support works already with RamDiscardMgr as long as guests only map populated memory. Both, populated and discarded memory is mapped into &address_space_memory, where vfio_get_xlat_addr() will find that memory, to create the vfio mapping. Sane guests will never map discarded memory (e.g., u

Re: [Virtio-fs] [PATCH] virtiofsd: make the debug log timestamp on stderr more human-readable

2020-12-08 Thread Vivek Goyal
On Tue, Dec 08, 2020 at 06:50:43AM +0100, Laszlo Ersek wrote: > The current timestamp format doesn't help me visually notice small jumps > in time ("small" as defined on human scale, such as a few seconds or a few > ten seconds). Replace it with a local time format where such differences > stand ou

[PATCH v2 05/10] vfio: Support for RamDiscardMgr in the !vIOMMU case

2020-12-08 Thread David Hildenbrand
Implement support for RamDiscardMgr, to prepare for virtio-mem support. Instead of mapping the whole memory section, we only map "populated" parts and update the mapping when notified about discarding/population of memory via the RamDiscardListener. Similarly, when syncing the dirty bitmaps, sync o

[PATCH v2 10/10] vfio: Disable only uncoordinated discards

2020-12-08 Thread David Hildenbrand
We support coordinated discarding of RAM using the RamDiscardMgr. Let's unlock support for coordinated discards, keeping uncoordinated discards (e.g., via virtio-balloon) disabled. This unlocks virtio-mem + vfio. Note that vfio used via "nvme://" by the block layer has to be implemented/unlocked s

[PATCH v2 07/10] softmmu/physmem: Don't use atomic operations in ram_block_discard_(disable|require)

2020-12-08 Thread David Hildenbrand
We have users in migration context that don't hold the BQL (when finishing migration). To prepare for further changes, use a dedicated mutex instead of atomic operations. Keep using qatomic_read ("READ_ONCE") for the functions that only extract the current state (e.g., used by virtio-balloon), lock

[PATCH v2] ppc/spapr: cleanup -machine pseries,nvdimm=X handling

2020-12-08 Thread Igor Mammedov
Since NVDIMM support was introduced on pseries machine, it ignored machine's nvdimm=on|off option and effectively was always enabled on machines that support NVDIMM. Later on commit (28f5a716212 ppc/spapr_nvdimm: do not enable support with 'nvdimm=off') makes QEMU error out in case user explicitl

Re: [Virtio-fs] [PATCH] virtiofsd: update FUSE_FORGET comment on "lo_inode.nlookup"

2020-12-08 Thread Vivek Goyal
On Tue, Dec 08, 2020 at 08:39:36AM +0100, Laszlo Ersek wrote: > Miklos confirms it's *only* the FUSE_FORGET request that the client can > use for decrementing "lo_inode.nlookup". > > Cc: "Dr. David Alan Gilbert" > Cc: Miklos Szeredi > Cc: Stefan Hajnoczi > Fixes: 1222f015558fc34cea02aa3a5a92de6

Re: [PATCH v3 2/2] block: qcow2: remove the created file on initialization error

2020-12-08 Thread Vladimir Sementsov-Ogievskiy
08.12.2020 19:27, Maxim Levitsky wrote: On Tue, 2020-12-08 at 18:47 +0300, Vladimir Sementsov-Ogievskiy wrote: 08.12.2020 17:21, Maxim Levitsky wrote: If the qcow initialization fails, we should remove the file if it was already created, to avoid leaving stale files around. We already do this

Re: [PATCH v3 2/2] block: qcow2: remove the created file on initialization error

2020-12-08 Thread Maxim Levitsky
On Tue, 2020-12-08 at 19:54 +0300, Vladimir Sementsov-Ogievskiy wrote: > 08.12.2020 19:27, Maxim Levitsky wrote: > > On Tue, 2020-12-08 at 18:47 +0300, Vladimir Sementsov-Ogievskiy wrote: > > > 08.12.2020 17:21, Maxim Levitsky wrote: > > > > If the qcow initialization fails, we should remove the fi

Re: [PATCH v2] ppc/spapr: cleanup -machine pseries,nvdimm=X handling

2020-12-08 Thread Daniel Henrique Barboza
On 12/8/20 1:46 PM, Igor Mammedov wrote: Since NVDIMM support was introduced on pseries machine, it ignored machine's nvdimm=on|off option and effectively was always enabled on machines that support NVDIMM. Later on commit (28f5a716212 ppc/spapr_nvdimm: do not enable support with 'nvdimm=of

Re: [PATCH 0/4] block: prepare for 64bit

2020-12-08 Thread Kevin Wolf
Am 03.12.2020 um 23:27 hat Vladimir Sementsov-Ogievskiy geschrieben: > Hi all! > > This is a preparation series for v4 of "[PATCH v3 00/17] 64bit > block-layer". > > The whole thing is in 04, and 01-03 are small preparations. Thanks, applied to the block branch. Kevin

Re: [PATCH v5 0/2] MTE support for KVM guest

2020-12-08 Thread Catalin Marinas
On Mon, Dec 07, 2020 at 07:03:13PM +, Marc Zyngier wrote: > On Mon, 07 Dec 2020 16:34:05 +, > Catalin Marinas wrote: > > On Mon, Dec 07, 2020 at 04:05:55PM +, Marc Zyngier wrote: > > > What I'd really like to see is a description of how shared memory > > > is, in general, supposed to w

Re: [PATCH 1/3] block: Simplify qmp_block_resize() error paths

2020-12-08 Thread Kevin Wolf
Am 08.12.2020 um 15:15 hat Vladimir Sementsov-Ogievskiy geschrieben: > 03.12.2020 20:23, Kevin Wolf wrote: > > The only thing that happens after the 'out:' label is blk_unref(blk). > > However, blk = NULL in all of the error cases, so instead of jumping to > > 'out:', we can just return directly. >

Re: [PATCH 0/4] block: prepare for 64bit

2020-12-08 Thread Vladimir Sementsov-Ogievskiy
08.12.2020 20:13, Kevin Wolf wrote: Am 03.12.2020 um 23:27 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi all! This is a preparation series for v4 of "[PATCH v3 00/17] 64bit block-layer". The whole thing is in 04, and 01-03 are small preparations. Thanks, applied to the block branch. Th

Re: [PATCH 3/3] block: Fix deadlock in bdrv_co_yield_to_drain()

2020-12-08 Thread Kevin Wolf
Am 08.12.2020 um 16:33 hat Vladimir Sementsov-Ogievskiy geschrieben: > 03.12.2020 20:23, Kevin Wolf wrote: > > If bdrv_co_yield_to_drain() is called for draining a block node that > > runs in a different AioContext, it keeps that AioContext locked while it > > yields and schedules a BH in the AioCo

Re: [PATCH] target/arm: do not use cc->do_interrupt for KVM directly

2020-12-08 Thread Claudio Fontana
On 12/8/20 5:28 PM, Eduardo Habkost wrote: > On Tue, Dec 08, 2020 at 03:34:03PM +0100, Philippe Mathieu-Daudé wrote: >> On 12/8/20 2:55 PM, Claudio Fontana wrote: >>> On 12/8/20 2:51 PM, Claudio Fontana wrote: On 12/8/20 2:27 PM, Philippe Mathieu-Daudé wrote: > On 12/7/20 10:50 PM, Peter M

Re: [PATCH] tpm: tpm_spapr: Remove unused tracepoint

2020-12-08 Thread Stefan Berger
On 12/7/20 1:43 AM, Roman Bolshakov wrote: Linking of qemu-system-ppc64 fails on macOS with dtrace enabled: error: probe tpm_spapr_show_buffer doesn't exist error: Could not register probes ld: error creating dtrace DOF section for architecture x86_64 The failure is explained in 8c8ed0

Re: [PATCH v5 2/4] migration: introduce UFFD-WP low-level interface helpers

2020-12-08 Thread Peter Xu
On Fri, Dec 04, 2020 at 12:31:01PM +0300, Andrey Gruzdev wrote: > Glue code to the userfaultfd kernel implementation. > Querying feature support, createing file descriptor, feature control, > memory region registration, IOCTLs on registered registered regions. > > Signed-off-by: Andrey Gruzdev R

[PATCH v2 02/24] target/arm: Add ALIGN_MEM to TBFLAG_ANY

2020-12-08 Thread Richard Henderson
Use this to signal when memory access alignment is required. This value comes from the CCR register for M-profile, and from the SCTLR register for A-profile. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 20 +++- target/arm/translate.h | 2 ++ target/arm/helper.c

[PATCH v2 03/24] target/arm: Adjust gen_aa32_{ld, st}_i32 for align+endianness

2020-12-08 Thread Richard Henderson
Create a finalize_memop function that computes alignment and endianness and returns the final MemOp for the operation. Split out gen_aa32_{ld,st}_internal_i32 which bypasses any special handling of endianness or alignment. Adjust gen_aa32_{ld,st}_i32 so that s->be_data is not added by the callers

[PATCH v2 00/24] target/arm: enforce alignment

2020-12-08 Thread Richard Henderson
As reported in https://bugs.launchpad.net/bugs/1905356 For version 2, I've rearranged things a bit, which has made it easy to support SCTLR.A/CCR.UNALIGN_TRAP. At least for non-sve code, where we issue tcg load/store operations. Predicated sve load/stores will require more work within the helper

[PATCH v2 07/24] target/arm: Enforce word alignment for LDRD/STRD

2020-12-08 Thread Richard Henderson
Buglink: https://bugs.launchpad.net/qemu/+bug/1905356 Signed-off-by: Richard Henderson --- target/arm/translate.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index f6007c23a6..9ca06cb373 100644 --- a/target/a

[PATCH v2 01/24] target/arm: Fix decode of align in VLDST_single

2020-12-08 Thread Richard Henderson
The encoding of size = 2 and size = 3 had the incorrect decode for align, overlapping the stride field. This error was hidden by what should have been unnecessary masking in translate. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/neon-ls.decode | 4 ++-- tar

[PATCH v2 09/24] target/arm: Enforce alignment for LDM/STM

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 1bfa209884..6c76bc521d 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -7824,7 +7824,7 @@ s

[PATCH v2 06/24] target/arm: Adjust gen_aa32_{ld, st}_i64 for align+endianness

2020-12-08 Thread Richard Henderson
Adjust the interface to match what has been done to the TCGv_i32 load/store functions. This is less obvious, because at present the only user of these functions, trans_VLDST_multiple, also wants to manipulate the endianness to speed up loading multiple bytes. Thus we retain an "internal" interfac

[PATCH v2 10/24] target/arm: Enforce alignment for RFE

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 6c76bc521d..a8bedbb45f 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -8259,10 +8259,10 @@

[PATCH v2 12/24] target/arm: Enforce alignment for VLDM/VSTM

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-vfp.c.inc | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/translate-vfp.c.inc b/target/arm/translate-vfp.c.inc index 96948f5a2d..98e4ae30eb 100644 --- a/target/arm/translate-vfp.c.inc +++ b/target/arm

[PATCH v2 04/24] target/arm: Merge gen_aa32_frob64 into gen_aa32_ld_i64

2020-12-08 Thread Richard Henderson
This is the only caller. Adjust some commentary to talk about SCTLR_B instead of the vanishing function. Signed-off-by: Richard Henderson --- target/arm/translate.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/target/arm/translate.c

[PATCH v2 19/24] target/arm: Enforce alignment for aa64 load-acq/store-rel

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 152a0a37ab..67a9b3bb09 100644 --- a/target/arm/translate-a64.c +++ b/target/ar

[PATCH v2 08/24] target/arm: Enforce alignment for LDA/LDAH/STL/STLH

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 9ca06cb373..1bfa209884 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -6876,7 +6876,7 @@ s

[PATCH v2 05/24] target/arm: Fix SCTLR_B test for TCGv_i64 load/store

2020-12-08 Thread Richard Henderson
Just because operating on a TCGv_i64 temporary does not mean that we're performing a 64-bit operation. Restrict the frobbing to actual 64-bit operations. Signed-off-by: Richard Henderson --- target/arm/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ar

[PATCH v2 16/24] target/arm: Enforce alignment for VLDn/VSTn (single)

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-neon.c.inc | 48 - 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/target/arm/translate-neon.c.inc b/target/arm/translate-neon.c.inc index 4dab01ae18..3a9ea3a0bb 100644 --- a/target/arm/transl

[PATCH v2 11/24] target/arm: Enforce alignment for SRS

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index a8bedbb45f..c7e01ea73a 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -5134,11 +5134,11 @@

[PATCH v2 21/24] target/arm: Enforce alignment for aa64 vector LDn/STn (multiple)

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 4395721446..93065242cc 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/transl

[PATCH v2 13/24] target/arm: Enforce alignment for VLDR/VSTR

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-vfp.c.inc | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/arm/translate-vfp.c.inc b/target/arm/translate-vfp.c.inc index 98e4ae30eb..122e409f39 100644 --- a/target/arm/translate-vfp.c.inc +++ b/targe

[PATCH v2 20/24] target/arm: Use MemOp for size + endian in aa64 vector ld/st

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 67a9b3bb09..4395721446 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/

[PATCH v2 14/24] target/arm: Enforce alignment for VLD1 (all lanes)

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-neon.c.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/arm/translate-neon.c.inc b/target/arm/translate-neon.c.inc index 18d9042130..7cb89b18e0 100644 --- a/target/arm/translate-neon.c.inc +++ b/target/ar

[PATCH v2 22/24] target/arm: Enforce alignment for aa64 vector LDn/STn (single)

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 93065242cc..57042b8bb7 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.

[PATCH v2 23/24] target/arm: Enforce alignment for sve LD1R

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 0c3a6d2121..6125e734af 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -501

[PATCH v2 15/24] target/arm: Enforce alignment for VLDn/VSTn (multiple)

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate.h | 1 + target/arm/translate.c | 15 +++ target/arm/translate-neon.c.inc | 27 ++- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/target/arm/translate.h b/target/arm/

Re: Why do we have both CONFIG_SOFTMMU and CONFIG_USER_ONLY?

2020-12-08 Thread Richard Henderson
On 12/7/20 5:56 AM, Claudio Fontana wrote: > On 12/7/20 12:50 PM, Peter Maydell wrote: >> On Mon, 7 Dec 2020 at 11:39, Claudio Fontana wrote: >>> >>> As in Subject, >>> >>> am I understanding correctly that the one or the other is redundant? >>> >>> Should we keep only one of them? >> >> I think t

Re: [PATCH] hmp-commands.hx: List abbreviation after command for cont, quit, print

2020-12-08 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > We have four HMP commands which have a single-character abbreviated > version: cont ('c'), quit ('q'), print ('p') and help ('h'). For > cont, quit and print, we list the abbreviation first in the help > documentation and the command name. This

[PATCH v2 17/24] target/arm: Use finalize_memop for aa64 gpr load/store

2020-12-08 Thread Richard Henderson
In the case of gpr load, merge the size and is_signed arguments; otherwise, simply convert size to memop. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 78 -- 1 file changed, 33 insertions(+), 45 deletions(-) diff --git a/target/arm/transl

Re: Plugin Register Accesses

2020-12-08 Thread Alex Bennée
Aaron Lindsay writes: > On Dec 08 12:17, Alex Bennée wrote: >> Aaron Lindsay writes: >> >> > I'm trying to migrate to using the new plugin interface. I see the >> > following in include/qemu/qemu-plugin.h: >> > >> >> enum qemu_plugin_cb_flags { >> >> QEMU_PLUGIN_CB_NO_REGS, /* callback do

Re: [PATCH v2 8/9] vnc: add support for extended desktop resize

2020-12-08 Thread Daniel P . Berrangé
On Tue, Dec 08, 2020 at 12:57:36PM +0100, Gerd Hoffmann wrote: > The extended desktop resize encoding adds support for (a) clients > sending resize requests to the server, and (b) multihead support. > > This patch implements (a). All resize requests are rejected by qemu. > Qemu can't resize the f

[PATCH v2 18/24] target/arm: Use finalize_memop for aa64 fpr load/store

2020-12-08 Thread Richard Henderson
For 128-bit load/store, use 16-byte alignment. This requires that we perform the two operations in the correct order so that we generate the alignment fault before modifying memory. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 42 +++--- 1 fi

[PATCH 0/4] clock: Get rid of clock_get_ns()

2020-12-08 Thread Peter Maydell
This patchseries makes some changes to the clock API: * Remove clock_get_ns() * Add clock_ticks_to_ns() to return number of nanoseconds it will take the clock to tick N times * clock_display_freq() to return prettily-formatted string for showing humans the approximate clock frequency This

[PATCH v2 24/24] target/arm: Enforce alignment for sve unpredicated LDR/STR

2020-12-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 58 +- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 6125e734af..b481e97428 100644 --- a/target/arm/translate-sve.c

[PATCH 1/4] clock: Introduce clock_ticks_to_ns()

2020-12-08 Thread Peter Maydell
The clock_get_ns() API claims to return the period of a clock in nanoseconds. Unfortunately since it returns an integer and a clock's period is represented in units of 2^-32 nanoseconds, the result is often an approximation, and calculating a clock expiry deadline by multiplying clock_get_ns() by a

[PATCH 4/4] clock: Define and use new clock_display_freq()

2020-12-08 Thread Peter Maydell
It's common to want to print a human-readable indication of a clock's frequency. Provide a utility function in the clock API to return a string which is a displayable representation of the frequency, and use it in qdev-monitor.c. Before: (qemu) info qtree [...] dev: xilinx,zynq_slcr, id ""

Re: [PATCH v5 4/4] migration: implementation of background snapshot thread

2020-12-08 Thread Peter Xu
On Fri, Dec 04, 2020 at 12:31:03PM +0300, Andrey Gruzdev wrote: > Introducing implementation of 'background' snapshot thread > which in overall follows the logic of precopy migration > while internally utilizes completely different mechanism > to 'freeze' vmstate at the start of snapshot creation.

[PATCH 3/4] clock: Remove clock_get_ns()

2020-12-08 Thread Peter Maydell
Remove the now-unused clock_get_ns() API and the CLOCK_PERIOD_TO_NS() macro that only it was using. Signed-off-by: Peter Maydell --- docs/devel/clocks.rst | 17 + include/hw/clock.h| 6 -- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/devel/clocks

Re: [PATCH v5 3/4] migration: support UFFD write fault processing in ram_save_iterate()

2020-12-08 Thread Peter Xu
On Fri, Dec 04, 2020 at 12:31:02PM +0300, Andrey Gruzdev wrote: > In this particular implementation the same single migration > thread is responsible for both normal linear dirty page > migration and procesing UFFD page fault events. > > Processing write faults includes reading UFFD file descripto

Re: [PATCH] pcie_aer: Fix help message of pcie_aer_inject_error command

2020-12-08 Thread Michael S. Tsirkin
On Tue, Dec 08, 2020 at 06:37:53PM +, Dr. David Alan Gilbert wrote: > * Zenghui Yu (yuzeng...@huawei.com) wrote: > > There is an interesting typo in the help message of pcie_aer_inject_error > > command. Use 'tlp' instead of 'tlb' to match the PCIe AER term. > > > > Signed-off-by: Zenghui Yu

Re: [PATCH v5 0/2] MTE support for KVM guest

2020-12-08 Thread Marc Zyngier
On 2020-12-08 17:21, Catalin Marinas wrote: On Mon, Dec 07, 2020 at 07:03:13PM +, Marc Zyngier wrote: On Mon, 07 Dec 2020 16:34:05 +, Catalin Marinas wrote: > On Mon, Dec 07, 2020 at 04:05:55PM +, Marc Zyngier wrote: > > What I'd really like to see is a description of how shared mem

<    1   2   3   4   5   >