Re: [Qemu-devel] [PATCH v5 1/3] ACPI: Add new ACPI structures and macros

2017-07-13 Thread gengdongjiu
Michael, Thanks for your review. On 2017/7/14 1:01, Michael S. Tsirkin wrote: >> +typedef struct GhesState { >> +uint64_t ghes_addr_le; >> +} GhesState; >> + >> +void ghes_build_acpi(GArray *table_data, GArray *hardware_error, >> +BIOSLinker *linker); >> +void

Re: [Qemu-devel] [PATCH v3] hw/i386: Deprecate the machines pc-0.10 to pc-1.2

2017-07-13 Thread Thomas Huth
On 14.07.2017 01:04, Michael S. Tsirkin wrote: > On Thu, Jul 13, 2017 at 12:20:10PM -0300, Eduardo Habkost wrote: >> On Thu, Jul 13, 2017 at 04:00:00AM +0300, Michael S. Tsirkin wrote: >>> On Wed, Jul 12, 2017 at 10:22:33AM +0200, Thomas Huth wrote: We don't want to carry along old machine

Re: [Qemu-devel] [PULL 24/42] configure: add --disable-tcg configure option

2017-07-13 Thread Philippe Mathieu-Daudé
Hi Paolo, trying "./configure --disable-docs --disable-tcg" I get: CC x86_64-softmmu/exec.o qemu/exec.c: In function ‘breakpoint_invalidate’: qemu/exec.c:797:9: error: implicit declaration of function ‘tb_invalidate_phys_addr’ [-Werror=implicit-function-declaration]

Re: [Qemu-devel] [Qemu-arm] [PATCH 5/7] hw/arm/mps2: Add timers

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/11/2017 08:17 AM, Peter Maydell wrote: Add the CMSDK APB timers to the MPS2 board. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/mps2.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/arm/mps2.c

Re: [Qemu-devel] [Qemu-arm] [PATCH 4/7] hw/char/cmsdk-apb-timer: Implement CMSDK APB timer device

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/11/2017 08:17 AM, Peter Maydell wrote: Implement a model of the simple timer device found in the CMSDK. Good candidate to reference in a wiki page HowToCreateNewDeviceInQEMU Signed-off-by: Peter Maydell --- hw/timer/Makefile.objs | 1 +

Re: [Qemu-devel] [PATCH 0/3] migration: export cap/params to qdev props

2017-07-13 Thread Peter Xu
On Wed, Jul 12, 2017 at 04:05:58PM -0300, Eduardo Habkost wrote: > On Wed, Jul 12, 2017 at 02:53:40PM +0800, Peter Xu wrote: > [...] > > These properties should only be used for debugging/testing purpose, > > and we should not guarantee any interface compatibility for them (just > > like HMP). >

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Never use 'uname' to identify target OS

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 12:15 PM, Peter Maydell wrote: For a very long time we have used 'uname -s' as our fallback if we don't identify the target OS using a compiler #define. This obviously doesn't work for cross-compilation, and we've had a comment suggesting we fix this in configure for a long time.

Re: [Qemu-devel] [PATCH v3 4/4] intel_iommu: implement mru list for iotlb

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 08:49:44PM +0300, Michael S. Tsirkin wrote: > On Wed, Jul 12, 2017 at 04:13:43PM +0800, Peter Xu wrote: > > It is not wise to disgard all the IOTLB cache when cache size reaches > > max, but that's what we do now. A slightly better (but still simple) way > > to do this is,

Re: [Qemu-devel] [PATCH v3 4/4] intel_iommu: implement mru list for iotlb

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 04:48:42PM +0800, Jason Wang wrote: > > > On 2017年07月12日 16:13, Peter Xu wrote: > >It is not wise to disgard all the IOTLB cache when cache size reaches > >max, but that's what we do now. A slightly better (but still simple) way > >to do this is, we just throw away the

Re: [Qemu-devel] [PATCH 0/3] migration: export cap/params to qdev props

2017-07-13 Thread Peter Xu
On Wed, Jul 12, 2017 at 08:02:40PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > We have the MigrationState as QDev now (which seems crazy). Let's > > continue to benefit. > > > > This series is exporting all migration capabilities/params as global > >

Re: [Qemu-devel] [PATCH v3 2/4] intel_iommu: let iotlb size tunable

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 08:47:00PM +0300, Michael S. Tsirkin wrote: > On Wed, Jul 12, 2017 at 04:13:41PM +0800, Peter Xu wrote: > > We were having static IOTLB size as 1024. Let it be a tunable. We can > > also turns IOTLB off if we want, by specify the size as zero. > > > > The tunable is named

