Re: [Qemu-devel] [RFC 4/6] target-ppc: add cmprb instruction

2016-08-02 Thread Nikunj A Dadhania
Richard Henderson writes: > This is better implemented without branches, like > >TCGv_i32 src1, src2, src2lo, src2hi; >TCGv_i32 crf = cpu_crf[cdfD(ctx->opcode)]; > >// allocate all 4 "src" temps > >tcg_gen_trunc_tl_i32(src1, cpu_gpr[rA(ctx->opcode)]); >tcg_gen_trunc_tl_i32(src

Re: [Qemu-devel] [RFC PATCH V10 4/7] colo-compare: track connection and enqueue packet

2016-08-02 Thread Jason Wang
On 2016年07月26日 09:49, Zhang Chen wrote: In this patch we use kernel jhash table to track connection, and then enqueue net packet like this: + CompareState ++ | | +---+ +---+ +---+ |conn list +--->conn +->conn

Re: [Qemu-devel] [PATCH] virtio-blk: Release s->rq queue at system_reset

2016-08-02 Thread Fam Zheng
On Tue, 08/02 08:46, Paolo Bonzini wrote: > > > On 29/07/2016 12:22, Fam Zheng wrote: > > At system_reset, there is no point in retrying the queued request, > > because the driver that issued the request won't be around any more. > > > > Analyzed-by: Laszlo Ersek > > Reported-by: Laszlo Ersek

Re: [Qemu-devel] [PATCH] virtio-blk: Release s->rq queue at system_reset

2016-08-02 Thread Fam Zheng
On Tue, 08/02 15:24, Fam Zheng wrote: > On Tue, 08/02 08:46, Paolo Bonzini wrote: > > > > > > On 29/07/2016 12:22, Fam Zheng wrote: > > > At system_reset, there is no point in retrying the queued request, > > > because the driver that issued the request won't be around any more. > > > > > > Anal

Re: [Qemu-devel] [RFC PATCH V10 6/7] colo-compare: introduce packet comparison thread

2016-08-02 Thread Jason Wang
On 2016年07月26日 09:49, Zhang Chen wrote: If primary packet is same with secondary packet, we will send primary packet and drop secondary packet, otherwise notify COLO frame to do checkpoint. If primary packet comes and secondary packet not, s/and/but/ and /packet not/packet does not/ after

[Qemu-devel] [PATCH v1 2/2] target-ppc: cmprb - truncate RA to 8bits

2016-08-02 Thread Nikunj A Dadhania
Missed the following bit in the instruction coding. src1 ← EXTZ(RA(56:63)) Reported-by: Anton Blanchard Signed-off-by: Nikunj A Dadhania --- Can be squashed with the original commit target-ppc/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-ppc/translate.c b/target-ppc

[Qemu-devel] [PATCH v1 1/2] target-ppc: modsw - return 64-bit sign extended

2016-08-02 Thread Nikunj A Dadhania
Reported-by: Anton Blanchard Signed-off-by: Nikunj A Dadhania --- Can be squashed with the original commit target-ppc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index fc3d371..dc89e6a 100644 --- a/target-ppc/t

Re: [Qemu-devel] [PATCH] qdev: Fix use after free in qdev_init_nofail error path

2016-08-02 Thread Igor Mammedov
On Tue, 2 Aug 2016 11:41:41 +0800 Fam Zheng wrote: > Since 69382d8b (qdev: Fix object reference leak in case device.realize() > fails), object_property_set_bool could release the object. The error > path wants the type name, so hold an reference before realizing it. > > Cc: Igor Mammedov > Sig

Re: [Qemu-devel] [RFC PATCH 1/3] hw/arm/virt: add hotplug memory support

