Re: Sudden slowdown of ARM emulation in master

2020-02-26 Thread Peter Maydell
On Tue, 25 Feb 2020 at 23:08, Niek Linnenbank wrote: > Just now I was working on some small fixes for the cubieboard machine and > rebasing my Allwinner H3 branches. > While doing some testing, I noticed that suddenly the machines were much > slower than before. > I only see this happening

[PATCH v2 13/13] monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups()

2020-02-26 Thread kuhn.chenqun
From: Chen Qun Clang static code analyzer show warning: monitor/hmp-cmds.c:2867:17: warning: Value stored to 'set' is never read set = true; ^ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: "Dr. David Alan Gilbert" Cc: Philippe Mathieu-Daudé

Re: [PATCH v2 13/13] monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups()

2020-02-26 Thread Philippe Mathieu-Daudé
On 2/26/20 9:46 AM, kuhn.chen...@huawei.com wrote: From: Chen Qun Clang static code analyzer show warning: monitor/hmp-cmds.c:2867:17: warning: Value stored to 'set' is never read set = true; ^ Reported-by: Euler Robot Signed-off-by: Chen Qun ---

[PULL v2 12/30] virtio-iommu: Add skeleton

2020-02-26 Thread Michael S. Tsirkin
From: Eric Auger This patchs adds the skeleton for the virtio-iommu device. Signed-off-by: Eric Auger Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Message-Id: <20200214132745.23392-2-eric.au...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL v2 11/30] virtio: gracefully handle invalid region caches

2020-02-26 Thread Michael S. Tsirkin
From: Stefan Hajnoczi The virtqueue code sets up MemoryRegionCaches to access the virtqueue guest RAM data structures. The code currently assumes that VRingMemoryRegionCaches is initialized before device emulation code accesses the virtqueue. An assertion will fail in vring_get_region_caches()

[PULL v2 25/30] libvhost-user: handle NOFD flag in call/kick/err better

2020-02-26 Thread Michael S. Tsirkin
From: Johannes Berg The code here is odd, for example will it print out invalid file descriptor numbers that were never sent in the message. Clean that up a bit so it's actually possible to implement a device that uses polling. Signed-off-by: Johannes Berg Message-Id:

Re: Sudden slowdown of ARM emulation in master

2020-02-26 Thread Howard Spoelstra
On Wed, Feb 26, 2020 at 10:19 AM Igor Mammedov wrote: > On Wed, 26 Feb 2020 00:07:55 +0100 > Niek Linnenbank wrote: > > > Hello Igor and Paolo, > > does following hack solves issue? > > diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c > index a08ab11f65..ab2448c5aa 100644 >

Re: Sudden slowdown of ARM emulation in master

2020-02-26 Thread Igor Mammedov
On Wed, 26 Feb 2020 10:32:38 +0100 Howard Spoelstra wrote: > On Wed, Feb 26, 2020 at 10:19 AM Igor Mammedov wrote: > > > On Wed, 26 Feb 2020 00:07:55 +0100 > > Niek Linnenbank wrote: > > > > > Hello Igor and Paolo, > > > > does following hack solves issue? > > > > diff --git

Re: [PATCH 2/2] qemu-img: free memory before re-assign

2020-02-26 Thread Pan Nengyuan
On 2/26/2020 6:13 PM, Max Reitz wrote: > On 26.02.20 04:30, Pan Nengyuan wrote: >> collect_image_check() is called twice in img_check(), the filename/format >> will be alloced without free the original memory. >> It is not a big deal since the process will exit anyway, but seems like a >>

[PATCH v3 09/10] test: tpm-tis: Get prepared to share tests between ISA and sysbus devices

2020-02-26 Thread Eric Auger
ISA and sysbus TPM-TIS devices will share their tests. Only the main() will change (instantiation option is different). Also the base address of the TPM-TIS device is going to be different. on x86 it is located at 0xFED4 while on ARM it can be located at any location, discovered through the

Re: Sudden slowdown of ARM emulation in master

2020-02-26 Thread Howard Spoelstra
On Wed, Feb 26, 2020 at 9:42 AM Peter Maydell wrote: > On Tue, 25 Feb 2020 at 23:08, Niek Linnenbank > wrote: > > > Just now I was working on some small fixes for the cubieboard machine > and rebasing my Allwinner H3 branches. > > While doing some testing, I noticed that suddenly the machines

[PULL v2 08/30] virtio-crypto: do delete ctrl_vq in virtio_crypto_device_unrealize

2020-02-26 Thread Michael S. Tsirkin
From: Pan Nengyuan Similar to other virtio-deivces, ctrl_vq forgot to delete in virtio_crypto_device_unrealize, this patch fix it. This device has aleardy maintained vq pointers. Thus, we use the new virtio_delete_queue function directly to do the cleanup. The leak stack: Direct leak of 10752

[PULL v2 14/30] virtio-iommu: Implement attach/detach command

2020-02-26 Thread Michael S. Tsirkin
From: Eric Auger This patch implements the endpoint attach/detach to/from a domain. Domain and endpoint internal datatypes are introduced. Both are stored in RB trees. The domain owns a list of endpoints attached to it. Also helpers to get/put end points and domains are introduced. As for the