Re: [Qemu-devel] [PATCH v3 1/4] intel_iommu: fix VTD_PAGE_MASK

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 04:41:32PM +0800, Jason Wang wrote: > > > On 2017年07月12日 16:13, Peter Xu wrote: > >IOMMUTLBEntry.iova is returned incorrectly in one PT path (though mostly > >we cannot really trigger this path, even if we do, we are mostly > >disgarding this value, so it didn't break

[Qemu-devel] Poor 8K random IO performance inside the guest

2017-07-13 Thread Nagarajan, Padhu (HPE Storage)
During an 8K random-read fio benchmark, we observed poor performance inside the guest in comparison to the performance seen on the host block device. The table below shows the IOPS on the host and inside the guest with both virtioscsi (scsimq) and virtioblk (blkmq).

Re: [Qemu-devel] [PATCH v2 12/29] ui: use DIV_ROUND_UP

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- ui/cursor.c |

Re: [Qemu-devel] [PATCH v2 28/29] test-iov: replace g_malloc()+memcpy() with g_memdup()

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I found these pattern via grepping the source tree. I don't have a coccinelle script for it! Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- tests/test-iov.c | 3 +--

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 14/29] virtio-gpu: use DIV_ROUND_UP

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé ---

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 21/29] msix: use DIV_ROUND_UP

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/pci/msix.c

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 16/29] console: use DIV_ROUND_UP

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé ---

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 18/29] piix: use DIV_ROUND_UP

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé ---

Re: [Qemu-devel] [PATCH v2 17/29] virtio-serial: use DIV_ROUND_UP

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:32 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau --- hw/char/virtio-serial-bus.c | 8 1 file changed, 4

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 05/29] i8254: use QEMU_ALIGN_DOWN

2017-07-13 Thread Philippe Mathieu-Daudé
On 07/13/2017 01:31 PM, Marc-André Lureau wrote: I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé ---

[Qemu-devel] [PATCH v2] spapr: ignore decr interrupts when MSR_EE is disabled

2017-07-13 Thread Nikunj A Dadhania
Rebooting a SMP TCG guest is broken for both single/multi threaded TCG. When reset happens, all the CPUs are in halted state. First CPU is brought out of reset and secondary CPUs would be initialized by the guest kernel using a rtas call start-cpu. However, in case of TCG, decrementer interrupts

Re: [Qemu-devel] [PATCH V7 00/12] Add COLO-proxy virtio-net support

2017-07-13 Thread Jason Wang
On 2017年07月04日 14:53, Zhang Chen wrote: If user use -device virtio-net-pci, virtio-net driver will add a header to raw net packet that colo-proxy can't handle it. COLO-proxy just focus on the packet payload, so we skip the virtio-net header to compare the sent packet that primary guest's to

Re: [Qemu-devel] [PATCH v2 3/5] migration/rdma: Allow cancelling while waiting for wrid

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 12:56:47PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > When waiting for a WRID, if the other side dies we end up waiting > for ever with no way to cancel the migration. > Cure this by poll()ing the fd first with a

Re: [Qemu-devel] [PATCH V2 3/4] net/colo-compare.c: Optimize unpredictable tcp options comparison

2017-07-13 Thread Jason Wang
On 2017年07月13日 13:52, Zhang Chen wrote: When network is busy, some tcp options(like sack) will unpredictable occur in primary side or secondary side. it will make packet size not same, but the two packet's payload is identical. colo just care about packet payload, so we skip the option field.

Re: [Qemu-devel] [PATCH v2 2/5] migration: Close file on failed migration load

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 12:56:46PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Closing the file before exit on a failure allows > the source to cleanup better, especially with RDMA. > > Partial fix for

Re: [Qemu-devel] [PATCH V2 2/4] net/colo-compare.c: Compare the tcp packets that has the same sequence number

2017-07-13 Thread Jason Wang
On 2017年07月13日 13:52, Zhang Chen wrote: If primary packet's sequence number not same with secondary packet's sequence number, no need to compare the packet other field. Signed-off-by: Zhang Chen --- net/colo-compare.c | 6 ++ 1 file changed, 6

Re: [Qemu-devel] [PATCH V2 1/4] net/colo-compare.c: Add checkpoint min period to optimize performance

2017-07-13 Thread Jason Wang
On 2017年07月13日 13:52, Zhang Chen wrote: If colo-compare find out the first different packet that means the following packet almost is different. we needn't do a lot of checkpoint in this time, so we set the no-need-checkpoint peroid, default just set 3 second. Signed-off-by: Zhang Chen

