[Qemu-devel] [PATCH v10 02/16] block: Add block_job_add_bdrv()

2016-10-06 Thread Alberto Garcia
When a block job is created on a certain BlockDriverState, operations are blocked there while the job exists. However, some block jobs may involve additional BDSs, which must be blocked separately when the job is created and unblocked manually afterwards. This patch adds block_job_add_bdrv(), that

[Qemu-devel] [PATCH v10 15/16] qemu-iotests: Add iotests.supports_quorum()

2016-10-06 Thread Alberto Garcia
There's many tests that need Quorum support in order to run. At the moment each test implements its own check to see if Quorum is enabled. This patch centralizes all those checks in a new function called iotests.supports_quorum(). Signed-off-by: Alberto Garcia --- tests/qemu-iotests/041|

[Qemu-devel] [PATCH] linux-user: add kcmp() syscall

2016-10-06 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d21d901..a32386e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -304,6 +304,11 @@ _syscall3(int, ioprio_set, in

Re: [Qemu-devel] [PATCH v2] qemu_opt_foreach: Fix crasher

2016-10-06 Thread Peter Maydell
On 6 October 2016 at 13:39, Michal Privoznik wrote: > The crash occurred when I tried to attach vhost-user net: > > {"execute":"chardev-add","arguments":{"id":"charnet2","backend":{"type":"socket","data":{"addr":{"type":"unix","data":{"path":"/var/run/openvswitch/vhost-user1"}},"wait":false,"serve

[Qemu-devel] [PATCH v10 09/16] block: Add QMP support for streaming to an intermediate layer

2016-10-06 Thread Alberto Garcia
This patch makes the 'device' parameter of the 'block-stream' command accept a node name that is not a root node. In addition to that, operation blockers will be checked in all intermediate nodes between the top and the base node. Signed-off-by: Alberto Garcia --- blockdev.c | 11

[Qemu-devel] [PATCH v10 01/16] block: Pause all jobs during bdrv_reopen_multiple()

2016-10-06 Thread Alberto Garcia
When a BlockDriverState is about to be reopened it can trigger certain operations that need to write to disk. During this process a different block job can be woken up. If that block job completes and also needs to call bdrv_reopen() it can happen that it needs to do it on the same BlockDriverState

[Qemu-devel] [PATCH v10 00/16] Support streaming to an intermediate layer

2016-10-06 Thread Alberto Garcia
Hi all, 6 months after v9, and more than a year after v8, here's the new version of the intermediate block streaming series. There have been so many changes in QEMU since then that all patches in this series are either new or have changed. Still, some of the most important changes have been merge

[Qemu-devel] [PATCH v2 12/12] virtio: cleanup VMSTATE_VIRTIO_DEVICE

2016-10-06 Thread Halil Pasic
Now all the usages of the old version of VMSTATE_VIRTIO_DEVICE are gone, so we can get rid of the conditionals, and the old macro. Signed-off-by: Halil Pasic --- We could also make virtio_load/save static (private) at this point. I think we should. Opinions? --- hw/9pfs/virtio-9p-device.c |

[Qemu-devel] [PATCH v10 03/16] block: Use block_job_add_bdrv() in mirror_start_job()

2016-10-06 Thread Alberto Garcia
Use block_job_add_bdrv() instead of blocking all operations in mirror_start_job() and unblocking them in mirror_exit(). Signed-off-by: Alberto Garcia --- block/mirror.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index f9d1fec..9b5159f 10

[Qemu-devel] [PATCH v10 08/16] block: Support streaming to an intermediate layer

2016-10-06 Thread Alberto Garcia
This makes sure that the image we are streaming into is open in read-write mode during the operation. Operation blockers are also set in all intermediate nodes, since they will be removed from the chain afterwards. Finally, this also unblocks the stream operation in backing files. Signed-off-by:

[Qemu-devel] [PATCH v2 09/12] virtio-balloon: convert VMSTATE_VIRTIO_DEVICE

2016-10-06 Thread Halil Pasic
Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic --- hw/virtio/virtio-balloon.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 49a2f4a..1014ec6 100644 --- a/hw/virtio/virtio-b

[Qemu-devel] [PATCH v2 11/12] vhost-vsock: convert VMSTATE_VIRTIO_DEVICE

2016-10-06 Thread Halil Pasic
Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic --- hw/virtio/vhost-vsock.c | 44 +++- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/hw/virtio/vhost-vsock.c b/hw/virtio/vhost-vsock.c index bde2456..99cb216 100644 --- a

[Qemu-devel] [PATCH v2 01/12] virtio: prepare change VMSTATE_VIRTIO_DEVICE macro

2016-10-06 Thread Halil Pasic
In most cases the functions passed to VMSTATE_VIRTIO_DEVICE only call the virtio_load and virtio_save wrappers. Some include some pre- and post- massaging too. The massaging is better expressed as such in the VMStateDescription. Let us prepare for changing the semantic of the VMSTATE_VIRTIO_DEVICE

[Qemu-devel] [PATCH v2 08/12] virtio-scsi: convert VMSTATE_VIRTIO_DEVICE

2016-10-06 Thread Halil Pasic
Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic --- hw/scsi/virtio-scsi.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index e596b64..def316b 100644 --- a/hw/scsi/virtio-scsi.c

[Qemu-devel] [PATCH v2 10/12] virtio-rng: convert VMSTATE_VIRTIO_DEVICE

2016-10-06 Thread Halil Pasic
Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic --- hw/virtio/virtio-rng.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index cd8ca10..62867d1 100644 --- a/hw/virtio/virtio-rng.c +++

[Qemu-devel] [PATCH v2 07/12] virtio-input: convert VMSTATE_VIRTIO_DEVICE

2016-10-06 Thread Halil Pasic
Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic --- hw/input/virtio-input.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/hw/input/virtio-input.c b/hw/input/virtio-input.c index ccdf730..5e31033 100644 --- a/hw/input/virtio-inpu

[Qemu-devel] [PATCH v2 02/12] virtio-blk: convert VMSTATE_VIRTIO_DEVICE

2016-10-06 Thread Halil Pasic
Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic --- hw/block/virtio-blk.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 3a6112f..d773453 100644 --- a/hw/block/virtio-blk.c

[Qemu-devel] [PATCH v2 06/12] virtio-gpu: convert VMSTATE_VIRTIO_DEVICE

2016-10-06 Thread Halil Pasic
Use the new VMSTATE_VIRTIO_DEVICE macro. The device virtio-gpu is special because it actually does not adhere to the virtio migration schema, because device state is last. Signed-off-by: Halil Pasic --- hw/display/virtio-gpu.c | 41 + 1 file changed, 29 in

[Qemu-devel] [PATCH v2 04/12] virtio-9p: convert VMSTATE_VIRTIO_DEVICE

2016-10-06 Thread Halil Pasic
Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic --- hw/9pfs/virtio-9p-device.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 009b43f..c51dd9f 100644 --- a/hw/9pfs/virtio-9p-

[Qemu-devel] [PATCH v2 05/12] virtio-serial: convert VMSTATE_VIRTIO_DEVICE

2016-10-06 Thread Halil Pasic
Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic --- hw/char/virtio-serial-bus.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index db57a38..5566e94 100644 --- a/hw/char/virtio

Re: [Qemu-devel] [PATCH v4 00/17] Convert VFIO-PCI to realize

2016-10-06 Thread Auger Eric
Hi Markus, On 04/10/2016 15:20, Markus Armbruster wrote: > Eric Auger writes: > >> This series converts VFIO-PCI to realize. It also aims at improving >> the error reporting in case of QMP hot-plug. >> >> Before the series, a device_add failure would have reported: >> {"error": {"class": "Generi

[Qemu-devel] [PATCH v2 00/12] virtio migration: simplify vmstate helper

2016-10-06 Thread Halil Pasic
As a part of the long term effort to convert migration to vmstate the migration of virtio devices was recently partially switched to vmstate starting with the outer layer (commit 5943124cc "virtio: Migration helper function and macro" and the subsequent "virtio-*: Wrap in vmstate" commits). This w

[Qemu-devel] [PATCH v2 03/12] virtio-net: convert VMSTATE_VIRTIO_DEVICE

2016-10-06 Thread Halil Pasic
Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic --- hw/net/virtio-net.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 6b8ae2c..8059457 100644 --- a/hw/net/virtio

[Qemu-devel] [PATCH] linux-user: add RTA_PRIORITY in netlink

2016-10-06 Thread Laurent Vivier
Used by fedora21 on ppc64 in the network initialization Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 0815f30..d21d901 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2

[Qemu-devel] [PULL 12/29] target-ppc: add stxvh8x instruction

2016-10-06 Thread David Gibson
From: Nikunj A Dadhania stxvh8x: Store VSX Vector Halfword*8 Vector (16-bit elements): +--+--+--+--+--+--+--+--+ | 0001 | 1011 | 2021 | 3031 | 4041 | 5051 | 6061 | 7071 | +--+--+--+--+--+--+--+--+ Store results in following: Big-

Re: [Qemu-devel] [PATCH v2] rules.mak: quiet-command: Split command name and args to print

2016-10-06 Thread Peter Maydell
On 4 October 2016 at 20:55, Eric Blake wrote: > On 10/04/2016 11:27 AM, Peter Maydell wrote: >> The quiet-command make rule currently takes two arguments: >> the command and arguments to run, and a string to print if >> the V flag is not set (ie we are not being verbose). >> By convention, the str

[Qemu-devel] [PULL 19/29] MAINTAINERS: Add two more ppc related files

2016-10-06 Thread David Gibson
From: Thomas Huth The file hw/intc/heathrow_pic.c belongs to the Old World Mac machine, and pc-bios/ppc_rom.bin belongs to the PReP machine. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS i

[Qemu-devel] [PULL 18/29] target-ppc: Implement mtvsrws instruction

2016-10-06 Thread David Gibson
From: Ravi Bangoria mtvsrws: Move To VSR Word & Splat Signed-off-by: Ravi Bangoria Signed-off-by: Nikunj A Dadhania Reviewed-by: Richard Henderson Signed-off-by: David Gibson --- target-ppc/translate/vsx-impl.inc.c | 19 +++ target-ppc/translate/vsx-ops.inc.c | 1 + 2 file

[Qemu-devel] [PULL 23/29] libqos: add PPC64 PCI support

2016-10-06 Thread David Gibson
From: Laurent Vivier Signed-off-by: Laurent Vivier [dwg: Fixed build problem on 32-bit hosts] Signed-off-by: David Gibson --- tests/Makefile.include | 1 + tests/libqos/pci-pc.c| 22 tests/libqos/pci-spapr.c | 288 +++ tests/libqos/pci-

[Qemu-devel] [PULL 06/29] ppc: Check the availability of transactional memory

2016-10-06 Thread David Gibson
From: Thomas Huth KVM-PR currently does not support transactional memory, and the implementation in TCG is just a fake. We should not announce TM support in the ibm,pa-features property when running on such a system, so disable it by default and only enable it if the KVM implementation supports i

[Qemu-devel] [PATCH v2] qemu_opt_foreach: Fix crasher

2016-10-06 Thread Michal Privoznik
Program terminated with signal SIGSEGV, Segmentation fault. #0 0x55baf6ab4adc in qemu_opt_foreach (opts=0x0, func=0x55baf696b650 , opaque=0x7ffc51368c00, errp=0x7ffc51368e48) at util/qemu-option.c:617 617 QTAILQ_FOREACH(opt, &opts->head, next) { [Current thread is 1 (Thread 0x7f1d497

[Qemu-devel] [PULL 22/29] target-ppc: fix vmx instruction type/type2

2016-10-06 Thread David Gibson
From: Nikunj A Dadhania A few of the new instructions added inadvertently changed the type of old instruction(PPC_ALTIVEC) to PPC2_ALTIVEC_207 in the dual form declaration. commit: b5d569a1 (target-ppc: add vector extract instructions) commit: e7b1e06f (target-ppc: add vector insert instructions

[Qemu-devel] [PULL 17/29] target-ppc: add vclzlsbb/vctzlsbb instructions

2016-10-06 Thread David Gibson
From: Rajalakshmi Srinivasaraghavan The following vector instructions are added from ISA 3.0. vclzlsbb - Vector Count Leading Zero Least-Significant Bits Byte vctzlsbb - Vector Count Trailing Zero Least-Significant Bits Byte Signed-off-by: Rajalakshmi Srinivasaraghavan Reviewed-by: Richard Hen

Re: [Qemu-devel] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-06 Thread Paolo Bonzini
On 06/10/2016 13:56, Dr. David Alan Gilbert wrote: >> > Yes, it's sickening but that's what you do to honor backwards >> > compatibility. > Actually, that's not *that* bad an idea. > > Lets go with Jianjun's structure for the moment; we can always expand on it. > > It seems we have ~3 concepts

[Qemu-devel] [PULL 25/29] libqos: use generic qtest_shutdown()

2016-10-06 Thread David Gibson
From: Laurent Vivier Machine specific shutdown function can be registered by the machine specific qtest_XXX_boot() if needed. So we will not have to test twice the architecture (on boot and on shutdown) if the test can be run on several architectures. Signed-off-by: Laurent Vivier Reviewed-by:

[Qemu-devel] [PULL 11/29] target-ppc: add lxvh8x instruction

2016-10-06 Thread David Gibson
From: Nikunj A Dadhania lxvh8x: Load VSX Vector Halfword*8 Big-Endian Storage +---+---+---+---+---+---+---+---+ | 00 01 | 10 11 | 20 21 | 30 31 | 40 41 | 50 51 | 60 61 | 70 71 | +---+---+---+---+---+---+---+---+ Little-Endian Stor

Re: [Qemu-devel] [PATCH 2/2] migration: send and check the devices between source and distination at the begining

2016-10-06 Thread Dr. David Alan Gilbert
* Li Zhijian (lizhij...@cn.fujitsu.com) wrote: > > > On 09/30/2016 05:58 PM, Dr. David Alan Gilbert wrote: > > * Li Zhijian (lizhij...@cn.fujitsu.com) wrote: > > > > > > > > > On 09/30/2016 02:15 PM, Amit Shah wrote: > > > > Hi, > > > > > > > > On (Thu) 29 Sep 2016 [19:06:32], Li Zhijian wrote

[Qemu-devel] [PULL 27/29] spapr: fix check of cpu alias name in spapr_get_cpu_core_type()

2016-10-06 Thread David Gibson
From: Greg Kurz If the user passes an alias name and a property to -cpu, QEMU fails to find the CPU definition and exits. $ qemu-system-ppc64 -cpu POWER8E,compat=power7 qemu-system-ppc64: Unable to find sPAPR CPU Core definition This happens because spapr_get_cpu_core_type() passes the full str

[Qemu-devel] [PULL 28/29] tests/pxe: Use -nodefaults to speed up ppc64/ipv6 pxe test

2016-10-06 Thread David Gibson
From: Thomas Huth SLOF is unfortunately quite slow when running with TCG, so the pxe test is also performing rather slow here. By using "-nodefaults" we can disable some devices (vscsi) that we are not interested in here, so that SLOF does not have to scan them during boot and thus starts up a li

[Qemu-devel] [PULL 01/29] spapr_vscsi: fix build error introduced by f19661c8

2016-10-06 Thread David Gibson
From: Felipe Franciosi A typo introduced in f19661c8 prevents qemu from building when configured with --enable-trace-backend=dtrace. Signed-off-by: Felipe Franciosi Reviewed-by: Laurent Vivier Signed-off-by: David Gibson --- hw/scsi/spapr_vscsi.c | 2 +- hw/scsi/trace-events | 2 +- 2 files

[Qemu-devel] [PULL 21/29] target-ppc/kvm: Enable transactional memory on POWER8 with KVM-HV, too

2016-10-06 Thread David Gibson
From: Thomas Huth Transactional memory is also supported on POWER8 KVM-HV if the KVM_CAP_PPC_HTM is not available in the kernel yet, so add a hack to allow TM here, too. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- target-ppc/kvm.c | 9 - 1 file changed, 8 insertions(+),

[Qemu-devel] [PULL 14/29] target-ppc: add stxvb16x instruction

2016-10-06 Thread David Gibson
From: Nikunj A Dadhania stxvb16x: Store VSX Vector Byte*16 Vector (8-bit elements): +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |F0|F1|F2|F3|F4|F5|F6|F7|E0|E1|E2|E3|E4|E5|E6|E7| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ Store results in following: Little/Big-endian Storage +--+--

[Qemu-devel] [PULL 29/29] hw/ppc/spapr: Use POWER8 by default for the pseries-2.8 machine

2016-10-06 Thread David Gibson
From: Thomas Huth A couple of distributors are compiling their distributions with "-mcpu=power8" for ppc64le these days, so the user sooner or later runs into a crash there when not explicitely specifying the "-cpu POWER8" option to QEMU (which is currently using POWER7 for the "pseries" machine

[Qemu-devel] [PULL 26/29] tests: enable ohci/uhci/xhci tests on PPC64

2016-10-06 Thread David Gibson
From: Laurent Vivier Signed-off-by: Laurent Vivier Signed-off-by: David Gibson --- tests/Makefile.include| 8 +++- tests/usb-hcd-uhci-test.c | 24 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include i

[Qemu-devel] [PULL 03/29] pseries: Add 2.8 machine type, set up compatibility macros

2016-10-06 Thread David Gibson
Now that 2.7 is released, create the pseries-2.8 machine type and add the boilerplate compatiblity macro stuff. There's nothing new to put into the 2.7 compatiliby properties yet, but we'll need something eventually, so we might as well get it ready now. Signed-off-by: David Gibson --- hw/ppc/s

[Qemu-devel] [PULL 24/29] libqos: add PCI management in qtest_vboot()/qtest_shutdown()

2016-10-06 Thread David Gibson
From: Laurent Vivier Signed-off-by: Laurent Vivier Reviewed-by: Greg Kurz Reviewed-by: David Gibson Signed-off-by: David Gibson --- tests/e1000e-test.c | 2 +- tests/i440fx-test.c | 2 +- tests/ide-test.c| 2 +- tests/ivshmem-test.c| 2 +- tests/libqos

[Qemu-devel] [PULL 16/29] target-ppc: add vector compare not equal instructions

2016-10-06 Thread David Gibson
From: Rajalakshmi Srinivasaraghavan The following vector compare not equal instructions are added from ISA 3.0. vcmpneb - Vector Compare Not Equal Byte vcmpneh - Vector Compare Not Equal Halfword vcmpnew - Vector Compare Not Equal Word Signed-off-by: Rajalakshmi Srinivasaraghavan Reviewed-by:

[Qemu-devel] [PULL 13/29] target-ppc: add lxvb16x instruction

2016-10-06 Thread David Gibson
From: Nikunj A Dadhania lxvb16x: Load VSX Vector Byte*16 Little/Big-endian Storage +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |F0|F1|F2|F3|F4|F5|F6|F7|E0|E1|E2|E3|E4|E5|E6|E7| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ Vector load results in (8-bit elements): +--+--+--+--+--+--+--

[Qemu-devel] [PULL 10/29] target-ppc: improve stxvw4x implementation

2016-10-06 Thread David Gibson
From: Nikunj A Dadhania Manipulate data and store 8bytes instead of 4bytes. Vector (32-bit elements): +--+--+--+--+ | 00112233 | 44556677 | 8899AABB | CCDDEEFF | +--+--+--+--+ Store results in following: Big-Endian Storage +--

Re: [Qemu-devel] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-06 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 05/10/2016 18:56, Dr. David Alan Gilbert wrote: > > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: > >> Currently we cannot directly transfer a QTAILQ instance because of the > >> limitation in the migration code. Here we introduce an approa

[Qemu-devel] [PULL 15/29] target-ppc: fix invalid mask - cmpl, bctar

2016-10-06 Thread David Gibson
From: Avinesh Kumar cmpl: invalid bit mask should be 0x0041 bctar: invalid bit mask should be 0xE000 Signed-off-by: Avinesh Kumar Signed-off-by: Rajalakshmi Srinivasaraghavan Signed-off-by: David Gibson --- target-ppc/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

[Qemu-devel] [PULL 09/29] target-ppc: improve lxvw4x implementation

2016-10-06 Thread David Gibson
From: Nikunj A Dadhania Load 8byte at a time and manipulate. Big-Endian Storage +-+-+-+-+ | 00 11 22 33 | 44 55 66 77 | 88 99 AA BB | CC DD EE FF | +-+-+-+-+ Little-Endian Storage +-+

[Qemu-devel] [PULL 05/29] hw/ppc/spapr: Fix the selection of the processor features

2016-10-06 Thread David Gibson
From: Thomas Huth The current code uses pa_features_206 for POWERPC_MMU_2_06, and for everything else, it uses pa_features_207. This is bad in some cases because there is also a "degraded" MMU version of ISA 2.06, called POWERPC_MMU_2_06a, which should of course use the flags for 2.06 instead. An

[Qemu-devel] [PULL 04/29] hw/ppc/spapr: Move code related to "ibm, pa-features" to a separate function

2016-10-06 Thread David Gibson
From: Thomas Huth The function spapr_populate_cpu_dt() has become quite big already, and since we likely have to extend the pa-features property for every new processor generation, it is nicer if we put the related code into a separate function. Signed-off-by: Thomas Huth Reviewed-by: Cédric Le

[Qemu-devel] [PATCH v5 01/14] cryptodev: introduce cryptodev backend interface

2016-10-06 Thread Gonglei
cryptodev backend interface is used to realize the active work for virtual crypto device. This patch only add the framework, doesn't include specific operations. Signed-off-by: Gonglei --- backends/Makefile.objs | 2 + backends/cryptodev.c | 176 +

[Qemu-devel] [PULL 00/29] ppc-for-2.8 queue 20161006

2016-10-06 Thread David Gibson
The following changes since commit bbc4c3f4f3c624e2de64fdcb79f4dd8c1a508e9d: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2016-10-04 14:25:08 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.8-2016100

[Qemu-devel] [PULL 08/29] target-ppc: Implement mtvsrdd instruction

2016-10-06 Thread David Gibson
From: Ravi Bangoria mtvsrdd: Move To VSR Double Doubleword Signed-off-by: Ravi Bangoria Signed-off-by: Nikunj A Dadhania Reviewed-by: Richard Henderson Signed-off-by: David Gibson --- target-ppc/translate/vsx-impl.inc.c | 23 +++ target-ppc/translate/vsx-ops.inc.c | 1

[Qemu-devel] [PULL 20/29] target-ppc/kvm: Add a wrapper function to check for KVM-PR

2016-10-06 Thread David Gibson
From: Thomas Huth It makes more sense if we have a proper function to check for KVM-PR than to check for the GET_PVINFO extension all over the place. Signed-off-by: Thomas Huth [dwg: Expanded a comment to discourage overuse of this function] Signed-off-by: David Gibson --- target-ppc/kvm.c |

[Qemu-devel] [RFC v4 8/8] hw: vfio: common: Adapt vfio_listeners for reserved_iova region

2016-10-06 Thread Eric Auger
In case of reserved iova region, let's declare this region to the kernel so that it can use it for IOVA/HPA bindings. Signed-off-by: Eric Auger --- hw/vfio/common.c | 48 +--- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/hw/vfio/comm

[Qemu-devel] [PULL 02/29] tests: Test IPv6 and ppc64 in the PXE tester

2016-10-06 Thread David Gibson
From: Thomas Huth The firmware of the pseries machine, SLOF, is able to load files via IPv6 networking, too. So to test both, network bootloading on ppc64 and IPv6 (via Slirp) , let's add some PXE tests for this environment, too. Since we can not use the normal x86 boot sector for network boot lo

[Qemu-devel] [PULL 07/29] target-ppc: Implement mfvsrld instruction

2016-10-06 Thread David Gibson
From: Ravi Bangoria mfvsrld: Move From VSR Lower Doubleword Signed-off-by: Ravi Bangoria Signed-off-by: Nikunj A Dadhania Reviewed-by: Richard Henderson Signed-off-by: David Gibson --- target-ppc/translate/vsx-impl.inc.c | 17 + target-ppc/translate/vsx-ops.inc.c | 1 + 2

[Qemu-devel] [PATCH v5 03/14] virtio-crypto: introduce virtio_crypto.h

2016-10-06 Thread Gonglei
Introduce the virtio_crypto.h which follows virtio-crypto specification. Signed-off-by: Gonglei --- include/standard-headers/linux/virtio_crypto.h | 381 + 1 file changed, 381 insertions(+) create mode 100644 include/standard-headers/linux/virtio_crypto.h diff --git a/i

[Qemu-devel] [RFC v4 7/8] hw: vfio: common: vfio_prepare_msi_mapping

2016-10-06 Thread Eric Auger
Introduce an helper function to retrieve the iommu type1 capability chain info. The first capability ready to be exploited is the msi geometry capability. vfio_prepare_msi_mapping allocates a MemoryRegion dedicated to host MSI IOVA mapping. Its size matches the host needs. This region is mapped on

[Qemu-devel] [PATCH v5 12/14] virtio-crypto-test: add qtest case for virtio-crypto

2016-10-06 Thread Gonglei
We can simply test the functions of virtio crypto device, including session creation, session closing, cipher encryption and decryption. Quick usage: # make tests/virtio-crypto-test && ./tests/virtio-crypto-test CCtests/virtio-crypto-test.o LINK tests/virtio-crypto-test /x86_64/virtio/c

[Qemu-devel] [RFC v4 6/8] hw: platform-bus: Enable to map any memory region onto the platform-bus

2016-10-06 Thread Eric Auger
The platform bus is currently used to map dynamically instantiable platform device MMIO regions. The platform bus also can be seen as a pool of free guest physical addresses. We would like to use that pool to allocate a contiguous reserved IOVA region usable for MSI message address IOMMU mapping.

[Qemu-devel] [PATCH v5 09/14] virtio-crypto: add data queue processing handler

2016-10-06 Thread Gonglei
Introduces VirtIOCryptoReq structure to store crypto request so that we can support sync and async crypto operation in the future. At present, we only support cipher and algorithm chainning. Signed-off-by: Gonglei --- hw/virtio/virtio-crypto.c | 326 +

[Qemu-devel] [RFC v4 1/8] linux-headers: Partial update for MSI IOVA handling

2016-10-06 Thread Eric Auger
This is a partial update aiming at enhancing the VFIO user API with IOMMU info capability chain, msi_geometry reporting and MSI IOVA window registration. The kernel code is not yet upstreamed. It is available at https://github.com/eauger/linux/tree/generic-v7-passthrough-v13 ([PATCH v13 00/15] KVM

[Qemu-devel] [PATCH v5 10/14] cryptodev: introduce an unified wrapper for crypto operation

2016-10-06 Thread Gonglei
We use an opaque point to the VirtIOCryptoReq which can support different packets based on different algorithms. Signed-off-by: Gonglei --- backends/cryptodev-builtin.c | 2 +- backends/cryptodev.c | 28 ++-- hw/virtio/virtio-crypto.c| 10 +- include/

[Qemu-devel] [RFC v4 4/8] memory: Add reserved_iova region type

2016-10-06 Thread Eric Auger
Introduce a new reserved_iova region type. This type of iova region is bound to be used by the kernel to map some host physical addresses (typically MSI frames). A new initializer, memory_region_init_reserved_iova is introduced, as well as a test function, memory_region_is_reserved_iova. Signed-o

[Qemu-devel] [RFC v4 2/8] hw: vfio: common: vfio_get_iommu_type1_info

2016-10-06 Thread Eric Auger
Introduce vfio_get_iommu_type1_info helper that allows to handle variable size vfio_iommu_type1_info allocation with capability chain support. Besides, fixes a checkpatch warning on vfio_host_win_add's call. Signed-off-by: Eric Auger --- hw/vfio/common.c | 33 +++--

[Qemu-devel] [PATCH v5 13/14] virtio-crypto: add myself as virtio-crypto and cryptodev backends maintainer

2016-10-06 Thread Gonglei
This patch including two parts: Cryptodev Backends and virtio-crypto stuff. I can maintain cryptodev backends which introduced by myself. For virtio-crypto stuff, I can share the work with Michael (The whole virtio supporter). Signed-off-by: Gonglei --- MAINTAINERS | 14 ++ 1 file ch

[Qemu-devel] [RFC v4 5/8] memory: memory_region_find_by_name

2016-10-06 Thread Eric Auger
This new helper makes possible to search for a MemoryRegion matching a given name within a root MemoryRegion. Signed-off-by: Eric Auger --- include/exec/memory.h | 11 +++ memory.c | 16 2 files changed, 27 insertions(+) diff --git a/include/exec/memory.h b

[Qemu-devel] [RFC v4 3/8] hw: vfio: common: Introduce vfio_register_msi_iova

2016-10-06 Thread Eric Auger
vfio_register_msi_iova allows to register the MSI IOVA region. This IOVA window will be used by the kernel to map MSI doorbells. The function will become static in subsequent patches. However, since there is no user yet, the compiler argues; the function is currently not static and a dummy declara

[Qemu-devel] [RFC v4 0/8] KVM PCI/MSI passthrough with mach-virt

2016-10-06 Thread Eric Auger
On ARM, MSI transactions emitted by passthrough'ed devices are translated by the IOMMU. So the host must allocate IOVAs and map them to the host MSI frame physical addresses. Those IOVAs must be allocated within safe GPA slots, unused by the guest. The QEMU VFIO device retrieves the size if the I

[Qemu-devel] [PATCH v5 05/14] virtio-crypto: add virtio crypto device emulation

2016-10-06 Thread Gonglei
Introduce the virtio crypto realization, I'll finish the core code in the following patches. The thoughts came from virtio net realization. For more information see: http://qemu-project.org/Features/VirtioCrypto Signed-off-by: Gonglei --- hw/virtio/Makefile.objs | 1 + hw/

[Qemu-devel] [PATCH v5 06/14] virtio-crypto-pci: add virtio crypto pci support

2016-10-06 Thread Gonglei
This patch adds virtio-crypto-pci, which is the pci proxy for the virtio crypto device. Signed-off-by: Gonglei --- hw/virtio/Makefile.objs | 1 + hw/virtio/virtio-crypto-pci.c | 77 +++ hw/virtio/virtio-pci.h| 15 + 3 files changed,

[Qemu-devel] [PATCH v5 14/14] cryptodev: rename cryptodev stuff

2016-10-06 Thread Gonglei
Remove qcrypto and/or QCRYPTO prefix in order to make the name shorter because it doesn't repeat any information. Signed-off-by: Gonglei --- backends/cryptodev-builtin.c | 84 backends/cryptodev.c | 106 +++--- hw/virtio/virtio-

[Qemu-devel] [PATCH v5 02/14] cryptodev: add symmetric algorithm operation stuff

2016-10-06 Thread Gonglei
This patch adds session operation and crypto operation stuff in the cryptodev backend, including function pointers and corresponding structures. Signed-off-by: Gonglei --- backends/cryptodev.c | 45 +++ include/sysemu/cryptodev.h | 138 +

[Qemu-devel] [PATCH v5 00/14] virtio-crypto: introduce framework and device emulation

2016-10-06 Thread Gonglei
The virtio crypto is a virtual crypto device as well as a kind of virtual hardware accelerator for virtual machines. The encryption and decryption requests are placed in the data queue and handled by the real crypto accelerators finally. The second queue is the control queue used to create or destr

[Qemu-devel] [PATCH v5 08/14] virtio-crypto: add control queue handler

2016-10-06 Thread Gonglei
Realize the symmetric algorithm control queue handler, including plain cipher and chainning algorithms. Currently the control queue is used to create and close session for symmetric algorithm. Signed-off-by: Gonglei --- hw/virtio/virtio-crypto.c | 277 +++

[Qemu-devel] [PATCH v5 11/14] virtio-crypto: emulate virtio crypto as a legacy device by default

2016-10-06 Thread Gonglei
the scenario of virtio crypto device is mostly NFV, which require the existing Guest can't need to do any changes to support virtio crypto, so that they can easily migrate the existing network units to VM. That's also a basic requirement came from our customers in production environment. For virti

[Qemu-devel] [PATCH v5 07/14] virtio-crypto: set capacity of algorithms supported

2016-10-06 Thread Gonglei
Expose the capacity of algorithms supported by virtio crypto device to the frontend driver using pci configuration space. Signed-off-by: Gonglei --- hw/virtio/virtio-crypto.c | 40 ++- include/hw/virtio/virtio-crypto.h | 14 ++ 2 files chan

[Qemu-devel] [PATCH v5 04/14] cryptodev: introduce a new cryptodev backend

2016-10-06 Thread Gonglei
The new cryptodev backend named cryptodev-builtin, which realized by QEMU cipher APIS. These APIs can be backed by either nettle or gcrypt. Signed-off-by: Gonglei --- backends/Makefile.objs | 1 + backends/cryptodev-builtin.c | 345 +++ qemu-option

Re: [Qemu-devel] [PATCH 2/3] block-backend: Remember if attached device is non-qdev

2016-10-06 Thread Kevin Wolf
Am 05.10.2016 um 20:01 hat Max Reitz geschrieben: > On 05.10.2016 11:26, Kevin Wolf wrote: > > Almost all block devices are qdevified by now. This allows us to go back > > from the BlockBackend to the DeviceState. xen_disk is the last device > > that is missing. We'll remember in the BlockBackend i

Re: [Qemu-devel] Monitor brain dump

2016-10-06 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: > > Thanks for this. > >> In the beginning, there was only monitor.c, and it provided what we >> today call HMP, at just under 500 SLOC. >> >> Since then, most (but not all) HMP commands have moved elsewhere, eithe

Re: [Qemu-devel] Monitor brain dump

2016-10-06 Thread Marc-André Lureau
Hi On Thu, Oct 6, 2016 at 3:14 PM Paolo Bonzini wrote: > > > On 06/10/2016 13:10, Peter Maydell wrote: > > On 6 October 2016 at 12:07, Paolo Bonzini wrote: > >> My hunch is that it would be a drop in the sea if monitor.c were > >> refactored properly. > > > > Speaking of refactoring, is there s

Re: [Qemu-devel] Monitor brain dump

2016-10-06 Thread Paolo Bonzini
On 06/10/2016 13:10, Peter Maydell wrote: > On 6 October 2016 at 12:07, Paolo Bonzini wrote: >> My hunch is that it would be a drop in the sea if monitor.c were >> refactored properly. > > Speaking of refactoring, is there scope for splitting things > up so that if the foo subsystem needs to im

Re: [Qemu-devel] [PATCH] block: Add bdrv_runtime_opts to query-command-line-options

2016-10-06 Thread Kevin Wolf
Am 06.10.2016 um 12:58 hat Martin Kletzander geschrieben: > On Thu, Oct 06, 2016 at 11:40:36AM +0200, Kevin Wolf wrote: > >Recently we moved a few options from QemuOptsLists in blockdev.c to > >bdrv_runtime_opts in block.c in order to make them accissble using > >blockdev-add. However, this has the

Re: [Qemu-devel] Monitor brain dump

2016-10-06 Thread Peter Maydell
On 6 October 2016 at 12:07, Paolo Bonzini wrote: > My hunch is that it would be a drop in the sea if monitor.c were > refactored properly. Speaking of refactoring, is there scope for splitting things up so that if the foo subsystem needs to implement a monitor command it can just call a function

Re: [Qemu-devel] [PATCH 01/12] virtio: add VIRTIO_DEF_DEVICE_VMSD macro

2016-10-06 Thread Halil Pasic
On 10/05/2016 09:00 PM, Dr. David Alan Gilbert wrote: > * Paolo Bonzini (pbonz...@redhat.com) wrote: >> >> >> On 05/10/2016 16:29, Dr. David Alan Gilbert wrote: >>> The virtio-input conversion especially is nice and simple. >>> The only weird case is virtio-gpu, and well virtio-gpu is the one tha

Re: [Qemu-devel] Monitor brain dump

2016-10-06 Thread Paolo Bonzini
On 05/10/2016 19:43, Dr. David Alan Gilbert wrote: > > Speaking of the pocket calculator: my recommendation would be "nuke from > > orbit". It adds surprising corner cases to the HMP language, and > > provides next to no value. > > Huh, didn't realise that existed - I assume you mean get_expr a

Re: [Qemu-devel] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-06 Thread Paolo Bonzini
On 05/10/2016 18:56, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> Currently we cannot directly transfer a QTAILQ instance because of the >> limitation in the migration code. Here we introduce an approach to >> transfer such structures. In our approach such a

Re: [Qemu-devel] [PATCH 4/4] linux-user: Fix fadvise64() syscall support for Mips32

2016-10-06 Thread Aleksandar Markovic
Sure, Peter, I am going to take your hints and address all your concerns in the v2 of this series, which is planned to be posted soon. I appreciate your guidance, Aleksandar From: Peter Maydell [peter.mayd...@linaro.org] Sent: Wednesday, October 05, 2016

Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness

2016-10-06 Thread Peter Maydell
On 6 October 2016 at 04:38, David Gibson wrote: > On Wed, Oct 05, 2016 at 05:31:07AM -0700, Peter Maydell wrote: >> On 4 October 2016 at 16:43, David Gibson wrote: >> > On Tue, Oct 04, 2016 at 01:36:09PM +0100, Peter Maydell wrote: >> >> The difficulty with this patch is that it's hard to tell wh

Re: [Qemu-devel] [PULL 00/15] Migration

2016-10-06 Thread Peter Maydell
On 5 October 2016 at 14:44, Juan Quintela wrote: > From: Juan Quintela > > The following changes since commit bbc4c3f4f3c624e2de64fdcb79f4dd8c1a508e9d: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2016-10-04 14:25:08 +0100) > > are available in the git rep

Re: [Qemu-devel] [PATCH] block: Add bdrv_runtime_opts to query-command-line-options

2016-10-06 Thread Martin Kletzander
On Thu, Oct 06, 2016 at 11:40:36AM +0200, Kevin Wolf wrote: Recently we moved a few options from QemuOptsLists in blockdev.c to bdrv_runtime_opts in block.c in order to make them accissble using blockdev-add. However, this has the side effect that these options are missing from query-command-line

Re: [Qemu-devel] [PATCH 0/3] qht fixes

2016-10-06 Thread Paolo Bonzini
On 06/10/2016 00:34, Emilio G. Cota wrote: > Patch 1 fixes a warning that gcc may unnecessarily emit. > > Patch 2 fixes a real bug that sometimes shows up as a segfault in test-qht. > Daniel reported it yesterday on IRC; the trick to easily trigger it is to > run on RHEL6 (or CentOS6). > It is v

Re: [Qemu-devel] [PATCH 01/12] virtio: add VIRTIO_DEF_DEVICE_VMSD macro

2016-10-06 Thread Halil Pasic
On 10/05/2016 05:52 PM, Paolo Bonzini wrote: > > On 05/10/2016 16:29, Dr. David Alan Gilbert wrote: >> > The virtio-input conversion especially is nice and simple. >> > The only weird case is virtio-gpu, and well virtio-gpu is the one that's >> > odd here (compared to the rest of virtio). > Thou

Re: [Qemu-devel] [RFC v3 7/8] hw: vfio: common: vfio_prepare_msi_mapping

2016-10-06 Thread Auger Eric
Hi, On 06/10/2016 11:50, Eric Auger wrote: > Introduce an helper function to retrieve the iommu type1 capability > chain info. > > The first capability ready to be exploited is the msi geometry > capability. vfio_prepare_msi_mapping allocates a MemoryRegion > dedicated to host MSI IOVA mapping. I

Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness

2016-10-06 Thread Peter Maydell
On 6 October 2016 at 04:45, David Gibson wrote: > On Wed, Oct 05, 2016 at 07:20:52AM -0700, Peter Maydell wrote: >> On 5 October 2016 at 07:00, Cédric Le Goater wrote: >> > On 10/05/2016 03:53 PM, Peter Maydell wrote: >> >> Which tswap? Last time I worked through the stack of >> >> what happens I

<    1   2   3   4   >