Re: [Qemu-devel] [PATCH RFC v4 27/29] qapi: Change Netdev into a flat union

2015-09-17 Thread Markus Armbruster
Wen Congyang writes: > On 09/18/2015 04:11 AM, Eric Blake wrote: >> On 09/17/2015 08:34 AM, Eric Blake wrote: >> I apply Markus's v8 patch and this series, make check will fail: TEST: tests/virtio-net-test... (pid=23648) /x86_64/virtio/net/pci/basic: qemu-system-x86_64: -ne

Re: [Qemu-devel] [PATCH v8 06/26] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions

2015-09-17 Thread Markus Armbruster
Eric Blake writes: > On 09/16/2015 05:06 AM, Markus Armbruster wrote: >> Fixes flat unions to get the base's base members. Test case is from >> commit 2fc0043, in qapi-schema-test.json: >> >> { 'union': 'UserDefFlatUnion', >> 'base': 'UserDefUnionBase', >> 'discriminator': 'enum

Re: [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU

2015-09-17 Thread Markus Armbruster
Eric Blake writes: > On 09/17/2015 10:32 AM, Paolo Bonzini wrote: > > Can we revert this one, please? Checkpatch now warns about constructs > like > typedef struct MyDevice { > DeviceState parent; > > int reg0, reg1, reg2; > } MyDevice; It's i

Re: [Qemu-devel] [RFC PATCH 03/10] vfio: Check guest IOVA ranges against host IOMMU capabilities

2015-09-17 Thread Alexey Kardashevskiy
On 09/17/2015 11:09 PM, David Gibson wrote: The current vfio core code assumes that the host IOMMU is capable of mapping any IOVA the guest wants to use to where we need. However, real IOMMUs generally only support translating a certain range of IOVAs (the "DMA window") not a full 64-bit address

[Qemu-devel] [PATCH RFC 0/4] sPAPR: Support multiple PEs in one PHB

2015-09-17 Thread Gavin Shan
This patchset bases on David Gibson's git tree: git://github.com/dgibson/qemu.git (branch: vfio). And it requires host kernel changes which is being reviewed this moment. https://patchwork.ozlabs.org/patch/519135/ https://patchwork.ozlabs.org/patch/519136/ Currently, EEH works with the assumptio

[Qemu-devel] [PATCH RFC 4/4] sPAPR: Remove EEH callbacks in sPAPRPHBClass

2015-09-17 Thread Gavin Shan
Currently, the EEH operations implemented in the callbacks in sPAPRPHBClass, which will be dropped soon. This makes those functions corresponding to the EEH callbacks in sPAPRPHBClass public so that they can be called directly. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci.c | 44 -

[Qemu-devel] [PATCH RFC 1/4] linux-headers: Sync vfio.h

2015-09-17 Thread Gavin Shan
This synchronizes the Linux header vfio.h because of the changes introduced by below Linux commits: 900facd ("drivers/vfio: Support IOMMU group for EEH operations") 108f78d ("drivers/vfio: Support EEH API revision") Signed-off-by: Gavin Shan --- linux-headers/linux/vfio.h | 6 ++ 1 fi

[Qemu-devel] [PATCH RFC 3/4] sPAPR: Support multiple IOMMU groups in PHB for EEH operations

2015-09-17 Thread Gavin Shan
Currently, EEH works based on the assumption that every VFIO PHB has only one attached IOMMU group, which won't be true any more. It means every PHB would have multiple attached IOMMU groups. In order to apply the request EEH operation to the specified IOMMU group (PE), the changes to host kernel i

[Qemu-devel] [PATCH RFC 2/4] VFIO: Introduce vfio_get_group_id()

2015-09-17 Thread Gavin Shan
This introduces vfio_get_group_id() to retrieve the group ID from the specified PCI device. The function will be used by subsequent patches to support applying EEH operation on the specified IOMMU group. Signed-off-by: Gavin Shan --- hw/vfio/pci.c | 12 include/hw/vfio/vfio

Re: [Qemu-devel] [RFC PATCH 01/10] vfio: Remove unneeded union from VFIOContainer

2015-09-17 Thread Alexey Kardashevskiy
On 09/17/2015 11:09 PM, David Gibson wrote: Currently the VFIOContainer iommu_data field contains a union with different information for different host iommu types. However: * It only actually contains information for the x86-like "Type1" iommu * Because we have a common listener the Typ

Re: [Qemu-devel] [PATCH] net/vmxnet3: Refine l2 header validation

2015-09-17 Thread Shmulik Ladkani
Hi, On Thu, 3 Sep 2015 17:45:34 +0100 Stefan Hajnoczi wrote: > Thanks, applied to my net tree: > https://github.com/stefanha/qemu/commits/net For some reason, the patch isn't present on Stefan's last pull requests. Can you please verify this gets merged? Thanks, Shmulik

[Qemu-devel] [PATCH] vmxnet3: Add support for VMXNET3_CMD_GET_ADAPTIVE_RING_INFO command

2015-09-17 Thread Shmulik Ladkani
Some drivers (e.g. vmware-tools) issue the VMXNET3_CMD_GET_ADAPTIVE_RING_INFO command. Currently, due to lack of support, a bogus value (-1) is returned. Support this command, returning the "adaptive-ring disabled" flag. Signed-off-by: Shmulik Ladkani --- hw/net/vmxnet3.c | 9 + hw/net

[Qemu-devel] [PATCH v2 21/22] tcg: Remove gen_intermediate_code_pc

2015-09-17 Thread Richard Henderson
It is no longer used, so tidy up everything reached by it. This includes the gen_opc_* arrays, the search_pc parameter and the inline gen_intermediate_code_internal functions. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 1 - target-alpha/tran

[Qemu-devel] [PATCH v2 19/22] tcg: Pass data argument to restore_state_to_opc

2015-09-17 Thread Richard Henderson
The gen_opc_* arrays are already redundant with the data stored in the insn_start arguments. Transition restore_state_to_opc to use data from the latter. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 2 +- target-alpha/translate.c | 5 ++

[Qemu-devel] [PATCH v2 14/22] target-sparc: Remove gen_opc_jump_pc

2015-09-17 Thread Richard Henderson
Since jump_pc[1] is always npc + 4, we can infer after incrementing that jump_pc[1] == pc + 4. Because of that, we can encode the branch destination into a single word, and store that in npc. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-sparc/translate.c | 19

[Qemu-devel] [PATCH v2 16/22] tcg: Merge cpu_gen_code into tb_gen_code

2015-09-17 Thread Richard Henderson
As it's only caller, this tidies things a bit. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 2 - translate-all.c | 131 ++-- 2 files changed, 59 insertions(+), 74 deletions(-) diff --git a/includ

[Qemu-devel] [PATCH v2 22/22] tcg: Remove tcg_gen_code_search_pc

2015-09-17 Thread Richard Henderson
It's no longer used, so tidy up everything reached by it. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/tcg.c | 59 +++ tcg/tcg.h | 2 -- 2 files changed, 19 insertions(+), 42 deletions(-) diff --git a/tcg/tcg.c b/t

[Qemu-devel] [PATCH v2 17/22] target-*: Drop cpu_gen_code define

2015-09-17 Thread Richard Henderson
This symbol no longer exists. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-alpha/cpu.h | 1 - target-arm/cpu.h| 1 - target-cris/cpu.h | 1 - target-i386/cpu.h | 1 - target-lm32/cpu.h | 1 - target-m68k/cpu.h | 1 - target-microbla

[Qemu-devel] [PATCH v2 15/22] target-sparc: Add npc state to insn_start

2015-09-17 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-sparc/cpu.h | 1 + target-sparc/translate.c | 7 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 72ea171..ac8f383 100644 --- a/target-sparc/cpu.h +++ b

[Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-17 Thread Richard Henderson
We can now restore state without retranslation. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 1 + tcg/tcg.c | 42 - tcg/tcg.h | 5 +- translate-all.c | 153 +++- 4 files changed, 14

[Qemu-devel] [PATCH v2 12/22] target-sparc: Tidy gen_branch_a interface

2015-09-17 Thread Richard Henderson
We always pass pc2 == dc->npc and r_cond == cpu_cond, and always set is_br afterward. Infer all of that. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-sparc/translate.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/target-s

[Qemu-devel] [PATCH v2 11/22] target-cris: Mirror gen_opc_pc into insn_start

2015-09-17 Thread Richard Henderson
This perhaps isn't ideal in terms of (ab)using the "pc" field to encode both pc and ppc + delay branch state, as one has to be aware of this when examining opcode dumps. But it preserves existing logic, which will be good for bisection, and it certainly does save storage space. Reviewed-by: Peter

[Qemu-devel] [PATCH v2 13/22] target-sparc: Split out gen_branch_n

2015-09-17 Thread Richard Henderson
Unify three copies of this code from different branch types. Fix the case when npc == DYNAMIC_PC, i.e. a branch within a delay slot. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-sparc/translate.c | 55 1 file changed, 2

[Qemu-devel] [PATCH v2 10/22] target-sh4: Add flags state to insn_start

2015-09-17 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-sh4/cpu.h | 1 + target-sh4/translate.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target-sh4/cpu.h b/target-sh4/cpu.h index 1f68b27..ea854cb 100644 --- a/target-sh4/cpu.h +++ b/target-sh4/cpu

[Qemu-devel] [PATCH v2 18/22] tcg: Add TCG_MAX_INSNS

2015-09-17 Thread Richard Henderson
Adjust all translators to respect it. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-alpha/translate.c | 3 +++ target-arm/translate-a64.c| 3 +++ target-arm/translate.c| 6 +- target-cris/translate.c | 3 +++ target-i386/translate.c

[Qemu-devel] [PATCH v2 09/22] target-s390x: Add cc_op state to insn_start

2015-09-17 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-s390x/cpu.h | 1 + target-s390x/translate.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h index 9aeb024..68d6528 100644 --- a/target-s390x/cpu.h +++ b/targ

[Qemu-devel] [PATCH v2 04/22] target-*: Introduce and use cpu_breakpoint_test

2015-09-17 Thread Richard Henderson
Reduce the boilerplate required for each target. At the same time, move the test for breakpoint after calling tcg_gen_insn_start. Signed-off-by: Richard Henderson --- include/qom/cpu.h | 16 +++ target-alpha/translate.c | 13 target-arm/translate-a64.c

[Qemu-devel] [PATCH v2 03/22] target-*: Increment num_insns immediately after tcg_gen_insn_start

2015-09-17 Thread Richard Henderson
This does tidy the icount test common to all targets. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 4 ++-- target-arm/translate-a64.c| 6 +++--- target-arm/translate.c| 7 --- target-cris/translate.c | 4 ++-- target-i386/translate.c | 5 +++--

[Qemu-devel] [PATCH v2 07/22] target-i386: Add cc_op state to insn_start

2015-09-17 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-i386/cpu.h | 1 + target-i386/translate.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 5231e8c..717d558 100644 --- a/target-i386/cpu.h +++ b/target-i3

[Qemu-devel] [PATCH v2 05/22] tcg: Allow extra data to be attached to insn_start

2015-09-17 Thread Richard Henderson
With an eye toward having this data replace the gen_opc_* arrays that each target collects in order to enable restore_state_from_tb. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/tcg-op.h | 52 tcg/tcg-opc.h | 4 ++--

[Qemu-devel] [PATCH v2 01/22] tcg: Rename debug_insn_start to insn_start

2015-09-17 Thread Richard Henderson
With an eye toward making it mandatory. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-alpha/translate.c | 2 +- target-arm/translate-a64.c| 2 +- target-arm/translate.c| 2 +- target-cris/translate.c | 4 ++-- target-cris/translate_v10.c | 2 +-

[Qemu-devel] [PATCH v2 08/22] target-mips: Add delayed branch state to insn_start

2015-09-17 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-mips/cpu.h | 1 + target-mips/translate.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 2acc4b3..0d7c820 100644 --- a/target-mips/cpu.h +++ b/target-m

[Qemu-devel] [PATCH v2 00/22] Do away with TB retranslation

2015-09-17 Thread Richard Henderson
Version 2, updated based on comments. Notable changes: (1) Move breakpoint recognition after insn_start. Now we really do never have zero insns per TB. Assertions added. (2) Comments added. (3) Minor tweeks to the encoding, reflected in the comments. I examined a handfull of test c

[Qemu-devel] [PATCH v2 02/22] target-*: Unconditionally emit tcg_gen_insn_start

2015-09-17 Thread Richard Henderson
While we're at it, emit the opcode adjacent to where we currently record data for search_pc. This puts gen_io_start et al on the "correct" side of the marker. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-alpha/translate.c | 6 ++ target-arm/translate-a64.c

[Qemu-devel] [PATCH v2 06/22] target-arm: Add condexec state to insn_start

2015-09-17 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-arm/cpu.h | 1 + target-arm/translate-a64.c | 2 +- target-arm/translate.c | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 1b80516..c4a7400 10064

[Qemu-devel] [PATCH v3] ui/cocoa.m: Add Mount image file menu item

2015-09-17 Thread Programmingkid
Add "Mount Image File..." and a "Eject Image File" menu items to cocoa interface. This patch makes sharing files between the host and the guest user-friendly. The "Mount Image File..." menu item displays a dialog box having the user pick an image file to use in QEMU. The image file is setup as a U

Re: [Qemu-devel] [PATCH v2] virtio: add some migration doc

2015-09-17 Thread Jason Wang
On 09/18/2015 12:42 AM, Cornelia Huck wrote: > Try to cover the basics of virtio migration. > > Signed-off-by: Cornelia Huck > Reviewed-by: Greg Kurz > --- > v1->v2: make copyright explicit > --- Reviewed-by: Jason Wang Thanks > docs/virtio-migration.txt | 106 > ++

[Qemu-devel] Determining if USB is available

2015-09-17 Thread Programmingkid
Would you know of a function that could indicate if USB is available on the current emulator?

Re: [Qemu-devel] [PATCH 0/7 v9] vhost-user multiple queue support

2015-09-17 Thread Yuanhan Liu
On Thu, Sep 17, 2015 at 03:23:55PM +0300, Michael S. Tsirkin wrote: > On Tue, Sep 15, 2015 at 03:10:27PM +0800, Yuanhan Liu wrote: > > Hi, > > > > Here is the updated patch set for enabling vhost-user multiple queue. > > This patch set introduces 2 more vhost user messages: > > VHOST_USER_GET_QUE

Re: [Qemu-devel] [PATCH v11 02/12] init/cleanup of netfilter object

2015-09-17 Thread Yang Hongyang
On 09/18/2015 12:09 AM, Eric Blake wrote: On 09/16/2015 07:23 PM, Yang Hongyang wrote: +{ 'enum': 'NetFilterChain', + 'data': [ 'all', 'in', 'out' ] } I don't see any other QMP usage of this enum anywhere in the series. Are you planning on supporting QMP? If so, let's get that design disc

[Qemu-devel] [PATCH] hw/pci-host/piix: fix one file descriptor leak

2015-09-17 Thread Tiejun Chen
Commit 595a4f07d6bd (piix: create host bridge to passthrough) introduced to leak of one file descriptor, "config_fd", now just fix that. CC: Michael S. Tsirkin CC: Stefano Stabellini CC: Paolo Bonzini Acked-by: Stefano Stabellini Signed-off-by: Tiejun Chen --- hw/pci-host/piix.c | 3 +++ 1 f

Re: [Qemu-devel] [PATCH RFC v4 27/29] qapi: Change Netdev into a flat union

2015-09-17 Thread Wen Congyang
On 09/18/2015 04:11 AM, Eric Blake wrote: > On 09/17/2015 08:34 AM, Eric Blake wrote: > >>> >>> I apply Markus's v8 patch and this series, make check will fail: >>> TEST: tests/virtio-net-test... (pid=23648) >>> /x86_64/virtio/net/pci/basic: >>> qemu-syste

Re: [Qemu-devel] [RFC PATCH 06/10] vfio: Allow hotplug of containers onto existing guest IOMMU mappings

2015-09-17 Thread David Gibson
On Thu, Sep 17, 2015 at 10:54:24AM -0600, Alex Williamson wrote: > On Thu, 2015-09-17 at 23:09 +1000, David Gibson wrote: > > At present the memory listener used by vfio to keep host IOMMU mappings > > in sync with the guest memory image assumes that if a guest IOMMU > > appears, then it has no exi

Re: [Qemu-devel] [RFC PATCH 08/10] spapr_iommu: Rename vfio_accel parameter

2015-09-17 Thread David Gibson
On Thu, Sep 17, 2015 at 10:54:38AM -0600, Alex Williamson wrote: > On Thu, 2015-09-17 at 23:09 +1000, David Gibson wrote: > > The vfio_accel parameter used when creating a new TCE table (guest IOMMU > > context) has a confusing name. What it really means is whether we need the > > TCE table create

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-17 Thread Michael Roth
Quoting Paolo Bonzini (2015-09-17 10:53:40) > > > On 17/09/2015 17:50, Michael Roth wrote: > > We still need globals for RTAS lookups. I think QOM is our most > > mature/well-tested interface for managing inter-device > > relationships/lookups, but I can understand if using > > root_container/lin

Re: [Qemu-devel] QEMU+Aarch64: in_asm log skips instructions of loop-programs

2015-09-17 Thread Christopher Covington
Hi Sergey, On 09/04/2015 12:38 PM, Sergey Smolov wrote: > >> >> 03.09.2015 19:35, Peter Maydell пишет: >>> On 3 September 2015 at 15:31, Sergey Smolov wrote: Do you think it is possible to implement another QEMU logger which will make a record for every executed block, >>> Yes (this wo

Re: [Qemu-devel] [PATCH 7/7] qapi: support nested structs in OptsVisitor

2015-09-17 Thread Kővágó Zoltán
2015-09-17 23:24 keltezéssel, Eric Blake írta: On 09/07/2015 06:14 AM, Kővágó, Zoltán wrote: The current OptsVisitor flattens the whole structure, if there are same named fields under different paths (like `in' and `out' in `Audiodev'), the current visitor can't cope with them (for example setti

Re: [Qemu-devel] [PATCH 7/7] qapi: support nested structs in OptsVisitor

2015-09-17 Thread Eric Blake
On 09/07/2015 06:14 AM, Kővágó, Zoltán wrote: > The current OptsVisitor flattens the whole structure, if there are same > named fields under different paths (like `in' and `out' in `Audiodev'), > the current visitor can't cope with them (for example setting > `frequency=44100' will set the in's fre

Re: [Qemu-devel] [PATCH v3 0/5] add ACPI node for fw_cfg on pc and arm

2015-09-17 Thread Gabriel L. Somlo
On Thu, Sep 17, 2015 at 11:30:59PM +0300, Michael S. Tsirkin wrote: > On Thu, Sep 17, 2015 at 10:56:29AM -0400, Gabriel L. Somlo wrote: > > New since v2: > > > > - pc/i386 node in ssdt only on machine types *newer* than 2.4 > > (as suggested by Eduardo) > > > > I appreciate any further

Re: [Qemu-devel] [PATCH 6/7] qapi: reorder NetdevBase and Netdev

2015-09-17 Thread Eric Blake
On 09/07/2015 06:14 AM, Kővágó, Zoltán wrote: > Probably more logical if NetdevBase comes before Netdev. > No semantic changes. > > Signed-off-by: Kővágó, Zoltán > Reviewed-by: Eric Blake > --- > qapi-schema.json | 46 +++--- > 1 file changed, 23 insertio

Re: [Qemu-devel] [PATCH 5/7] qapi: change Netdev into a flat union

2015-09-17 Thread Eric Blake
On 09/07/2015 06:14 AM, Kővágó, Zoltán wrote: > Except qapi-schema.json, this patch was generated by: > > find . -name .git -prune -o -type f \! -name '*~' -print0 | \ > xargs -0 sed -i \ > -e 's/NetClientOptionsKind/NetClientDriver/g' \ > -e 's/NET_CLIENT_OPTIONS_KIND_/NET_CLIENT_DRIVER

Re: [Qemu-devel] [PATCH v3 0/5] add ACPI node for fw_cfg on pc and arm

2015-09-17 Thread Michael S. Tsirkin
On Thu, Sep 17, 2015 at 10:56:29AM -0400, Gabriel L. Somlo wrote: > New since v2: > > - pc/i386 node in ssdt only on machine types *newer* than 2.4 > (as suggested by Eduardo) > > I appreciate any further comments and reviews. Hopefully we can make > this palatable for upstream, mod

Re: [Qemu-devel] [PATCH 1/7] qapi: support implicit structs in OptsVisitor

2015-09-17 Thread Eric Blake
On 09/07/2015 06:08 AM, Kővágó, Zoltán wrote: > They are required for flat unions (you still have to allocate the > structs). > > Signed-off-by: Kővágó, Zoltán > --- > qapi/opts-visitor.c | 15 +++ > 1 file changed, 15 insertions(+) Reviewed-by: Eric Blake and required for 'make c

Re: [Qemu-devel] [PATCH RFC v4 27/29] qapi: Change Netdev into a flat union

2015-09-17 Thread Eric Blake
On 09/17/2015 08:34 AM, Eric Blake wrote: >> >> I apply Markus's v8 patch and this series, make check will fail: >> TEST: tests/virtio-net-test... (pid=23648) >> /x86_64/virtio/net/pci/basic: >> qemu-system-x86_64: -netdev socket,fd=6,id=hs0: Invalid param

Re: [Qemu-devel] [PATCH 17/20] tcg: Pass data argument to restore_state_to_opc

2015-09-17 Thread Richard Henderson
On 09/08/2015 11:46 AM, Peter Maydell wrote: > On 2 September 2015 at 06:52, Richard Henderson wrote: >> The gen_opc_* arrays are already redundant with the data stored in >> the insn_start arguments. Transition restore_state_to_opc to use >> data from the later. > > Typo: "latter". > >> Signed

Re: [Qemu-devel] [PATCH RFC V4 0/4] Implement GIC-500 from GICv3 family for arm64

2015-09-17 Thread Peter Maydell
On 17 September 2015 at 19:54, Shlomo Pongratz wrote: > See inline. (You don't need to keep saying this, by the way -- inline quoting and response is the usual form of email on this list.) > On Thursday, September 17, 2015, Peter Maydell > wrote: >> >> On 17 September 2015 at 19:18, Shlomo Pong

Re: [Qemu-devel] [PATCH RFC V4 0/4] Implement GIC-500 from GICv3 family for arm64

2015-09-17 Thread Shlomo Pongratz
See inline. On Thursday, September 17, 2015, Peter Maydell wrote: > On 17 September 2015 at 19:18, Shlomo Pongratz > wrote: > > On Thursday, September 17, 2015, Peter Maydell > > >> This still seems to have the same issues as were noted in previous > >> rounds: > >> * you need to get rid of t

Re: [Qemu-devel] MIPS qemu build failure

2015-09-17 Thread Peter Maydell
On 17 September 2015 at 19:21, Steve Ellcey wrote: > > Following up to my own email. Apparently the reason I get this error is > that I am building with "--disable-tools --disable-system". I don't need > the tools and I don't have pixman on my build system so if I don't use > "--disable-tools --

Re: [Qemu-devel] [PATCH 0/4] ahci: clean up signature generation

2015-09-17 Thread John Snow
On 09/17/2015 04:40 AM, Stefan Hajnoczi wrote: > On Tue, Sep 01, 2015 at 04:50:37PM -0400, John Snow wrote: >> Ultimately, clean up the signature generation and as a result, tidy up >> the port_reset and init_d2h functions. >> >> ___

Re: [Qemu-devel] [PATCH RFC V4 0/4] Implement GIC-500 from GICv3 family for arm64

2015-09-17 Thread Peter Maydell
On 17 September 2015 at 19:18, Shlomo Pongratz wrote: > On Thursday, September 17, 2015, Peter Maydell >> This still seems to have the same issues as were noted in previous >> rounds: >> * you need to get rid of the limitation on number of cores. There >>should be no hard limit imposed by th

Re: [Qemu-devel] MIPS qemu build failure

2015-09-17 Thread Steve Ellcey
Following up to my own email. Apparently the reason I get this error is that I am building with "--disable-tools --disable-system". I don't need the tools and I don't have pixman on my build system so if I don't use "--disable-tools --disable-system" I get an error about not having pixman instal

Re: [Qemu-devel] [PATCH RFC V4 0/4] Implement GIC-500 from GICv3 family for arm64

2015-09-17 Thread Shlomo Pongratz
Thanks Please see inline Best regards, S.P. On Thursday, September 17, 2015, Peter Maydell wrote: > On 17 September 2015 at 18:38, Shlomo Pongratz > wrote: > > From: Shlomo Pongratz > > > > > This patch is a first step toward 128 cores support for arm64. > > > > At first only 64 cores are su

Re: [Qemu-devel] [PATCH RFC V4 0/4] Implement GIC-500 from GICv3 family for arm64

2015-09-17 Thread Peter Maydell
On 17 September 2015 at 18:38, Shlomo Pongratz wrote: > From: Shlomo Pongratz > > This patch is a first step toward 128 cores support for arm64. > > At first only 64 cores are supported. > This is because largest integer type has the size of 64 bits and modifying > essential data structures in or

Re: [Qemu-devel] [PATCH 0/2] tcg/mips: small cleanups

2015-09-17 Thread Richard Henderson
On 09/17/2015 09:03 AM, Aurelien Jarno wrote: > I have these patches for quite some time in one of my local branch in > the hope I would have time to do further changes. Given that I am going > to send a pull request for the 64-bit qemu_ld issue, I think it's a good > opportunity to also include th

[Qemu-devel] [PATCH RFC V4 2/4] hw/intc: Implment GIC-500

2015-09-17 Thread Shlomo Pongratz
From: Shlomo Pongratz Implement GIC-500 from GICv3 family for arm64 This patch is a first step toward 128 cores support for arm64. At first only 64 cores are supported. This is because the largest integer type has the size of 64 bits and modifying essential data structures in order to support 1

[Qemu-devel] [PATCH RFC V4 3/4] target-arm/cpu64 GICv3 system instructions support

2015-09-17 Thread Shlomo Pongratz
From: Shlomo Pongratz Add system instructions used by the Linux (kernel) GICv3 device driver Signed-off-by: Shlomo Pongratz --- target-arm/cpu-qom.h | 1 + target-arm/cpu.h | 12 ++ target-arm/cpu64.c | 118 +++ 3 files changed, 131

[Qemu-devel] [PATCH RFC V4 4/4] Add virt-v3 machine that uses GIC-500

2015-09-17 Thread Shlomo Pongratz
From: Pavel Fedin I would like to offer this, slightly improved implementation. The key thing is a new kernel_irqchip_type member in Machine class. Currently it it used only by virt machine for its internal purposes, however in future it is to be passed to KVM in kvm_irqchip_create(). The varia

[Qemu-devel] [PATCH RFC V4 1/4] hw/intc: Implement GIC-500 support files

2015-09-17 Thread Shlomo Pongratz
From: Shlomo Pongratz Add files need to maintain the GIC-500 state. Signed-off-by: Shlomo Pongratz --- hw/intc/arm_gicv3_common.c | 120 ++- hw/intc/gicv3_internal.h | 161 + include/hw/intc/arm_gicv3.h|

[Qemu-devel] [PATCH RFC V4 0/4] Implement GIC-500 from GICv3 family for arm64

2015-09-17 Thread Shlomo Pongratz
From: Shlomo Pongratz This patch is a first step toward 128 cores support for arm64. At first only 64 cores are supported. This is because largest integer type has the size of 64 bits and modifying essential data structures in order to support 128 cores will require the usage of bitops. Things

Re: [Qemu-devel] [PATCH v14 0/5] vGICv3 support

2015-09-17 Thread Peter Maydell
On 9 September 2015 at 08:49, Pavel Fedin wrote: > This series introduces support for GICv3 by KVM. Software emulation is > currently not supported. > > v13 => v14 > > - Rebased on the latest master, fixed conflicts in hw/arm/virt.c > You'll need to fix the acpi related bits Shannon has review co

Re: [Qemu-devel] [PATCH v8 06/26] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions

2015-09-17 Thread Eric Blake
On 09/16/2015 05:06 AM, Markus Armbruster wrote: > Fixes flat unions to get the base's base members. Test case is from > commit 2fc0043, in qapi-schema-test.json: > > { 'union': 'UserDefFlatUnion', > 'base': 'UserDefUnionBase', > 'discriminator': 'enum1', > 'data': { 'value1

Re: [Qemu-devel] [RFC PATCH 09/10] spapr_iommu: Provide a function to switch a TCE table to allowing VFIO

2015-09-17 Thread Alex Williamson
On Thu, 2015-09-17 at 23:09 +1000, David Gibson wrote: > Because of the way non-VFIO guest IOMMU operations are KVM accelerated, not > all TCE tables (guest IOMMU contexts) can support VFIO devices. Currently, > this is decided at creation time. > > To support hotplug of VFIO devices, we need to

Re: [Qemu-devel] [PATCH v2] virtio: add some migration doc

2015-09-17 Thread Dr. David Alan Gilbert
* Cornelia Huck (cornelia.h...@de.ibm.com) wrote: > Try to cover the basics of virtio migration. Thank you for doing this; I don't know the innards of virtio, but having to debug migration with it in the mix, it is nice to have something to look at. Dave > Signed-off-by: Cornelia Huck > Reviewe

Re: [Qemu-devel] [RFC PATCH 08/10] spapr_iommu: Rename vfio_accel parameter

2015-09-17 Thread Alex Williamson
On Thu, 2015-09-17 at 23:09 +1000, David Gibson wrote: > The vfio_accel parameter used when creating a new TCE table (guest IOMMU > context) has a confusing name. What it really means is whether we need the > TCE table created to be able to support VFIO devices. > > VFIO is relevant, because when

Re: [Qemu-devel] [RFC PATCH 06/10] vfio: Allow hotplug of containers onto existing guest IOMMU mappings

2015-09-17 Thread Alex Williamson
On Thu, 2015-09-17 at 23:09 +1000, David Gibson wrote: > At present the memory listener used by vfio to keep host IOMMU mappings > in sync with the guest memory image assumes that if a guest IOMMU > appears, then it has no existing mappings. > > This may not be true if a VFIO device is hotplugged

Re: [Qemu-devel] [RFC PATCH 00/10] pseries: Allow VFIO devices on spapr-pci-host-bridge

2015-09-17 Thread Alex Williamson
On Thu, 2015-09-17 at 23:09 +1000, David Gibson wrote: > Currently the pseries machine type uses two types of PCI Host Bridge > (PHB) devices: "spapr-pci-host-bridge" the 'normal' variant intended > for emulated PCI devices, and "spapr-pci-vfio-host-bridge" intended > for VFIO devices. > > When us

Re: [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU

2015-09-17 Thread Eric Blake
On 09/17/2015 10:32 AM, Paolo Bonzini wrote: Can we revert this one, please? Checkpatch now warns about constructs like typedef struct MyDevice { DeviceState parent; int reg0, reg1, reg2; } MyDevice; >>> >>> It's interesting that qom/object.h docu

[Qemu-devel] [PATCH v2] virtio: add some migration doc

2015-09-17 Thread Cornelia Huck
Try to cover the basics of virtio migration. Signed-off-by: Cornelia Huck Reviewed-by: Greg Kurz --- v1->v2: make copyright explicit --- docs/virtio-migration.txt | 106 ++ 1 file changed, 106 insertions(+) create mode 100644 docs/virtio-migration.tx

Re: [Qemu-devel] [PATCH] README: fill out some useful quickstart information

2015-09-17 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Thu, Sep 17, 2015 at 01:20:43PM +0100, Peter Maydell wrote: >> On 17 September 2015 at 13:05, Daniel P. Berrange >> wrote: >> > On Thu, Sep 17, 2015 at 12:32:56PM +0100, Peter Maydell wrote: >> >> On 17 September 2015 at 12:03, Daniel P. Berrange >> >> wrote:

[Qemu-devel] [PATCH v18 17/21] typedef: add typedef for QemuOpts

2015-09-17 Thread Pavel Dovgalyuk
This patch moves typedefs for QemuOpts and related types to qemu/typedefs.h file. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- include/qemu/option.h |5 + include/qemu/typedefs.h |3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/qemu/

Re: [Qemu-devel] [PATCH 3/4] checkpatch: adapt some tests to QEMU

2015-09-17 Thread Paolo Bonzini
On 17/09/2015 18:16, Peter Maydell wrote: > On 17 September 2015 at 17:00, Paolo Bonzini wrote: >> >> >> On 17/09/2015 16:24, Peter Maydell wrote: >>> Can we revert this one, please? Checkpatch now warns about constructs >>> like >>> typedef struct MyDevice { >>> DeviceState parent; >>>

[Qemu-devel] [PATCH v18 21/21] replay: recording of the user input

2015-09-17 Thread Pavel Dovgalyuk
This records user input (keyboard and mouse events) in record mode and replays these input events in replay mode. Signed-off-by: Pavel Dovgalyuk --- include/ui/input.h |2 + replay/Makefile.objs |1 replay/replay-events.c | 33 + replay/replay-input.c| 160 +++

[Qemu-devel] [PATCH v18 15/21] bottom halves: introduce bh call function

2015-09-17 Thread Pavel Dovgalyuk
This patch introduces aio_bh_call function. It is used to execute bottom halves as callbacks without adding them to the queue. Signed-off-by: Pavel Dovgalyuk --- async.c |7 ++- include/block/aio.h |5 + 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/

[Qemu-devel] [PATCH v18 19/21] replay: replay blockers for devices

2015-09-17 Thread Pavel Dovgalyuk
Some devices are not supported by record/replay subsystem. This patch introduces replay blocker which denies starting record/replay if such devices are included into the configuration. Signed-off-by: Pavel Dovgalyuk --- hw/bt/hci.c |7 +++ include/qapi/qmp/qerror.h |3 +

[Qemu-devel] [PATCH v18 20/21] replay: command line options

2015-09-17 Thread Pavel Dovgalyuk
This patch introduces command line options for enabling recording or replaying virtual machine behavior. These options are added to icount command line parameter. They include 'rr' which switches between record and replay and 'rrfile' for specifying the filename for replay log. Signed-off-by: Pave

[Qemu-devel] [PATCH v18 14/21] replay: checkpoints

2015-09-17 Thread Pavel Dovgalyuk
This patch introduces checkpoints that synchronize cpu thread and iothread. When checkpoint is met in the code all asynchronous events from the queue are executed. Signed-off-by: Pavel Dovgalyuk --- cpus.c |5 + qemu-timer.c | 40 ++

[Qemu-devel] [PATCH v18 16/21] replay: ptimer

2015-09-17 Thread Pavel Dovgalyuk
This patch adds deterministic replay for hardware periodic countdown timers. ptimer uses bottom halves layer to execute such an asynchronous callback. We put this callback into the replay queue instead of bottom halves one. When checkpoint is met by main loop thread, the replay queue is processed a

[Qemu-devel] [PATCH v18 12/21] replay: shutdown event

2015-09-17 Thread Pavel Dovgalyuk
This patch records and replays simulator shutdown event. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/replay-internal.h |2 ++ replay/replay.c | 14 ++ replay/replay.h |5 + vl.c |1 + 4 files changed,

[Qemu-devel] [PATCH v18 13/21] icount: improve counting for record/replay

2015-09-17 Thread Pavel Dovgalyuk
icount_warp_rt function is called by qemu_clock_warp and as callback of icount_warp timer. This patch adds call to qemu_clock_warp into main_loop_wait function, because icount warp may be missed in record/replay mode, when CPU is sleeping. This patch also disables of calling this function by timer,

[Qemu-devel] [PATCH v18 11/21] replay: recording and replaying clock ticks

2015-09-17 Thread Pavel Dovgalyuk
Clock ticks are considered as the sources of non-deterministic data for virtual machine. This patch implements saving the clock values when they are acquired (virtual, host clock). When replaying the execution corresponding values are read from log and transfered to the module, which wants to read

[Qemu-devel] [PATCH v18 10/21] replay: asynchronous events infrastructure

2015-09-17 Thread Pavel Dovgalyuk
This patch adds module for saving and replaying asynchronous events. These events include network packets, keyboard and mouse input, USB packets, thread pool and bottom halves callbacks. All events are stored in the queue to be processed at synchronization points such as beginning of TB execution,

[Qemu-devel] [PATCH v18 09/21] replay: interrupts and exceptions

2015-09-17 Thread Pavel Dovgalyuk
This patch includes modifications of common cpu files. All interrupts and exceptions occured during recording are written into the replay log. These events allow correct replaying the execution by kicking cpu thread when one of these events is found in the log. Signed-off-by: Pavel Dovgalyuk ---

[Qemu-devel] [PATCH v18 06/21] cpu-exec: allow temporary disabling icount

2015-09-17 Thread Pavel Dovgalyuk
This patch is required for deterministic replay to generate an exception by trying executing an instruction without changing icount. It adds new flag to TB for disabling icount while translating it. Signed-off-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- cpu-exec.c |7

[Qemu-devel] [PATCH v18 18/21] replay: initialization and deinitialization

2015-09-17 Thread Pavel Dovgalyuk
This patch introduces the functions for enabling the record/replay and for freeing the resources when simulator closes. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- exec.c |2 + replay/replay-internal.h |2 + replay/replay-user.c |4 + replay/

[Qemu-devel] [PATCH v18 08/21] i386: interrupt poll processing

2015-09-17 Thread Pavel Dovgalyuk
This patch updates x86_cpu_exec_interrupt function. It can process two interrupt request at a time (poll and another one). This makes its execution non-deterministic. Determinism is requred for recorded icount execution. Signed-off-by: Pavel Dovgalyuk --- target-i386/seg_helper.c |3 +++ 1 f

[Qemu-devel] [PATCH v18 05/21] replay: introduce icount event

2015-09-17 Thread Pavel Dovgalyuk
This patch adds icount event to the replay subsystem. This event corresponds to execution of several instructions and used to synchronize input events in the replay phase. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/replay-internal.c | 24 re

[Qemu-devel] [PATCH v18 02/21] replay: global variables and function stubs

2015-09-17 Thread Pavel Dovgalyuk
This patch adds global variables, defines, function declarations, and function stubs for deterministic VM replay used by external modules. Reviewed-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Pavel Dovgalyuk --- Makefile.target |1 docs/replay.txt | 168 ++

[Qemu-devel] [PATCH v18 07/21] cpu: replay instructions sequence

2015-09-17 Thread Pavel Dovgalyuk
This patch adds calls to replay functions into the icount setup block. In record mode number of executed instructions is written to the log. In replay mode number of istructions to execute is taken from the replay log. When replayed instructions counter is expired qemu_notify_event() function is ca

[Qemu-devel] [PATCH v18 03/21] replay: internal functions for replay log

2015-09-17 Thread Pavel Dovgalyuk
This patch adds functions to perform read and write operations with replay log. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/Makefile.objs |1 replay/replay-internal.c | 155 ++ replay/replay-internal.h | 46 ++

[Qemu-devel] [PATCH v18 04/21] replay: introduce mutex to protect the replay log

2015-09-17 Thread Pavel Dovgalyuk
This mutex will protect read/write operations for replay log. Using mutex is necessary because most of the events consist of several fields stored in the log. The mutex will help to avoid races. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/replay-internal.c | 27 +

  1   2   3   >