2016-08-02 Thread Peter Maydell
On 1 August 2016 at 10:14, Igor Mammedov wrote: > On Mon, 1 Aug 2016 09:13:34 +0100 > Peter Maydell wrote: >> On 1 August 2016 at 08:46, Igor Mammedov wrote: >> > Base alignment comes from max supported hugepage size, >> >> Max hugepage size for any host? (if so, should be defined >> in a common

Re: [Qemu-devel] [RFC PATCH V10 7/7] colo-compare: add TCP, UDP, ICMP packet comparison

2016-08-02 Thread Jason Wang
On 2016年07月26日 09:49, Zhang Chen wrote: We add TCP,UDP,ICMP packet comparison to replace IP packet comparison. This can increase the accuracy of the package comparison. less checkpoint more efficiency. s/less/Less/ Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Co

Re: [Qemu-devel] [RFC PATCH 02/11] qemu-clk: allow to attach a clock to a device

2016-08-02 Thread KONRAD Frederic
Le 29/06/2016 à 02:15, Alistair Francis a écrit : On Mon, Jun 13, 2016 at 9:27 AM, wrote: From: KONRAD Frederic This allows to attach a clock to a DeviceState. Contrary to gpios, the clock pins are not contained in the DeviceState but with the child property so they can appears in the qom-

Re: [Qemu-devel] [PATCH] spapr: Don't support query-hotpluggable-cpus on earlier pseries machine types

2016-08-02 Thread Igor Mammedov
On Tue, 2 Aug 2016 16:20:50 +1000 David Gibson wrote: > On Tue, Aug 02, 2016 at 10:34:34AM +0530, Bharata B Rao wrote: > > On Tue, Aug 02, 2016 at 02:25:08PM +1000, David Gibson wrote: > > > On Power, support for vCPU hotplug is new in qemu 2.7. However, we > > > currently implement the query_

Re: [Qemu-devel] [PATCH] qdev: Fix use after free in qdev_init_nofail error path

2016-08-02 Thread Fam Zheng
On Tue, 08/02 10:14, Igor Mammedov wrote: > On Tue, 2 Aug 2016 00:00:27 -0400 > John Snow wrote: > > > On 08/01/2016 11:41 PM, Fam Zheng wrote: > > > Since 69382d8b (qdev: Fix object reference leak in case device.realize() > > > fails), object_property_set_bool could release the object. The error

Re: [Qemu-devel] [PATCH V11 0/9] Introduce COLO-compare and filter-rewriter

2016-08-02 Thread Jason Wang
On 2016年07月28日 18:12, Zhang Chen wrote: COLO-compare is a part of COLO project. It is used to compare the network package to help COLO decide whether to do checkpoint. Filter-rewriter is a part of COLO project too. It will rewrite some of secondary packet to make secondary guest's connection e

Re: [Qemu-devel] [PATCH] qdev: Fix use after free in qdev_init_nofail error path

2016-08-02 Thread Igor Mammedov
On Tue, 2 Aug 2016 00:00:27 -0400 John Snow wrote: > On 08/01/2016 11:41 PM, Fam Zheng wrote: > > Since 69382d8b (qdev: Fix object reference leak in case device.realize() > > fails), object_property_set_bool could release the object. The error > > path wants the type name, so hold an reference be

Re: [Qemu-devel] [PATCH V11 8/9] filter-rewriter: track connection and parse packet

2016-08-02 Thread Jason Wang
On 2016年07月28日 18:12, Zhang Chen wrote: We use colo-base.h to track connection and parse packet Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-base.c | 14 ++ net/colo-base.h | 1 + net/filter-rewriter.c | 50 +++

Re: [Qemu-devel] [PULL v5 29/57] intel_iommu: add SID validation for IR

2016-08-02 Thread Peter Xu
On Mon, Aug 01, 2016 at 06:39:05PM +0200, Jan Kiszka wrote: [...] > > static MemTxResult vtd_mem_ir_read(void *opaque, hwaddr addr, > > @@ -2209,11 +2250,17 @@ static MemTxResult vtd_mem_ir_write(void *opaque, > > hwaddr addr, > > { > > int ret = 0; > > MSIMessage from = {}, to = {};

[Qemu-devel] [V15 1/4] hw/pci: Prepare for AMD IOMMU

2016-08-02 Thread David Kiarie
Introduce PCI macros from for use by AMD IOMMU Signed-off-by: David Kiarie --- include/hw/pci/pci.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 929ec2f..d47e0e6 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pc

[Qemu-devel] [V15 4/4] hw/i386: AMD IOMMU IVRS table

2016-08-02 Thread David Kiarie
Add IVRS table for AMD IOMMU. Generate IVRS or DMAR depending on emulated IOMMU. Signed-off-by: David Kiarie --- hw/acpi/aml-build.c | 2 +- hw/i386/acpi-build.c| 76 - hw/i386/x86-iommu.c | 19 include/hw/acpi/aml

[Qemu-devel] [V15 0/4] AMD IOMMU

2016-08-02 Thread David Kiarie
Hi all, This patchset adds basic AMD IOMMU emulation support to Qemu. This version happens to have been delayed since I expected to send it together with IR code but it seems that may take even longer so I'm sending this first. Changes since v13 -Added an error to make AMD IOMMU incompatible

[Qemu-devel] [V15 2/4] hw/i386/trace-events: Add AMD IOMMU trace events

2016-08-02 Thread David Kiarie
Signed-off-by: David Kiarie --- hw/i386/trace-events | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/i386/trace-events b/hw/i386/trace-events index b4882c1..592de3a 100644 --- a/hw/i386/trace-events +++ b/hw/i386/trace-events @@ -13,3 +13,32 @@ mhp_pc_dimm_as

Re: [Qemu-devel] [PATCH] qdev: Fix use after free in qdev_init_nofail error path

2016-08-02 Thread Fam Zheng
On Tue, 08/02 09:55, Igor Mammedov wrote: > qdev_init_nofail() { called with ref == 1 Yes it does. > object_property_set_bool(true, "realized") > if error: > ref == 1 ^ This is not the case for qdev, the object is actually released by object_property_set_bool if fa

[Qemu-devel] [V15 3/4] hw/i386: Introduce AMD IOMMU

2016-08-02 Thread David Kiarie
Add AMD IOMMU emulaton to Qemu in addition to Intel IOMMU. The IOMMU does basic translation, error checking and has a minimal IOTLB implementation. This IOMMU bypassed the need for target aborts by responding with IOMMU_NONE access rights and exempts the region 0xfee0-0xfeef from translatio

Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM

2016-08-02 Thread Gerd Hoffmann
On Di, 2016-08-02 at 15:35 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2016-08-02 at 07:25 +0200, Gerd Hoffmann wrote: > > > That's the part we cannot provide unfortunately. There is sadly no > > > toolchain that can produce a MacOS PEF binary other than hosted in > > > MacOS itself. In fact I d

Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM

2016-08-02 Thread Benjamin Herrenschmidt
On Tue, 2016-08-02 at 10:55 +0200, Gerd Hoffmann wrote: > > CodeWarrior for MacOS X does come with command line versions of the > > tools, I plan to look into doing a Makefile once I've sorted out the > > various arguments for these things at least. > > Yes, you do that once, put it into roms/Make

[Qemu-devel] [PATCH 2/7] vhdx: Use QEMU UUID API

2016-08-02 Thread Fam Zheng
This removes our dependency to libuuid, so that the driver can always be built. Similar to how we handled data plane configure options, --enable-vhdx and --disable-vhdx are also changed to a nop with a message saying it's obsolete. Signed-off-by: Fam Zheng --- block/Makefile.objs | 2 +- block

[Qemu-devel] [PATCH 1/7] util: Add UUID API

2016-08-02 Thread Fam Zheng
A number of different places across the code base use CONFIG_UUID. Some of them are soft dependency, some are not built if libuuid is not available, some come with dummy fallback, some throws runtime error. It is hard to maintain, and hard to reason for users. Since UUID is a simple standard with

[Qemu-devel] [PATCH 7/7] configure: Remove detection code for UUID

2016-08-02 Thread Fam Zheng
All code now uses built-in UUID implementation. Remove the code of libuuid and make --enable-uuid and --disable-uuid only print a message. Signed-off-by: Fam Zheng --- configure | 43 --- 1 file changed, 4 insertions(+), 39 deletions(-) diff --git a/confi

[Qemu-devel] [PATCH 4/7] vpc: Use QEMU UUID API

2016-08-02 Thread Fam Zheng
Previously we conditionally generate if footer->uuid, when libuuid is available. Now that we have a built-in implementation, we can switch to it. Signed-off-by: Fam Zheng --- block/vpc.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index 4

[Qemu-devel] [PATCH 6/7] tests: No longer dependent on CONFIG_UUID

2016-08-02 Thread Fam Zheng
crypto now uses built-in uuid implementation, so this check is not needed. Signed-off-by: Fam Zheng --- tests/test-crypto-block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-crypto-block.c b/tests/test-crypto-block.c index a38110d..1957a86 100644 --- a/tests/te

[Qemu-devel] [PATCH 0/7] UUID clean ups for 2.8

2016-08-02 Thread Fam Zheng
The facts how we use libuuid now are not particularly pleasant. - VHDX driver depends on uuid, but is unconditionally checked in iotests 109. If it is not built, the test would fail, leaving no hint about that. In fact this even makes the feature implementation a bit ugly because it compromise

[Qemu-devel] [PATCH 3/7] vdi: Use QEMU UUID API

2016-08-02 Thread Fam Zheng
The QEMU UUID api, including the data structure (qemu_uuid_t), is fully compatible with libuuid. Use it, and remove the unused code. Signed-off-by: Fam Zheng --- block/vdi.c | 49 ++--- 1 file changed, 10 insertions(+), 39 deletions(-) diff --git a/b

Re: [Qemu-devel] [RFC PATCH 05/11] docs: add qemu-clock documentation

2016-08-02 Thread KONRAD Frederic
Le 29/06/2016 à 02:38, Alistair Francis a écrit : On Mon, Jun 13, 2016 at 9:27 AM, wrote: From: KONRAD Frederic This adds the qemu-clock documentation. Signed-off-by: KONRAD Frederic --- docs/clock.txt | 112 + 1 file changed, 11

[Qemu-devel] [PATCH 5/7] crypto: Switch to QEMU UUID API

2016-08-02 Thread Fam Zheng
The uuid generation doesn't return error, so update the function signature and calling code accordingly. Signed-off-by: Fam Zheng --- crypto/block-luks.c | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c inde

Re: [Qemu-devel] [PATCH] mptsas: Fix a migration compatible issue

2016-08-02 Thread Cao jin
Hi On 08/01/2016 11:29 PM, Amit Shah wrote: On (Mon) 01 Aug 2016 [10:16:50], Paolo Bonzini wrote: @@ -1370,7 +1370,7 @@ static const VMStateDescription vmstate_mptsas = { .post_load = mptsas_post_load, .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(dev, MPTSASState

[Qemu-devel] [PATCH] ppc: Fix macio ESCC legacy mapping

2016-08-02 Thread Benjamin Herrenschmidt
The current mapping, while correct for the base ports (which is all the driver uses these days), is wrong for the extended registers. I suspect the bugs come from incorrect tables in the CHRP IO Ref document, I have verified the new values here match Apple's MacTech.pdf. Note: Nothing that I kno

Re: [Qemu-devel] [PULL v5 29/57] intel_iommu: add SID validation for IR

2016-08-02 Thread Jan Kiszka
[always keep the list in CC] On 2016-08-02 10:54, David Kiarie wrote: > > > On Tue, Aug 2, 2016 at 11:46 AM, Jan Kiszka > wrote: > > On 2016-08-02 10:36, Peter Xu wrote: > > On Mon, Aug 01, 2016 at 06:39:05PM +0200, Jan Kiszka wrote: > > > > [...]

Re: [Qemu-devel] [PULL v5 29/57] intel_iommu: add SID validation for IR

2016-08-02 Thread Jan Kiszka
On 2016-08-02 10:36, Peter Xu wrote: > On Mon, Aug 01, 2016 at 06:39:05PM +0200, Jan Kiszka wrote: > > [...] > >>> static MemTxResult vtd_mem_ir_read(void *opaque, hwaddr addr, >>> @@ -2209,11 +2250,17 @@ static MemTxResult vtd_mem_ir_write(void *opaque, >>> hwaddr addr, >>> { >>> int ret

Re: [Qemu-devel] [PATCH for-2.4] Revert "vhost-user: Send VHOST_RESET_OWNER on vhost stop"

2016-08-02 Thread Luke Gorrie
Hi Michael & all, On 4 August 2015 at 21:00, Luke Gorrie wrote: > Hi Michael, > > Sorry I didn't see this mail sooner - > > On 30 July 2015 at 10:36, Michael S. Tsirkin wrote: > >> This reverts commit 294ce717e0f212ed0763307f3eab72b4a1bdf4d0. >> >> vhost stop happens e.g. when guest unloads the

[Qemu-devel] [PATCH v2] util: Fix assertion in iov_copy() upon zero 'bytes' and non-zero 'offset'

2016-08-02 Thread Shmulik Ladkani
From: Shmulik Ladkani In cases where iov_copy() is passed with zero 'bytes' argument and a non-zero 'offset' argument, nothing gets copied - as expected. However no copy iterations are performed, so 'offset' is left unaltered, leading to the final assert(offset == 0) to fail. Instead, change th

Re: [Qemu-devel] [PATCH] mptsas: Fix a migration compatible issue

2016-08-02 Thread Paolo Bonzini
> Before I send the fix, I did a quick test on linux as following: > > #include > #include > > int main() > { > printf("bool size = %d\n", sizeof(bool)); > } > > > then: > ./a.out > bool size = 1 > > and there is mptsas.c #include "qemu/osdep.h", osdep.h #include > > So, am I missing

[Qemu-devel] [RFC PATCH v1 0/2] Live migration optimization for Thunderx platform

2016-08-02 Thread vijay . kilari
From: Vijaya Kumar K The CPU MIDR_EL1 register is exposed to userspace for arm64 with the below patch. https://lkml.org/lkml/2016/7/8/467 Thunderx platform requires explicit prefetch instruction to provide prefetch hint. Using MIDR_EL1 information, provided by above kernel patch, prefetch is exe

[Qemu-devel] [RFC PATCH v1 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-02 Thread vijay . kilari
From: Vijaya Kumar K Add helper API to read MIDR_EL1 registers to fetch cpu identification information. This helps in adding errata's and architecture specific features. This is implemented only for arm architecture. Signed-off-by: Vijaya Kumar K --- include/qemu-common.h |1 + util/Makef

[Qemu-devel] [RFC PATCH v1 2/2] utils: Add prefetch for Thunderx platform

2016-08-02 Thread vijay . kilari
From: Vijaya Kumar K Thunderx pass2 chip requires explicit prefetch instruction to give prefetch hint. To speed up live migration on Thunderx platform, prefetch instruction is added in zero buffer check function. The below results show live migration time improvement with prefetch instruction w

Re: [Qemu-devel] Making cputlb.c operations safe for MTTCG

2016-08-02 Thread Paolo Bonzini
> > - tlb_set_page_with_attrs is also hard-ish to get right, but perhaps the > > same idea of adding the callback last would work: > > > > /* First set addr_write so that concurrent tlb_reset_dirty_range > > * finds a match. > > */ > > te->addr_write = address; > > if (memory

Re: [Qemu-devel] [PULL v5 29/57] intel_iommu: add SID validation for IR

2016-08-02 Thread Peter Xu
On Tue, Aug 02, 2016 at 10:46:13AM +0200, Jan Kiszka wrote: > On 2016-08-02 10:36, Peter Xu wrote: > > On Mon, Aug 01, 2016 at 06:39:05PM +0200, Jan Kiszka wrote: > > > > [...] > > > >>> static MemTxResult vtd_mem_ir_read(void *opaque, hwaddr addr, > >>> @@ -2209,11 +2250,17 @@ static MemTxResul

[Qemu-devel] [PATCH] mptsas: really fix migration compatibility

2016-08-02 Thread Paolo Bonzini
Commit 2e2aa316 removed internal flag msi_in_use, but it existed in vmstate. Restore it for migration to older QEMU versions. Reported-by: Amit Shah Suggested-by: Amit Shah Cc: Markus Armbruster Cc: Marcel Apfelbaum Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc: Amit Shah Cc: Cao jin Signed

Re: [Qemu-devel] [PATCH V11 8/9] filter-rewriter: track connection and parse packet

2016-08-02 Thread Zhang Chen
On 08/02/2016 04:23 PM, Jason Wang wrote: On 2016年07月28日 18:12, Zhang Chen wrote: We use colo-base.h to track connection and parse packet Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-base.c | 14 ++ net/colo-base.h

[Qemu-devel] [PATCH v1 3/3] vnc: ensure connection sharing/limits is always configured

2016-08-02 Thread Daniel P. Berrange
The connection sharing / limits are only set in the vnc_display_open() method and so missed when VNC is running with '-vnc none'. This in turn prevents clients being added to the VNC server with the QMP "add_client" command. This was introduced in commit e5f34cdd2da54f28d90889a3afd15fad2d6105ff

[Qemu-devel] [PATCH v1 2/3] vnc: fix crash when vnc_server_info_get has an error

2016-08-02 Thread Daniel P. Berrange
The vnc_server_info_get will allocate the VncServerInfo struct and then call vnc_init_basic_info_from_server_addr to populate the basic fields. If this returns an error though, the qapi_free_VncServerInfo call will then crash because the VncServerInfo struct instance was not properly NULL-initializ

[Qemu-devel] [PATCH v1 0/3] Fix QMP add_client with -vnc none

2016-08-02 Thread Daniel P. Berrange
This series of patches fixes 3 bugs which prevent the use of QMP add_client to attach VNC clients when no listener socket is present with -vnc none. This has been originally broken since 2.3.0 with the introduction of VNC client limits, and later turned into a crash. Daniel P. Berrange (3): vnc

[Qemu-devel] [PATCH v1 1/3] vnc: don't crash getting server info if lsock is NULL

2016-08-02 Thread Daniel P. Berrange
When VNC is started with '-vnc none' there will be no listener socket present. When we try to populate the VncServerInfo we'll crash accessing a NULL 'lsock' field. #0 qio_channel_socket_get_local_address (ioc=0x0, errp=errp@entry=0x7ffd5b8aa0f0) at io/channel-socket.c:33 #1 0x7f4b9a297d6

[Qemu-devel] [PATCH v2] qdev: Fix use after free in qdev_init_nofail error path

2016-08-02 Thread Igor Mammedov
Since 69382d8b (qdev: Fix object reference leak in case device.realize() fails), object_property_set_bool releases the device object in case realize's failed and device hasn't explicitly assigned parent. It happens due to object_unparent() on error handling path releases not only implicitly set par

[Qemu-devel] [PATCH] hw/ide: fix a writing to null pointer exception

2016-08-02 Thread 忽朝俭
From b5e5c01b025e83500ca46628add7f63f42f9b2ab Mon Sep 17 00:00:00 2001From: chaojianhu Date: Tue, 2 Aug 2016 17:39:16 +0800Subject: [PATCH] hw/ide: fix a writing to null pointer exception In qemu less than v2.1.3, ide_flush_cache calls ide_flush_cb with s->bs == NULL,and ide_flush_cb calls bdrv_

Re: [Qemu-devel] [RFC PATCH v1 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-02 Thread Paolo Bonzini
- Original Message - > From: "vijay kilari" > To: qemu-...@nongnu.org, "peter maydell" , > pbonz...@redhat.com > Cc: qemu-devel@nongnu.org, "Prasun Kapoor" , "vijay > kilari" , > "Vijaya Kumar K" > Sent: Tuesday, August 2, 2016 12:20:15 PM > Subject: [RFC PATCH v1 1/2] utils: Add helper

Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM

2016-08-02 Thread Gerd Hoffmann
On Di, 2016-08-02 at 19:17 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2016-08-02 at 10:55 +0200, Gerd Hoffmann wrote: > > > CodeWarrior for MacOS X does come with command line versions of the > > > tools, I plan to look into doing a Makefile once I've sorted out the > > > various arguments for

Re: [Qemu-devel] [PATCH] mptsas: really fix migration compatibility

2016-08-02 Thread Cao jin
On 08/02/2016 06:34 PM, Paolo Bonzini wrote: Commit 2e2aa316 removed internal flag msi_in_use, but it existed in vmstate. Restore it for migration to older QEMU versions. Reported-by: Amit Shah Suggested-by: Amit Shah Cc: Markus Armbruster Cc: Marcel Apfelbaum Cc: Paolo Bonzini Cc: Micha

Re: [Qemu-devel] [Qemu-block] [PATCH 1/3] blockjob: fix dead pointer in txn list

2016-08-02 Thread Vladimir Sementsov-Ogievskiy
On 02.08.2016 01:39, John Snow wrote: On 07/27/2016 06:49 AM, Vladimir Sementsov-Ogievskiy wrote: Job may be freed in block_job_unref and in this case this would break transaction QLIST. Fix this by removing job from this list before unref. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blo

Re: [Qemu-devel] [RFC PATCH v1 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-02 Thread Peter Maydell
On 2 August 2016 at 11:20, wrote: > +long int qemu_read_cpuid_info(void) Don't use "long" here, it might be 32 or 64 bits. The kernel ABI for the /sys/ file we're reading says it is a 64-bit value, so uint64_t is what you want. > +{ > +FILE *fp; > +char *buf; > +long int midr = 0; >

[Qemu-devel] [PULL 1/1] MAINTAINERS: Add Host Memory Backends section

2016-08-02 Thread Eduardo Habkost
The hostmem code is closely related to the NUMA code, so I am willing to handle patches to those files and share the work with Igor (the original author of that code). Acked-by: Igor Mammedov Reviewed-by: Markus Armbruster Signed-off-by: Eduardo Habkost --- MAINTAINERS | 7 +++ 1 file chan

[Qemu-devel] [PULL 0/1] MAINTAINERS: Add Host Memory Backends section

2016-08-02 Thread Eduardo Habkost
The following changes since commit cc0100f464c94bf80ad36cd432f4a1ed58126b60: MAINTAINERS: Update the Xilinx maintainers (2016-08-01 15:31:32 +0100) are available in the git repository at: git://github.com/ehabkost/qemu.git tags/numa-pull-request for you to fetch changes up to 4fc264f49c2998

Re: [Qemu-devel] [PATCH for-2.7] wxx: Fix compilation of host-libusb.c

2016-08-02 Thread Gerd Hoffmann
On Fr, 2016-07-29 at 08:55 +0200, Stefan Weil wrote: > libusb.h uses the WINAPI calling convention for all function > callbacks. > > Cross compilation with Mingw-w64 on Cygwin fails when this calling > convention is missing. queued up both mingw fixes. thanks, Gerd

Re: [Qemu-devel] [PATCH 1/1] ehci: faster frame index calculation for skipped frames

2016-08-02 Thread Gerd Hoffmann
On Mi, 2016-07-27 at 19:55 +0300, Denis V. Lunev wrote: > ehci_update_frindex takes time linearly proportional to a number > of uframes to calculate new frame index and raise FLR interrupts, > which is a problem for large amounts of uframes. > > If we experience large delays between echi timer cal

Re: [Qemu-devel] [PATCH 2/2] xen: drain submit queue in xen-usb before removing device

2016-08-02 Thread Gerd Hoffmann
On Fr, 2016-07-29 at 13:17 +0200, Juergen Gross wrote: > When unplugging a device in the Xen pvusb backend drain the submit > queue before deallocation of the control structures. Otherwise there > will be bogus memory accesses when I/O contracts are finished. > > Correlated to this issue is the ha

[Qemu-devel] [PATCH] net: vmxnet: check fragment length during fragmentation

2016-08-02 Thread P J P
From: Prasad J Pandit VMware VMXNET* NIC emulator supports packet fragmentation. While fragmenting a packet, it checks for more fragments based on packet length and current fragment length. It is susceptible to an infinite loop, if the current fragment length is zero. Add check to avoid it. Repo

Re: [Qemu-devel] [PATCH v2 7/6] exec: ensure the only one cpu_index allocation method is used

2016-08-02 Thread Eduardo Habkost
On Wed, Jul 27, 2016 at 11:24:54AM +0200, Igor Mammedov wrote: > Make sure that cpu_index auto allocation isn't used in > combination with manual cpu_index assignment. And > dissallow out of order cpu removal if auto allocation > is in use. > > Target that wishes to support out of order unplug sho

Re: [Qemu-devel] [PATCH] xen: use a common function for pv and hvm guest backend register calls

2016-08-02 Thread Gerd Hoffmann
On Di, 2016-08-02 at 08:32 +0200, Juergen Gross wrote: > Instead of calling xen_be_register() for each supported backend type > for hvm and pv guests in their machine init functions use a common > function in order not to have to add new backends twice. > > This at once fixes the error that hvm do

Re: [Qemu-devel] [PATCH 2/2] xen: drain submit queue in xen-usb before removing device

2016-08-02 Thread Juergen Gross
On 02/08/16 13:37, Gerd Hoffmann wrote: > On Fr, 2016-07-29 at 13:17 +0200, Juergen Gross wrote: >> When unplugging a device in the Xen pvusb backend drain the submit >> queue before deallocation of the control structures. Otherwise there >> will be bogus memory accesses when I/O contracts are fini

Re: [Qemu-devel] [RFC PATCH 06/11] introduce fixed-clock

2016-08-02 Thread KONRAD Frederic
Le 02/07/2016 à 01:07, Alistair Francis a écrit : On Mon, Jun 13, 2016 at 9:27 AM, wrote: From: KONRAD Frederic This is a fixed clock device. It justs behave as an empty device with a parametrable output rate. Signed-off-by: KONRAD Frederic --- hw/misc/Makefile.objs | 2 + hw

Re: [Qemu-devel] [PULL v5 29/57] intel_iommu: add SID validation for IR

2016-08-02 Thread David Kiarie
On Tue, Aug 2, 2016 at 1:28 PM, Peter Xu wrote: > On Tue, Aug 02, 2016 at 10:46:13AM +0200, Jan Kiszka wrote: > > On 2016-08-02 10:36, Peter Xu wrote: > > > On Mon, Aug 01, 2016 at 06:39:05PM +0200, Jan Kiszka wrote: > > > > > > [...] > > > > > >>> static MemTxResult vtd_mem_ir_read(void *opaque

[Qemu-devel] [Patch v1 03/29] s390x/cpumodel: expose CPU class properties

2016-08-02 Thread David Hildenbrand
Let's expose the description and migration safety and whether a definition is static, as class properties, this can be helpful in the future. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target-s390x/cpu.c| 1 + target-s390x/cpu.h| 1 + target-s390x/cpu_models.

[Qemu-devel] [Patch v1 05/29] s390x/cpumodel: generate CPU feature lists for CPU models

2016-08-02 Thread David Hildenbrand
From: Michael Mueller This patch introduces the helper "gen-features" which allows to generate feature list definitions at compile time. Its flexibility is better and the error-proneness is lower when compared to static programming time added statements. The helper includes "target-s390x/cpu_fea

[Qemu-devel] [Patch v1 07/29] s390x/cpumodel: introduce CPU feature group definitions

2016-08-02 Thread David Hildenbrand
Let's use the generated groups to create feature group representations for the user. These groups can later be used to enable/disable multiple features in one shot and will be used to reduce the amount of reported features to the user if all subfeatures are in place. Acked-by: Cornelia Huck Signe

[Qemu-devel] [Patch v1 13/29] s390x/sclp: factor out preparation of cpu entries

2016-08-02 Thread David Hildenbrand
Let's factor out the common code of "read cpu info" and "read scp info". This will make the introduction of new cpu entry fields easier. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) d

[Qemu-devel] [Patch v1 02/29] s390x/cpumodel: "host" and "qemu" as CPU subclasses

2016-08-02 Thread David Hildenbrand
This patch introduces two CPU models, "host" and "qemu". "qemu" is used as default when running under TCG. "host" is used as default when running under KVM. "host" cannot be used without KVM. "host" is not migration-safe. They both inherit from the base s390x CPU, which is turned into an abstract c

[Qemu-devel] [Patch v1 11/29] s390x/cpumodel: let the CPU model handle feature checks

2016-08-02 Thread David Hildenbrand
If we have certain features enabled, we have to migrate additional state (e.g. vector registers or runtime-instrumentation registers). Let the CPU model control that unless we have no "host" CPU model in the KVM case. This will later on be the case for compatibility machines, so migration from QEMU

[Qemu-devel] [Patch v1 08/29] s390x/cpumodel: register defined CPU models as subclasses

2016-08-02 Thread David Hildenbrand
This patch adds the CPU model definitions that are known on s390x - like z900, zBC12 or z13. For each definition, introduce two CPU models: 1. Base model (e.g. z13-base): Minimum feature set we expect to be around on all z13 systems. These models are migration-safe and will never change. 2.

[Qemu-devel] [Patch v1 01/29] qmp: details about CPU definitions in query-cpu-definitions

2016-08-02 Thread David Hildenbrand
It might be of interest for tooling whether a CPU definition can be safely used when migrating, or if e.g. CPU features might get lost during migration when migrationg from/to a different QEMU version or host, even if the same compatibility machine is used. Also, we want to know if a CPU definitio

[Qemu-devel] [Patch v1 09/29] s390x/cpumodel: store the CPU model in the CPU instance

2016-08-02 Thread David Hildenbrand
A CPU model consists of a CPU definition, to which delta changes are applied - features added or removed (e.g. z13-base,vx=on). In addition, certain properties (e.g. cpu id) can later on change during migration but belong into the CPU model. This data will later be filled from the host model in the

[Qemu-devel] [Patch v1 00/29] s390x CPU models: exposing features

2016-08-02 Thread David Hildenbrand
After a very helpful discussion with Eduardo, we I did some changes to the patch series, the most important ones being: - All models except "host" will be "migration-safe" on s390x - CPU model expansion now has only two types "full" and "static" - The parameter "type" from CPU model baseline has be

[Qemu-devel] [Patch v1 14/29] s390x/sclp: introduce sclp feature blocks

2016-08-02 Thread David Hildenbrand
The sclp "read cpu info" and "read scp info" commands can include features for the cpu info and configuration characteristics (extended), decribing some advanced features available in the configuration. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- include/hw/s390x/sclp.h | 12 ++

[Qemu-devel] [Patch v1 10/29] s390x/cpumodel: expose features and feature groups as properties

2016-08-02 Thread David Hildenbrand
Let's add all features and feature groups as properties to all CPU models. If the "host" CPU model is unknown, we can neither query nor change features. KVM will just continue to work like it did until now. We will not allow to enable features that were not part of the original CPU model, because

[Qemu-devel] [Patch v1 16/29] s390x/sclp: propagate the ibc val(lowest and unblocked ibc)

2016-08-02 Thread David Hildenbrand
If we have a lowest ibc, we can indicate the ibc to the guest. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 2 ++ include/hw/s390x/sclp.h | 3 ++- target-s390x/cpu_models.c | 21 + target-s390x/cpu_models.h | 12 4

[Qemu-devel] [Patch v1 25/29] qmp: add QMP interface "query-cpu-model-comparison"

2016-08-02 Thread David Hildenbrand
Let's provide a standardized interface to compare two CPU models. query-cpu-model-compare takes two models and returns what it knows about their compability under a certain QEMU machine QEMU has been started with. If modelA is a subset of modelB or if both are identical, modelA will run in the sa

[Qemu-devel] [Patch v1 12/29] s390x/cpumodel: check and apply the CPU model

2016-08-02 Thread David Hildenbrand
We have to test if a configured CPU model is runnable in the current configuration, and if not report why that is the case. This is done by comparing it to the maximum supported model (host for KVM or z900 for TCG). Also, we want to do some base sanity checking for a configured CPU model. We'll ca

[Qemu-devel] [Patch v1 17/29] s390x/sclp: propagate the mha via sclp

2016-08-02 Thread David Hildenbrand
The mha is provided in the CPU model, so get any CPU and extract the value. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 1 + include/hw/s390x/sclp.h | 3 ++- target-s390x/cpu_models.c | 14 ++ target-s390x/cpu_models.h | 1 + 4 files

[Qemu-devel] [Patch v1 04/29] s390x/cpumodel: introduce CPU features

2016-08-02 Thread David Hildenbrand
From: Michael Mueller The patch introduces s390x CPU features (most of them refered to as facilities) along with their discription and some functions that will be helpful when working with the features later on. Please note that we don't introduce all known CPU features, only the ones currently

[Qemu-devel] [Patch v1 20/29] s390x/kvm: allow runtime-instrumentation for "none" machine

2016-08-02 Thread David Hildenbrand
To be able to query the correct host model for the "none" machine, let's allow runtime-instrumentation for that machine. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/

[Qemu-devel] [Patch v1 15/29] s390x/sclp: indicate sclp features

2016-08-02 Thread David Hildenbrand
We have three different blocks in the SCLP read-SCP information response that indicate sclp features. Let's prepare propagation. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 9 + target-s390x/cpu_models.c | 14 ++ target-s390x/cpu

[Qemu-devel] [PATCH v2 1/2] xen: when removing a backend don't remove many of them

2016-08-02 Thread Juergen Gross
When a Xenstore watch fires indicating a backend has to be removed don't remove all backends for that domain with the specified device index, but just the one which has the correct type. The easiest way to achieve this is to use the already determined xendev as parameter for xen_be_del_xendev() in

[Qemu-devel] [Patch v1 29/29] s390x/cpumodel: implement QMP interface "query-cpu-model-baseline"

2016-08-02 Thread David Hildenbrand
Let's implement that interface by reusing our conversion code and lookup code for CPU definitions. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target-s390x/cpu_models.c | 55 +++ 1 file changed, 55 insertions(+) diff --git a/target-s

[Qemu-devel] [Patch v1 23/29] s390x/kvm: let the CPU model control CMM(A)

2016-08-02 Thread David Hildenbrand
Starting with recent kernels, if the cmma attributes are available, we actually have hardware support. Enabling CMMA then means providing the guest VCPU with CMM, therefore enabling its CMM facility. Let's not blindly enable CMM anymore but let's control it using CPU models. For disabled CPU model

[Qemu-devel] [Patch v1 18/29] s390x/sclp: propagate hmfai

2016-08-02 Thread David Hildenbrand
hmfai is provided on CPU models >= z196. Let's propagate it properly. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 1 + include/hw/s390x/sclp.h | 3 ++- target-s390x/cpu_models.c | 14 ++ target-s390x/cpu_models.h | 1 + 4 files chang

[Qemu-devel] [Patch v1 28/29] s390x/cpumodel: implement QMP interface "query-cpu-model-comparison"

2016-08-02 Thread David Hildenbrand
Let's implement that interface by reusing our convertion code implemented for expansion. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target-s390x/cpu_models.c | 84 +++ 1 file changed, 84 insertions(+) diff --git a/target-s390x/cpu_m

[Qemu-devel] [Patch v1 21/29] s390x/kvm: implement CPU model support

2016-08-02 Thread David Hildenbrand
Let's implement our two hooks so we can support CPU models. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target-s390x/cpu_models.c | 75 +++- target-s390x/cpu_models.h | 50 target-s390x/kvm.c| 295 ++ 3 file

[Qemu-devel] [Patch v1 19/29] linux-headers: update against kvm/next

2016-08-02 Thread David Hildenbrand
Update against 601045bff745 ("Merge branch 'kvm-ppc-next'..."). Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- linux-headers/asm-arm64/kvm.h | 2 ++ linux-headers/asm-s390/kvm.h | 41 + linux-headers/linux/kvm.h | 12 +++- 3 fi

Re: [Qemu-devel] [PULL v5 29/57] intel_iommu: add SID validation for IR

2016-08-02 Thread Jan Kiszka
On 2016-08-02 14:17, David Kiarie wrote: > > > On Tue, Aug 2, 2016 at 3:12 PM, Peter Xu > wrote: > > On Tue, Aug 02, 2016 at 02:58:55PM +0300, David Kiarie wrote: > > > Sure. David, so do you like to do it or I cook this patch? :) > > > > If there are n

[Qemu-devel] [Patch v1 24/29] qmp: add QMP interface "query-cpu-model-expansion"

2016-08-02 Thread David Hildenbrand
Let's provide a standardized interface to expand CPU models, like the host model. This interface can be used by tooling to get details about a specific CPU model, e.g. the "host" model. To take care of all architectures, two detail levels for an expansion are introduced. Certain architectures migh

[Qemu-devel] [Patch v1 22/29] s390x/kvm: disable host model for existing compat machines

2016-08-02 Thread David Hildenbrand
Compatibility machines that touch runtime-instrumentation should not be used with the CPU model. Otherwise the host model will look different, depending on the QEMU machine QEMU has been started with. So let's simply disable the host model for existing compatibility machines that all disable ri.

[Qemu-devel] [PATCH v2 2/2] xen: drain submit queue in xen-usb before removing device

2016-08-02 Thread Juergen Gross
When unplugging a device in the Xen pvusb backend drain the submit queue before deallocation of the control structures. Otherwise there will be bogus memory accesses when I/O contracts are finished. Correlated to this issue is the handling of cancel requests: a packet cancelled will still lead to

  1   2   3   4   >