[Qemu-devel] [PULL 06/14] hw/mips: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [PULL 10/14] hw/ppc: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

Re: [Qemu-devel] how to handle QOM 'container' objects whose contents depend on QOM properties?

2018-02-06 Thread Peter Maydell
On 6 February 2018 at 19:04, Eduardo Habkost wrote: > On Tue, Feb 06, 2018 at 06:18:25PM +, Peter Maydell wrote: >> One current approach to that is that instead of init'ing those >> child objects in the container init, we postpone that to >> container realize. This looks pretty ugly, and it al

[Qemu-devel] [PULL 13/14] hw/xen*: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [PULL 04/14] hw/dma: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [PULL 11/14] hw/sd: Replace fprintf(stderr, "*\n" with DPRINTF()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Signed-off-by: Alistair Francis [Most of original patch dropped, commit message replaced to match what's left] Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20180203084315.20497-11-arm...@redhat.com> Reviewed-by: Thomas Huth --- hw/s

[Qemu-devel] [PULL 08/14] hw/openrisc: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [RFC PATCH 01/34] hyperv: ensure VP index equal to QEMU cpu_index

2018-02-06 Thread Roman Kagan
Hyper-V identifies vCPUs by Virtual Processor (VP) index which can be queried by the guest via HV_X64_MSR_VP_INDEX msr. It is defined by the spec as a sequential number which can't exceed the maximum number of vCPUs per VM. It has to be owned by QEMU in order to preserve it across migration. How

[Qemu-devel] [RFC PATCH 02/34] hyperv_testdev: refactor for readability

2018-02-06 Thread Roman Kagan
Make hyperv_testdev slightly easier to follow and enhance in future. For that, put the hyperv sint routes (wrapped in a helper structure) on a linked list rather than a fixed-size array. Signed-off-by: Roman Kagan --- hw/misc/hyperv_testdev.c | 114 ++-

[Qemu-devel] [PULL 07/14] hw/moxie: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [PULL 03/14] hw/arm: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [RFC PATCH 11/34] hyperv: add synic message delivery

2018-02-06 Thread Roman Kagan
Add infrastructure to deliver SynIC messages to the guest SynIC message page. Note that KVM also may want to deliver (SynIC timer) messages to the same message slot. The problem is that the access to a SynIC message slot is controlled by the value of its .msg_type field which indicates if the slo

[Qemu-devel] [PULL 14/14] tcg: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [PULL 12/14] hw/sparc*: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [RFC PATCH 03/34] hyperv: cosmetic: g_malloc -> g_new

2018-02-06 Thread Roman Kagan
Signed-off-by: Roman Kagan --- target/i386/hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c index c9a4bb539d..e762eac79f 100644 --- a/target/i386/hyperv.c +++ b/target/i386/hyperv.c @@ -88,7 +88,7 @@ HvSintRoute *kvm_hv_sint_

[Qemu-devel] [RFC PATCH 15/34] hyperv_testdev: add SynIC message and event testmodes

2018-02-06 Thread Roman Kagan
Add testmodes for SynIC messages and events. The message or event connection setup / teardown is initiated by the guest via new control codes written to the test device port. Then the test connections bounce the respective operations back to the guest, i.e. the incoming messages are posted or the

Re: [Qemu-devel] how to handle QOM 'container' objects whose contents depend on QOM properties?

2018-02-06 Thread Eduardo Habkost
On Tue, Feb 06, 2018 at 07:27:17PM +, Peter Maydell wrote: > On 6 February 2018 at 19:04, Eduardo Habkost wrote: > > On Tue, Feb 06, 2018 at 06:18:25PM +, Peter Maydell wrote: > >> One current approach to that is that instead of init'ing those > >> child objects in the container init, we p

[Qemu-devel] [PULL 02/14] audio: Replace AUDIO_FUNC with __func__

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Apparently we don't use __MSC_VER as a compiler anymore and we always require a C99 compiler (which means we always have __func__) so we don't need a special AUDIO_FUNC macro. We can just replace AUDIO_FUNC with __func__ instead. Checkpatch failures were manually fixed. S

[Qemu-devel] [RFC PATCH 07/34] hyperv: make HvSintRoute reference-counted

2018-02-06 Thread Roman Kagan
Multiple entities (e.g. VMBus devices) can use the same SINT route. To make their lives easier in maintaining SINT route ownership, make it reference-counted. Adjust the respective API names accordingly. Signed-off-by: Roman Kagan --- target/i386/hyperv.h | 10 +- hw/misc/hyperv_te

[Qemu-devel] [RFC PATCH 21/34] vmbus: build configuration

2018-02-06 Thread Roman Kagan
From: Evgeny Yakovlev Add option to configure and makefiles to enable building vmbus support (default to "on" on Linux and "off" otherwise). Signed-off-by: Roman Kagan --- configure| 11 +++ hw/Makefile.objs | 1 + 2 files changed, 12 insertions(+) diff --git a/configure b/co

[Qemu-devel] [RFC PATCH 12/34] hyperv: add synic event flag signaling

2018-02-06 Thread Roman Kagan
Add infrastructure to signal SynIC event flags by atomically setting the corresponding bit in the event flags page and firing a SINT if necessary. Signed-off-by: Roman Kagan --- target/i386/hyperv.h | 2 ++ target/i386/hyperv.c | 32 2 files changed, 34 insertio

Re: [Qemu-devel] [PATCH v5 1/4] target/arm: implement SHA-512 instructions

2018-02-06 Thread Peter Maydell
On 6 February 2018 at 19:59, Ard Biesheuvel wrote: > Thanks a lot for debugging that. As I said, I don't have test vectors, > or I would have tested it myself, and most likely would have found > this as well. No problem. I spent a surprisingly long time looking at the inside of the loop trying to

[Qemu-devel] [RFC PATCH 24/34] scsi: add Hyper-V/VMBus SCSI protocol definitions

2018-02-06 Thread Roman Kagan
Add a header with data structures and constants defining the protocol between the guest and the hypervisor implementing the Hyper-V VMBus SCSI controller. Mostly taken from the corresponding definitions in the Linux kernel. Signed-off-by: Roman Kagan --- hw/scsi/hvscsi-proto.h | 150 +++

[Qemu-devel] [RFC PATCH 16/34] hyperv: update copyright notices

2018-02-06 Thread Roman Kagan
Signed-off-by: Roman Kagan --- target/i386/hyperv.h | 1 + hw/misc/hyperv_testdev.c | 1 + target/i386/hyperv.c | 1 + 3 files changed, 3 insertions(+) diff --git a/target/i386/hyperv.h b/target/i386/hyperv.h index fcc41caf1f..8b7fcd0b48 100644 --- a/target/i386/hyperv.h +++ b/target/i38

[Qemu-devel] [RFC PATCH 31/34] hv-net: add .bootindex support

2018-02-06 Thread Roman Kagan
Add support for .bootindex property in hv-net. This results in a corresponding entry appearing in fw_cfg "bootorder". In order to actually boot off a hv-net device (via PXE) the firmware needs also a driver for it (either built-in or supplied via ROM). Signed-off-by: Roman Kagan --- hw/net/hv-

[Qemu-devel] [RFC PATCH 23/34] i386: en/disable vmbus by a machine property

2018-02-06 Thread Roman Kagan
Hyper-V VMBus logically belongs to the machine, so make its presence be controlled by a boolean property of the machine. TODO: consider doing this through adding the vmbus-bridge device instead Signed-off-by: Roman Kagan --- include/hw/i386/pc.h | 3 +++ hw/i386/pc.c | 34 ++

[Qemu-devel] [RFC PATCH 28/34] net: add RNDIS definitions

2018-02-06 Thread Roman Kagan
Add a header with constants used in Microsoft RNDIS protocol. The header is taken unchanged from the Linux kernel. TODO: reconcile with usb-net Signed-off-by: Roman Kagan --- hw/net/rndis.h | 391 + 1 file changed, 391 insertions(+) creat

[Qemu-devel] [RFC PATCH 08/34] hyperv: qom-ify SynIC

2018-02-06 Thread Roman Kagan
Make Hyper-V SynIC a device which is attached as a child to X86CPU. For now it only makes SynIC visibile in the qom hierarchy, and maintains its internal fields in sync with the respecitve msrs of the parent cpu (the fields will be used in followup patches). Signed-off-by: Roman Kagan --- targe

[Qemu-devel] [RFC PATCH 00/34] Hyper-V / VMBus

2018-02-06 Thread Roman Kagan
This is a work-in-progress series with Hyper-V / VMBus device emulation. It's still very raw but it's testable so I'd appreciate feedback on whether the design is sound. This stuff can also be seen at https://src.openvz.org/scm/up/qemu.git. Current status of the components included: * Hyper-V in

[Qemu-devel] [RFC PATCH 34/34] hv-net: define default rom file name

2018-02-06 Thread Roman Kagan
Signed-off-by: Roman Kagan --- hw/net/hv-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/hv-net.c b/hw/net/hv-net.c index 3d719458ea..b44ab20b0f 100644 --- a/hw/net/hv-net.c +++ b/hw/net/hv-net.c @@ -1423,6 +1423,7 @@ static void hv_net_class_init(ObjectClass *klass, void *data)

[Qemu-devel] [RFC PATCH 14/34] hyperv: process POST_MESSAGE hypercall

2018-02-06 Thread Roman Kagan
Add handling of POST_MESSAGE hypercall. For that, add an interface to regsiter a handler for the messages arrived from the guest on a particular connection id (IOW set up a message connection in Hyper-V speak). Signed-off-by: Roman Kagan --- target/i386/hyperv.h | 5 +++ target/i386/hyperv.c |

Re: [Qemu-devel] [PATCH RFC 18/21] qapi/common: Fix guardname() for funny filenames

2018-02-06 Thread Eric Blake
On 02/02/2018 07:03 AM, Markus Armbruster wrote: guardname() fails to return a valid C identifier for arguments containing anything but [A-Za-z0-9_.-']. Fix that. Signed-off-by: Markus Armbruster --- scripts/qapi/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[Qemu-devel] [RFC PATCH 05/34] hyperv: allow passing arbitrary data to sint ack callback

2018-02-06 Thread Roman Kagan
Make sint ack callback accept an opaque pointer, that is stored on sint_route at creation time. This allows for more convenient interaction with the callback. Besides, nothing outside hyperv.c should need to know the layout of HvSintRoute fields any more so its declaration can be removed from the

[Qemu-devel] [RFC PATCH 18/34] hyperv: add support for KVM_HYPERV_EVENTFD

2018-02-06 Thread Roman Kagan
When setting up a notifier for Hyper-V event connection, attempt to use the KVM-assisted one first, and fall back to userspace handling of the hypercall if the kernel doesn't provide the requested feature. Signed-off-by: Roman Kagan --- include/sysemu/kvm.h | 1 + accel/kvm/kvm-all.c | 15

[Qemu-devel] [RFC PATCH 04/34] hyperv: synic: only setup ack notifier if there's a callback

2018-02-06 Thread Roman Kagan
There's no point setting up an sint ack notifier if no callback is specified. Signed-off-by: Roman Kagan --- target/i386/hyperv.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c index e762eac79f..

[Qemu-devel] [RFC PATCH 19/34] vmbus: add vmbus protocol definitions

2018-02-06 Thread Roman Kagan
Add a header with data structures and constants used in Hyper-V VMBus hypervisor <-> guest interactions. Based on the respective stuff from Linux kernel. Signed-off-by: Roman Kagan --- include/hw/vmbus/vmbus-proto.h | 222 + 1 file changed, 222 insertions

Re: [Qemu-devel] [PATCH 00/24] re-factor and add fp16 using glibc soft-fp

2018-02-06 Thread Alex Bennée
Peter Maydell writes: > On 4 February 2018 at 04:11, Richard Henderson > wrote: >> Or there's the code from glibc. I know Peter didn't like the idea; >> debugging this code is fairly painful -- the massive preprocessor >> macros mean that you can't step through anything. But at least we >> ha

[Qemu-devel] [RFC PATCH 06/34] hyperv: address HvSintRoute by X86CPU pointer

2018-02-06 Thread Roman Kagan
Use X86CPU pointer to refer to the respective HvSintRoute instead of vp_index. This is more convenient and also paves the way for future enhancements. Signed-off-by: Roman Kagan --- target/i386/hyperv.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/target/i386/h

[Qemu-devel] [RFC PATCH 22/34] i386: Hyper-V VMBus ACPI DSDT entry

2018-02-06 Thread Roman Kagan
From: Andrey Smetanin Guest OS uses ACPI to discover vmbus presence. Add a corresponding entry to DSDT in case vmbus has been enabled. Experimentally Windows guests were found to require this entry to include two IRQ resources, so this patch adds two semi-arbitrarily chosen ones (7 and 13). Th

Re: [Qemu-devel] [PATCH RFC 17/21] qapi/types qapi/visit: Generate built-in stuff into separate files

2018-02-06 Thread Eric Blake
On 02/02/2018 07:03 AM, Markus Armbruster wrote: Linking code from multiple separate QAPI schemata into the same program is possible, but involves some weirdness around built-in types: * We generate code for built-in types into .c only with option --builtins. The user is responsible to gener

[Qemu-devel] [RFC PATCH 09/34] hyperv: block SynIC use in QEMU in incompatible configurations

2018-02-06 Thread Roman Kagan
Certain configurations do not allow SynIC to be used in QEMU. In particular, - when hyperv_vpindex is off, SINT routes can't be used as they refer to the destination vCPU by vp_index - older KVM (which doesn't expose KVM_CAP_HYPERV_SYNIC2) zeroes out SynIC message and event pages on every ms

[Qemu-devel] [RFC PATCH 20/34] vmbus: vmbus implementation

2018-02-06 Thread Roman Kagan
Add the VMBus infrastructure -- bus, devices, root bridge, vmbus state machine, vmbus channel interactions, etc. TODO: - split into smaller palatable pieces - more comments - check and handle corner cases Kudos to Evgeny Yakovlev (formerly eyakov...@virtuozzo.com) and Andrey Smetatin (formerly

[Qemu-devel] [RFC PATCH 10/34] hyperv: make overlay pages for SynIC

2018-02-06 Thread Roman Kagan
Per Hyper-V spec, SynIC message and event flag pages are to be implemented as so called overlay pages. That is, they are owned by the hypervisor and, when mapped into the guest physical address space, overlay the guest physical pages such that 1) the overlaid guest page becomes invisible to the g

[Qemu-devel] [RFC PATCH 30/34] net: add Hyper-V/VMBus net adapter

2018-02-06 Thread Roman Kagan
TODO: - add MAC filtering - add offloads - perf tuning Signed-off-by: Roman Kagan --- hw/net/hv-net.c | 1440 ++ hw/net/Makefile.objs |2 + 2 files changed, 1442 insertions(+) create mode 100644 hw/net/hv-net.c diff --git a/hw/net/hv-n

[Qemu-devel] [RFC PATCH 13/34] hyperv: process SIGNAL_EVENT hypercall

2018-02-06 Thread Roman Kagan
Add handling of SIGNAL_EVENT hypercall. For that, provide an interface to associate an EventNotifier with an event connection number, so that it's signaled when the SIGNAL_EVENT hypercall with the matching parameters is called by the guest. TODO: we should be able to move this to KVM and avoid ex

Re: [Qemu-devel] [PATCH 1/4] multiboot: Change multiboot_info from array of bytes to a C struct

2018-02-06 Thread Jack Schwartz
Hi Anatol and Kevin. Kevin and Anatol, thanks for your replies. A few comments inline close to the bottom... On 2018-02-05 13:43, Anatol Pomozov wrote: Hi On Wed, Jan 31, 2018 at 1:12 AM, Kevin Wolf wrote: Am 31.01.2018 um 00:15 hat Jack Schwartz geschrieben: Hi Anatol and Kevin. Even tho

[Qemu-devel] [RFC PATCH 17/34] [not to commit] import HYPERV_EVENTFD stuff from kernel

2018-02-06 Thread Roman Kagan
Allow to build and test HYPERV_EVENTD until it comes through the regular kernel headers import. Signed-off-by: Roman Kagan --- linux-headers/linux/kvm.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index d92c9b2f0e..471

[Qemu-devel] [RFC PATCH 26/34] hv-scsi: limit the number of requests per notification

2018-02-06 Thread Roman Kagan
There's a vague feeling that, if there are too many requests in the incoming ring buffer, processing and replying to them may usurp the event loop (main thread) and thus induce lags, soft lockups, etc. So ensure to yield the event loop at most every 1024 requests. TODO: do something smarter than

[Qemu-devel] [RFC PATCH 25/34] scsi: add Hyper-V/VMBus SCSI controller

2018-02-06 Thread Roman Kagan
Add an implementation of Hyper-V/VMBus SCSI controller. Kudos to Evgeny Yakovlev (formerly eyakov...@virtuozzo.com) for research and prototyping. Signed-off-by: Roman Kagan --- hw/scsi/hv-scsi.c | 398 ++ hw/scsi/Makefile.objs | 2 + hw/scsi

[Qemu-devel] [RFC PATCH 27/34] tests: hv-scsi: add start-stop test

2018-02-06 Thread Roman Kagan
It's trivial and tests only a tiny fraction of the relevant code, but it's better than nothing. Signed-off-by: Roman Kagan --- tests/hv-scsi-test.c | 57 ++ tests/Makefile.include | 3 +++ 2 files changed, 60 insertions(+) create mode 100644 te

[Qemu-devel] [RFC PATCH 32/34] loader: allow arbitrary basename for fw_cfg file roms

2018-02-06 Thread Roman Kagan
rom_add_file assumes that the basename of the file roms in fw_cfg should be the same as the original basename of the rom file on the filesystem. However, this is not always convenient: the rom basename may bear certain meaning in the guest firmware context, e.g. contain device ids, while the the f

[Qemu-devel] [RFC PATCH 29/34] net: add Hyper-V/VMBus network protocol definitions

2018-02-06 Thread Roman Kagan
Add a header with data structures and constants defining the protocol for communication between the guest and the hypervisor implementing the Hyper-V/VMBus network adapter. Mostly taken from the corresponding definitions in the Linux kernel. TODO: move RNDIS stuff to rndis.h Signed-off-by: Roman

[Qemu-devel] [RFC PATCH 33/34] vmbus: add support for rom files

2018-02-06 Thread Roman Kagan
In order to leverage third-party drivers for VMBus devices in firmware (in particular, there's a case with iPXE driver for hv-net in SeaBIOS and OVMF), introduce an infrastructure to supply such drivers as option ROMs. To make it easy for the firmware to locate such ROMs, they are stored in fw_cfg

Re: [Qemu-devel] [PULL 00/47] Misc patches for 2018-02-05

2018-02-06 Thread Paolo Bonzini
On 06/02/2018 20:18, Peter Maydell wrote: > Hi. I'm afraid this fails to build the all-linux-static config: > > LINKivshmem-client > [usual linker gripes about getpwuid &c in static binaries deleted] > /usr/lib/gcc/x86_64-linux-gnu/5/libubsan.a(sanitizer_linux_libcdep.o): > In function `__sa

Re: [Qemu-devel] [PATCH v11 00/20] tcg: generic vector operations

2018-02-06 Thread Alex Bennée
Alex Bennée writes: > Richard Henderson writes: > >> Changes since v11: >> * Use dup_const more. >> * Cleanup some gvec 2i and 2s routines. >> * Use more helpers and less gotos in target/arm/translate-a64.c. > > I just noticed the aarch64 cross build breaks: > > n file included from /root

Re: [Qemu-devel] [PATCH v2] pci/bus: let it has higher migration priority

2018-02-06 Thread Michael S. Tsirkin
On Tue, Feb 06, 2018 at 03:39:33PM +0800, Peter Xu wrote: > In the past, we prioritized IOMMU migration so that we have such a > priority order: > > IOMMU > PCI Devices > > When migrating a guest with both vIOMMU and a pcie-root-port, we'll > always migrate vIOMMU first, since pci buses will

Re: [Qemu-devel] [PATCH 01/10] cuda: do not use old_mmio accesses

2018-02-06 Thread Mark Cave-Ayland
On 05/02/18 14:17, Laurent Vivier wrote: On 03/02/2018 11:37, Mark Cave-Ayland wrote: Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c | 40 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/c

Re: [Qemu-devel] [PATCH 08/10] cuda: factor out timebase-derived counter value and load time

2018-02-06 Thread Mark Cave-Ayland
On 05/02/18 19:44, Philippe Mathieu-Daudé wrote: On 02/03/2018 07:37 AM, Mark Cave-Ayland wrote: Commit b981289c49 "PPC: Cuda: Use cuda timer to expose tbfreq to guest" altered the timer calculations from those based upon the hardware CUDA clock frequency to those based upon the CPU timebase fr

Re: [Qemu-devel] [RFC PATCH 00/34] Hyper-V / VMBus

2018-02-06 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180206203048.11096-1-rka...@virtuozzo.com Subject: [Qemu-devel] [RFC PATCH 00/34] Hyper-V / VMBus === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log --one

Re: [Qemu-devel] [PATCH v3 01/25] nios2: 10m50_devboard: replace cpu_model with cpu_type

2018-02-06 Thread Eduardo Habkost
On Tue, Jan 23, 2018 at 09:08:00AM +0100, Igor Mammedov wrote: > use cpu_create() instead of being removed cpu_generic_init() > > Signed-off-by: Igor Mammedov > --- > CC: Chris Wulff > CC: Marek Vasut > --- > hw/nios2/10m50_devboard.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [Qemu-devel] [RFC PATCH 00/34] Hyper-V / VMBus

2018-02-06 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180206203048.11096-1-rka...@virtuozzo.com Subject: [Qemu-devel] [RFC PATCH 00/34] Hyper-

Re: [Qemu-devel] [PATCH v3 02/25] tests: add machine 'none' with -cpu test

2018-02-06 Thread Eduardo Habkost
On Tue, Jan 23, 2018 at 09:08:01AM +0100, Igor Mammedov wrote: > Check that "$QEMU -M none -cpu FOO" starts QEMU without error > > Signed-off-by: Igor Mammedov > --- > v2: > - rename file to machine-none-test.c (Thomas Huth ) > - use qtest_startf()/instead of qtest_start() (Thomas Huth > ) [

Re: [Qemu-devel] [PATCH v3 03/25] arm: cpu: add CPU_RESOLVING_TYPE macro

2018-02-06 Thread Eduardo Habkost
On Tue, Jan 23, 2018 at 09:08:02AM +0100, Igor Mammedov wrote: > it will be used for providing to cpu name resolving class for > parsing cpu model for system and user emulation code. > > Along with change add target to null-machine test, so > that when switch to CPU_RESOLVING_TYPE happens, > thest

Re: [Qemu-devel] [PATCH v3 02/25] tests: add machine 'none' with -cpu test

2018-02-06 Thread Eduardo Habkost
On Tue, Jan 23, 2018 at 09:08:01AM +0100, Igor Mammedov wrote: > Check that "$QEMU -M none -cpu FOO" starts QEMU without error > > Signed-off-by: Igor Mammedov [...] > +struct arch2cpu { > +const char *arch; > +const char *cpu_model; > +}; > + > +static struct arch2cpu cpus_map[] = { > +

Re: [Qemu-devel] [RFC PATCH 00/34] Hyper-V / VMBus

2018-02-06 Thread no-reply
Hi, This series failed docker-quick@centos6 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180206203048.11096-1-rka...@virtuozzo.com Subject: [Qemu-devel] [RFC PATCH 00/34] Hyper

Re: [Qemu-devel] [PATCH v4 23/25] Use cpu_create(type) instead of cpu_init(cpu_model)

2018-02-06 Thread Eduardo Habkost
On Mon, Feb 05, 2018 at 06:08:29PM +0100, Igor Mammedov wrote: > With all targets defining CPU_RESOLVING_TYPE, refactor > cpu_parse_cpu_model(type, cpu_model) to parse_cpu_model(cpu_model) > so that callers won't have to know internal resolving cpu > type. Place it in exec.c so it could be called f

Re: [Qemu-devel] [PATCH v3 24/25] cpu: get rid of unused cpu_init() defines

2018-02-06 Thread Eduardo Habkost
On Tue, Jan 23, 2018 at 09:08:23AM +0100, Igor Mammedov wrote: > cpu_init(cpu_model) were replaced by cpu_create(cpu_type) so > no users are left, remove it. > > Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost -- Eduardo

[Qemu-devel] [PATCH v1 2/2] xlnx-zynqmp-pmu: Connect the PMU IOMOD PIT devices

2018-02-06 Thread Alistair Francis
Signed-off-by: Alistair Francis --- hw/microblaze/xlnx-zynqmp-pmu.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.c index 999a5657cf..f466c56e45 100644 --- a/hw/microblaze/xlnx-zynqmp-pmu.c

[Qemu-devel] [PATCH v1 0/2] Add and connet the PMU IOModule PIT device

2018-02-06 Thread Alistair Francis
Alistair Francis (2): timer: Initial commit of xlnx-pmu-iomod-pit device xlnx-zynqmp-pmu: Connect the PMU IOMOD PIT devices include/hw/timer/xlnx-pmu-iomod-pit.h | 58 hw/microblaze/xlnx-zynqmp-pmu.c | 35 + hw/timer/xlnx-pmu-iomod-pit.c | 241

[Qemu-devel] [PATCH v1 1/2] timer: Initial commit of xlnx-pmu-iomod-pit device

2018-02-06 Thread Alistair Francis
Signed-off-by: Alistair Francis --- include/hw/timer/xlnx-pmu-iomod-pit.h | 58 hw/timer/xlnx-pmu-iomod-pit.c | 241 ++ hw/timer/Makefile.objs| 2 + 3 files changed, 301 insertions(+) create mode 100644 include/hw/timer/xlnx-pm

Re: [Qemu-devel] [PATCH v3 00/25] generalize parsing of cpu_model (part 4)

2018-02-06 Thread Eduardo Habkost
I will try to summarize my comments here: * I suggest squashing patches 2-22 together. This way we shouldn't have any intermediate commits where "make check" generates warnings, and the series is shorter. * Or, even better: squash the CPU_RESOLVING_TYPE parts of 3-22 into one patch, and

Re: [Qemu-devel] [PATCH v2 3/3] virtio-balloon: add a timer to limit the free page report waiting time

2018-02-06 Thread Michael S. Tsirkin
On Tue, Feb 06, 2018 at 07:08:19PM +0800, Wei Wang wrote: > This patch adds a timer to limit the time that host waits for the free > page hints reported by the guest. Users can specify the time in ms via > "free-page-wait-time" command line option. If a user doesn't specify a > time, host waits til

Re: [Qemu-devel] [PATCH v2 2/3] migration: use the free page reporting feature from balloon

2018-02-06 Thread Michael S. Tsirkin
On Tue, Feb 06, 2018 at 07:08:18PM +0800, Wei Wang wrote: > Use the free page reporting feature from the balloon device to clear the > bits corresponding to guest free pages from the dirty bitmap, so that the > free memory are not sent. > > Signed-off-by: Wei Wang > CC: Michael S. Tsirkin > CC:

Re: [Qemu-devel] [PATCH v2 0/3] virtio-balloon: free page hint reporting support

2018-02-06 Thread Michael S. Tsirkin
On Tue, Feb 06, 2018 at 07:08:16PM +0800, Wei Wang wrote: > This is the deivce part implementation to add a new feature, > VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device > receives the guest free page hints from the driver and clears the > corresponding bits in the dirty b

[Qemu-devel] [RFC PATCH] vfio/pci: Add ioeventfd support

2018-02-06 Thread Alex Williamson
The ioeventfd here is actually irqfd handling of an ioeventfd such as supported in KVM. A user is able to pre-program a device write to occur when the eventfd triggers. This is yet another instance of eventfd-irqfd triggering between KVM and vfio. The impetus for this is high frequency writes to

[Qemu-devel] [RFC PATCH 0/5] vfio: ioeventfd support

2018-02-06 Thread Alex Williamson
For the matching kernel patch, see: https://lkml.org/lkml/2018/2/6/866 This series enables ioeventfd support and makes use of a proposed vfio kernel ioeventfd interface for accelerating high frequency writes through to the device. In the specific case addressed, the writes are to a range of MMIO

[Qemu-devel] [RFC PATCH 1/5] vfio/quirks: Add common quirk alloc helper

2018-02-06 Thread Alex Williamson
This will later be used to include list initialization Signed-off-by: Alex Williamson --- hw/vfio/pci-quirks.c | 48 +--- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index e5779a7ad35b..

[Qemu-devel] [RFC PATCH 2/5] vfio/quirks: Add generic support for ioveventfds

2018-02-06 Thread Alex Williamson
We might wish to handle some quirks via ioeventfds, add a list of ioeventfds to the quirk. Signed-off-by: Alex Williamson --- hw/vfio/pci-quirks.c | 17 + hw/vfio/pci.h| 11 +++ 2 files changed, 28 insertions(+) diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci

[Qemu-devel] [RFC PATCH 4/5] vfio: Update linux header

2018-02-06 Thread Alex Williamson
Update with proposed ioeventfd API. Signed-off-by: Alex Williamson --- linux-headers/linux/vfio.h | 24 1 file changed, 24 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index 4312e961ffd3..0921994daa6d 100644 --- a/linux-headers/li

[Qemu-devel] [RFC PATCH 3/5] vfio/quirks: Automatic ioeventfd enabling for NVIDIA BAR0 quirks

2018-02-06 Thread Alex Williamson
Record data writes that come through the NVIDIA BAR0 quirk, if we get enough in a row that we're only passing through, automatically enable an ioeventfd for it. The primary target for this is the MSI-ACK that NVIDIA uses to allow the MSI interrupt to re-trigger, which is a 4-byte write, data value

[Qemu-devel] [RFC PATCH 5/5] vfio/quirks: Enable ioeventfd quirks to be handled by vfio directly

2018-02-06 Thread Alex Williamson
With vfio ioeventfd support, we can program vfio-pci to perform a specified BAR write when an eventfd is triggered. This allows the KVM ioeventfd to be wired directly to vfio-pci, entirely avoiding userspace handling for these events. On the same micro-benchmark where the ioeventfd got us to almo

Re: [Qemu-devel] [PATCH v2 1/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-02-06 Thread Michael S. Tsirkin
On Tue, Feb 06, 2018 at 07:08:17PM +0800, Wei Wang wrote: > The new feature enables the virtio-balloon device to receive the hint of > guest free pages from the free page vq, and clears the corresponding bits > of the free page from the dirty bitmap, so that those free pages are not > transferred b

Re: [Qemu-devel] [PATCH v6 00/23] x86: Secure Encrypted Virtualization (AMD)

2018-02-06 Thread Brijesh Singh
On 2/6/18 9:51 AM, Bruce Rogers wrote: On 1/29/2018 at 10:41 AM, wrote: >> This patch series provides support for AMD's new Secure Encrypted >> Virtualization (SEV) feature. >> >> SEV is an extension to the AMD‑V architecture which supports running >> multiple VMs under the control of a hy

Re: [Qemu-devel] [PATCH for-2.9-rc5 v4 2/2] block: Drain BH in bdrv_drained_begin

2018-02-06 Thread Fam Zheng
On Tue, Feb 6, 2018 at 11:32 PM, Kevin Wolf wrote: > Am 18.04.2017 um 16:30 hat Fam Zheng geschrieben: >> During block job completion, nothing is preventing >> block_job_defer_to_main_loop_bh from being called in a nested >> aio_poll(), which is a trouble, such as in this code path: >> >> qmp_

Re: [Qemu-devel] [PATCH v1 1/2] timer: Initial commit of xlnx-pmu-iomod-pit device

2018-02-06 Thread Philippe Mathieu-Daudé
Hi Alistair, On 02/06/2018 07:23 PM, Alistair Francis wrote: > Signed-off-by: Alistair Francis > --- > > include/hw/timer/xlnx-pmu-iomod-pit.h | 58 > hw/timer/xlnx-pmu-iomod-pit.c | 241 > ++ > hw/timer/Makefile.objs| 2 + >

Re: [Qemu-devel] [PATCH v2 0/3] s390x/pci: fixup and optimize IOTLB code

2018-02-06 Thread Yi Min Zhao
在 2018/2/6 下午6:23, Cornelia Huck 写道: On Mon, 5 Feb 2018 15:22:55 +0800 Yi Min Zhao wrote: This series contains three patches, 1) optimizes the code including walking DMA tables and rpcit handler 2) fixes the issue caused by IOTLB global refresh 3) uses the right pal and pba when registering

Re: [Qemu-devel] [PATCH v4 00/14] Initial i.MX7 support

2018-02-06 Thread Andrey Smirnov
On Wed, Jan 31, 2018 at 9:03 AM, Philippe Mathieu-Daudé wrote: > Hi Peter, Andrey. > > On 01/15/2018 10:36 PM, Andrey Smirnov wrote: >> Hi everyone, >> >> This v4 of the patch series containing the work that I've done in >> order to enable support for i.MX7 emulation in QEMU. >> >> *NOTE*: Patches

Re: [Qemu-devel] [RFC PATCH] vfio/pci: Add ioeventfd support

2018-02-06 Thread Alexey Kardashevskiy
On 07/02/18 11:08, Alex Williamson wrote: > The ioeventfd here is actually irqfd handling of an ioeventfd such as > supported in KVM. A user is able to pre-program a device write to > occur when the eventfd triggers. This is yet another instance of > eventfd-irqfd triggering between KVM and vfio.

Re: [Qemu-devel] [PATCH v4 09/14] pci: Add support for Designware IP block

2018-02-06 Thread Andrey Smirnov
On Wed, Jan 31, 2018 at 4:13 AM, Marcel Apfelbaum wrote: > On 30/01/2018 19:49, Andrey Smirnov wrote: >> On Tue, Jan 30, 2018 at 5:18 AM, Marcel Apfelbaum >> wrote: >>> Hi Andrei, >>> >>> Sorry for letting you wait, >>> I have some comments/questions below. >>> >>> >>> On 16/01/2018 3:37, Andrey

[Qemu-devel] [PATCH v5 00/14] Initial i.MX7 support

2018-02-06 Thread Andrey Smirnov
Hi everyone, This v5 of the patch series containing the work that I've done in order to enable support for i.MX7 emulation in QEMU. As the one before last commit in the series states the supported i.MX7 features are: * up to 2 Cortex A9 cores (SMP works with PSCI) * A7 MPCORE (identical

[Qemu-devel] [PATCH v5 03/14] i.MX: Add code to emulate i.MX7 CCM, PMU and ANALOG IP blocks

2018-02-06 Thread Andrey Smirnov
Add minimal code needed to allow upstream Linux guest to boot. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: Marcel Apfelbaum Cc: Michael S. Tsirkin Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Andrey Smi

[Qemu-devel] [PATCH v5 02/14] hw: i.MX: Convert i.MX6 to use TYPE_IMX_USDHC

2018-02-06 Thread Andrey Smirnov
Convert i.MX6 to use TYPE_IMX_USDHC since that's what real HW comes with. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: Marcel Apfelbaum Cc: Michael S. Tsirkin Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmail.com Reviewed-by: Philippe Mathieu-Daudé Signe

[Qemu-devel] [PATCH v5 04/14] i.MX: Add code to emulate i.MX2 watchdog IP block

2018-02-06 Thread Andrey Smirnov
Add enough code to emulate i.MX2 watchdog IP block so it would be possible to reboot the machine running Linux Guest. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: Marcel Apfelbaum Cc: Michael S. Tsirkin Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmail.co

[Qemu-devel] [PATCH v5 01/14] sdhci: Add i.MX specific subtype of SDHCI

2018-02-06 Thread Andrey Smirnov
IP block found on several generations of i.MX family does not use vanilla SDHCI implementation and it comes with a number of quirks. Introduce i.MX SDHCI subtype of SDHCI block to add code necessary to support unmodified Linux guest driver. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-

[Qemu-devel] [PATCH v5 05/14] i.MX: Add code to emulate i.MX7 SNVS IP-block

2018-02-06 Thread Andrey Smirnov
Add code to emulate SNVS IP-block. Currently only the bits needed to be able to emulate machine shutdown are implemented. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: Marcel Apfelbaum Cc: Michael S. Tsirkin Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmai

[Qemu-devel] [PATCH v5 11/14] usb: Add basic code to emulate Chipidea USB IP

2018-02-06 Thread Andrey Smirnov
Add code to emulate Chipidea USB IP (used in i.MX SoCs). Tested to work against: -usb -drive if=none,id=stick,file=usb.img,format=raw -device \ usb-storage,bus=usb-bus.0,drive=stick Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: Marcel Apfelbaum Cc: Michael S. Tsirkin Cc: q

[Qemu-devel] [PATCH v5 06/14] i.MX: Add code to emulate GPCv2 IP block

2018-02-06 Thread Andrey Smirnov
Add minimal code needed to allow upstream Linux guest to boot. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: Marcel Apfelbaum Cc: Michael S. Tsirkin Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Andrey Smi

[Qemu-devel] [PATCH v5 07/14] i.MX: Add i.MX7 GPT variant

2018-02-06 Thread Andrey Smirnov
Add minimal code needed to allow upstream Linux guest to boot. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: Marcel Apfelbaum Cc: Michael S. Tsirkin Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmail.com Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pet

[Qemu-devel] [PATCH v5 13/14] hw/arm: Move virt's PSCI DT fixup code to arm/boot.c

2018-02-06 Thread Andrey Smirnov
Move virt's PSCI DT fixup code to arm/boot.c and set this fixup to happen automatically for every board that doesn't mark "psci-conduit" as disabled. This way emulated boards other than "virt" that rely on PSIC for SMP could benefit from that code. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe M

[Qemu-devel] [PATCH v5 12/14] i.MX: Add i.MX7 SOC implementation.

2018-02-06 Thread Andrey Smirnov
The following interfaces are partially or fully emulated: * up to 2 Cortex A9 cores (SMP works with PSCI) * A7 MPCORE (identical to A15 MPCORE) * 4 GPTs modules * 7 GPIO controllers * 2 IOMUXC controllers * 1 CCM module * 1 SVNS module * 1 SRC module * 1 GPCv2 c

<    1   2   3   4   5   >