[PATCH 1/9] tests/migration: mem leak fix

2020-06-03 Thread Mao Zhongyi
‘data’ has the possibility of memory leaks, so use the glib macros g_autofree recommended by CODING_STYLE.rst to automatically release the memory that returned from g_malloc(). Signed-off-by: Mao Zhongyi Reviewed-by: Alex Bennée Reviewed-by: Laurent Vivier --- tests/migration/stress.c | 21

[PATCH 9/9] migration/ram: calculate un/encoded_size only when needed.

2020-06-03 Thread Mao Zhongyi
Signed-off-by: Mao Zhongyi --- migration/ram.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 41cc530d9d..ca20030b64 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -910,14 +910,15 @@ static void

[PATCH 3/9] monitor/hmp-cmds: add units for migrate_parameters

2020-06-03 Thread Mao Zhongyi
When running: (qemu) info migrate_parameters announce-initial: 50 ms announce-max: 550 ms announce-step: 100 ms compress-wait-thread: on ... max-bandwidth: 33554432 bytes/second downtime-limit: 300 milliseconds x-checkpoint-delay: 2 ... xbzrle-cache-size: 67108864 add units for the parameters

Re: [RFC v3 8/8] vhost-vdpa: introduce vhost-vdpa net client

2020-06-03 Thread Cindy Lu
Hi Jason, On Wed, Jun 3, 2020 at 4:43 PM Jason Wang wrote: > > > On 2020/6/3 下午4:19, Cindy Lu wrote: > >>> +static void vhost_vdpa_cleanup(NetClientState *nc) > >>> +{ > >>> +VhostVDPAState *s = DO_UPCAST(VhostVDPAState, nc, nc); > >>> + > >>> +if (s->vhost_net) { > >>> +

Re: [PATCH v5] linux-user: syscall: ioctls: support DRM_IOCTL_VERSION

2020-06-03 Thread Laurent Vivier
Le 03/06/2020 à 03:08, cheng...@emindsoft.com.cn a écrit : > From: Chen Gang > > Another DRM_IOCTL_* commands will be done later. > > Signed-off-by: Chen Gang > --- > configure | 10 > linux-user/ioctls.h| 5 ++ > linux-user/syscall.c | 117

Re: How do I add my tcg tests to check-tcg?

2020-06-03 Thread Alex Bennée
Bastian Koppelmann writes: > Hi Alex, > > I have some time again to integrate my tcg tests patch for TriCore [1]. > However, > I'm struggeling a bit to get through the details of the Makefiles. I'm > assuming > the right rule to run is 'make check-tcg'. I tried running that for >

Re: [PULL 04/12] hmp: Simplify qom-set

2020-06-03 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > On 02.06.20 11:26, Dr. David Alan Gilbert wrote: > > * Markus Armbruster (arm...@redhat.com) wrote: > >> "Dr. David Alan Gilbert (git)" writes: > >> > >>> From: "Dr. David Alan Gilbert" > >>> > >>> Simplify qom_set by making it use qmp_qom_set and

Re: [PULL 04/12] hmp: Simplify qom-set

2020-06-03 Thread David Hildenbrand
On 03.06.20 12:43, Dr. David Alan Gilbert wrote: > * David Hildenbrand (da...@redhat.com) wrote: >> On 02.06.20 11:26, Dr. David Alan Gilbert wrote: >>> * Markus Armbruster (arm...@redhat.com) wrote: "Dr. David Alan Gilbert (git)" writes: > From: "Dr. David Alan Gilbert" >

Re: [PULL 04/12] hmp: Simplify qom-set

2020-06-03 Thread David Hildenbrand
On 03.06.20 13:31, David Hildenbrand wrote: > On 03.06.20 12:43, Dr. David Alan Gilbert wrote: >> * David Hildenbrand (da...@redhat.com) wrote: >>> On 02.06.20 11:26, Dr. David Alan Gilbert wrote: * Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" writes:

RE: [Question] Regarding PMU initialization within the QEMU for ARM VCPUs

2020-06-03 Thread Salil Mehta
Hi Andrew, Many thanks for the reply. > From: Andrew Jones [mailto:drjo...@redhat.com] > Sent: Wednesday, June 3, 2020 10:38 AM > To: Salil Mehta > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; Peter Maydell > ; Igor Mammedov ; > m...@redhat.com > Subject: Re: [Question] Regarding PMU

Re: [PATCH v4 4/6] iotests: 194: test also migration of dirty bitmap

2020-06-03 Thread Thomas Huth
On 22/05/2020 00.06, Vladimir Sementsov-Ogievskiy wrote: > Test that dirty bitmap migration works when we deal with mirror. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Eric Blake > --- > tests/qemu-iotests/194 | 14 ++ > tests/qemu-iotests/194.out | 6 ++

Re: [PATCH] ftgmac100: Implement variable descriptor size

2020-06-03 Thread Cédric Le Goater
On 6/2/20 6:47 PM, Erik Smit wrote: > The hardware supports variable descriptor sizes, configured with the DBLAC > register. yes. The DBLAC default value is 0x00022F00 on AST2400 and 0x00022500 on AST2500 and AST2600. The current reset handler needs a little fix btw. This sets the TX and RX

RE: [PATCH 3/3] migration/colo: Merge multi checkpoint request into one.

2020-06-03 Thread Zhang, Chen
> -Original Message- > From: Zhanghailiang > Sent: Tuesday, June 2, 2020 2:59 PM > To: Zhang, Chen ; Dr . David Alan Gilbert > ; Juan Quintela ; qemu-dev > > Cc: Zhang Chen ; Jason Wang > > Subject: RE: [PATCH 3/3] migration/colo: Merge multi checkpoint request > into one. > > > >

[PATCH 1/2] virtio-blk: Refactor the code that processes queued requests

2020-06-03 Thread Sergio Lopez
Move the code that processes queued requests from virtio_blk_dma_restart_bh() to its own, non-static, function. This will allow us to call it from the virtio_blk_data_plane_start() in a future patch. Signed-off-by: Sergio Lopez --- include/hw/virtio/virtio-blk.h | 1 + hw/block/virtio-blk.c

Re: [RFC v2 10/18] guest memory protection: Add guest memory protection interface

2020-06-03 Thread David Gibson
On Mon, May 25, 2020 at 12:27:35PM +0200, Greg Kurz wrote: > On Thu, 21 May 2020 13:42:56 +1000 > David Gibson wrote: > > > Several architectures have mechanisms which are designed to protect guest > > memory from interference or eavesdropping by a compromised hypervisor. AMD > > SEV does this

Re: [RFC v2 10/18] guest memory protection: Add guest memory protection interface

2020-06-03 Thread David Gibson
On Mon, Jun 01, 2020 at 06:44:50PM -0700, Richard Henderson wrote: > On 5/20/20 8:42 PM, David Gibson wrote: > > @@ -0,0 +1,29 @@ > > +#/* > > Two extraneous # at the beginning of the new files. Huh, weird. Fixed. -- David Gibson| I'll have my music baroque, and my code

Re: [RFC v2 15/18] guest memory protection: Decouple kvm_memcrypt_*() helpers from KVM

2020-06-03 Thread David Gibson
On Mon, Jun 01, 2020 at 09:13:01PM -0700, Richard Henderson wrote: > On 5/20/20 8:43 PM, David Gibson wrote: > > The kvm_memcrypt_enabled() and kvm_memcrypt_encrypt_data() helper functions > > don't conceptually have any connection to KVM (although it's not possible > > in practice to use them

Re: [PATCH v2] icount: make dma reads deterministic

2020-06-03 Thread Kevin Wolf
Am 03.06.2020 um 07:57 hat Pavel Dovgalyuk geschrieben: > > On 02.06.2020 18:54, Kevin Wolf wrote: > > Am 30.04.2020 um 11:02 hat Pavel Dovgalyuk geschrieben: > > > From: Pavel Dovgalyuk > > > > > > Windows guest sometimes makes DMA requests with overlapping > > > target addresses. This leads

[PATCH 8/9] docs/xbzrle: update 'cache miss rate' and 'encoding rate' to docs

2020-06-03 Thread Mao Zhongyi
Signed-off-by: Mao Zhongyi --- docs/xbzrle.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/xbzrle.txt b/docs/xbzrle.txt index 385b4993f8..6bd1828f34 100644 --- a/docs/xbzrle.txt +++ b/docs/xbzrle.txt @@ -113,9 +113,11 @@ is recommended. xbzrle transferred:

Re: [PATCH 1/2] sd: sdhci: Implement basic vendor specific register support

2020-06-03 Thread Philippe Mathieu-Daudé
On 6/3/20 8:58 AM, Guenter Roeck wrote: > On 6/2/20 11:37 PM, Philippe Mathieu-Daudé wrote: >> Hi Guenter, >> >> On 6/3/20 7:24 AM, Guenter Roeck wrote: >>> The Linux kernel's IMX code now uses vendor specific commands. >>> This results in endless warnings when booting the Linux kernel. >>> >>>

Re: [PATCH v5] linux-user: syscall: ioctls: support DRM_IOCTL_VERSION

2020-06-03 Thread Chen Gang
On 2020/6/3 下午5:49, Laurent Vivier wrote: > Le 03/06/2020 à 03:08, cheng...@emindsoft.com.cn a écrit : >> +#ifdef HAVE_DRM_H >> + >> +static void unlock_drm_version(struct drm_version *host_ver) >> +{ >> +if (host_ver->name) { >> +unlock_user(host_ver->name, 0UL, 0); > > unlock_user()

[PATCH v2] exec: flush the whole TLB if a watchpoint crosses a page boundary

2020-06-03 Thread Alex Bennée
There is no particular reason why you can't have a watchpoint in TCG that covers a large chunk of the address space. We could be clever about it but these cases are pretty rare and we can assume the user will expect a little performance degradation. NB: In my testing gdb will silently squash a

Re: [PATCH] qom-hmp-cmds: fix a memleak in hmp_qom_get

2020-06-03 Thread Pan Nengyuan
On 6/3/2020 2:51 PM, Philippe Mathieu-Daudé wrote: > Hi Pan, > > On 6/3/20 9:03 AM, Pan Nengyuan wrote: >> 'obj' forgot to free at the end of hmp_qom_get(). Fix that. >> >> The leak stack: >> Direct leak of 40 byte(s) in 1 object(s) allocated from: >> #0 0x7f4e3a779ae8 in

[PATCH 4/9] monitor/hmp-cmds: don't silently output when running 'migrate_set_downtime' fails

2020-06-03 Thread Mao Zhongyi
Although 'migrate_set_downtime' has been deprecated and replaced with 'migrate_set_parameter downtime_limit', it has not been completely eliminated, possibly due to compatibility with older versions. I think as long as this old parameter is running, we should report appropriate message when

[PATCH 6/9] monitor/hmp-cmds: add 'goto end' to reduce duplicate code.

2020-06-03 Thread Mao Zhongyi
Signed-off-by: Mao Zhongyi --- monitor/hmp-cmds.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index acdd6baff3..e8cf72eb3a 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -1501,8 +1501,7 @@ void

[PATCH 5/9] monitor/hmp-cmds: delete redundant Error check before invoke hmp_handle_error()

2020-06-03 Thread Mao Zhongyi
hmp_handle_error() does Error check internally. Signed-off-by: Mao Zhongyi --- monitor/hmp-cmds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 6938f1060e..acdd6baff3 100644 --- a/monitor/hmp-cmds.c +++

[PATCH 7/9] monitor/hmp-cmds: improvements for the 'info migrate'

2020-06-03 Thread Mao Zhongyi
When running: (qemu) info migrate globals: store-global-state: on only-migratable: off ... xbzrle transferred: 640892 kbytes xbzrle pages: 16645936 pages xbzrle cache miss: 1525426 xbzrle cache miss rate: 0.09 xbzrle encoding rate: 91.42 xbzrle overflow: 40896 ... compression pages: 377710 pages

Re: [PATCH v1 9/9] .travis.yml: allow failure for unreliable hosts

2020-06-03 Thread Philippe Mathieu-Daudé
On 6/2/20 5:46 PM, Alex Bennée wrote: > They will still run but they won't get in the way of the result. > > Signed-off-by: Alex Bennée > --- > .travis.yml | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/.travis.yml b/.travis.yml > index 564be50a3c1..ec6367af1f0 100644 > ---

RE: [Question] Regarding PMU initialization within the QEMU for ARM VCPUs

2020-06-03 Thread Salil Mehta
Hello, Any comments on this would be really helpful & much appreciated. Thanks in anticipation! Best regards Salil > -Original Message- > From: Salil Mehta > Sent: Monday, June 1, 2020 4:00 PM > To: qemu-devel@nongnu.org; qemu-...@nongnu.org > Cc: Peter Maydell ; m...@redhat.com; Igor

[Bug 1805256] Autopkgtest regression report (qemu/1:4.2-3ubuntu6.2)

2020-06-03 Thread Ubuntu SRU Bot
All autopkgtests for the newly accepted qemu (1:4.2-3ubuntu6.2) for focal have finished running. The following regressions have been reported in tests triggered by the package: systemd/245.4-4ubuntu3.1 (arm64) Please visit the excuses page listed below and investigate the failures, proceeding

Re: [PATCH] hw/block/nvme: Verify msix_vector_use() returned value

2020-06-03 Thread Kevin Wolf
Am 02.06.2020 um 17:57 hat Philippe Mathieu-Daudé geschrieben: > msix_vector_use() returns -EINVAL on error. Assert it won't. > > Signed-off-by: Philippe Mathieu-Daudé > --- > Notes taken while reviewing: > https://www.mail-archive.com/qemu-block@nongnu.org/msg66831.html > Based-on:

[PATCH 2/2] virtio-blk: On restart, process queued requests in the proper context

2020-06-03 Thread Sergio Lopez
On restart, we were scheduling a BH to process queued requests, which would run before starting up the data plane, leading to those requests being assigned and started on coroutines on the main context. This could cause requests to be wrongly processed in parallel from different threads (the main

[PATCH 0/2] virtio-blk: Avoid processing requests on the main context on restart

2020-06-03 Thread Sergio Lopez
On restart, we were scheduling a BH to process queued requests, which would run before starting up the data plane, leading to those requests being assigned and started on coroutines on the main context. This could cause requests to be wrongly processed in parallel from different threads (the main

Re: [Question] Regarding PMU initialization within the QEMU for ARM VCPUs

2020-06-03 Thread Andrew Jones
On Wed, Jun 03, 2020 at 11:45:22AM +, Salil Mehta wrote: > Hi Andrew, > Many thanks for the reply. > > > From: Andrew Jones [mailto:drjo...@redhat.com] > > Sent: Wednesday, June 3, 2020 10:38 AM > > To: Salil Mehta > > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; Peter Maydell > > ; Igor

Re: [PATCH] ftgmac100: Implement variable descriptor size

2020-06-03 Thread Cédric Le Goater
On 6/3/20 9:08 AM, Philippe Mathieu-Daudé wrote: > On 6/2/20 6:47 PM, Erik Smit wrote: >> The hardware supports variable descriptor sizes, configured with the DBLAC >> register. >> >> Most drivers use the default 2*8, which is currently hardcoded in qemu, but >> the implementation of the driver in

Re: About the kvm-no-adjvtime CPU property

2020-06-03 Thread Andrew Jones
On Tue, Jun 02, 2020 at 03:47:22PM +0800, Ying Fang wrote: > > > On 2020/6/1 20:29, Andrew Jones wrote: > > On Mon, Jun 01, 2020 at 08:07:31PM +0800, Ying Fang wrote: > > > > > > > > > On 2020/6/1 16:07, Andrew Jones wrote: > > > > On Sat, May 30, 2020 at 04:56:26PM +0800, Ying Fang wrote: > >

How do I add my tcg tests to check-tcg?

2020-06-03 Thread Bastian Koppelmann
Hi Alex, I have some time again to integrate my tcg tests patch for TriCore [1]. However, I'm struggeling a bit to get through the details of the Makefiles. I'm assuming the right rule to run is 'make check-tcg'. I tried running that for xtensa-softmmu, arm-softmmu, and aarch64-softmmu, but they

Re: [Question] Regarding PMU initialization within the QEMU for ARM VCPUs

2020-06-03 Thread Andrew Jones
On Wed, Jun 03, 2020 at 11:59:23AM +0200, Auger Eric wrote: > Hi Drew, > > On 6/3/20 11:37 AM, Andrew Jones wrote: > > On Mon, Jun 01, 2020 at 03:04:33PM +, Salil Mehta wrote: > >> Hello, > >> I could see below within function fdt_add_pmu_nodes() part of > >> hw/arm/virt.c during virt machine

RE: [Question] Regarding PMU initialization within the QEMU for ARM VCPUs

2020-06-03 Thread Salil Mehta
Hi Eric, > From: Qemu-arm [mailto:qemu-arm-bounces+salil.mehta=huawei@nongnu.org] > On Behalf Of Auger Eric > Sent: Wednesday, June 3, 2020 10:59 AM > To: Andrew Jones ; Salil Mehta > Cc: Peter Maydell ; Igor Mammedov > ; qemu-...@nongnu.org; qemu-devel@nongnu.org; > m...@redhat.com >

Re: [PATCH v5] linux-user: syscall: ioctls: support DRM_IOCTL_VERSION

2020-06-03 Thread Laurent Vivier
Le 03/06/2020 à 13:05, Chen Gang a écrit : > On 2020/6/3 下午5:49, Laurent Vivier wrote: >> Le 03/06/2020 à 03:08, cheng...@emindsoft.com.cn a écrit : >>> +#ifdef HAVE_DRM_H >>> + >>> +static void unlock_drm_version(struct drm_version *host_ver) >>> +{ >>> +if (host_ver->name) { >>> +

Re: [PATCH v2] target/arm/cpu: adjust virtual time for arm cpu

2020-06-03 Thread Andrew Jones
On Wed, Jun 03, 2020 at 10:02:08AM +0800, Ying Fang wrote: > Virtual time adjustment was implemented for virt-5.0 machine type, > but the cpu property was enabled only for host-passthrough and > max cpu model. Let's add it for arm cpu which has the gernic > timer feature enabled. > > >

Re: [RFC v3 8/8] vhost-vdpa: introduce vhost-vdpa net client

2020-06-03 Thread Jason Wang
On 2020/6/3 下午4:19, Cindy Lu wrote: +static void vhost_vdpa_cleanup(NetClientState *nc) +{ +VhostVDPAState *s = DO_UPCAST(VhostVDPAState, nc, nc); + +if (s->vhost_net) { +vhost_net_cleanup(s->vhost_net); +g_free(s->vhost_net); +s->vhost_net = NULL; +} + +

Re: [PATCH 3/3] numa: Initialize node initiator with respect to .has_cpu

2020-06-03 Thread Michal Privoznik
On 6/2/20 10:00 AM, Tao Xu wrote: On 6/1/2020 4:10 PM, Michal Privoznik wrote: On 5/29/20 5:09 PM, Igor Mammedov wrote: On Fri, 29 May 2020 15:33:48 +0200 Michal Privoznik wrote: The initiator attribute of a NUMA node is documented as the 'NUMA node that has best performance to given NUMA

Re: [PATCH v2] icount: make dma reads deterministic

2020-06-03 Thread Pavel Dovgalyuk
On 03.06.2020 11:15, Kevin Wolf wrote: Am 03.06.2020 um 07:57 hat Pavel Dovgalyuk geschrieben: On 02.06.2020 18:54, Kevin Wolf wrote: Am 30.04.2020 um 11:02 hat Pavel Dovgalyuk geschrieben: From: Pavel Dovgalyuk Windows guest sometimes makes DMA requests with overlapping target addresses.

Re: [PULL 04/12] hmp: Simplify qom-set

2020-06-03 Thread David Hildenbrand
On 02.06.20 11:26, Dr. David Alan Gilbert wrote: > * Markus Armbruster (arm...@redhat.com) wrote: >> "Dr. David Alan Gilbert (git)" writes: >> >>> From: "Dr. David Alan Gilbert" >>> >>> Simplify qom_set by making it use qmp_qom_set and the JSON parser. >>> >>> (qemu) qom-get /machine smm >>>

[PATCH 1/2] Introduce (x86) CPU model deprecation API

2020-06-03 Thread Robert Hoo
Complement versioned CPU model framework with the ability of marking some versions deprecated. When that CPU model is chosen, get some warning. The warning message is customized, e.g. telling in which future QEMU version will it be obsoleted. The deprecation message will also appear by

[PATCH 2/2] Mark Icelake-Client CPU models deprecated

2020-06-03 Thread Robert Hoo
Going to obsolete Icelake-Client CPU models in the future. Signed-off-by: Robert Hoo --- target/i386/cpu.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index d7ac22f..6c34ea3 100644 --- a/target/i386/cpu.c +++

Re: [PULL 04/12] hmp: Simplify qom-set

2020-06-03 Thread David Hildenbrand
On 03.06.20 13:43, Dr. David Alan Gilbert wrote: > * David Hildenbrand (da...@redhat.com) wrote: >> On 03.06.20 12:43, Dr. David Alan Gilbert wrote: >>> * David Hildenbrand (da...@redhat.com) wrote: On 02.06.20 11:26, Dr. David Alan Gilbert wrote: > * Markus Armbruster (arm...@redhat.com)

Re: [PATCH v4 4/6] iotests: 194: test also migration of dirty bitmap

2020-06-03 Thread Vladimir Sementsov-Ogievskiy
03.06.2020 10:52, Thomas Huth wrote: On 22/05/2020 00.06, Vladimir Sementsov-Ogievskiy wrote: Test that dirty bitmap migration works when we deal with mirror. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- tests/qemu-iotests/194 | 14 ++

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-03 Thread Cindy Lu
On Wed, Jun 3, 2020 at 2:43 PM Jason Wang wrote: > > > On 2020/5/29 下午10:06, Cindy Lu wrote: > > From: Tiwei Bie > > > > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > > vhost-user. The above patch provides a generic device for vDPA purpose, > > this vDPA device exposes

Re: [RFC v3 8/8] vhost-vdpa: introduce vhost-vdpa net client

2020-06-03 Thread Cindy Lu
Hi Jason, On Wed, Jun 3, 2020 at 2:39 PM Jason Wang wrote: > > > On 2020/5/29 下午10:06, Cindy Lu wrote: > > From: Tiwei Bie > > > Similar for this patch, you can change the git author and keep sobs for > both Tiwei and Ling Shan. > > Will Fix this > > > > This patch set introduces a new net

Re: [PATCH v2] icount: make dma reads deterministic

2020-06-03 Thread Pavel Dovgalyuk
On 03.06.2020 11:15, Kevin Wolf wrote: Am 03.06.2020 um 07:57 hat Pavel Dovgalyuk geschrieben: On 02.06.2020 18:54, Kevin Wolf wrote: Am 30.04.2020 um 11:02 hat Pavel Dovgalyuk geschrieben: From: Pavel Dovgalyuk Windows guest sometimes makes DMA requests with overlapping target addresses.

Re: [Question] Regarding PMU initialization within the QEMU for ARM VCPUs

2020-06-03 Thread Auger Eric
Hi Drew, On 6/3/20 11:37 AM, Andrew Jones wrote: > On Mon, Jun 01, 2020 at 03:04:33PM +, Salil Mehta wrote: >> Hello, >> I could see below within function fdt_add_pmu_nodes() part of >> hw/arm/virt.c during virt machine initialization time: >> >> Observation: >> In below function, support of

Re: [PATCH v5 07/11] hw/char: Initial commit of Ibex UART

2020-06-03 Thread LIU Zhiwei
On 2020/6/3 1:54, Alistair Francis wrote: On Tue, Jun 2, 2020 at 5:28 AM LIU Zhiwei wrote: Hi Alistair, There are still some questions I don't understand. 1. Is the baud rate or fifo a necessary feature to simulate? As you can see, qemu_chr_fe_write will send the byte as soon as possible.

[PATCH 0/9] monitor/hmp-cmds: small improvements for migration

2020-06-03 Thread Mao Zhongyi
patch1 ~ patch4 have been r-b, here rebase to HEAD. patch5 ~ patch9 mainly decorate some statistics and minor logic changes of migration, because they all involve migration, so merged into a patchset. Cc: dgilb...@redhat.com Cc: quint...@redhat.com Mao Zhongyi (9): tests/migration: mem leak

[PATCH 2/9] tests/migration: fix unreachable path in stress test

2020-06-03 Thread Mao Zhongyi
If stressone() or stress() exits it's because of a failure because the test runs forever otherwise, so change stressone and stress type to void to make the exit_failure() as the exit function of main(). Signed-off-by: Mao Zhongyi Reviewed-by: Laurent Vivier --- tests/migration/stress.c | 13

RE: [PATCH 3/3] migration/colo: Merge multi checkpoint request into one.

2020-06-03 Thread Zhanghailiang
> -Original Message- > From: Zhang, Chen [mailto:chen.zh...@intel.com] > Sent: Wednesday, June 3, 2020 5:11 PM > To: Zhanghailiang ; Dr . David Alan > Gilbert ; Juan Quintela ; > qemu-dev > Cc: Zhang Chen ; Jason Wang > > Subject: RE: [PATCH 3/3] migration/colo: Merge multi checkpoint

Re: [Question] Regarding PMU initialization within the QEMU for ARM VCPUs

2020-06-03 Thread Andrew Jones
On Mon, Jun 01, 2020 at 03:04:33PM +, Salil Mehta wrote: > Hello, > I could see below within function fdt_add_pmu_nodes() part of > hw/arm/virt.c during virt machine initialization time: > > Observation: > In below function, support of PMU feature is being checked for > each vcpu and if the

Re: [PATCH v1 8/9] plugins: new hwprofile plugin

2020-06-03 Thread Alex Bennée
Robert Foley writes: > Hi, > > On Tue, 2 Jun 2020 at 11:46, Alex Bennée wrote: > >> diff --git a/tests/plugin/hwprofile.c b/tests/plugin/hwprofile.c >> new file mode 100644 >> index 000..f5e0639e762 >> --- /dev/null >> +++ b/tests/plugin/hwprofile.c > >> +static void

Re: [PULL 04/12] hmp: Simplify qom-set

2020-06-03 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > On 03.06.20 12:43, Dr. David Alan Gilbert wrote: > > * David Hildenbrand (da...@redhat.com) wrote: > >> On 02.06.20 11:26, Dr. David Alan Gilbert wrote: > >>> * Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)"

Re: [PATCH v2 00/16] python: add mypy support to python/qemu

2020-06-03 Thread Vladimir Sementsov-Ogievskiy
03.06.2020 00:45, John Snow wrote: Requires: 20200602194844.15258-1-js...@redhat.com Hmm, somehow, I can't find it neither in https://lists.gnu.org/archive/html/qemu-devel/ nor in my thunderbird.. Could you post sequence of your series by subject, or export a git branch? -- Best regards,

Re: [PATCH RFC 01/32] python/qemu: create qemu.lib module

2020-06-03 Thread Kevin Wolf
Am 02.06.2020 um 18:44 hat John Snow geschrieben: > > > On 6/2/20 6:08 AM, Kevin Wolf wrote: > > Am 14.05.2020 um 07:53 hat John Snow geschrieben: > >> move python/qemu/*.py to python/qemu/lib/*.py. > >> > >> To create a namespace package, the 'qemu' directory itself shouldn't > >> have module

[PATCH v4] icount: make dma reads deterministic

2020-06-03 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk Windows guest sometimes makes DMA requests with overlapping target addresses. This leads to the following structure of iov for the block driver: addr size1 addr size2 addr size3 It means that three adjacent disk blocks should be read into the same memory buffer. Windows

Re: [Question] Regarding PMU initialization within the QEMU for ARM VCPUs

2020-06-03 Thread Auger Eric
Hi Drew, On 6/3/20 12:21 PM, Andrew Jones wrote: > On Wed, Jun 03, 2020 at 11:59:23AM +0200, Auger Eric wrote: >> Hi Drew, >> >> On 6/3/20 11:37 AM, Andrew Jones wrote: >>> On Mon, Jun 01, 2020 at 03:04:33PM +, Salil Mehta wrote: Hello, I could see below within function

[PULL 00/15] riscv-to-apply queue

2020-06-03 Thread Alistair Francis
-20200603 for you to fetch changes up to fe0fe4735e798578097758781166cc221319b93d: riscv: Initial commit of OpenTitan machine (2020-06-03 09:11:51 -0700) This is a collection of RISC-V patches for 5.1. This incldues removing deprecated

[PULL 05/15] hw/riscv: spike: Remove deprecated ISA specific machines

2020-06-03 Thread Alistair Francis
The ISA specific Spike machines have been deprecated in QEMU since 4.1, let's finally remove them. Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Reviewed-by: Thomas Huth --- docs/system/deprecated.rst | 17 +-- include/hw/riscv/spike.h | 6 +-

[PULL 07/15] target/riscv: Drop support for ISA spec version 1.09.1

2020-06-03 Thread Alistair Francis
The RISC-V ISA spec version 1.09.1 has been deprecated in QEMU since 4.1. It's not commonly used so let's remove support for it. Signed-off-by: Alistair Francis Reviewed-by: Bin Meng --- docs/system/deprecated.rst| 20 +-- target/riscv/cpu.h|

[PULL 06/15] target/riscv: Remove the deprecated CPUs

2020-06-03 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Bin Meng --- docs/system/deprecated.rst | 33 ++--- target/riscv/cpu.h | 7 --- target/riscv/cpu.c | 28 tests/qtest/machine-none-test.c | 4 ++-- 4 files

[PATCH] tests: fix a memory in test_socket_unix_abstract_good

2020-06-03 Thread Li Qiang
After build qemu with '-fsanitize=address' extra-cflags, 'make check' show following leak: = ==44580==ERROR: LeakSanitizer: detected memory leaks Direct leak of 2500 byte(s) in 1 object(s) allocated from: #0 0x7f1b5a8b8d28 in

[PATCH v2] ati-vga: check mm_index before recursive call

2020-06-03 Thread P J P
From: Prasad J Pandit While accessing VGA registers via ati_mm_read/write routines, a guest may set 's->regs.mm_index' such that it leads to infinite recursion. Check mm_index value to avoid it. Reported-by: Ren Ding Reported-by: Hanqing Zhao Reported-by: Yi Ren Signed-off-by: Prasad J

Re: [PATCH v2] ati-vga: check mm_index before recursive call

2020-06-03 Thread Philippe Mathieu-Daudé
On 6/3/20 8:55 PM, P J P wrote: > From: Prasad J Pandit > > While accessing VGA registers via ati_mm_read/write routines, > a guest may set 's->regs.mm_index' such that it leads to infinite > recursion. Check mm_index value to avoid it. > > Reported-by: Ren Ding > Reported-by: Hanqing Zhao >

Re: [PATCH v6 4/5] 9pfs: T_readdir latency optimization

2020-06-03 Thread Christian Schoenebeck
On Sonntag, 19. April 2020 17:06:17 CEST Christian Schoenebeck wrote: > Make top half really top half and bottom half really bottom half: > > Each T_readdir request handling is hopping between threads (main > I/O thread and background I/O driver threads) several times for > every individual

Re: another tst-arm-mte bug: qemu-system segfaults

2020-06-03 Thread Szabolcs Nagy
The 06/03/2020 09:21, Richard Henderson wrote: > On 6/3/20 6:50 AM, Szabolcs Nagy wrote: > > thanks my tests now get further but later i run into > > the previous assert failure: > > > > target/arm/mte_helper.c:97:allocation_tag_mem: assertion failed: (tag_size > > <= in_page) > > > > i might

Re: [PATCH] tests: fix a memory in test_socket_unix_abstract_good

2020-06-03 Thread Philippe Mathieu-Daudé
On 6/3/20 6:14 PM, Li Qiang wrote: > After build qemu with '-fsanitize=address' extra-cflags, > 'make check' show following leak: > > = > ==44580==ERROR: LeakSanitizer: detected memory leaks > > Direct leak of 2500 byte(s) in 1

[PATCH] hw/sd/sdcard: Restrict Class 6 commands to SCSD cards

2020-06-03 Thread Philippe Mathieu-Daudé
Only SCSD cards support Class 6 (Block Oriented Write Protection) commands. "SD Specifications Part 1 Physical Layer Simplified Spec. v3.01" 4.3.14 Command Functional Difference in Card Capacity Types * Write Protected Group SDHC and SDXC do not support write-protected groups. Issuing

Re: [PATCH v3] osdep: Make MIN/MAX evaluate arguments only once

2020-06-03 Thread Eric Blake
On 6/3/20 11:32 AM, Richard Henderson wrote: I'd prefer we generate a compile-time error than a runtime trap (or nothing, depending on compiler flags controlling __builtin_unreachable). What we have DOES produce a compile-time error.  If either expression to MIN_CONST() is not actually const,

Re: [PULL 04/12] hmp: Simplify qom-set

2020-06-03 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > On 03.06.20 13:43, Dr. David Alan Gilbert wrote: > > * David Hildenbrand (da...@redhat.com) wrote: > >> On 03.06.20 12:43, Dr. David Alan Gilbert wrote: > >>> * David Hildenbrand (da...@redhat.com) wrote: > On 02.06.20 11:26, Dr. David Alan

Re: [PATCH v2] exec: flush the whole TLB if a watchpoint crosses a page boundary

2020-06-03 Thread Philippe Mathieu-Daudé
On 6/3/20 1:24 PM, Alex Bennée wrote: > There is no particular reason why you can't have a watchpoint in TCG > that covers a large chunk of the address space. We could be clever > about it but these cases are pretty rare and we can assume the user > will expect a little performance degradation. >

Re: [PULL 04/12] hmp: Simplify qom-set

2020-06-03 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > On 03.06.20 14:26, David Hildenbrand wrote: > > On 03.06.20 14:24, Dr. David Alan Gilbert wrote: > >> * David Hildenbrand (da...@redhat.com) wrote: > >>> On 03.06.20 13:43, Dr. David Alan Gilbert wrote: > * David Hildenbrand (da...@redhat.com)

RE: [Question] Regarding PMU initialization within the QEMU for ARM VCPUs

2020-06-03 Thread Salil Mehta
Hi Andrew, > From: Andrew Jones [mailto:drjo...@redhat.com] > Sent: Wednesday, June 3, 2020 1:16 PM > To: Salil Mehta > Cc: Peter Maydell ; m...@redhat.com; > qemu-devel@nongnu.org; eric.au...@redhat.com; qemu-...@nongnu.org; Igor > Mammedov > Subject: Re: [Question] Regarding PMU

Re: [PATCH] block/block-copy: block_copy_dirty_clusters: fix failure check

2020-06-03 Thread Max Reitz
On 26.05.20 20:13, Vladimir Sementsov-Ogievskiy wrote: > ret may be > 0 on success path at this point. Fix assertion, which may > crash currently. > > Fixes: 4ce5dd3e9b5ee0fac18625860eb3727399ee965e > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/block-copy.c | 4 +++- > 1 file

Re: [PATCH v2 00/16] python: add mypy support to python/qemu

2020-06-03 Thread John Snow
On 6/3/20 4:24 AM, Vladimir Sementsov-Ogievskiy wrote: > 03.06.2020 00:45, John Snow wrote: >> Requires: 20200602194844.15258-1-js...@redhat.com > > Hmm, somehow, I can't find it neither in > https://lists.gnu.org/archive/html/qemu-devel/ > nor in my thunderbird.. > > Could you post sequence

Re: [PATCH 0/2] virtio-blk: Avoid processing requests on the main context on restart

2020-06-03 Thread Kevin Wolf
Am 03.06.2020 um 11:32 hat Sergio Lopez geschrieben: > On restart, we were scheduling a BH to process queued requests, which > would run before starting up the data plane, leading to those requests > being assigned and started on coroutines on the main context. > > This could cause requests to be

Re: [PATCH 2/5] vhost: involve device backends in feature negotiation

2020-06-03 Thread Stefan Hajnoczi
On Mon, Jun 01, 2020 at 08:51:43PM +0800, Jason Wang wrote: > > On 2020/5/29 下午9:56, Stefan Hajnoczi wrote: > > On Fri, May 29, 2020 at 03:04:54PM +0800, Jason Wang wrote: > > > On 2020/5/23 上午1:17, Stefan Hajnoczi wrote: > > > > Many vhost devices in QEMU currently do not involve the device

[PATCH v3 01/20] exec: Introduce ram_block_discard_(disable|require)()

2020-06-03 Thread David Hildenbrand
We want to replace qemu_balloon_inhibit() by something more generic. Especially, we want to make sure that technologies that really rely on RAM block discards to work reliably to run mutual exclusive with technologies that effectively break it. E.g., vfio will usually pin all guest memory,

Re: [PATCH] ati-vga: increment mm_index in ati_mm_read/write

2020-06-03 Thread BALATON Zoltan
On Wed, 3 Jun 2020, BALATON Zoltan wrote: On Wed, 3 Jun 2020, P J P wrote: +-- On Wed, 3 Jun 2020, Gerd Hoffmann wrote --+ | Hmm, why modify mm_index? Shouldn't we just check it is non-zero | before calling ati_mm_read/ati_mm_write? if (s->regs.mm_index & BIT(31)) { ... } else {

Re: [PATCH v5 07/11] hw/char: Initial commit of Ibex UART

2020-06-03 Thread Alistair Francis
On Wed, Jun 3, 2020 at 3:33 AM LIU Zhiwei wrote: > > On 2020/6/3 1:54, Alistair Francis wrote: > > On Tue, Jun 2, 2020 at 5:28 AM LIU Zhiwei wrote: > >> Hi Alistair, > >> > >> There are still some questions I don't understand. > >> > >> 1. Is the baud rate or fifo a necessary feature to

Re: [PATCH 2/5] linux-user: Add strace support for printing argument of syscalls used for extend attributes

2020-06-03 Thread Laurent Vivier
Le 02/06/2020 à 13:53, Filip Bozuta a écrit : > From: Filip Bozuta > > This patch implements strace argument printing functionality for following > syscalls: > > *getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value > > ssize_t getxattr(const char *path, const

Re: [PATCH v1 8/9] plugins: new hwprofile plugin

2020-06-03 Thread Alex Bennée
Peter Maydell writes: > On Tue, 2 Jun 2020 at 16:54, Alex Bennée wrote: >> >> This is a plugin intended to help with profiling access to various >> bits of system hardware. It only really makes sense for system >> emulation. >> >> It takes advantage of the recently exposed helper API that

Re: [PATCH v3] xen: fix build without pci passthrough

2020-06-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200603160442.3151170-1-anthony.per...@citrix.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT

Re: [RFC PATCH 2/2] linux-user/mmap: Fix Clang 'type-limit-compare' warning

2020-06-03 Thread Richard Henderson
On 6/3/20 9:06 AM, Eric Blake wrote: > Instead of using #if, the following suffices to shut up clang: > > diff --git c/linux-user/mmap.c w/linux-user/mmap.c > index e37803379747..8d9ba201625d 100644 > --- c/linux-user/mmap.c > +++ w/linux-user/mmap.c > @@ -715,7 +715,7 @@ abi_long

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-06-03 Thread Richard Henderson
On Wed, 29 Apr 2020 at 18:54, Wei Wang wrote: > +if (xbzrle_counters.pages == rs->xbzrle_pages_prev) { > +xbzrle_counters.encoding_rate = 0; > +} else if (!encoded_size) { > +xbzrle_counters.encoding_rate = UINT64_MAX; > +} else { > +

[PULL 02/15] riscv: Change the default behavior if no -bios option is specified

2020-06-03 Thread Alistair Francis
From: Bin Meng Per QEMU deprecated doc, QEMU 4.1 introduced support for the -bios option in QEMU for RISC-V for the virt machine and sifive_u machine. The default behavior has been that QEMU does not automatically load any firmware if no -bios option is included. Now 2 releases passed, it's

Re: another tst-arm-mte bug: qemu-system segfaults

2020-06-03 Thread Richard Henderson
On 6/3/20 6:50 AM, Szabolcs Nagy wrote: > thanks my tests now get further but later i run into > the previous assert failure: > > target/arm/mte_helper.c:97:allocation_tag_mem: assertion failed: (tag_size <= > in_page) > > i might be able to reduce it to a small reproducer > this time. i assume

[PULL 09/15] riscv: sifive_e: Manually define the machine

2020-06-03 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Palmer Dabbelt --- include/hw/riscv/sifive_e.h | 4 hw/riscv/sifive_e.c | 41 +++-- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/include/hw/riscv/sifive_e.h

Re: [PATCH v3] osdep: Make MIN/MAX evaluate arguments only once

2020-06-03 Thread Richard Henderson
On 6/2/20 7:29 PM, Eric Blake wrote: > Because: > > #if MIN(...) > > now fails to compile (you can't have { in a preprocessor expression), and: > > #if MIN_CONST(...) > > fails to compile (__builtin_constant_p() is not a preprocessor macro, so it > warns that it is being treated as 0).  The

Re: [PATCH v1 01/12] configure: add --enable-tsan flag + fiber annotations for coroutine-ucontext

2020-06-03 Thread Robert Foley
On Tue, 2 Jun 2020 at 15:22, Alex Bennée wrote: > > > Robert Foley writes: > > > From: Lingfeng Yang > > > > +# Thread sanitizer is, for now, much noisier than the other sanitizers; > > +# keep it separate until that is not the case. > > I think we also need to stop both being enabled at once.

Re: [PATCH v3] xen: fix build without pci passthrough

2020-06-03 Thread Roger Pau Monné
On Wed, Jun 03, 2020 at 05:04:42PM +0100, Anthony PERARD wrote: > From: Roger Pau Monne > > Xen PCI passthrough support may not be available and thus the global > variable "has_igd_gfx_passthru" might be compiled out. Common code > should not access it in that case. > > Unfortunately, we can't

Re: [PATCH v3] xen: fix build without pci passthrough

2020-06-03 Thread Paolo Bonzini
On 03/06/20 18:04, Anthony PERARD wrote: > From: Roger Pau Monne > > Xen PCI passthrough support may not be available and thus the global > variable "has_igd_gfx_passthru" might be compiled out. Common code > should not access it in that case. > > Unfortunately, we can't use

Re: [RFC PATCH 2/2] linux-user/mmap: Fix Clang 'type-limit-compare' warning

2020-06-03 Thread Thomas Huth
On 03/06/2020 20.01, Richard Henderson wrote: > On 6/3/20 9:06 AM, Eric Blake wrote: >> Instead of using #if, the following suffices to shut up clang: >> >> diff --git c/linux-user/mmap.c w/linux-user/mmap.c >> index e37803379747..8d9ba201625d 100644 >> --- c/linux-user/mmap.c >> +++

  1   2   3   >