Re: [Qemu-devel] CPU hotplug on POWER9 (TCG) fails in ppc_radix64_handle_mmu_fault

2017-07-13 Thread Suraj Jitindar Singh
Hi Cedric, On Wed, 2017-07-12 at 19:19 +0200, Cédric Le Goater wrote: > Hi,  > > Today, if you try to hotplug a CPU on a POWER9 guest (TCG), it fails > with an assert on the LPCR_UPRT bit missing in > ppc_radix64_handle_mmu_fault() > >   (qemu) device_add

Re: [Qemu-devel] [PATCH 1/3] qdev: provide DEFINE_PROP_INT64()

2017-07-13 Thread Peter Xu
On Thu, Jul 13, 2017 at 04:05:32PM +, Marc-André Lureau wrote: [...] > > diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h > > index 0604c33..2939614 100644 > > --- a/include/hw/qdev-properties.h > > +++ b/include/hw/qdev-properties.h > > @@ -13,6 +13,7 @@ extern

Re: [Qemu-devel] [PATCH 3/5] migration/rdma: Allow cancelling while waiting for wrid

2017-07-13 Thread Peter Xu
On Wed, Jul 12, 2017 at 01:36:07PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Jul 04, 2017 at 07:49:13PM +0100, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > When waiting for a WRID, if

Re: [Qemu-devel] [PATCH 2/5] migration: Close file on failed migration load

2017-07-13 Thread Peter Xu
On Wed, Jul 12, 2017 at 12:00:22PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Jul 04, 2017 at 07:49:12PM +0100, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > Closing the file before

Re: [Qemu-devel] [RFC 22/29] vhost+postcopy: Call wakeups

2017-07-13 Thread Peter Xu
On Wed, Jul 12, 2017 at 05:00:04PM +0200, Andrea Arcangeli wrote: > On Tue, Jul 11, 2017 at 12:22:32PM +0800, Peter Xu wrote: > > On Wed, Jun 28, 2017 at 08:00:40PM +0100, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > Cause the

Re: [Qemu-devel] [RFC v2 6/8] virtio-iommu: Implement the translation and commands

