Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-06 Thread Tan, Jianfeng
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Tuesday, February 6, 2018 1:32 AM > To: Igor Mammedov > Cc: Tan, Jianfeng; qemu-devel@nongnu.org; Jason Wang; Maxime Coquelin; > Michael S . Tsirkin > Subject: Re: [Qemu-devel] [RFC] exec: eliminate ram

[Qemu-devel] [PATCH v2 4/8] mem/nvdimm: ensure write persistence to PMEM in label emulation

2018-02-06 Thread Haozhong Zhang
Guest writes to vNVDIMM labels are intercepted and performed on the backend by QEMU. When the backend is a real persistent memort, QEMU needs to take proper operations to ensure its write persistence on the persistent memory. Otherwise, a host power failure may result in the loss of guest label

[Qemu-devel] [PATCH v2 3/8] configure: add libpmem support

2018-02-06 Thread Haozhong Zhang
Add a pair of configure options --{enable,disable}-libpmem to control whether QEMU is compiled with PMDK libpmem [1]. QEMU may write to the host persistent memory (e.g. in vNVDIMM label emulation and live migration), so it must take the proper operations to ensure the persistence of its own

[Qemu-devel] [PATCH v2 6/8] migration/ram: ensure write persistence on loading normal pages to PMEM

2018-02-06 Thread Haozhong Zhang
When loading a normal page to persistent memory, load its data by libpmem function pmem_memcpy_nodrain() instead of memcpy(). Combined with a call to pmem_drain() at the end of memory loading, we can guarantee all those normal pages are persistenly loaded to PMEM. Signed-off-by: Haozhong Zhang

Re: [Qemu-devel] [PATCH v4] m68k: implement movep instruction

2018-02-06 Thread Pavel Dovgalyuk
> From: Laurent Vivier [mailto:laur...@vivier.eu] > Le 06/02/2018 à 14:30, Pavel Dovgalyuk a écrit : > >> From: Laurent Vivier [mailto:laur...@vivier.eu] > > Thanks! > > > > By the way, we also handled reset interrupt, but it is not compatible with > > other m68k > platforms: > > > > @@ -66,8

[Qemu-devel] [PATCH v2 8/8] migration/ram: ensure write persistence on loading xbzrle pages to PMEM

2018-02-06 Thread Haozhong Zhang
When loading a xbzrle encoded page to persistent memory, load the data via libpmem function pmem_memcpy_nodrain() instead of memcpy(). Combined with a call to pmem_drain() at the end of memory loading, we can guarantee those xbzrle encoded pages are persistently loaded to PMEM. Signed-off-by:

[Qemu-devel] [PATCH v2 2/8] hostmem-file: add the 'pmem' option

2018-02-06 Thread Haozhong Zhang
When QEMU emulates vNVDIMM labels and migrates vNVDIMM devices, it needs to know whether the backend storage is a real persistent memory, in order to decide whether special operations should be performed to ensure the data persistence. This boolean option 'pmem' allows users to specify whether

[Qemu-devel] [PATCH v2 5/8] migration/ram: ensure write persistence on loading zero pages to PMEM

2018-02-06 Thread Haozhong Zhang
When loading a zero page, check whether it will be loaded to persistent memory If yes, load it by libpmem function pmem_memset_nodrain(). Combined with a call to pmem_drain() at the end of RAM loading, we can guarantee all those zero pages are persistently loaded. Depending on the host HW/SW

[Qemu-devel] [PATCH v2 7/8] migration/ram: ensure write persistence on loading compressed pages to PMEM

2018-02-06 Thread Haozhong Zhang
When loading a compressed page to persistent memory, flush CPU cache after the data is decompressed. Combined with a call to pmem_drain() at the end of memory loading, we can guarantee those compressed pages are persistently loaded to PMEM. Signed-off-by: Haozhong Zhang

[Qemu-devel] [PATCH v2 1/8] memory, exec: switch file ram allocation functions to 'flags' parameters

2018-02-06 Thread Haozhong Zhang
As more flag parameters besides the existing 'share' are going to be added to following functions memory_region_init_ram_from_file qemu_ram_alloc_from_fd qemu_ram_alloc_from_file , let's switch them to use the 'flags' parameters so as to ease future flag additions. The existing

[Qemu-devel] [PATCH v2 0/8] nvdimm: guarantee persistence of QEMU writes to persistent memory

2018-02-06 Thread Haozhong Zhang
This v2 patch series extends v1 [1] by covering the migration path as well. QEMU writes to vNVDIMM backends in the vNVDIMM label emulation and live migration. If the backend is on the persistent memory, QEMU needs to take proper operations to ensure its writes persistent on the persistent memory.