[PULL v2 13/30] virtio-iommu: Decode the command payload

2020-02-26 Thread Michael S. Tsirkin
From: Eric Auger This patch adds the command payload decoding and introduces the functions that will do the actual command handling. Those functions are not yet implemented. Signed-off-by: Eric Auger Reviewed-by: Jean-Philippe Brucker Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin

[PULL v2 21/30] MAINTAINERS: add virtio-iommu related files

2020-02-26 Thread Michael S. Tsirkin
From: Eric Auger Add a new "virtio-iommu" section with the new files related to this device. Signed-off-by: Eric Auger Message-Id: <20200214132745.23392-11-eric.au...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Peter Maydell --- MAINTAINERS |

Re: [PATCH] hw/intc/arm_gic_kvm: Don't assume kernel can provide a GICv2

2020-02-26 Thread Andrew Jones
On Wed, Feb 26, 2020 at 08:56:03AM +, Peter Maydell wrote: > On Wed, 26 Feb 2020 at 08:52, Andrew Jones wrote: > > Although, many QEMU command line users still won't know what to do > > without an explicit "Try -machine gic-version=host" hint, so that > > might be nice to add too. > > In the

Re: [PATCH v2 01/13] block/stream: Remove redundant statement in stream_run()

2020-02-26 Thread Kevin Wolf
Am 26.02.2020 um 09:46 hat kuhn.chen...@huawei.com geschrieben: > From: Chen Qun > > Clang static code analyzer show warning: > block/stream.c:186:9: warning: Value stored to 'ret' is never read > ret = 0; > ^ ~ > Reported-by: Euler Robot > Signed-off-by: Chen Qun >

[PATCH v3 00/10] vTPM for aarch64

2020-02-26 Thread Eric Auger
This series adds the capability to instantiate an MMIO TPM TIS in ARM virt. It is candidate to qemu 5.0. The existing TPM TIS code is reshuffled into a generic part, the ISA device and the sysbus device. The sysbus TPM-TIS device gets dynamically instantiated in machvirt on the platform bus.

[PATCH v3 03/10] tpm: Separate tpm_tis common functions from isa code

2020-02-26 Thread Eric Auger
Move the device agnostic code into tpm_tis_common.c and put the ISA device specific code into tpm_tis_isa.c Signed-off-by: Eric Auger Reviewed-by: Stefan Berger --- v2 -> v3: - Added Stefan's R-b --- hw/tpm/Makefile.objs | 2 +- hw/tpm/tpm_tis.h |

[PATCH v3 02/10] tpm: Use TPMState as a common struct

2020-02-26 Thread Eric Auger
As we plan to introduce a SysBus TPM TIS device, let's make the TPMState a common struct usable by both the ISADevice and the SysBusDevice. TPMStateISA embeds the struct and inherits from the ISADevice. The prototype of functions bound to be used by both the ISA and SysBus devices is changed to

Re: [PATCH v2 01/13] block/stream: Remove redundant statement in stream_run()

2020-02-26 Thread Kevin Wolf
Am 26.02.2020 um 11:21 hat Chenqun (kuhn) geschrieben: > > > >-Original Message- > >From: Kevin Wolf [mailto:kw...@redhat.com] > >Sent: Wednesday, February 26, 2020 5:51 PM > >To: Chenqun (kuhn) > >Cc: qemu-devel@nongnu.org; qemu-triv...@nongnu.org; > >peter.mayd...@linaro.org;

Re: Sudden slowdown of ARM emulation in master

2020-02-26 Thread Mark Cave-Ayland
On 26/02/2020 10:03, Peter Maydell wrote: >> On Wed, 26 Feb 2020 00:07:55 +0100 >> Niek Linnenbank wrote: >> >>> Hello Igor and Paolo, >> >> does following hack solves issue? >> >> diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c >> index a08ab11f65..ab2448c5aa 100644 >> ---

Re: [PATCH] hw/intc/arm_gic_kvm: Don't assume kernel can provide a GICv2

2020-02-26 Thread Andrew Jones
On Tue, Feb 25, 2020 at 06:24:35PM +, Peter Maydell wrote: > In our KVM GICv2 realize function, we try to cope with old kernels > that don't provide the device control API (KVM_CAP_DEVICE_CTRL): we > try to use the device control, and if that fails we fall back to > assuming that the kernel

Re: Sudden slowdown of ARM emulation in master

2020-02-26 Thread Peter Maydell
On Wed, 26 Feb 2020 at 08:44, Philippe Mathieu-Daudé wrote: > > On 2/26/20 9:41 AM, Peter Maydell wrote: > > On Tue, 25 Feb 2020 at 23:08, Niek Linnenbank > > wrote: > > > >> Just now I was working on some small fixes for the cubieboard machine and > >> rebasing my Allwinner H3 branches. > >>

[PATCH v2 12/13] usb/hcd-ehci: Remove redundant statements

2020-02-26 Thread kuhn.chenqun
From: Chen Qun The "again" assignment is meaningless before g_assert_not_reached. In addition, the break statements no longer needs to be after g_assert_not_reached. Clang static code analyzer show warning: hw/usb/hcd-ehci.c:2108:13: warning: Value stored to 'again' is never read

[PATCH v2 11/13] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write()

