Re: [PATCH v2 1/1] utils: Use fixed-point arithmetic in qemu_strtosz

2021-03-17 Thread Thomas Huth
On 15/03/2021 16.58, Richard Henderson wrote: Once we've parsed the fractional value, extract it into an integral 64-bit fraction. Perform the scaling with integer arithemetic, and simplify the overflow detection. I've put this patch in my local branch, but I'm still getting a failure in the

[PATCH] virtio-pmem: fix virtio_pmem_resp assign problem

2021-03-17 Thread wangliangzz
From: Wang Liang ret in virtio_pmem_resp is a uint32_t variable, which should be assigned using virtio_stl_p. The kernel side driver does not guarantee virtio_pmem_resp to be initialized to zero in advance, So sometimes the flush operation will fail. Signed-off-by: Wang Liang --- hw/virtio/vi

[PULL v2 01/15] utils: Use fixed-point arithmetic in qemu_strtosz

2021-03-17 Thread Alex Bennée
From: Richard Henderson Once we've parsed the fractional value, extract it into an integral 64-bit fraction. Perform the scaling with integer arithmetic, and simplify the overflow detection. Reviewed-by: Eric Blake Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <2021

[PULL v2 02/15] plugins: new syscalls plugin

2021-03-17 Thread Alex Bennée
From: Matthias Weckbecker This commit adds a new syscalls plugin that displays the syscalls as they are executed and returned. This plugin outputs the number of the syscall as well as the syscall return value. Works in *-user only. Essentially, this commit restores: https://lists.gnu.org/arc

[PULL v2 04/15] plugins: expand kernel-doc for qemu_info_t

2021-03-17 Thread Alex Bennée
It seems kernel-doc struggles a bit with typedef structs but with enough encouragement we can get something out of it. Signed-off-by: Alex Bennée Message-Id: <20210312172821.31647-5-alex.ben...@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 3303dce862..4b8

[PULL v2 05/15] plugins: cleanup kernel-doc for qemu_plugin_install

2021-03-17 Thread Alex Bennée
kernel-doc doesn't like multiple Note sections. Also add an explicit Return. Signed-off-by: Alex Bennée Message-Id: <20210312172821.31647-6-alex.ben...@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 4b84c6c293..ac1bb318da 100644 --- a/include/qemu/qemu-plu

[PULL v2 00/15] misc fixes (strtoz, plugins, guest-loader)

2021-03-17 Thread Alex Bennée
Apologies for the delay, it took several swings at the CI to get a clean pass. I've dropped the SYS_HEAPINFO and final kernel-doc integration patch for now. I've also nabbed rth's strtoz fix although that is also in another 1 change PR he submitted earlier. The following changes since commit 5b7f5

[PULL v2 07/15] plugins: expand the typedef kernel-docs for translation

2021-03-17 Thread Alex Bennée
Signed-off-by: Alex Bennée Message-Id: <20210312172821.31647-8-alex.ben...@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 09b235f0b4..529fe3e16b 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -103,14 +103,14 @@ QEMU_PLUGIN_EXPOR

[PULL v2 09/15] plugins: add qemu_plugin_id_t to kernel-doc

2021-03-17 Thread Alex Bennée
Signed-off-by: Alex Bennée Message-Id: <20210312172821.31647-10-alex.ben...@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index e4d782b628..272d240a8f 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -32,6 +32,9 @@ #define QEMU_PLUG

[PULL v2 13/15] plugins: getting qemu_plugin_get_hwaddr only expose one function prototype

2021-03-17 Thread Alex Bennée
From: Yonggang Luo This is used for counting how much function are export to qemu plugin. Signed-off-by: Yonggang Luo Signed-off-by: Alex Bennée Reviewed-by: Alex Bennée Message-Id: <20201013002806.1447-2-luoyongg...@gmail.com> Message-Id: <20210312172821.31647-14-alex.ben...@linaro.org> dif

[PULL v2 03/15] plugins: Expose physical addresses instead of device offsets

2021-03-17 Thread Alex Bennée
From: Aaron Lindsay This allows plugins to query for full virtual-to-physical address translation for a given `qemu_plugin_hwaddr` and stops exposing the offset within the device itself. As this change breaks the API, QEMU_PLUGIN_VERSION is incremented. Signed-off-by: Aaron Lindsay Signed-off-b

[PULL v2 12/15] plugins: expand kernel-doc for memory query and instrumentation

2021-03-17 Thread Alex Bennée
Signed-off-by: Alex Bennée Message-Id: <20210312172821.31647-13-alex.ben...@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index ad9dc4b69d..9e67ab1aa2 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -393,24 +393,48 @@ uint64_t qemu_pl

[PULL v2 08/15] plugins: add qemu_plugin_cb_flags to kernel-doc

2021-03-17 Thread Alex Bennée
Also add a note to explain currently they are unused. Signed-off-by: Alex Bennée Message-Id: <20210312172821.31647-9-alex.ben...@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 529fe3e16b..e4d782b628 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qem

[PULL v2 10/15] plugins: expand inline exec kernel-doc documentation.

2021-03-17 Thread Alex Bennée
Remove the extraneous @cb parameter and document the non-atomic nature of the INLINE_ADD_U64 operation. Signed-off-by: Alex Bennée Message-Id: <20210312172821.31647-11-alex.ben...@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 272d240a8f..a3805bb299 100644