2017-07-13 Thread Peter Xu
On Wed, Jun 07, 2017 at 06:01:25PM +0200, Eric Auger wrote: > This patch adds the actual implementation for the translation routine > and the virtio-iommu commands. > > Signed-off-by: Eric Auger [...] > static int virtio_iommu_attach(VirtIOIOMMU *s, >

[Qemu-devel] [PATCH v4 15/20] xlnx_zynqmp: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/arm/xlnx-zynqmp.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 64f52f8..cd8a4aa 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -140,11 +140,6 @@

[Qemu-devel] [PATCH v4 18/20] mips_cmgcr: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/misc/mips_cmgcr.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/misc/mips_cmgcr.c b/hw/misc/mips_cmgcr.c index a1edb53..211f609 100644 --- a/hw/misc/mips_cmgcr.c +++ b/hw/misc/mips_cmgcr.c @@ -181,18

Re: [Qemu-devel] [PATCH v2] docker: Don't enable networking as a side-effect of DEBUG=1

2017-07-13 Thread Fam Zheng
On Thu, 07/13 15:43, Daniel P. Berrange wrote: > When trying to debug problems with tests it is natural to set > DEBUG=1 when starting the docker environment. Unfortunately > this has a side-effect of enabling an eth0 network interface > in the container, which changes the operating environment of

[Qemu-devel] [PATCH v4 20/20] spapr_rng: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/ppc/spapr_rng.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spapr_rng.c b/hw/ppc/spapr_rng.c index 80515eb..d2acd61 100644 --- a/hw/ppc/spapr_rng.c +++ b/hw/ppc/spapr_rng.c @@ -96,17 +96,11 @@ static

[Qemu-devel] [PATCH v4 17/20] xilinx_axidma: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/dma/xilinx_axidma.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index 6065689..4f68f50 100644 --- a/hw/dma/xilinx_axidma.c +++ b/hw/dma/xilinx_axidma.c @@

[Qemu-devel] [PATCH v4 19/20] cpu: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- exec.c| 27 +++ include/qom/cpu.h | 1 + qom/cpu.c | 1 + 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/exec.c b/exec.c index a083ff8..385c2d0 100644 --- a/exec.c +++ b/exec.c @@ -27,6

[Qemu-devel] [PATCH v4 16/20] xilinx_axienet: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/net/xilinx_axienet.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c index b670184..05344b4 100644 --- a/hw/net/xilinx_axienet.c +++ b/hw/net/xilinx_axienet.c

[Qemu-devel] [PATCH v4 13/20] armv7m: Convert armv7m.memory to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/arm/armv7m.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 8efc4e8..1c837da 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -132,12 +132,6 @@ static void

[Qemu-devel] [PATCH v4 14/20] gicv3: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/intc/arm_gicv3_its_kvm.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c index 1f8991b..39903d5 100644 --- a/hw/intc/arm_gicv3_its_kvm.c +++

[Qemu-devel] [PATCH v4 09/20] virtio-crypto: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Unlike other object_property_add_link() occurrences in virtio devices, virtio-crypto checks the "in use" state of the linked backend object in addition to qdev_prop_allow_set_link_before_realize. To convert it without needing to specialize DEFINE_PROP_LINK which always uses the qdev callback, move

Re: [Qemu-devel] About the trace framework

2017-07-13 Thread Wang Dong
On 07/11/2017 05:39 PM, Xie Changlong wrote: 在 7/11/2017 9:33 AM, Wang Dong 写道: On 07/10/2017 01:24 PM, Xie Changlong wrote: 在 7/9/2017 5:57 PM, Wang Dong 写道: Hi, I am new to QEMU. But I got some problem so that I want to figure it out. So I try to debug qemu to see what happened.

[Qemu-devel] [PATCH v4 12/20] armv7m: Convert bitband.source-mamory to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/arm/armv7m.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index c8a11f2..8efc4e8 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -97,12 +97,6 @@ static void bitband_init(Object

[Qemu-devel] [PATCH v4 05/20] qdev: Add const qualifier to PropertyInfo definitions

2017-07-13 Thread Fam Zheng
The remaining non-const ones are in e1000e which modifies description at runtime. They can be addressed separatedly. Signed-off-by: Fam Zheng --- hw/core/qdev-properties-system.c | 8 +++ hw/core/qdev-properties.c| 44 +-

[Qemu-devel] [PATCH v4 04/20] qmp: Use ObjectProperty.type if present

2017-07-13 Thread Fam Zheng
The dynamic value is more informative in the case of link property, otherwise it is the same. Signed-off-by: Fam Zheng --- qmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmp.c b/qmp.c index 133fdfc..9f8a167 100644 --- a/qmp.c +++ b/qmp.c @@ -496,7

[Qemu-devel] [PATCH v4 10/20] dimm: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Unlike the usual object_property_add_link() invocations in other devices, dimm checks the "is mapped" state of the backend in addition to qdev_prop_allow_set_link_before_realize. To convert it without specializing DEFINE_PROP_LINK which always uses the qdev general check callback, move the extra

[Qemu-devel] [PATCH v4 08/20] virtio-rng: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/s390x/virtio-ccw.c | 2 -- hw/virtio/virtio-pci.c | 2 -- hw/virtio/virtio-rng.c | 12 +--- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index c5e0606..a492d0f 100644 ---

[Qemu-devel] [PATCH v4 03/20] qdev: Introduce DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
This property can be used to replace the object_property_add_link in device code, to add a link to other objects, which is a common pattern. Signed-off-by: Fam Zheng --- hw/core/qdev-properties.c| 18 ++ include/hw/qdev-core.h | 1 +

[Qemu-devel] [PATCH v4 06/20] virtio-blk: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/virtio-blk.c | 6 ++ hw/s390x/virtio-ccw.c | 2 -- hw/virtio/virtio-pci.c | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index c0bd247..b750bd8 100644 ---

[Qemu-devel] [PATCH v4 11/20] ivshmem: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Unlike the usual object_property_add_link() invocations in other devices, ivshmem checks the "is mapped" state of the backend in addition to qdev_prop_allow_set_link_before_realize. To convert it without specializing DEFINE_PROP_LINK which always uses the qdev callback, move the extra check to

[Qemu-devel] [PATCH v4 07/20] virtio-scsi: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/s390x/virtio-ccw.c | 2 -- hw/scsi/virtio-scsi.c | 13 ++--- hw/virtio/virtio-pci.c | 2 -- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index a0437d1..c5e0606 100644 ---

[Qemu-devel] [PATCH v4 01/20] qom: enforce readonly nature of link's check callback

2017-07-13 Thread Fam Zheng
From: Igor Mammedov link's check callback is supposed to verify/permit setting it, however currently nothing restricts it from misusing it and modifying target object from within. Make sure that readonly semantics are checked by compiler to prevent callback's misuse.

[Qemu-devel] [PATCH v4 02/20] qdev: Introduce PropertyInfo.create

2017-07-13 Thread Fam Zheng
This allows property implementation to provide a specialized property creation method. Update conditions guarding property types accordingly. Signed-off-by: Fam Zheng --- hw/core/qdev.c | 31 +++ include/hw/qdev-core.h | 1 + qmp.c

[Qemu-devel] [PATCH v4 00/20] qdev: Introduce DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
v4: Add a pointer type param to DEFINE_PROP_LINK, don't change pointer types to "Object *". [Paolo] v3: Include Igor's patch, and fix virtio-crypto too. Always use qdev_prop_allow_set_link_before_realize and OBJ_PROP_LINK_UNREF_ON_RELEASE. Include as many applicable devices as

Re: [Qemu-devel] [PATCH v3 06/20] virtio-blk: Convert to DEFINE_PROP_LINK

2017-07-13 Thread Fam Zheng
On Thu, 07/13 15:42, Paolo Bonzini wrote: > On 04/07/2017 08:43, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > --- > > hw/block/dataplane/virtio-blk.c | 2 +- > > hw/block/virtio-blk.c | 5 + > > hw/s390x/virtio-ccw.c | 2 -- > >

Re: [Qemu-devel] [PATCH v2 8/8] virtio-crypto: use virtqueue_error for errors with queue context

2017-07-13 Thread Gonglei (Arei)
> -Original Message- > From: Cornelia Huck [mailto:coh...@redhat.com] > Sent: Thursday, July 13, 2017 11:37 PM > To: Ladi Prosek > Cc: qemu-devel; Fernando Casas Schössow; Michael S. Tsirkin; Jason Wang; > Markus Armbruster; Greg Kurz; Gonglei (Arei); > aneesh.ku...@linux.vnet.ibm.com;

Re: [Qemu-devel] [PATCH] target/i386: Fix ANDN (bmi)

2017-07-13 Thread Richard Henderson
On 07/13/2017 11:51 AM, Ricardo Ribalda Delgado wrote: Operands on ANDN are swapped. Tested with the following function: long test_andn(long v1, long v2){ return (~v1 & v2); } Compiled with: gcc kk.c -mbmi -O3 -Wall 0910 : 910:c4 e2 c0 f2 c6andn

[Qemu-devel] [PATCH 2/8] target/alpha: Copy tb->flags into DisasContext

2017-07-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 4a627fc..48be19a 100644 --- a/target/alpha/translate.c +++

[Qemu-devel] [PATCH 5/8] target/alpha: Fix temp leak in gen_mtpr

2017-07-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index d684a7b..5e37b1a 100644 --- a/target/alpha/translate.c +++

[Qemu-devel] [PATCH 8/8] target/alpha: Log temp leaks

2017-07-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index aaaf28f..90e6d52 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -3013,6

[Qemu-devel] [PATCH 1/8] target/alpha: Remove amask from tb->flags

2017-07-13 Thread Richard Henderson
This value is constant for the cpu and does not need to be stored within the TB. Signed-off-by: Richard Henderson --- target/alpha/cpu.h | 9 --- target/alpha/translate.c | 70 ++-- 2 files changed, 38 insertions(+), 41

[Qemu-devel] [PATCH 6/8] target/alpha: Fix temp leak in gen_call_pal

2017-07-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 5e37b1a..326af7f 100644 --- a/target/alpha/translate.c +++

[Qemu-devel] [PATCH 3/8] target/alpha: Merge several flag bytes into ENV->FLAGS

2017-07-13 Thread Richard Henderson
The flags are arranged such that we can manipulate them either a whole, or as individual bytes. The computation within cpu_get_tb_cpu_state is now reduced to a single load and mask. Signed-off-by: Richard Henderson --- target/alpha/cpu.h | 70

[Qemu-devel] [PATCH 4/8] target/alpha: Fix temp leak in gen_bcond

2017-07-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 140d6f3..d684a7b 100644 --- a/target/alpha/translate.c +++

[Qemu-devel] [PATCH 7/8] target/alpha: Fix temp leak in gen_fbcond

2017-07-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/alpha/translate.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 326af7f..aaaf28f 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c

[Qemu-devel] [PATCH 0/8] target/alpha cleanups

2017-07-13 Thread Richard Henderson
The new title holder for perf top is helper_lookup_tb_ptr. Those targets that have a complicated cpu_get_tb_cpu_state function are going to regret that. This cleans up the Alpha version of that function such that it is just two loads and one mask. Which is one practically-free mask away from

Re: [Qemu-devel] Disparity between host and guest CPU utilization during disk IO benchmark

2017-07-13 Thread Nagarajan, Padhu (HPE Storage)
Thanks Stefan. Couldn't get to this earlier. Did another run and took a diff of /proc/interrupts before and after the run. It shows all the interrupts for 'virtio7-req.0' going to CPU1. I guess that explains the "CPU1/KVM" vcpu utilization on the host. 34:147 666085 0

Re: [Qemu-devel] Nios2 documentation page now up

2017-07-13 Thread Marek Vasut
On 07/13/2017 09:59 PM, Programmingkid wrote: > > On Jul 13, 2017, at 3:01 PM, Marek Vasut wrote: > >> On 07/13/2017 08:23 PM, Programmingkid wrote: >>> >>> On Jul 13, 2017, at 10:48 AM, Marek Vasut wrote: >>> On 07/13/2017 04:28 PM, Programmingkid wrote: > Hi I have recently created a

Re: [Qemu-devel] [PATCH v3] hw/i386: Deprecate the machines pc-0.10 to pc-1.2

2017-07-13 Thread Michael S. Tsirkin
On Wed, Jul 12, 2017 at 05:29:01PM +0100, Daniel P. Berrange wrote: > Yep, I'm amenable to that POV too. It is entirely valid to say that if > downstream distros need to care about such ancient back-compat, then they > will just have to do the extra work to use git history to undelete any bits >

Re: [Qemu-devel] [PATCH v3] hw/i386: Deprecate the machines pc-0.10 to pc-1.2

2017-07-13 Thread Michael S. Tsirkin
On Thu, Jul 13, 2017 at 12:20:10PM -0300, Eduardo Habkost wrote: > On Thu, Jul 13, 2017 at 04:00:00AM +0300, Michael S. Tsirkin wrote: > > On Wed, Jul 12, 2017 at 10:22:33AM +0200, Thomas Huth wrote: > > > We don't want to carry along old machine types forever. If we are able to > > > remove the

Re: [Qemu-devel] [PATCH v2] target/i386: Fix BLSR and BLSI

2017-07-13 Thread Ricardo Ribalda Delgado
Hi For completion. This is my poor man tbm test. It has run for 5 minutes with no errors gcc tbm.c -O3 -march=native -o pc gcc tbm.c -mtbm -O3 for a in $(seq 0 65535); do /tmp/qemu/x86_64-linux-user/qemu-x86_64 -cpu qemu64,+tbm ./a.out $a >/tmp/res.qemu ; ./pc $a > /tmp/res.pc ; if ! diff

Re: [Qemu-devel] [PATCH v3] hw/i386: Deprecate the machines pc-0.10 to pc-1.2

2017-07-13 Thread Michael S. Tsirkin
On Thu, Jul 13, 2017 at 12:17:40PM -0300, Eduardo Habkost wrote: > > > Oh right. So you need to find dots and split at these points. > > > Something like the below? Completely untested. > > > > > > int mstcmp(const char *s1, const char *s2) > > > { > > > const char *e1, *e2; > > > int l1, l2,

Re: [Qemu-devel] [PATCH v5 2/3] ACPI: Add APEI GHES Table Generation support

2017-07-13 Thread Michael S. Tsirkin
On Thu, Jul 13, 2017 at 09:41:03PM +0200, Laszlo Ersek wrote: > >> + > >> +error_source++; > >> +} > >> + > >> +for (i = 0; i < GHES_ACPI_HEST_NOTIFY_RESERVED; i++) { > >> +bios_linker_loader_add_pointer(linker, > >> +GHES_ERRORS_FW_CFG_FILE, sizeof(uint64_t) *

Re: [Qemu-devel] [PATCH v2] target/i386: Fix BLSR and BLSI

2017-07-13 Thread Ricardo Ribalda Delgado
Hi again Some progress here, I think that I have found a bug in andn, I have already send a patch. I have made a rudimentary testcase for bmi. I will try tomorrow o build something similar for tbm. For reference, I am using this script: for a in $(seq 0 255); do for b in $(seq 0 255); do for c

[Qemu-devel] [PATCH] target/i386: Fix ANDN (bmi)

2017-07-13 Thread Ricardo Ribalda Delgado
Operands on ANDN are swapped. Tested with the following function: long test_andn(long v1, long v2){ return (~v1 & v2); } Compiled with: gcc kk.c -mbmi -O3 -Wall 0910 : 910:c4 e2 c0 f2 c6 andn %rsi,%rdi,%rax 915:c3 retq 916:66 2e 0f

Re: [Qemu-devel] [PATCH v2 08/27] linux-user/sh4: Notice gUSA regions during signal delivery

2017-07-13 Thread John Paul Adrian Glaubitz
On 07/13/2017 11:37 PM, Richard Henderson wrote: > Unfortunately with something as complex as ghc this doesn't help much. > I hope you can find something smaller that produces a similar problem... GHC is truly a complex matter. It's in fact the package that causes most trouble on qemu-user, both

Re: [Qemu-devel] [PATCH v2 08/27] linux-user/sh4: Notice gUSA regions during signal delivery

2017-07-13 Thread Richard Henderson
On 07/13/2017 12:56 AM, John Paul Adrian Glaubitz wrote: It either hangs, so I had to use "Ctrl+C" or it segfaulted. Sometimes it would crash with: (sid-sh4-sbuild)root@nofan:/# ghc Main.hs /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) Unhandled trap: 0x180

Re: [Qemu-devel] [PATCH v2 0/9] block: -device drive= fixes

2017-07-13 Thread John Snow
On 07/13/2017 07:41 AM, Kevin Wolf wrote: > Since 2.9 it is possible for a user to care only about nodes and qdev devices, > but not about BlockBackends, by defining with -blockdev and using their node > name in -device. Devices create an anonymous BlockBackend internally then. > > One of the

Re: [Qemu-devel] tests/Makefile.include non-portable use of $RANDOM

2017-07-13 Thread Peter Maydell
On 13 July 2017 at 21:16, Eric Blake wrote: > On 07/13/2017 12:32 PM, Peter Maydell wrote: >> On NetBSD the shell complains: >> # echo $((RANDOM % 255 + 1)) >> -sh: arith: syntax error: "RANDOM % 255 + 1" >> >> and so 'make check' doesn't work. >> >> Any suggestions for

Re: [Qemu-devel] [PATCH v2] target/i386: Fix BLSR and BLSI

2017-07-13 Thread Ricardo Ribalda Delgado
Hi Richard The simple example works as expected, but my big application (gobject-introspection) still crashes with sigsegv :(. it seems to be something related to the bmi and tbm instructions. If I disable them in gcc ( -mno-bmi -mno-tbm), the application runs ok. A look at qemu's code does not

Re: [Qemu-devel] [PATCH v2 10/29] vvfat: use DIV_ROUND_UP

2017-07-13 Thread Eric Blake
On 07/13/2017 11:32 AM, Marc-André Lureau wrote: > I used the clang-tidy qemu-round check to generate the fix: > https://github.com/elmarco/clang-tools-extra > > Signed-off-by: Marc-André Lureau > --- > block/vvfat.c | 4 ++-- > 1 file changed, 2 insertions(+), 2

Re: [Qemu-devel] [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-13 Thread Michael S. Tsirkin
On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: > On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: > > > > So the way I see it, there are several issues: > > > > - internal wait - forces multiple APIs like kick/kick_sync > >note how kick_sync can fail but your code never checks

Re: [Qemu-devel] [PATCH v2 09/29] vpc: use DIV_ROUND_UP

2017-07-13 Thread Eric Blake
On 07/13/2017 11:31 AM, Marc-André Lureau wrote: > I used the clang-tidy qemu-round check to generate the fix: > https://github.com/elmarco/clang-tools-extra > > Signed-off-by: Marc-André Lureau > --- > block/vpc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2

Re: [Qemu-devel] [PATCH v2 03/29] vhdx: use QEMU_ALIGN_DOWN

2017-07-13 Thread Eric Blake
On 07/13/2017 11:31 AM, Marc-André Lureau wrote: > I used the clang-tidy qemu-round check to generate the fix: > https://github.com/elmarco/clang-tools-extra > > Signed-off-by: Marc-André Lureau > --- > block/vhdx-log.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [Qemu-devel] [PATCH v2 08/29] qcow2: use DIV_ROUND_UP

2017-07-13 Thread Eric Blake
On 07/13/2017 11:31 AM, Marc-André Lureau wrote: > I used the clang-tidy qemu-round check to generate the fix: > https://github.com/elmarco/clang-tools-extra > > Signed-off-by: Marc-André Lureau > --- > block/qcow2-cluster.c | 2 +- > 1 file changed, 1 insertion(+),

[Qemu-devel] [PATCH 1/2] hyperv: add header with protocol definitions

2017-07-13 Thread Roman Kagan
The definitions for Hyper-V emulation are currently taken from a header imported from the Linux kernel. However, as these describe a third-party protocol rather than a kernel API, it probably wasn't a good idea to publish it in the kernel uapi. This patch introduces a header that provides all

Re: [Qemu-devel] tests/Makefile.include non-portable use of $RANDOM

2017-07-13 Thread Eric Blake
On 07/13/2017 12:32 PM, Peter Maydell wrote: > Currently our test makefile does > >MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$((RANDOM % 255 + 1))} > > This works on bash, but $RANDOM is bash-specific. > On dash, it doesn't do what we want, but it does do something: > > $ echo $((RANDOM % 255 +

[Qemu-devel] [PATCH 0/2] hyperv: own protocol header instead of kernel's

2017-07-13 Thread Roman Kagan
Supersede kernel's header for Hyper-V protocol definitions with our own. The reason is that, since this is a third-party protocol and not a kernel API, the kernel folks are not happy exposing it in the kernel uapi. The patchset is done to allow gradual transition from the kernel's hyperv.h to the

[Qemu-devel] [PATCH 2/2] update-linux-headers: prepare for hyperv.h removal

2017-07-13 Thread Roman Kagan
All definitions related to Hyper-V emulation are now taken from the QEMU own header, so the one imported from the kernel is no longer needed. Unfortunately it's included by kvm_para.h. So, until this is fixed in the kernel, teach the header harvesting script to substitute kernel's hyperv.h with

Re: [Qemu-devel] [PATCH 0/3] Fix NetBSD build (don't build ivshmem tools)

2017-07-13 Thread Eric Blake
On 07/13/2017 01:40 PM, Kamil Rytarowski wrote: >> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((RANDOM % 255 + 1))} gtester -k >> --verbose -m=quick tests/check-qdict >> sh: arith: syntax error: "RANDOM % 255 + 1" >> >> likely because we're using a bashism there. Yes, assuming that $RANDOM exists is a

Re: [Qemu-devel] Nios2 documentation page now up

2017-07-13 Thread Programmingkid
On Jul 13, 2017, at 3:01 PM, Marek Vasut wrote: > On 07/13/2017 08:23 PM, Programmingkid wrote: >> >> On Jul 13, 2017, at 10:48 AM, Marek Vasut wrote: >> >>> On 07/13/2017 04:28 PM, Programmingkid wrote: Hi I have recently created a new documentation page for the Nios2 target. I

Re: [Qemu-devel] [PATCH v5 2/3] ACPI: Add APEI GHES Table Generation support

2017-07-13 Thread Laszlo Ersek
On 07/13/17 19:32, Michael S. Tsirkin wrote: > On Wed, Jul 12, 2017 at 10:08:16AM +0800, Dongjiu Geng wrote: snip >> etc/acpi/tables etc/hardware_errors >> == >> +---+ >> +--+

Re: [Qemu-devel] [PATCH v3 6/7] scripts/dump-guest-memory.py: add vmcoreinfo

2017-07-13 Thread Laszlo Ersek
On 07/13/17 17:36, Marc-André Lureau wrote: > Hi > > On Wed, Jul 12, 2017 at 2:08 AM Marc-André Lureau < > marcandre.lur...@gmail.com> wrote: > >> Acked-by: Laszlo Ersek >> >>> >>> but I would still like a real Pythonista to review this patch. Adding >>> Janosch. >>> >>> >>

[Qemu-devel] [PULL] Update OpenBIOS images

2017-07-13 Thread Mark Cave-Ayland
Hi Peter, Here are the latest set of updates for OpenBIOS. Please pull. ATB, Mark. The following changes since commit 49bcce4b9c11759678fd223aefb48691c4959d4f: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-07-12' into staging (2017-07-13 16:56:06 +0100) are available

Re: [Qemu-devel] Nios2 documentation page now up

2017-07-13 Thread Marek Vasut
On 07/13/2017 08:23 PM, Programmingkid wrote: > > On Jul 13, 2017, at 10:48 AM, Marek Vasut wrote: > >> On 07/13/2017 04:28 PM, Programmingkid wrote: >>> Hi I have recently created a new documentation page for the Nios2 target. I >>> would greatly appreciate any feedback you might have on it.

[Qemu-devel] [PATCH] vl.c/exit: pause cpus before closing block devices

2017-07-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" There's a rare exit seg if the guest is accessing IO during exit. It's always hitting the atomic_inc(>in_flight) with a NULL bs. This was added recently in 99723548 but I don't see it as the cause. Flip vl.c around so we pause the cpus before

Re: [Qemu-devel] [PATCH v5 18/18] dirty-bitmap: Convert internal hbitmap size/granularity

2017-07-13 Thread John Snow
On 07/12/2017 09:05 PM, Eric Blake wrote: > Now that all callers are using byte-based interfaces, there's no > reason for our internal hbitmap to remain with sector-based > granularity. It also simplifies our internal scaling, since we > already know that hbitmap widens requests out to

  1   2   3   4   5   6   >