2020-02-26 Thread kuhn.chenqun
From: Chen Qun Clang static code analyzer show warning: hw/timer/exynos4210_mct.c:1370:9: warning: Value stored to 'index' is never read index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i); ^ ~ hw/timer/exynos4210_mct.c:1399:9: warning: Value

[PULL v2 06/30] vhost-user-fs: convert to the new virtio_delete_queue function

2020-02-26 Thread Michael S. Tsirkin
From: Pan Nengyuan use the new virtio_delete_queue function to cleanup. Signed-off-by: Pan Nengyuan Cc: "Dr. David Alan Gilbert" Cc: Stefan Hajnoczi Message-Id: <20200225075554.10835-3-pannengy...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL v2 03/30] bios-tables-test: default diff command

2020-02-26 Thread Michael S. Tsirkin
Most people probably just want diff -u. So let's use that as the default. Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/tests/qtest/bios-tables-test.c

[PULL v2 04/30] rebuild-expected-aml.sh: remind about the process

2020-02-26 Thread Michael S. Tsirkin
Remind users of rebuild-expected-aml.sh about the process to follow. Suppress the warning if allowed file list exists - that's a big hint user is already aware of the process. Signed-off-by: Michael S. Tsirkin --- tests/data/acpi/rebuild-expected-aml.sh | 7 +++ 1 file changed, 7

[PULL v2 16/30] virtio-iommu: Implement translate

2020-02-26 Thread Michael S. Tsirkin
From: Eric Auger This patch implements the translate callback Signed-off-by: Eric Auger Reviewed-by: Jean-Philippe Brucker Reviewed-by: Michael S. Tsirkin Message-Id: <20200214132745.23392-6-eric.au...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL v2 26/30] docs: vhost-user: add in-band kick/call messages

2020-02-26 Thread Michael S. Tsirkin
From: Johannes Berg For good reason, vhost-user is currently built asynchronously, that way better performance can be obtained. However, for certain use cases such as simulation, this is problematic. Consider an event-based simulation in which both the device and CPU have scheduled according to

[PULL v2 15/30] virtio-iommu: Implement map/unmap

2020-02-26 Thread Michael S. Tsirkin
From: Eric Auger This patch implements virtio_iommu_map/unmap. Signed-off-by: Eric Auger Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Message-Id: <20200214132745.23392-5-eric.au...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL v2 23/30] libvhost-user-glib: fix VugDev main fd cleanup

2020-02-26 Thread Michael S. Tsirkin
From: Johannes Berg If you try to make a device implementation that can handle multiple connections and allow disconnections (which requires overriding the VHOST_USER_NONE handling), then glib will warn that we remove a src while it's still on the mainloop, and will poll() an FD that doesn't

[PULL v2 24/30] libvhost-user-glib: use g_main_context_get_thread_default()

2020-02-26 Thread Michael S. Tsirkin
From: Johannes Berg If we use NULL, we just get the main program default mainloop here. Using g_main_context_get_thread_default() has basically the same effect, but it lets us start different devices in different threads with different mainloops, which can be useful. Reviewed-by: Stefan

Re: QAPI schema for desired state of LUKS keyslots

2020-02-26 Thread Maxim Levitsky
On Wed, 2020-02-26 at 08:28 +0100, Markus Armbruster wrote: > Max Reitz writes: > > > On 25.02.20 17:48, Markus Armbruster wrote: > > > Max Reitz writes: > > > > > > > On 15.02.20 15:51, Markus Armbruster wrote: > > > > > Review of this patch led to a lengthy QAPI schema design discussion. > >

Re: Sudden slowdown of ARM emulation in master

2020-02-26 Thread Igor Mammedov
On Wed, 26 Feb 2020 00:07:55 +0100 Niek Linnenbank wrote: > Hello Igor and Paolo, does following hack solves issue? diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index a08ab11f65..ab2448c5aa 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -944,7

[PATCH V2] vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM

2020-02-26 Thread Jason Wang
We turn on device IOTLB via VIRTIO_F_IOMMU_PLATFORM unconditionally on platform without IOMMU support. This can lead unnecessary IOTLB transactions which will damage the performance. Fixing this by check whether the device is backed by IOMMU and disable device IOTLB. Reported-by: Halil Pasic

Re: [PATCH 1/2] block/qcow2: do free crypto_opts in qcow2_close()

2020-02-26 Thread Max Reitz
On 26.02.20 04:30, Pan Nengyuan wrote: > 'crypto_opts' forgot to free in qcow2_close(), this patch fix the bellow leak > stack: > > Direct leak of 24 byte(s) in 1 object(s) allocated from: > #0 0x7f0edd81f970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970) > #1 0x7f0edc6d149d in

Re: [PATCH V2] vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM

2020-02-26 Thread Jason Wang
On 2020/2/26 下午5:53, Michael S. Tsirkin wrote: On Wed, Feb 26, 2020 at 05:43:57PM +0800, Jason Wang wrote: We turn on device IOTLB via VIRTIO_F_IOMMU_PLATFORM unconditionally on platform without IOMMU support. This can lead unnecessary IOTLB transactions which will damage the performance.

RE: [PATCH v2 01/13] block/stream: Remove redundant statement in stream_run()