[PULL v2 06/15] plugins: expand the callback typedef kernel-docs

2021-03-17 Thread Alex Bennée
Signed-off-by: Alex Bennée Message-Id: <20210312172821.31647-7-alex.ben...@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index ac1bb318da..09b235f0b4 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -99,17 +99,36 @@ QEMU_PLUGIN_EXPORT

[PULL v2 11/15] plugins: expand kernel-doc for instruction query and instrumentation

2021-03-17 Thread Alex Bennée
Signed-off-by: Alex Bennée Message-Id: <20210312172821.31647-12-alex.ben...@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index a3805bb299..ad9dc4b69d 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -327,21 +327,70 @@ void qemu_plugin

Re: [PATCH v3 1/3] hw: Model ASPEED's Hash and Crypto Engine

2021-03-17 Thread Cédric Le Goater
On 3/17/21 1:02 AM, Andrew Jeffery wrote: > > > On Fri, 12 Mar 2021, at 21:27, Joel Stanley wrote: >> The HACE (Hash and Crypto Engine) is a device that offloads MD5, SHA1, >> SHA2, RSA and other cryptographic algorithms. >> >> This initial model implements a subset of the device's functionality;

[PULL v2 14/15] plugins: Fixes typo in qemu-plugin.h

2021-03-17 Thread Alex Bennée
From: Yonggang Luo Getting the comment consistence with the function name Signed-off-by: Yonggang Luo Signed-off-by: Alex Bennée Message-Id: <20201013002806.1447-3-luoyongg...@gmail.com> Message-Id: <20210312172821.31647-15-alex.ben...@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/inc

[PULL v2 15/15] hw/core: Only build guest-loader if libfdt is available