[Qemu-devel] [qemu-web PATCH v2] Add a blog post with the presentations from DevConf and FOSDEM 2018

2018-02-06 Thread Thomas Huth
Let's provide some links to the videos from FOSDEM and DevConf. Reviewed-by: Alex Bennée Reviewed-by: Marc-André Lureau Reviewed-by: Eduardo Otubo Signed-off-by: Thomas Huth --- v2: - Added link to the

[Qemu-devel] [PATCH] ratelimit: don't align wait time with slices

2018-02-06 Thread Wolfgang Bumiller
It is possible for rate limited writes to keep overshooting a slice's quota by a tiny amount causing the slice-aligned waiting period to effectively halve the rate. Signed-off-by: Wolfgang Bumiller --- Copied the Ccs from the discussion thread, hope that's fine, as I also

Re: [Qemu-devel] [PATCH v2 3/6] qapi: add nbd-server-remove

2018-02-06 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: >> 26.01.2018 18:05, Dr. David Alan Gilbert wrote: >> > * Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: [...] >> > > most of commands, ported to hmp are done

Re: [Qemu-devel] [PATCH 00/54] Patch Round-up for stable 2.11.1, freeze on 2018-02-12

2018-02-06 Thread Thomas Huth
On 06.02.2018 20:14, Michael Roth wrote: > Hi everyone, > > > The following new patches are queued for QEMU stable v2.11.1: > > https://github.com/mdroth/qemu/commits/stable-2.11-staging > > The

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

2018-02-06 Thread Richard Henderson
On 02/06/2018 11:15 AM, Peter Maydell wrote: > My test setup doesn't capture register values from > before the insn executes... I have patches for RISU to dump each record written to the trace file, which does allow one to go back and examine previous register values. r~

Re: [Qemu-devel] [PATCH v5 0/5] coroutine-lock: polymorphic CoQueue

2018-02-06 Thread Fam Zheng
On Sat, 02/03 10:39, Paolo Bonzini wrote: > There are cases in which a queued coroutine must be restarted from > non-coroutine context (with qemu_co_enter_next). In this cases, > qemu_co_enter_next also needs to be thread-safe, but it cannot use a > CoMutex and so cannot qemu_co_queue_wait. This

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

2018-02-06 Thread Alexey Kardashevskiy
On 07/02/18 15:25, Alex Williamson wrote: > On Wed, 7 Feb 2018 15:09:22 +1100 > Alexey Kardashevskiy wrote: >> On 07/02/18 11:08, Alex Williamson wrote: >>> diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h >>> index e3301dbd27d4..07966a5f0832 100644 >>> ---

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

2018-02-06 Thread Alex Williamson
On Wed, 7 Feb 2018 15:09:22 +1100 Alexey Kardashevskiy wrote: > On 07/02/18 11:08, Alex Williamson wrote: > > diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h > > index e3301dbd27d4..07966a5f0832 100644 > > --- a/include/uapi/linux/vfio.h > > +++

[Qemu-devel] [PATCH v5 10/14] pci: Add support for Designware IP block

2018-02-06 Thread Andrey Smirnov
Add code needed to get a functional PCI subsytem when using in conjunction with upstream Linux guest (4.13+). Tested to work against "e1000e" (network adapter, using MSI interrupts) as well as "usb-ehci" (USB controller, using legacy PCI interrupts). Based on "i.MX6 Applications Processor

[Qemu-devel] [PATCH v5 09/14] pci: Use pci_config_size in pci_data_* accessors

2018-02-06 Thread Andrey Smirnov
Use pci_config_size (as opposed to PCI_CONFIG_SPACE_SIZE) in pci_data_read() and pci_data_write(), so this function would work for both classic PCI and PCIe use-cases. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé

[Qemu-devel] [PATCH v5 08/14] i.MX: Add implementation of i.MX7 GPR 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] [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

[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] [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:

[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] [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é

[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

[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

[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:

[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] [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] [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

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

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

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. >>

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

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 > ++ >

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

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

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

[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

[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

[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

[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

[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

[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

[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

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

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:

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

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,

[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

[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

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 ---

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

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]

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

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, >

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

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]

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

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

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

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

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 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

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 in static binaries deleted] > /usr/lib/gcc/x86_64-linux-gnu/5/libubsan.a(sanitizer_linux_libcdep.o): > In function

[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

[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 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

[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(+)

[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 ++

[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 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

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

[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

[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

[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

[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

[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

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

[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

[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(-)

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

[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

[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

[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 +

[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

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

[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 +++

[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

[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

[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

[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,

[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

[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

[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 ---

[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 ---

  1   2   3   4   5   >