2020-02-26 Thread Chenqun (kuhn)
>-Original Message- >From: Kevin Wolf [mailto:kw...@redhat.com] >Sent: Wednesday, February 26, 2020 5:51 PM >To: Chenqun (kuhn) >Cc: qemu-devel@nongnu.org; qemu-triv...@nongnu.org; >peter.mayd...@linaro.org; Zhanghailiang ; >Euler Robot ; John Snow ; >Max Reitz >Subject: Re: [PATCH v2

[PATCH v3 07/10] docs/specs/tpm: Document TPM_TIS sysbus device for ARM

2020-02-26 Thread Eric Auger
Update the documentation with recent changes related to the sysbus TPM_TIS device addition and add the command line to be used with arm VIRT. Signed-off-by: Eric Auger --- docs/specs/tpm.rst | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] hw/ide: Remove status register read side effect

2020-02-26 Thread BALATON Zoltan
On Wed, 26 Feb 2020, jasper.low...@bt.com wrote: > Problem with that patch is that it removes this clearing from the func > that's also used to emulate ISA IDE ioports which according to their > spec should clear irq on read so that function should be OK but maybe > should not be called by PCI

Re: [PATCH] vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM

2020-02-26 Thread Michael S. Tsirkin
On Wed, Feb 26, 2020 at 02:20:36AM -0500, Jason Wang wrote: > > > - Original Message - > > On Wed, Feb 26, 2020 at 03:06:47PM +0800, Jason Wang wrote: > > > We turn on device IOTLB via VIRTIO_F_IOMMU_PLATFORM unconditionally on > > > platform without IOMMU support. This can lead

Re: [RFC v2 5/6] tpm: Add the SysBus TPM TIS device

2020-02-26 Thread Auger Eric
Hi Ard, On 2/25/20 10:52 AM, Ard Biesheuvel wrote: > On Tue, 25 Feb 2020 at 10:19, Auger Eric wrote: >> >> Hi, >> >> On 2/17/20 7:13 PM, Auger Eric wrote: >>> Hi Stefan, >>> >>> On 2/16/20 7:32 PM, Stefan Berger wrote: On 2/14/20 1:37 PM, Eric Auger wrote: > Introduce the tpm-tis-device

Re: [PATCH 0/4] docs: Miscellaneous rST conversions

2020-02-26 Thread Peter Maydell
On Wed, 26 Feb 2020 at 07:50, Markus Armbruster wrote: > Peter Maydell writes: > > * get the qapidoc generation conversion reviewed and into > >master (since at the moment it outputs into files included > >from qemu-doc) > > Not true. QAPI doc comments go into *separate* manuals, the

[PATCH v2 04/13] scsi/esp-pci: Remove redundant statement in esp_pci_io_write()

2020-02-26 Thread kuhn.chenqun
From: Chen Qun Clang static code analyzer show warning: hw/scsi/esp-pci.c:198:9: warning: Value stored to 'size' is never read size = 4; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Paolo Bonzini Cc:Fam Zheng --- hw/scsi/esp-pci.c | 1 - 1 file

[PATCH v2 05/13] scsi/scsi-disk: Remove redundant statement in scsi_disk_emulate_command()

2020-02-26 Thread kuhn.chenqun
From: Chen Qun Clang static code analyzer show warning: scsi/scsi-disk.c:1918:5: warning: Value stored to 'buflen' is never read buflen = req->cmd.xfer; ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Paolo Bonzini Cc: Fam Zheng ---

[PATCH v2 06/13] display/pxa2xx_lcd: Remove redundant statement in pxa2xx_palette_parse()

2020-02-26 Thread kuhn.chenqun
From: Chen Qun Clang static code analyzer show warning: hw/display/pxa2xx_lcd.c:596:9: warning: Value stored to 'format' is never read format = 0; ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Andrzej Zaborowski Cc: Peter Maydell ---

[PATCH v2 09/13] dma/xlnx-zdma: Remove redundant statement in zdma_write_dst()