2021-03-17 Thread Alex Bennée
From: Philippe Mathieu-Daudé Add a Kconfig entry for guest-loader so we can optionally deselect it (default is built in), and add a Meson dependency on libfdt. This fixes when building with --disable-fdt: /usr/bin/ld: libcommon.fa.p/hw_core_guest-loader.c.o: in function `loader_insert_platfo

[Bug 1919036] Re: Assertion failure in fifo8_push_all() through am53c974

2021-03-17 Thread Mark Cave-Ayland
Thank you both for the reproducers. Please see the proposed patchset here: https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg06063.html -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1919036 T

[Bug 1919035] Re: Assertion failure in fifo8_pop_buf() through am53c974

2021-03-17 Thread Mark Cave-Ayland
Thank you both for the reproducers. Please see the proposed patchset here: https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg06063.html -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1919035 T

[Bug 1909247] Re: QEMU: use after free vulnerability in esp_do_dma() in hw/scsi/esp.c

2021-03-17 Thread Mark Cave-Ayland
Thank you both for the reproducers. Please see the proposed patchset here: https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg06063.html -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1909247 T

[Bug 1910723] Re: NULL pointer dereference issues in am53c974 SCSI host bus adapter

2021-03-17 Thread Mark Cave-Ayland
Thank you both for the reproducers. Please see the proposed patchset here: https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg06063.html -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1910723 T

Re: [PATCH 0/4] esp: fix asserts/segfaults discovered by fuzzer

2021-03-17 Thread Paolo Bonzini
On 17/03/21 00:30, Mark Cave-Ayland wrote: Recently there have been a number of issues raised on Launchpad as a result of fuzzing the am53c974 (ESP) device. I spent some time over the past couple of days checking to see if anything had improved since my last patchset: from what I can tell the iss

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-17 Thread Max Reitz
On 16.03.21 18:48, Vladimir Sementsov-Ogievskiy wrote: 16.03.2021 15:25, Max Reitz wrote: On 15.03.21 15:40, Vladimir Sementsov-Ogievskiy wrote: 15.03.2021 12:58, Max Reitz wrote: [...] The question is whether it really makes sense to even have a seqcache_read() path when in reality it’s pr

Re: [PATCH v3 1/3] hw: Model ASPEED's Hash and Crypto Engine

2021-03-17 Thread Cédric Le Goater
On 3/12/21 11:57 AM, Joel Stanley wrote: > The HACE (Hash and Crypto Engine) is a device that offloads MD5, SHA1, > SHA2, RSA and other cryptographic algorithms. > > This initial model implements a subset of the device's functionality; > currently only direct access (non-scatter gather) hashing. >

RE: [RFC 0/1] Use dmabufs for display updates instead of pixman

2021-03-17 Thread Kasireddy, Vivek
Hi Gerd, Sorry for the delayed response. I wanted to wait until I finished my proof-of-concept -- that included adding synchronization -- to ask follow up questions. > > > > Does your work above not count for anything? > > It is quite old, and I think not up-to-date with the final revision of t

Re: [PATCH 0/7] block/nbd: decouple reconnect from drain

2021-03-17 Thread Vladimir Sementsov-Ogievskiy
15.03.2021 09:06, Roman Kagan wrote: The reconnection logic doesn't need to stop while in a drained section. Moreover it has to be active during the drained section, as the requests that were caught in-flight with the connection to the server broken can only usefully get drained if the connection

[RFC PATCH] i386: Add ratelimit for bus locks acquired in guest

2021-03-17 Thread Chenyi Qiang
Virtual Machines can exploit bus locks to degrade the performance of system. To address this kind of performance DOS attack, bus lock VM exit is introduced in KVM and it will report the bus locks detected in guest, which can help userspace to enforce throttling policies. The availability of bus lo

Re: Windows 10 won't run on default x86_64 machine anymore

2021-03-17 Thread Reinoud Zandijk
On Tue, Mar 16, 2021 at 09:34:08PM +0100, Igor Mammedov wrote: > Thanks for reporting it before it was released > please test/review fix that I've just posted: > > "[PATCH for-6.0] x86:acpi:piix4: reinitialize PM1.CNT on reset" I've tested qemu with the patch, booted the install without specifyi

Re: [PULL 0/1] Fix qemu_strtosz regression

2021-03-17 Thread Peter Maydell
On Mon, 15 Mar 2021 at 18:51, Richard Henderson wrote: > > The following changes since commit 51204c2f188ec1e2a38f14718d38a3772f850a4b: > > Merge remote-tracking branch > 'remotes/bkoppelmann2/tags/pull-tricore-20210314' into staging (2021-03-15 > 15:34:27 +) > > are available in the Git r

Re: [PATCH] hw/char/pl011: Fix clock migration failure

2021-03-17 Thread Peter Maydell
On Wed, 17 Mar 2021 at 04:44, Gavin Shan wrote: > > There is a added clock to trace buad rate change since v5.2.0 by > commit aac63e0e6ea3 ("hw/char/pl011: add a clock input"). The added > clock causes migration failure. For example, migration from v5.2.0 > to v5.1.0 can fail with the following er

Re: Half a usb-redir idea

2021-03-17 Thread Dr. David Alan Gilbert
* Gerd Hoffmann (kra...@redhat.com) wrote: > On Tue, Mar 16, 2021 at 05:21:02PM +, Dr. David Alan Gilbert wrote: > > Hi, > > I've got a half-baked idea, which I thought might be worth mentioning. > > > > How hard would it be to give qemu a usbredir server rather than client? > > The usb par

Re: [PATCH] virtio-pmem: fix virtio_pmem_resp assign problem

2021-03-17 Thread Stefano Garzarella
On Tue, Mar 16, 2021 at 10:41:45PM -0400, wanglian...@126.com wrote: From: Wang Liang ret in virtio_pmem_resp is a uint32_t variable, which should be assigned using virtio_stl_p. The kernel side driver does not guarantee virtio_pmem_resp to be initialized to zero in advance, So sometimes the f

Re: [PATCH] virtio-pmem: fix virtio_pmem_resp assign problem

2021-03-17 Thread David Hildenbrand
On 17.03.21 03:41, wanglian...@126.com wrote: From: Wang Liang ret in virtio_pmem_resp is a uint32_t variable, which should be assigned using virtio_stl_p. The kernel side driver does not guarantee virtio_pmem_resp to be initialized to zero in advance, So sometimes the flush operation will fai

[RFC PATCH v2 0/5] target/arm: Add MTE support to KVM guest

2021-03-17 Thread Haibo Xu
This version is rebased against kernel patches v10, and only header files are updated since v1[1]. This series add support for MTE(Memory Tagging Extension)[2] in KVM guest. It's based on Steven Price's kernel KVM patches v10[3], and has been tested to ensure that test case[4] can be passed in a K

[RFC PATCH v2 1/5] Update Linux headers with new MTE support

2021-03-17 Thread Haibo Xu
Signed-off-by: Haibo Xu --- linux-headers/linux/kvm.h | 16 1 file changed, 16 insertions(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index 020b62a619..941743b3a7 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -1056,6 +1056,7

[RFC PATCH v2 2/5] Add basic MTE support to KVM guest

2021-03-17 Thread Haibo Xu
Enable the virt machine feature "mte" to work with KVM guest. This feature is still hiden from the user in this patch, and will be available in a later patch. Signed-off-by: Haibo Xu --- hw/arm/virt.c | 22 +++--- target/arm/cpu.c | 2 +- target/arm/kvm.c | 9 +

[RFC PATCH v2 4/5] Add migration support for KVM guest with MTE

2021-03-17 Thread Haibo Xu
To make it easier to keep the page tags sync with the page data, tags for one page are appended to the data during ram save iteration. This patch only add the pre-copy migration support. Post-copy and compress as well as zero page saving are not supported yet. Signed-off-by: Haibo Xu --- includ

[RFC PATCH v2 5/5] Enable the MTE support for KVM guest

2021-03-17 Thread Haibo Xu
Signed-off-by: Haibo Xu --- hw/arm/virt.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 76658b93a3..36cfdb29e9 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -79,6 +79,7 @@ #include "hw/virtio/virtio-iommu.h" #

[RFC PATCH v2 3/5] Add APIs to get/set MTE tags

2021-03-17 Thread Haibo Xu
MTE spec provide instructions to retrieve the memory tags: (1) LDG, at 16 bytes granularity, and available in both user and kernel space; (2) LDGM, at 256 bytes granularity in maximum, and only available in kernel space To improve the performance, KVM has exposed the LDGM capability to use

Re: [PATCH for-6.0] x86:acpi:piix4: reinitialize PM1.CNT on reset

2021-03-17 Thread Igor Mammedov
On Tue, 16 Mar 2021 13:56:03 -0700 Isaku Yamahata wrote: > The fix itself looks good to me for the reported issue. > Should more registers be reset in theory? > But it would cause other issues. > > i.e. > acpi_pm1_evt_reset(&s->ar); > acpi_pm_tmr_reset(&s->ar); > acpi_gpe_reset(&s->ar); It's ve

Re: [PATCH] sockets: update SOCKET_ADDRESS_TYPE_FD listen(2) backlog

2021-03-17 Thread Stefan Hajnoczi
On Tue, Mar 16, 2021 at 08:35:14AM -0500, Eric Blake wrote: > On 3/16/21 4:10 AM, Stefan Hajnoczi wrote: > > On Wed, Mar 10, 2021 at 05:30:04PM +, Stefan Hajnoczi wrote: > >> socket_get_fd() fails with the error "socket_get_fd: too many > >> connections" if the given listen backlog value is not

Re: Windows 10 won't run on default x86_64 machine anymore

2021-03-17 Thread Igor Mammedov
On Wed, 17 Mar 2021 09:58:25 +0100 Reinoud Zandijk wrote: > On Tue, Mar 16, 2021 at 09:34:08PM +0100, Igor Mammedov wrote: > > Thanks for reporting it before it was released > > please test/review fix that I've just posted: > > > > "[PATCH for-6.0] x86:acpi:piix4: reinitialize PM1.CNT on reset"

[PATCH 0/3] s390x: modularize virtio-gpu-ccw

2021-03-17 Thread Gerd Hoffmann
Maybe not the most elegant but rather simple approach to the "parent object missing" problem: Use a symbol reference to make sure ccw modules load only in case ccw support is present. Also split the cpu changes to a separate patch. Gerd Hoffmann (3): s390x: move S390_ADAPTER_SUPPRESSIBLE s390

[PATCH 1/3] s390x: move S390_ADAPTER_SUPPRESSIBLE

2021-03-17 Thread Gerd Hoffmann
The definition S390_ADAPTER_SUPPRESSIBLE was moved to "cpu.h", per suggestion of Thomas Huth. From interface design perspective, IMHO, not a good thing as it belongs to the public interface of css_register_io_adapters(). We did this because CONFIG_KVM requeires NEED_CPU_H and Thomas, and other comm

[PATCH 3/3] s390x: modularize virtio-gpu-ccw

2021-03-17 Thread Gerd Hoffmann
Since the virtio-gpu-ccw device depends on the hw-display-virtio-gpu module, which provides the type virtio-gpu-device, packaging the hw-display-virtio-gpu module as a separate package that may or may not be installed along with the qemu package leads to problems. Namely if the hw-display-virtio-gp

[PATCH 2/3] s390x: add have_virtio_ccw

2021-03-17 Thread Gerd Hoffmann
Introduce a symbol which can be used to prevent ccw modules being loaded into system emulators without ccw support. Signed-off-by: Gerd Hoffmann --- hw/s390x/virtio-ccw.h | 5 + hw/s390x/virtio-ccw.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virt

Re: [PATCH v8 0/3] vnc: support reload x509 certificates

2021-03-17 Thread Gerd Hoffmann
On Tue, Mar 16, 2021 at 03:58:42PM +0800, Zihao Chang wrote: > This series supports reload x509 certificates for vnc > 1. Support reload x509 certificates. > 2. Support reload vnc certificates. > 3. Add new qmp display-reload and implement reload x509 certificates for vnc. Added to ui queue. than

Re: [PATCH] include/ui/console.h: Delete is_surface_bgr()

2021-03-17 Thread Gerd Hoffmann
On Sun, Mar 14, 2021 at 04:39:27PM +, Peter Maydell wrote: > The function is_surface_bgr() is no longer used anywhere, > so we can delete it. Added to (6.1) ui queue. thanks, Gerd

Re: [External] Re: [RFC PATCH 0/9] Support for Virtio-fs daemon crash reconnection

2021-03-17 Thread Stefan Hajnoczi
On Fri, Dec 18, 2020 at 05:39:34PM +0800, Jiachen Zhang wrote: > Thanks for the suggestions. Actually, we choose to save all state > information to QEMU because a virtiofsd has the same lifecycle as its > QEMU master. However, saving things to a file do avoid communication with > QEMU, and we no lo

Re: Half a usb-redir idea

2021-03-17 Thread Gerd Hoffmann
On Wed, Mar 17, 2021 at 09:10:51AM +, Dr. David Alan Gilbert wrote: > * Gerd Hoffmann (kra...@redhat.com) wrote: > > On Tue, Mar 16, 2021 at 05:21:02PM +, Dr. David Alan Gilbert wrote: > > > Hi, > > > I've got a half-baked idea, which I thought might be worth mentioning. > > > > > > How

Re: [PATCH 18/24] DAX/unmap virtiofsd: Parse unmappable elements

2021-03-17 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Tue, Feb 09, 2021 at 07:02:18PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > For some read/writes the virtio queue elements are unmappable by > > the daemon; these are cases where the data is to be read/w

Re: [PATCH] hw/char/pl011: Fix clock migration failure

2021-03-17 Thread Gavin Shan
Hi Peter, On 3/17/21 8:09 PM, Peter Maydell wrote: On Wed, 17 Mar 2021 at 04:44, Gavin Shan wrote: There is a added clock to trace buad rate change since v5.2.0 by commit aac63e0e6ea3 ("hw/char/pl011: add a clock input"). The added clock causes migration failure. For example, migration from v

Re: [PULL 0/9] virtiofs and migration queue

2021-03-17 Thread Peter Maydell
On Mon, 15 Mar 2021 at 20:14, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > The following changes since commit e7c6a8cf9f5c82aa152273e1c9e80d07b1b0c32c: > > Merge remote-tracking branch 'remotes/philmd/tags/avr-20210315' into > staging (2021-03-15 16:59:55 +) >

Re: [PATCH] hw/char/pl011: Fix clock migration failure

2021-03-17 Thread Peter Maydell
On Wed, 17 Mar 2021 at 10:37, Gavin Shan wrote: > > Hi Peter, > > On 3/17/21 8:09 PM, Peter Maydell wrote: > > On Wed, 17 Mar 2021 at 04:44, Gavin Shan wrote: > >> > >> static const VMStateDescription vmstate_pl011 = { > >> .name = "pl011", > >> .version_id = 2, > >> .minimum_

RE: Half a usb-redir idea

2021-03-17 Thread Thanos Makatos
> -Original Message- > From: Qemu-devel bounces+thanos.makatos=nutanix@nongnu.org> On Behalf Of Gerd > Hoffmann > Sent: 17 March 2021 10:17 > To: Dr. David Alan Gilbert > Cc: victort...@redhat.com; berra...@redhat.com; qemu- > de...@nongnu.org > Subject: Re: Half a usb-redir idea >

Re: [PATCH 4/5] coroutine-lock: reimplement CoRwLock to fix downgrade bug

2021-03-17 Thread David Edmondson
On Tuesday, 2021-03-16 at 17:00:06 +01, Paolo Bonzini wrote: > A feature of the current rwlock is that if multiple coroutines hold a > reader lock, all must be runnable. The unlock implementation relies on > this, choosing to wake a single coroutine when the final read lock > holder exits the crit

Re: [PATCH v4 1/2] migration/ram: Reduce unnecessary rate limiting

2021-03-17 Thread David Edmondson
On Wednesday, 2021-03-17 at 09:37:11 +08, Kunkun Jiang wrote: > Hi  Peter, > > On 2021/3/17 5:39, Peter Xu wrote: >> On Tue, Mar 16, 2021 at 08:57:15PM +0800, Kunkun Jiang wrote: >>> When the host page is a huge page and something is sent in the >>> current iteration, migration_rate_limit() should

Re: [PATCH v3] qga: return a more explicit error on why a command is disabled

2021-03-17 Thread Peter Krempa
On Fri, Feb 19, 2021 at 12:28:14 +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > qmp_disable_command() now takes an optional error string to return a > more explicit error message. > > Fixes: > https://bugzilla.redhat.com/show_bug.cgi?id=1928806 > > Signed-off-by: Marc-A

Re: [PATCH] virtio-pmem: fix virtio_pmem_resp assign problem

2021-03-17 Thread Pankaj Gupta
> ret in virtio_pmem_resp is a uint32_t variable, which should be assigned > using virtio_stl_p. > > The kernel side driver does not guarantee virtio_pmem_resp to be initialized > to zero in advance, So sometimes the flush operation will fail. > > Signed-off-by: Wang Liang > --- > hw/virtio/virti

Re: [PATCH] hw/char/pl011: Fix clock migration failure

2021-03-17 Thread Gavin Shan
Hi Peter, On 3/17/21 9:40 PM, Peter Maydell wrote: On Wed, 17 Mar 2021 at 10:37, Gavin Shan wrote: On 3/17/21 8:09 PM, Peter Maydell wrote: On Wed, 17 Mar 2021 at 04:44, Gavin Shan wrote: static const VMStateDescription vmstate_pl011 = { .name = "pl011", .version_id = 2,

[PATCH 0/2] Fix atomic test in "configure" + bump FreeBSD CI to 12.2

2021-03-17 Thread Thomas Huth
FreeBSD 12.1 is out of service now, so the Cirrus-CI task is failing due to using some packages from 12.2 on the 12.1 image. We have to update it to 12.2. However, there are two obstacles: First, the check for the 128-bit atomic functions in the configure script does not work right with the versio

[PATCH 1/2] configure: Don't use the __atomic_*_16 functions for testing 128-bit support

2021-03-17 Thread Thomas Huth
The test for 128-bit atomics is causing trouble with FreeBSD 12.2 and --enable-werror: cc -Werror -fPIE -DPIE -std=gnu99 -Wall -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-ali

[PATCH 2/2] cirrus.yml: Update the FreeBSD task to version 12.2

2021-03-17 Thread Thomas Huth
FreeBSD version 12.1 is out of service now, and the task in the Cirrus-CI is failing. Update to 12.2 to get it working again. Unfortunately, there is a bug in libtasn1 that triggers with the new version of Clang that is used there (see this thread for details: https://lists.gnu.org/archive/html/qem

Re: [PATCH] hw/char/pl011: Fix clock migration failure

2021-03-17 Thread Peter Maydell
On Wed, 17 Mar 2021 at 10:59, Gavin Shan wrote: > > Hi Peter, > > On 3/17/21 9:40 PM, Peter Maydell wrote: > > On Wed, 17 Mar 2021 at 10:37, Gavin Shan wrote: > >> On 3/17/21 8:09 PM, Peter Maydell wrote: > >>> On Wed, 17 Mar 2021 at 04:44, Gavin Shan wrote: > > static const VMState

Re: [PATCH 2/2] cirrus.yml: Update the FreeBSD task to version 12.2

2021-03-17 Thread Peter Maydell
On Wed, 17 Mar 2021 at 11:09, Thomas Huth wrote: > > FreeBSD version 12.1 is out of service now, and the task in the > Cirrus-CI is failing. Update to 12.2 to get it working again. > Unfortunately, there is a bug in libtasn1 that triggers with the > new version of Clang that is used there (see thi

Re: [PULL 00/17] NBD patches through 2021-03-09

2021-03-17 Thread Thomas Huth
On 11/03/2021 20.02, Peter Maydell wrote: On Tue, 9 Mar 2021 at 16:23, Eric Blake wrote: The following changes since commit 0436c55edf6b357ff56e2a5bf688df8636f83456: Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-03-08 13:51:41 +) are avail

Re: [PATCH v2 1/1] utils: Use fixed-point arithmetic in qemu_strtosz

2021-03-17 Thread Eric Blake
On 3/17/21 2:09 AM, Thomas Huth wrote: > On 15/03/2021 16.58, Richard Henderson wrote: >> Once we've parsed the fractional value, extract it into an integral >> 64-bit fraction.  Perform the scaling with integer arithemetic, and >> simplify the overflow detection. > > I've put this patch in my loc

Re: [PULL 00/17] NBD patches through 2021-03-09

2021-03-17 Thread Eric Blake
On 3/17/21 6:17 AM, Thomas Huth wrote: >> ERROR:../tests/test-cutils.c:2290:test_qemu_strtosz_metric: assertion >> failed (res == 12345000): (12344999 == 12345000) > > A different failure shows up in the MSYS2 builds now, too: > > https://cirrus-ci.com/task/5180846782021632?command=test#L543 A

Re: [PATCH 1/3] s390x: move S390_ADAPTER_SUPPRESSIBLE

2021-03-17 Thread Philippe Mathieu-Daudé
On 3/17/21 10:56 AM, Gerd Hoffmann wrote: > The definition S390_ADAPTER_SUPPRESSIBLE was moved to "cpu.h", per > suggestion of Thomas Huth. From interface design perspective, IMHO, not > a good thing as it belongs to the public interface of > css_register_io_adapters(). We did this because CONFIG_K

Re: [PATCH v3 1/3] hw: Model ASPEED's Hash and Crypto Engine

2021-03-17 Thread Philippe Mathieu-Daudé
On 3/12/21 11:57 AM, Joel Stanley wrote: > The HACE (Hash and Crypto Engine) is a device that offloads MD5, SHA1, > SHA2, RSA and other cryptographic algorithms. > > This initial model implements a subset of the device's functionality; > currently only direct access (non-scatter gather) hashing. >

Re: [PATCH v2 2/3] qom: move user_creatable_add_opts logic to vl.c and QAPIfy it

2021-03-17 Thread Kevin Wolf
Am 12.03.2021 um 18:35 hat Paolo Bonzini geschrieben: > Emulators are currently using OptsVisitor (via user_creatable_add_opts) > to parse the -object command line option. This has one extra feature, > compared to keyval, which is automatic conversion of integers to lists > as well as support for

Microsoft and Intel NVDIMM ACPI _DSM interfaces status?

2021-03-17 Thread Stefan Hajnoczi
Hi, Microsoft and Intel developed two different ACPI NVDIMM _DSM interfaces. The specs for the Intel interface are available here: https://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf This is the interface that QEMU emulates. It has been reported that Windows 2016 Server and 2019 Server gue

Re: [External] Re: [RFC PATCH 0/9] Support for Virtio-fs daemon crash reconnection

2021-03-17 Thread Christian Schoenebeck
On Mittwoch, 17. März 2021 11:05:32 CET Stefan Hajnoczi wrote: > On Fri, Dec 18, 2020 at 05:39:34PM +0800, Jiachen Zhang wrote: > > Thanks for the suggestions. Actually, we choose to save all state > > information to QEMU because a virtiofsd has the same lifecycle as its > > QEMU master. However, s

Re: [PULL v2 01/15] utils: Use fixed-point arithmetic in qemu_strtosz

2021-03-17 Thread Philippe Mathieu-Daudé
Hi Alex, On 3/17/21 8:22 AM, Alex Bennée wrote: > From: Richard Henderson > > Once we've parsed the fractional value, extract it into an integral > 64-bit fraction. Perform the scaling with integer arithmetic, and > simplify the overflow detection. > > Reviewed-by: Eric Blake > Signed-off-by:

Re: [PATCH 4/5] coroutine-lock: reimplement CoRwLock to fix downgrade bug

2021-03-17 Thread Paolo Bonzini
On 17/03/21 11:40, David Edmondson wrote: Isn't this... * ... Also, @qemu_co_rwlock_upgrade * only overrides CoRwlock fairness if there are no concurrent readers, so * another writer might run while @qemu_co_rwlock_upgrade blocks. ...now incorrect? Maybe, but for sure the comment was to

Re: [PATCH 1/2] configure: Don't use the __atomic_*_16 functions for testing 128-bit support

2021-03-17 Thread Paolo Bonzini
On 17/03/21 12:05, Thomas Huth wrote: Looking for they way we are using atomic functions in QEMU, we are not using these functions with the _16 suffix anyway. Switch to the same functions that we use in the include/qemu/atomic.h header. Acked-by: Paolo Bonzini

Re: [PATCH v4 1/2] migration/ram: Reduce unnecessary rate limiting

2021-03-17 Thread Dr. David Alan Gilbert
* Kunkun Jiang (jiangkun...@huawei.com) wrote: > Hi  Peter, > > On 2021/3/17 5:39, Peter Xu wrote: > > On Tue, Mar 16, 2021 at 08:57:15PM +0800, Kunkun Jiang wrote: > > > When the host page is a huge page and something is sent in the > > > current iteration, migration_rate_limit() should be execut

Fwd: [PATCH] hw/core: Only build guest-loader if libfdt is available

2021-03-17 Thread Philippe Mathieu-Daudé
forward to the list. -- Forwarded message - From: Anthoine Bourgeois Date: Wed, Mar 17, 2021 at 11:26 AM Subject: Re: [PATCH] hw/core: Only build guest-loader if libfdt is available To: Philippe Mathieu-Daudé On Mon, Mar 15, 2021 at 06:04:39PM +0100, Philippe Mathieu-Daudé wrot

Re: [PULL v2 15/15] hw/core: Only build guest-loader if libfdt is available

2021-03-17 Thread Philippe Mathieu-Daudé
Hi Alex, On 3/17/21 8:22 AM, Alex Bennée wrote: > From: Philippe Mathieu-Daudé > > Add a Kconfig entry for guest-loader so we can optionally deselect > it (default is built in), and add a Meson dependency on libfdt. > > This fixes when building with --disable-fdt: > > /usr/bin/ld: libcommon.

Re: [PULL v2 01/15] utils: Use fixed-point arithmetic in qemu_strtosz

2021-03-17 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Hi Alex, > > On 3/17/21 8:22 AM, Alex Bennée wrote: >> From: Richard Henderson >> >> Once we've parsed the fractional value, extract it into an integral >> 64-bit fraction. Perform the scaling with integer arithmetic, and >> simplify the overflow detection. >

Re: [PATCH v2] target/mips: Deprecate Trap-and-Emul KVM support

2021-03-17 Thread Philippe Mathieu-Daudé
On 3/17/21 2:12 AM, Jiaxun Yang wrote: > Upstream kernel had removed both host[1] and guest[2] support. > > [1]: > https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 > [2]: > https://git.kernel.org/pub/scm/linux/kernel/git/mips/linu

[PATCH v4 0/6] coroutine rwlock downgrade fix, minor VDI changes

2021-03-17 Thread Paolo Bonzini
This is a resubmit of David Edmondson's series at https://patchew.org/QEMU/20210309144015.557477-1-david.edmond...@oracle.com/. After closer analysis on IRC, the CoRwLock's attempt to ensure fairness turned out to be flawed. Therefore, this series reimplements CoRwLock without using a CoQueue. Tr

[PATCH 3/6] coroutine/mutex: Store the coroutine in the CoWaitRecord only once

2021-03-17 Thread Paolo Bonzini
From: David Edmondson When taking the slow path for mutex acquisition, set the coroutine value in the CoWaitRecord in push_waiter(), rather than both there and in the caller. Reviewed-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Edmondson Message-Id: <20210309144

[PATCH 1/6] block/vdi: When writing new bmap entry fails, don't leak the buffer

2021-03-17 Thread Paolo Bonzini
From: David Edmondson If a new bitmap entry is allocated, requiring the entire block to be written, avoiding leaking the buffer allocated for the block should the write fail. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Edmondson Message-Id: <20210309144015.557477-2-david.edmond...

[PATCH 6/6] test-coroutine: Add rwlock downgrade test

2021-03-17 Thread Paolo Bonzini
From: David Edmondson Test that downgrading an rwlock does not result in a failure to schedule coroutines queued on the rwlock. The diagram associated with test_co_rwlock_downgrade() describes the intended behaviour, but what was observed previously corresponds to: | c1 | c2 | c3

[PATCH 5/6] test-coroutine: add rwlock upgrade test

2021-03-17 Thread Paolo Bonzini
Test that rwlock upgrade is fair, and readers go back to sleep if a writer is in line. Signed-off-by: Paolo Bonzini --- tests/unit/test-coroutine.c | 62 + 1 file changed, 62 insertions(+) diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c

[PATCH 2/6] block/vdi: Don't assume that blocks are larger than VdiHeader

2021-03-17 Thread Paolo Bonzini
From: David Edmondson Given that the block size is read from the header of the VDI file, a wide variety of sizes might be seen. Rather than re-using a block sized memory region when writing the VDI header, allocate an appropriately sized buffer. Signed-off-by: David Edmondson Message-Id: <20210

[PATCH 4/6] coroutine-lock: reimplement CoRwLock to fix downgrade bug

2021-03-17 Thread Paolo Bonzini
An invariant of the current rwlock is that if multiple coroutines hold a reader lock, all must be runnable. The unlock implementation relies on this, choosing to wake a single coroutine when the final read lock holder exits the critical section, assuming that it will wake a coroutine attempting to

Re: [External] Re: [RFC PATCH 0/9] Support for Virtio-fs daemon crash reconnection

2021-03-17 Thread Jiachen Zhang
On Wed, Mar 17, 2021 at 6:05 PM Stefan Hajnoczi wrote: > On Fri, Dec 18, 2020 at 05:39:34PM +0800, Jiachen Zhang wrote: > > Thanks for the suggestions. Actually, we choose to save all state > > information to QEMU because a virtiofsd has the same lifecycle as its > > QEMU master. However, saving

Re: [PATCH v3 1/3] hw: Model ASPEED's Hash and Crypto Engine

2021-03-17 Thread Cédric Le Goater
On 3/17/21 12:47 PM, Philippe Mathieu-Daudé wrote: > On 3/12/21 11:57 AM, Joel Stanley wrote: >> The HACE (Hash and Crypto Engine) is a device that offloads MD5, SHA1, >> SHA2, RSA and other cryptographic algorithms. >> >> This initial model implements a subset of the device's functionality; >> cur

Re: [PATCH 2/2] cirrus.yml: Update the FreeBSD task to version 12.2

2021-03-17 Thread Thomas Huth
On 17/03/2021 12.16, Peter Maydell wrote: On Wed, 17 Mar 2021 at 11:09, Thomas Huth wrote: FreeBSD version 12.1 is out of service now, and the task in the Cirrus-CI is failing. Update to 12.2 to get it working again. Unfortunately, there is a bug in libtasn1 that triggers with the new version

[PATCH v2] block: increased maximum size of vvfat devices

2021-03-17 Thread Arkadiy
From: NDNF This fixes the problem of the impossibility to create FAT16 disks larger than 504 mb: The change CHS made it possible to obtain a larger disk. Also, auto-detection of disk parameters was added depending on the volume of the connected files: The size of all folders and files on the crea

Re: [PATCH] hw/char/pl011: Fix clock migration failure

2021-03-17 Thread Andrew Jones
On Wed, Mar 17, 2021 at 11:14:56AM +, Peter Maydell wrote: > On Wed, 17 Mar 2021 at 10:59, Gavin Shan wrote: > > > > Hi Peter, > > > > On 3/17/21 9:40 PM, Peter Maydell wrote: > > > On Wed, 17 Mar 2021 at 10:37, Gavin Shan wrote: > > >> On 3/17/21 8:09 PM, Peter Maydell wrote: > > >>> On Wed,

Re: [External] Re: [RFC PATCH 0/9] Support for Virtio-fs daemon crash reconnection

2021-03-17 Thread Jiachen Zhang
On Wed, Mar 17, 2021 at 7:50 PM Christian Schoenebeck < qemu_...@crudebyte.com> wrote: > On Mittwoch, 17. März 2021 11:05:32 CET Stefan Hajnoczi wrote: > > On Fri, Dec 18, 2020 at 05:39:34PM +0800, Jiachen Zhang wrote: > > > Thanks for the suggestions. Actually, we choose to save all state > > > i

Re: [PATCH v2 1/1] utils: Use fixed-point arithmetic in qemu_strtosz

2021-03-17 Thread Eric Blake
On 3/17/21 6:16 AM, Eric Blake wrote: > On 3/17/21 2:09 AM, Thomas Huth wrote: >> On 15/03/2021 16.58, Richard Henderson wrote: >>> Once we've parsed the fractional value, extract it into an integral >>> 64-bit fraction.  Perform the scaling with integer arithemetic, and >>> simplify the overflow d

Re: [PATCH v3 1/5] tests/acceptance: Extract QemuBaseTest from Test

2021-03-17 Thread Wainer dos Santos Moschetta
Hi, On 3/15/21 8:08 PM, Philippe Mathieu-Daudé wrote: The Avocado Test::fetch_asset() is handy to download artifacts before running tests. The current class is named Test but only tests system emulation. As we want to test user emulation, refactor the common code as QemuBaseTest. Signed-off-by:

Re: [PATCH] hw/char/pl011: Fix clock migration failure

2021-03-17 Thread Philippe Mathieu-Daudé
+Beraldo On 3/17/21 1:54 PM, Andrew Jones wrote: > On Wed, Mar 17, 2021 at 11:14:56AM +, Peter Maydell wrote: >> On Wed, 17 Mar 2021 at 10:59, Gavin Shan wrote: >>> >>> Hi Peter, >>> >>> On 3/17/21 9:40 PM, Peter Maydell wrote: On Wed, 17 Mar 2021 at 10:37, Gavin Shan wrote: > On 3/

Re: [PATCH 2/2] cirrus.yml: Update the FreeBSD task to version 12.2

2021-03-17 Thread Daniel P . Berrangé
On Wed, Mar 17, 2021 at 01:44:05PM +0100, Thomas Huth wrote: > On 17/03/2021 12.16, Peter Maydell wrote: > > On Wed, 17 Mar 2021 at 11:09, Thomas Huth wrote: > > > > > > FreeBSD version 12.1 is out of service now, and the task in the > > > Cirrus-CI is failing. Update to 12.2 to get it working ag

<    1   2   3   4   5   >