2020-02-26 Thread kuhn.chenqun
From: Chen Qun Clang static code analyzer show warning: hw/dma/xlnx-zdma.c:399:13: warning: Value stored to 'dst_type' is never read dst_type = FIELD_EX32(s->dsc_dst.words[3], ZDMA_CH_DST_DSCR_WORD3, ^ ~~~

[PULL v2 05/30] vhost-user-fs: do delete virtio_queues in unrealize

2020-02-26 Thread Michael S. Tsirkin
From: Pan Nengyuan Similar to other virtio device(https://patchwork.kernel.org/patch/11399237/), virtio queues forgot to delete in unrealize, and aslo error path in realize, this patch fix these memleaks, the leak stack is as follow: Direct leak of 57344 byte(s) in 1 object(s) allocated from:

[PULL v2 28/30] acpi: cpuhp: document CPHP_GET_CPU_ID_CMD command

2020-02-26 Thread Michael S. Tsirkin
From: Igor Mammedov Commit 3a61c8db9d25 introduced CPHP_GET_CPU_ID_CMD command but did not sufficiently describe it. Fix it by adding missing command documentation. Fixes: 3a61c8db9d25 ("acpi: cpuhp: add CPHP_GET_CPU_ID_CMD command") Signed-off-by: Igor Mammedov Reviewed-by: Laszlo Ersek

[PULL v2 29/30] vhost-user: only set slave channel for first vq

2020-02-26 Thread Michael S. Tsirkin
From: Adrian Moreno When multiqueue is enabled, a vhost_dev is created for each queue pair. However, only one slave channel is needed. Fixes: 4bbeeba023f2 (vhost-user: add slave-req-fd support) Cc: marcandre.lur...@redhat.com Signed-off-by: Adrian Moreno Message-Id:

[PULL v2 18/30] virtio-iommu: Support migration

2020-02-26 Thread Michael S. Tsirkin
From: Eric Auger Add Migration support. We rely on recently added gtree and qlist migration. We only migrate the domain gtree. The endpoint gtree is re-constructed in a post-load operation. Signed-off-by: Eric Auger Acked-by: Peter Xu Reviewed-by: Juan Quintela Reviewed-by: Michael S.

Re: [PATCH v4 00/10] Further bitmaps improvements

2020-02-26 Thread Vladimir Sementsov-Ogievskiy
gently ping.. almost all patches has r-b marks (except for 5 and 8) 05.02.2020 14:20, Vladimir Sementsov-Ogievskiy wrote: Hi! The main feature here is improvement of _next_dirty_area API, which I'm going to use then for backup / block-copy. Somehow, I thought that it was merged, but seems I

Re: [PATCH 2/2] qemu-img: free memory before re-assign

2020-02-26 Thread Max Reitz
On 26.02.20 04:30, Pan Nengyuan wrote: > collect_image_check() is called twice in img_check(), the filename/format > will be alloced without free the original memory. > It is not a big deal since the process will exit anyway, but seems like a > clean code and it will remove the warning spotted

[PATCH v3 08/10] test: tpm: pass optional machine options to swtpm test functions

2020-02-26 Thread Eric Auger
We plan to use swtpm test functions on ARM for testing the sysbus TPM-TIS device. However on ARM there is no default machine type. So we need to explictly pass some machine options on startup. Let's allow this by adding a new parameter to both swtpm test functions and update all call sites.

[PATCH v3 10/10] test: tpm-tis: Add Sysbus TPM-TIS device test

2020-02-26 Thread Eric Auger
The tests themselves are the same as the ISA device ones. Only the main() changes as the "tpm-tis-device" device gets instantiated. Also the base address of the device is not 0xFED4 anymore but matches the base address of the ARM virt platform bus. Signed-off-by: Eric Auger ---

[PATCH v3 05/10] tpm: Add the SysBus TPM TIS device

2020-02-26 Thread Eric Auger
Introduce the tpm-tis-device which is a sysbus device and is bound to be used on ARM. Signed-off-by: Eric Auger Reviewed-by: Stefan Berger --- v2 -> v3: - Added Stefan's R-b --- hw/tpm/Kconfig | 5 ++ hw/tpm/Makefile.objs| 1 + hw/tpm/tpm_tis_sysbus.c | 159

[PATCH v3 01/10] tpm: rename TPM_TIS into TPM_TIS_ISA

2020-02-26 Thread Eric Auger
As we plan to introduce a sysbus TPM_TIS, let's rename TPM_TIS into TPM_TIS_ISA. Signed-off-by: Eric Auger Reviewed-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé --- RFC v2 -> PATCH: - added Philippe and Stefan's R-b --- hw/i386/acpi-build.c | 6 +++--- hw/tpm/tpm_tis.c | 4 ++--

Re: [PATCH v2 03/13] block/file-posix: Remove redundant statement in raw_handle_perm_lock()

2020-02-26 Thread Kevin Wolf
Am 26.02.2020 um 09:46 hat kuhn.chen...@huawei.com geschrieben: > From: Chen Qun > > Clang static code analyzer show warning: > block/file-posix.c:891:9: warning: Value stored to 'op' is never read > op = RAW_PL_ABORT; > ^ > > Reported-by: Euler Robot >

Re: Sudden slowdown of ARM emulation in master

2020-02-26 Thread Philippe Mathieu-Daudé
On 2/26/20 9:41 AM, Peter Maydell wrote: On Tue, 25 Feb 2020 at 23:08, Niek Linnenbank wrote: Just now I was working on some small fixes for the cubieboard machine and rebasing my Allwinner H3 branches. While doing some testing, I noticed that suddenly the machines were much slower than

Re: [PATCH] hw/intc/arm_gic_kvm: Don't assume kernel can provide a GICv2

2020-02-26 Thread Peter Maydell
On Wed, 26 Feb 2020 at 08:52, Andrew Jones wrote: > Although, many QEMU command line users still won't know what to do > without an explicit "Try -machine gic-version=host" hint, so that > might be nice to add too. In the GIC code we don't know if the machine even has a gic-version property, so

Re: [PATCH 1/1] target/riscv: Fix VS mode interrupts forwarding.

2020-02-26 Thread Rajnesh Kanwal
Here is the link to the patch https://lists.nongnu.org/archive/html/qemu-riscv/2020-01/msg00191.html -Rajnesh On Tue, Feb 25, 2020 at 12:06 AM Alistair Francis wrote: > On Sun, Feb 23, 2020 at 11:23 AM Jose Martins > wrote: > > > > Hello rajnesh, > > > > I had already submitted almost this

Re: Sudden slowdown of ARM emulation in master

2020-02-26 Thread Philippe Mathieu-Daudé
On 2/26/20 9:48 AM, Peter Maydell wrote: On Wed, 26 Feb 2020 at 08:44, Philippe Mathieu-Daudé wrote: On 2/26/20 9:41 AM, Peter Maydell wrote: On Tue, 25 Feb 2020 at 23:08, Niek Linnenbank wrote: Just now I was working on some small fixes for the cubieboard machine and rebasing my

Re: [PATCH v2 09/13] dma/xlnx-zdma: Remove redundant statement in zdma_write_dst()

2020-02-26 Thread Philippe Mathieu-Daudé
On 2/26/20 9:46 AM, kuhn.chen...@huawei.com wrote: From: Chen Qun Clang static code analyzer show warning: hw/dma/xlnx-zdma.c:399:13: warning: Value stored to 'dst_type' is never read dst_type = FIELD_EX32(s->dsc_dst.words[3], ZDMA_CH_DST_DSCR_WORD3, ^

[PULL v2 27/30] libvhost-user: implement in-band notifications

2020-02-26 Thread Michael S. Tsirkin
From: Johannes Berg Add support for VHOST_USER_PROTOCOL_F_IN_BAND_NOTIFICATIONS, but as it's not desired by default, don't enable it unless the device implementation opts in by returning it from its protocol features callback. Note that I updated vu_set_vring_err_exec(), but didn't add any

[PULL v2 17/30] virtio-iommu: Implement fault reporting

2020-02-26 Thread Michael S. Tsirkin
From: Eric Auger The event queue allows to report asynchronous errors. The translate function now injects faults when relevant. Signed-off-by: Eric Auger Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Message-Id: <20200214132745.23392-7-eric.au...@redhat.com> Reviewed-by: Michael S.

[PULL v2 22/30] libvhost-user: implement VHOST_USER_PROTOCOL_F_REPLY_ACK

2020-02-26 Thread Michael S. Tsirkin
From: Johannes Berg This is really simple, since we know whether a response is already requested or not, so we can just send a (successful) response when there isn't one already. Given that, it's not all _that_ useful but the master can at least be sure the message was processed, and we can

[PULL v2 30/30] Fixed assert in vhost_user_set_mem_table_postcopy

2020-02-26 Thread Michael S. Tsirkin
From: Raphael Norwitz The current vhost_user_set_mem_table_postcopy() implementation populates each region of the VHOST_USER_SET_MEM_TABLE message without first checking if there are more than VHOST_MEMORY_MAX_NREGIONS already populated. This can cause memory corruption if too many regions are

Re: [edk2-devel] A problem with live migration of UEFI virtual machines

2020-02-26 Thread Laszlo Ersek
Hi Andrew, On 02/25/20 22:35, Andrew Fish wrote: > Laszlo, > > The FLASH offsets changing breaking things makes sense. > > I now realize this is like updating the EFI ROM without rebooting the > system. Thus changes in how the new EFI code works is not the issue. > > Is this migration event

Re: [PATCH V2] vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM

2020-02-26 Thread Michael S. Tsirkin
On Wed, Feb 26, 2020 at 05:43:57PM +0800, Jason Wang wrote: > We turn on device IOTLB via VIRTIO_F_IOMMU_PLATFORM unconditionally on > platform without IOMMU support. This can lead unnecessary IOTLB > transactions which will damage the performance. > > Fixing this by check whether the device is

Re: [PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open()

2020-02-26 Thread Kevin Wolf
Am 26.02.2020 um 09:46 hat kuhn.chen...@huawei.com geschrieben: > From: Chen Qun > > Clang static code analyzer show warning: > block/iscsi.c:1920:9: warning: Value stored to 'flags' is never read > flags &= ~BDRV_O_RDWR; > ^ > > Reported-by: Euler Robot >

[PATCH v3 06/10] hw/arm/virt: vTPM support

2020-02-26 Thread Eric Auger
Let the TPM TIS SYSBUS device be dynamically instantiable in ARM virt. A device tree node is dynamically created (TPM via MMIO). The TPM Physical Presence interface (PPI) is not supported. To run with the swtmp TPM emulator, the qemu command line must be augmented with: -chardev

[PATCH v3 04/10] tpm: Separate TPM_TIS and TPM_TIS_ISA configs

2020-02-26 Thread Eric Auger
Let's separate the compilation of tpm_tis_common.c from the compilation of tpm_tis_isa.c The common part will be also compiled along with the tpm_tis_sysbus device. Signed-off-by: Eric Auger Reviewed-by: Philippe Mathieu-Daudé --- v2 -> v3: - added Phillipe's R-b ---

RE: [PATCH v4 2/3] acpi:pci-expender-bus: Add pxb support for arm

2020-02-26 Thread miaoyubo
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Tuesday, February 25, 2020 9:12 PM > To: miaoyubo > Cc: Philippe Mathieu-Daudé ; > peter.mayd...@linaro.org; shannon.zha...@gmail.com; > berra...@redhat.com; qemu-devel@nongnu.org; Xiexiangyou > ;

RE: [PATCH v2 01/13] block/stream: Remove redundant statement in stream_run()

2020-02-26 Thread Chenqun (kuhn)
>-Original Message- >From: Kevin Wolf [mailto:kw...@redhat.com] >Sent: Wednesday, February 26, 2020 6:36 PM >To: Chenqun (kuhn) >Cc: John Snow ; qemu-devel@nongnu.org; qemu- >triv...@nongnu.org; peter.mayd...@linaro.org; Zhanghailiang >; Euler Robot >; Max Reitz >Subject: Re: [PATCH v2

RE: [PATCH v4 2/3] acpi:pci-expender-bus: Add pxb support for arm

2020-02-26 Thread miaoyubo
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Tuesday, February 25, 2020 9:15 PM > To: miaoyubo > Cc: peter.mayd...@linaro.org; shannon.zha...@gmail.com; Xiexiangyou > ; imamm...@redhat.com; qemu- > de...@nongnu.org; berra...@redhat.com > Subject: Re:

Re: [PATCH v6 10/18] target/ppc: Correct RMLS table

2020-02-26 Thread Greg Kurz
On Tue, 25 Feb 2020 10:37:16 +1100 David Gibson wrote: > The table of RMA limits based on the LPCR[RMLS] field is slightly wrong. > We're missing the RMLS == 0 => 256 GiB RMA option, which is available on > POWER8, so add that. > > The comment that goes with the table is much more wrong. We

[PATCH v2 01/13] block/stream: Remove redundant statement in stream_run()

2020-02-26 Thread kuhn.chenqun
From: Chen Qun Clang static code analyzer show warning: block/stream.c:186:9: warning: Value stored to 'ret' is never read ret = 0; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: John Snow --- Cc: John Snow Cc: Kevin Wolf Cc: Max Reitz ---

[PATCH v2 00/13] redundant code: Fix warnings reported by Clang static code analyzer

2020-02-26 Thread kuhn.chenqun
From: Chen Qun Since v1: - Patch1: Addressed John Snow review comment. - Patch12:Addressed Philippe Mathieu-Daudé review comment. - Patch9: Move the 'dst_type' declaration to while() statement. - Patch13: Move the 'set' declaration to the for() statement. Chen Qun (13): block/stream: Remove

[PATCH v2 07/13] display/exynos4210_fimd: Remove redundant statement in exynos4210_fimd_update()

2020-02-26 Thread kuhn.chenqun
From: Chen Qun Clang static code analyzer show warning: hw/display/exynos4210_fimd.c:1313:17: warning: Value stored to 'is_dirty' is never read is_dirty = false; Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Igor Mitsyanko Cc: Peter Maydell ---

[PATCH v2 02/13] block/iscsi:Remove redundant statement in iscsi_open()

2020-02-26 Thread kuhn.chenqun
From: Chen Qun Clang static code analyzer show warning: block/iscsi.c:1920:9: warning: Value stored to 'flags' is never read flags &= ~BDRV_O_RDWR; ^ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Ronnie Sahlberg Cc: Paolo Bonzini Cc: Peter

[PATCH v2 10/13] migration/vmstate: Remove redundant statement in vmstate_save_state_v()

2020-02-26 Thread kuhn.chenqun
From: Chen Qun The "ret" has been assigned in all branches. It didn't need to be assigned separately. Clang static code analyzer show warning: migration/vmstate.c:365:17: warning: Value stored to 'ret' is never read ret = 0; ^ ~ Reported-by: Euler Robot

[PATCH v2 08/13] display/blizzard: Remove redundant statement in blizzard_draw_line16_32()

2020-02-26 Thread kuhn.chenqun
From: Chen Qun Clang static code analyzer show warning: hw/display/blizzard.c:940:9: warning: Value stored to 'data' is never read data >>= 5; ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Andrzej Zaborowski Cc: Peter Maydell --- hw/display/blizzard.c

[PATCH v2 03/13] block/file-posix: Remove redundant statement in raw_handle_perm_lock()

2020-02-26 Thread kuhn.chenqun
From: Chen Qun Clang static code analyzer show warning: block/file-posix.c:891:9: warning: Value stored to 'op' is never read op = RAW_PL_ABORT; ^ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Kevin Wolf Cc: Max Reitz --- block/file-posix.c | 1

[PULL v2 00/30] virtio, pc: fixes, features

2020-02-26 Thread Michael S. Tsirkin
changes from v1: dropped vhost changes, hope this fixes build on Mac OS. The following changes since commit 9a8abceb5f01d1066d3a1ac5a33aabcbaeec1860: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-docs-20200225' into staging (2020-02-25 11:03:47 +) are available in the Git

[PULL v2 01/30] bios-tables-test: tell people how to update

2020-02-26 Thread Michael S. Tsirkin
For now just a pointer to the source file. Signed-off-by: Michael S. Tsirkin Reviewed-by: Laurent Vivier Reviewed-by: Thomas Huth --- tests/qtest/bios-tables-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qtest/bios-tables-test.c

[PULL v2 02/30] bios-tables-test: fix up DIFF generation

2020-02-26 Thread Michael S. Tsirkin
Turns out it goes to stdout which is suppressed even with V=1. Force DIFF output to stderr to make it visible. Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/qtest/bios-tables-test.c

[PULL v2 07/30] virtio-pmem: do delete rq_vq in virtio_pmem_unrealize

2020-02-26 Thread Michael S. Tsirkin
From: Pan Nengyuan Similar to other virtio-devices, rq_vq forgot to delete in virtio_pmem_unrealize, this patch fix it. This device has already maintained a vq pointer, thus we use the new virtio_delete_queue function directly to do the cleanup. Reported-by: Euler Robot Signed-off-by: Pan

[PULL v2 10/30] vhost-user-blk: convert to new virtio_delete_queue

2020-02-26 Thread Michael S. Tsirkin
From: Pan Nengyuan use the new virtio_delete_queue function to cleanup. Signed-off-by: Pan Nengyuan Message-Id: <20200224041336.30790-3-pannengy...@huawei.com> Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[Bug 1864814] [NEW] Improve UX for macOS when launching from a fullscreen app

2020-02-26 Thread Peter Vegh
Public bug reported: System/setup: * MacBook Pro, macOS (any version from the last 2 years), external monitor. * IDE on the laptop, emulator is used on the external monitor. Currently, when starting the emulator from e.g. Android Studio or IntelliJ IDEA, which is set to fullscreen mode on the

[PULL v2 20/30] hw/arm/virt: Add the virtio-iommu device tree mappings

2020-02-26 Thread Michael S. Tsirkin
From: Eric Auger Adds the "virtio,pci-iommu" node in the host bridge node and the RID mapping, excluding the IOMMU RID. This is done in the virtio-iommu-pci hotplug handler which gets called only if no firmware is loaded or if -no-acpi is passed on the command line. As non DT integration is not

[PULL v2 09/30] vhost-user-blk: delete virtioqueues in unrealize to fix memleaks

2020-02-26 Thread Michael S. Tsirkin
From: Pan Nengyuan virtio queues forgot to delete in unrealize, and aslo error path in realize, this patch fix these memleaks, the leak stack is as follow: Direct leak of 114688 byte(s) in 16 object(s) allocated from: #0 0x7f24024fdbf0 in calloc (/lib64/libasan.so.3+0xcabf0) #1

Re: [PATCH] vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM

2020-02-26 Thread Jason Wang
On 2020/2/26 下午4:12, Michael S. Tsirkin wrote: On Wed, Feb 26, 2020 at 02:20:36AM -0500, Jason Wang wrote: - Original Message - On Wed, Feb 26, 2020 at 03:06:47PM +0800, Jason Wang wrote: We turn on device IOTLB via VIRTIO_F_IOMMU_PLATFORM unconditionally on platform without IOMMU

[PULL v2 19/30] virtio-iommu-pci: Add virtio iommu pci support

2020-02-26 Thread Michael S. Tsirkin
From: Eric Auger This patch adds virtio-iommu-pci, which is the pci proxy for the virtio-iommu device. Currently non DT integration is not yet supported by the kernel. So the machine must implement a hotplug handler for the virtio-iommu-pci device that creates the device tree iommu-map bindings

Re: Sudden slowdown of ARM emulation in master

2020-02-26 Thread Igor Mammedov
On Wed, 26 Feb 2020 09:45:48 +0100 Howard Spoelstra wrote: > On Wed, Feb 26, 2020 at 9:42 AM Peter Maydell > wrote: > > > On Tue, 25 Feb 2020 at 23:08, Niek Linnenbank > > wrote: > > > > > Just now I was working on some small fixes for the cubieboard machine > > and rebasing my Allwinner

Re: Sudden slowdown of ARM emulation in master

2020-02-26 Thread Peter Maydell
On Wed, 26 Feb 2020 at 09:19, Igor Mammedov wrote: > > On Wed, 26 Feb 2020 00:07:55 +0100 > Niek Linnenbank wrote: > > > Hello Igor and Paolo, > > does following hack solves issue? > > diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c > index a08ab11f65..ab2448c5aa 100644 > ---

Re: [RFC PATCH v2] target/ppc: Enable hardfloat for PPC

2020-02-26 Thread Programmingkid
> On Feb 25, 2020, at 7:09 AM, BALATON Zoltan wrote: > > On Mon, 24 Feb 2020, Programmingkid wrote: >> Intel Core i5-2500S CPU @ 2.70GHz. > [...] >> Ok, I did test on the G4, here are my results: >> >> Git commit: c1e667d2598b9b3ce62b8e89ed22dd38dfe9f57f >> Mac OS 10.4.3 VM >> -cpu G4 >> -USB

Re: [PATCH 4/4] docs: Convert qemu-deprecated.texi to rST

2020-02-26 Thread Aleksandar Markovic
On Tuesday, February 25, 2020, Peter Maydell wrote: > > Convert the documentation of deprecated features to rST. > > s/depcreated/deprecated at two places below (unless there is (and suitable in the context) an english word "depcreated", that is not known to me). Aleksandar > We put the

[PATCH 15/18] docs/system: Convert security.texi to rST format

2020-02-26 Thread Paolo Bonzini
From: Peter Maydell security.texi is included from qemu-doc.texi but is not used in the qemu.1 manpage. So we can do a straightforward conversion of the contents, which go into the system manual. Signed-off-by: Peter Maydell Signed-off-by: Paolo Bonzini --- docs/system/index.rst| 1 +

  1   2   3   4   5   >