[Qemu-devel] [PATCH v2 1/2] slirp: Add "query-usernet" QMP command

2018-02-26 Thread Fam Zheng
HMP "info usernet" has been available but it isn't ideal for programed use cases. This closes the gap in QMP by adding a counterpart "query-usernet" command. It is basically translated from the HMP slirp_connection_info() loop, which now calls the QMP implementation and prints the data, just like o

[Qemu-devel] [PATCH qemu v2] qmp: Add qom-list-properties to list QOM object properties

2018-02-26 Thread Alexey Kardashevskiy
There is already 'device-list-properties' which does most of the job, however it does not handle everything returned by qom-list-types such as machines as they inherit directly from TYPE_OBJECT and not TYPE_DEVICE. It does not handle abstract classes either. This adds a new qom-list-properties com

Re: [Qemu-devel] [PATCH v4 4/7] qdev: add hotpluggable to DeviceState

2018-02-26 Thread Gerd Hoffmann
Hi, > > The connection between QemuConsole and User Interface (i.e. gtk, spice, > > ...) is a bit more flexible. But also not really designed for hotplug > > as QemuConsole is not hotpluggable in the first place ... > > > > We could drop the display property and use two devices instead. > > >

Re: [Qemu-devel] [PATCH v4 0/7] vfio: add display support

2018-02-26 Thread Gerd Hoffmann
On Fri, Feb 23, 2018 at 10:05:17AM +0100, Gerd Hoffmann wrote: > > Hi Gerd, > > > > It's a little bit concerning that the only way we can test the > > region-based display support is with proprietary drivers that nobody > > but NVIDIA has at this point. Have you considered adding region-based > >

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-02-26 Thread Alexey Kardashevskiy
On 19/02/18 13:46, Alexey Kardashevskiy wrote: > On 16/02/18 16:28, David Gibson wrote: >> On Wed, Feb 14, 2018 at 08:55:41AM -0700, Alex Williamson wrote: >>> On Wed, 14 Feb 2018 19:09:16 +1100 >>> Alexey Kardashevskiy wrote: >>> On 14/02/18 12:33, David Gibson wrote: > On Tue, Feb 13, 2

Re: [Qemu-devel] [PULL 0/4] Linux user for 2.12 patches

2018-02-26 Thread Laurent Vivier
Le 25/02/2018 à 19:13, no-re...@patchew.org a écrit : > Hi, > > This series failed build test on s390x host. Please find the details below. > > Type: series > Message-id: 20180225175928.13101-1-laur...@vivier.eu > Subject: [Qemu-devel] [PULL 0/4] Linux user for 2.12 patches > ... > === TEST BEGI

Re: [Qemu-devel] QEMU GSoC 2018 Project Idea (Apply polling to QEMU NVMe)

2018-02-26 Thread Paolo Bonzini
On 25/02/2018 23:52, Huaicheng Li wrote: > I remember there were some discussions back in 2015 about this, but I > don't see it finally done. For this project, I think we can go in three > steps: (1). add the shadow doorbell buffer support into QEMU NVMe > emulation, this will reduce # of VM-exits.

Re: [Qemu-devel] [qemu-s390x] [PATCH v1] numa: s390x has no NUMA

2018-02-26 Thread Claudio Imbrenda
On Fri, 23 Feb 2018 18:36:57 +0100 David Hildenbrand wrote: > Right now it is possible to crash QEMU for s390x by providing e.g. > -numa node,nodeid=0,cpus=0-1 > > Problem is, that numa.c uses mc->cpu_index_to_instance_props as an > indicator whether NUMA is supported by a machine type. We d

Re: [Qemu-devel] [PATCH] macio: fix NULL pointer dereference when issuing IDE trim

2018-02-26 Thread Anton Nefedov
On 23/2/2018 9:47 PM, Mark Cave-Ayland wrote: Commit ef0e64a983 "ide: pass IDEState to trim AIO callback" changed the IDE trim callback from using a BlockBackend to an IDEState but forgot to update the dma_blk_io() call in hw/ide/macio.c accordingly. I somehow missed this whole macio part in

Re: [Qemu-devel] [PATCH V4 3/3] tests: Add migration test for aarch64

2018-02-26 Thread Andrew Jones
On Fri, Feb 23, 2018 at 04:13:08PM -0600, Wei Huang wrote: > > > On 02/22/2018 03:00 AM, Andrew Jones wrote: > > On Wed, Feb 21, 2018 at 10:44:17PM -0600, Wei Huang wrote: > >> This patch adds migration test support for aarch64. The test code, which > >> implements the same functionality as x86,

Re: [Qemu-devel] [PATCH V5 3/4] tests/migration: Add migration-test header file

2018-02-26 Thread Andrew Jones
On Fri, Feb 23, 2018 at 03:58:57PM -0600, Wei Huang wrote: > This patch moves the settings related migration-test from the > migration-test.c file to a seperate header file. It also renames the > x86-a-b-bootblock.s file extension from .s to .S, allowing gcc > pre-processor to include the C-style h

Re: [Qemu-devel] [PATCH V5 2/4] tests/migration: Convert the boot block compilation script into Makefile

2018-02-26 Thread Andrew Jones
On Fri, Feb 23, 2018 at 03:58:56PM -0600, Wei Huang wrote: > The x86 boot block header currently is generated with a shell script. > To better support other CPUs (e.g. aarch64), we convert the script > into Makefile. This allows us to 1) support cross-compilation easily, > and 2) avoid creating a s

Re: [Qemu-devel] [PATCH V5 1/4] rules: Move cross compilation auto detection functions to rules.mak

2018-02-26 Thread Andrew Jones
On Fri, Feb 23, 2018 at 03:58:55PM -0600, Wei Huang wrote: > This patch moves the auto detection functions for cross compilation from > roms/Makefile to rules.mak. So the functions can be shared among Makefiles > in QEMU. > > Signed-off-by: Wei Huang > --- > roms/Makefile | 24 +++---

Re: [Qemu-devel] [PATCH v1] numa: s390x has no NUMA

2018-02-26 Thread Christian Borntraeger
On 02/23/2018 06:36 PM, David Hildenbrand wrote: > Right now it is possible to crash QEMU for s390x by providing e.g. > -numa node,nodeid=0,cpus=0-1 > > Problem is, that numa.c uses mc->cpu_index_to_instance_props as an > indicator whether NUMA is supported by a machine type. We don't > impl

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

2018-02-26 Thread Wang, Wei W
On Monday, February 26, 2018 1:07 PM, Wei Wang wrote: > On 02/09/2018 07:50 PM, Dr. David Alan Gilbert wrote: > > * Wei Wang (wei.w.w...@intel.com) wrote: > >> Use the free page reporting feature from the balloon device to clear > >> the bits corresponding to guest free pages from the dirty bitmap,

Re: [Qemu-devel] [PATCH v1] numa: s390x has no NUMA

2018-02-26 Thread David Hildenbrand
On 26.02.2018 10:20, Christian Borntraeger wrote: > > > On 02/23/2018 06:36 PM, David Hildenbrand wrote: >> Right now it is possible to crash QEMU for s390x by providing e.g. >> -numa node,nodeid=0,cpus=0-1 >> >> Problem is, that numa.c uses mc->cpu_index_to_instance_props as an >> indicator

Re: [Qemu-devel] [PATCH 01/19] target/hppa: Use DisasContextBase.is_jmp

2018-02-26 Thread Philippe Mathieu-Daudé
On 02/17/2018 05:31 PM, Richard Henderson wrote: > Instead of returning DisasJumpType, immediately store it. neat! > Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé > --- > target/hppa/translate.c | 971 > > 1 file change

Re: [Qemu-devel] [PATCH V5 4/4] tests: Add migration test for aarch64

2018-02-26 Thread Andrew Jones
On Fri, Feb 23, 2018 at 03:58:58PM -0600, Wei Huang wrote: > This patch adds migration test support for aarch64. The test code, which > implements the same functionality as x86, is booted as a kernel in qemu. > Here are the design choices we make for aarch64: > > * We choose this -kernel approach

Re: [Qemu-devel] [PATCH V5 3/4] tests/migration: Add migration-test header file

2018-02-26 Thread Andrew Jones
On Fri, Feb 23, 2018 at 03:58:57PM -0600, Wei Huang wrote: > This patch moves the settings related migration-test from the > migration-test.c file to a seperate header file. It also renames the > x86-a-b-bootblock.s file extension from .s to .S, allowing gcc > pre-processor to include the C-style h

Re: [Qemu-devel] [edk2] [PATCH 4/7] ovmf: link with Tcg2Pei module

2018-02-26 Thread Laszlo Ersek
On 02/23/18 14:23, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > This module will initialize TPM device, measure reported FVs and BIOS > version. > > CC: Laszlo Ersek > CC: Stefan Berger > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Marc-André Lu

Re: [Qemu-devel] [PATCH V5 4/4] tests: Add migration test for aarch64

2018-02-26 Thread Andrew Jones
On Mon, Feb 26, 2018 at 10:30:31AM +0100, Andrew Jones wrote: > On Fri, Feb 23, 2018 at 03:58:58PM -0600, Wei Huang wrote: > > +/* aarch64 virt machine physical memory starts at 0x4000, which > > + * is also the kernel loader base address. It should be fine to > > It's not the

Re: [Qemu-devel] [edk2] [PATCH 5/7] ovmf: link with Tcg2Dxe module

2018-02-26 Thread Laszlo Ersek
On 02/23/18 14:23, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > This module measures and log the boot environment. It also produces > the Tcg2 protocol, which allows for example to read the log from OS: > > [0.00] efi: EFI v2.70 by EDK II > [0.00] efi: SMBIOS

Re: [Qemu-devel] [PATCH v3 0/7] block: Handle null backing link

2018-02-26 Thread no-reply
Hi, This series failed build test on ppcbe host. Please find the details below. Type: series Message-id: 20180224154033.29559-1-mre...@redhat.com Subject: [Qemu-devel] [PATCH v3 0/7] block: Handle null backing link === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the

Re: [Qemu-devel] [edk2] [PATCH 6/7] ovmf: link with Tcg2ConfigDxe module

2018-02-26 Thread Laszlo Ersek
On 02/23/18 14:23, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The module allows to tweak and interact with the TPM. Note that many > actions are broken due to implementation of qemu TPM (providing it's > own ACPI table), and the lack of PPI implementation. > > CC: Laszlo Er

Re: [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'ats'?

2018-02-26 Thread Auger Eric
Hi Jintack, On 21/02/18 05:03, Jintack Lim wrote: > Hi, > > I'm using vhost with the virtual intel-iommu, and this page[1] shows > the QEMU command line example. > > qemu-system-x86_64 -M q35,accel=kvm,kernel-irqchip=split -m 2G \ >-device intel-iommu,intremap=on,device-iotlb

Re: [Qemu-devel] [PATCH v1] numa: s390x has no NUMA

2018-02-26 Thread Cornelia Huck
On Fri, 23 Feb 2018 18:36:57 +0100 David Hildenbrand wrote: > Right now it is possible to crash QEMU for s390x by providing e.g. > -numa node,nodeid=0,cpus=0-1 > > Problem is, that numa.c uses mc->cpu_index_to_instance_props as an > indicator whether NUMA is supported by a machine type. We d

Re: [Qemu-devel] [PATCH v1] numa: s390x has no NUMA

2018-02-26 Thread David Hildenbrand
On 26.02.2018 11:19, Cornelia Huck wrote: > On Fri, 23 Feb 2018 18:36:57 +0100 > David Hildenbrand wrote: > >> Right now it is possible to crash QEMU for s390x by providing e.g. >> -numa node,nodeid=0,cpus=0-1 >> >> Problem is, that numa.c uses mc->cpu_index_to_instance_props as an >> indicat

Re: [Qemu-devel] [PATCH 7/7] ovmf: add DxeTpm2MeasureBootLib

2018-02-26 Thread Laszlo Ersek
On 02/23/18 14:23, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The library registers a security management handler, to measure images > that are not measure in PEI phase. > > This seems to work for example with the qemu PXE rom: > > Loading driver at 0x0003E6C2000 EntryPoint=0

Re: [Qemu-devel] [PATCH v1] numa: s390x has no NUMA

2018-02-26 Thread Cornelia Huck
On Mon, 26 Feb 2018 11:28:26 +0100 David Hildenbrand wrote: > On 26.02.2018 11:19, Cornelia Huck wrote: > > On Fri, 23 Feb 2018 18:36:57 +0100 > > David Hildenbrand wrote: > > > >> Right now it is possible to crash QEMU for s390x by providing e.g. > >> -numa node,nodeid=0,cpus=0-1 > >> >

[Qemu-devel] [PULL-for-s390x 04/14] s390-ccw: update libc

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" Moved: memcmp from bootmap.h to libc.h (renamed from _memcmp) strlen from sclp.c to libc.h (renamed from _strlen) Added C standard functions: isdigit Added non C-standard function: uitoa atoui Signed-off-by: Collin L. Walling Acked-by: Christian Borntraeger

[Qemu-devel] [PULL-for-s390x 00/14] s390-ccw firmware update

2018-02-26 Thread Thomas Huth
Hi Cornelia! The following changes since commit 0a773d55ac76c5aa89ed9187a3bc5af8c5c2a6d0: maintainers: Add myself as a OpenBSD maintainer (2018-02-23 12:05:07 +) are available in the git repository at: https://github.com/huth/qemu.git tags/s390-ccw-bios-2018-02-26 for you to fetch ch

[Qemu-devel] [PULL-for-s390x 02/14] s390-ccw: refactor eckd_block_num to use CHS

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" Add new cylinder/head/sector struct. Use it to calculate eckd block numbers instead of a BootMapPointer (which used eckd chs anyway). Signed-off-by: Collin L. Walling Reviewed-by: Thomas Huth Acked-by: Christian Borntraeger Signed-off-by: Thomas Huth --- pc-bios/s3

[Qemu-devel] [PULL-for-s390x 03/14] s390-ccw: refactor IPL structs

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" ECKD DASDs have different IPL structures for CDL and LDL formats. The current Ipl1 and Ipl2 structs follow the CDL format, so we prepend "EckdCdl" to them. Boot info for LDL has been moved to a new struct: EckdLdlIpl1. Signed-off-by: Collin L. Walling Acked-by: Janosch

[Qemu-devel] [PULL-for-s390x 01/14] s390-ccw: refactor boot map table code

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" Some ECKD bootmap code was using structs designed for SCSI. Even though this works, it confuses readability. Add a new BootMapTable struct to assist with readability in bootmap entry code. Also: - replace ScsiMbr in ECKD code with appropriate structs - fix read_block me

[Qemu-devel] [PULL-for-s390x 08/14] s390-ccw: read stage2 boot loader data to find menu

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" Read the stage2 boot loader data block-by-block. We scan the current block for the string "zIPL" to detect the start of the boot menu banner. We then load the adjacent blocks (previous block and next block) to account for the possibility of menu data spanning multiple bl

[Qemu-devel] [PULL-for-s390x 09/14] s390-ccw: print zipl boot menu

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" When the boot menu options are present and the guest's disk has been configured by the zipl tool, then the user will be presented with an interactive boot menu with labeled entries. An example of what the menu might look like: zIPL v1.37.1-build-20170714 interactive boo

[Qemu-devel] [PULL-for-s390x 05/14] s390-ccw: move auxiliary IPL data to separate location

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" The s390-ccw firmware needs some information in support of the boot process which is not available on the native machine. Examples are the netboot firmware load address and now the boot menu parameters. While storing that data in unused fields of the IPL parameter block

[Qemu-devel] [PULL-for-s390x 14/14] pc-bios/s390: Rebuild the s390x firmware images with the boot menu changes

2018-02-26 Thread Thomas Huth
Provide a new s390-ccw.img binary with the boot menu patches by Collin. Though there should not be any visible changes for the network booting, the s390-netboot.img binary has been rebuilt, too, since some of the changes affected the shared source files. Signed-off-by: Thomas Huth --- pc-bios/s3

[Qemu-devel] [PULL-for-s390x 06/14] s390-ccw: parse and set boot menu options

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" Set boot menu options for an s390 guest and store them in the iplb. These options are set via the QEMU command line option: -boot menu=on|off[,splash-time=X] or via the libvirt domain xml: Where X represents some positive integer representing mil

[Qemu-devel] [PULL-for-s390x 07/14] s390-ccw: set up interactive boot menu parameters

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" Reads boot menu flag and timeout values from the iplb and sets the respective fields for the menu. Signed-off-by: Collin L. Walling Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- pc-bios/s390-ccw/Makefile | 2 +- pc-bios/s390-ccw/main.c | 24

[Qemu-devel] [PULL-for-s390x 13/14] s390-ccw: interactive boot menu for scsi

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" Interactive boot menu for scsi. This follows a similar procedure as the interactive menu for eckd dasd. An example follows: s390x Enumerated Boot Menu. 3 entries detected. Select from index 0 to 2. Signed-off-by: Collin L. Walling Reviewed-by: Thomas Huth [t

[Qemu-devel] [PULL-for-s390x 10/14] s390-ccw: read user input for boot index via the SCLP console

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" Implements an sclp_read function to capture input from the console and a wrapper function that handles parsing certain characters and adding input to a buffer. The input is checked for any erroneous values and is handled appropriately. A prompt will persist until input

Re: [Qemu-devel] [PATCH v6 00/23] RISC-V QEMU Port Submission

2018-02-26 Thread Daniel P . Berrangé
On Sat, Feb 24, 2018 at 09:05:49AM +1300, Michael Clark wrote: > Dear Daniel, > > We've had this discussion on a recent pull request where some code was > going to be copied directly from hw/arm/virt.c to hw/riscv/virt.c and we > have subsequently relicensed the recipient file as GPLv2+. This code

[Qemu-devel] [PULL-for-s390x 11/14] s390-ccw: set cp_receive mask only when needed and consume pending service irqs

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" It is possible while waiting for multiple types of external interrupts that we might have pending irqs remaining between irq consumption and irq-type disabling. Those interrupts could potentially propagate to the guest after IPL completes and cause unwanted behavior. As

[Qemu-devel] [PULL-for-s390x 12/14] s390-ccw: use zipl values when no boot menu options are present

2018-02-26 Thread Thomas Huth
From: "Collin L. Walling" If no boot menu options are present, then flag the boot menu to use the zipl options that were set in the zipl configuration file (and stored on disk by zipl). These options are found at some offset prior to the start of the zipl boot menu banner. The zipl timeout value

Re: [Qemu-devel] [PATCH v1] numa: s390x has no NUMA

2018-02-26 Thread Christian Borntraeger
On 02/26/2018 11:35 AM, Cornelia Huck wrote: > On Mon, 26 Feb 2018 11:28:26 +0100 > David Hildenbrand wrote: > >> On 26.02.2018 11:19, Cornelia Huck wrote: >>> On Fri, 23 Feb 2018 18:36:57 +0100 >>> David Hildenbrand wrote: >>> Right now it is possible to crash QEMU for s390x by provid

Re: [Qemu-devel] [PATCH v1] numa: s390x has no NUMA

2018-02-26 Thread David Hildenbrand
On 26.02.2018 12:07, Christian Borntraeger wrote: > > > On 02/26/2018 11:35 AM, Cornelia Huck wrote: >> On Mon, 26 Feb 2018 11:28:26 +0100 >> David Hildenbrand wrote: >> >>> On 26.02.2018 11:19, Cornelia Huck wrote: On Fri, 23 Feb 2018 18:36:57 +0100 David Hildenbrand wrote: >

Re: [Qemu-devel] [PATCH v1] numa: s390x has no NUMA

2018-02-26 Thread Cornelia Huck
On Mon, 26 Feb 2018 12:07:43 +0100 Christian Borntraeger wrote: > On 02/26/2018 11:35 AM, Cornelia Huck wrote: > > On Mon, 26 Feb 2018 11:28:26 +0100 > > David Hildenbrand wrote: > > > >> On 26.02.2018 11:19, Cornelia Huck wrote: > >>> On Fri, 23 Feb 2018 18:36:57 +0100 > >>> David Hildenbr

Re: [Qemu-devel] [PATCH v6 00/23] RISC-V QEMU Port Submission

2018-02-26 Thread Richard W.M. Jones
If anyone wants a simple way to test this, grab the latest bbl & stage4 disk image from here and boot it under qemu-system-riscv64 using the command line given in the readme.txt file: https://fedorapeople.org/groups/risc-v/disk-images/ I've added v6 to Fedora copr, and switched to using it for

Re: [Qemu-devel] [PATCH v3 0/7] block: Handle null backing link

2018-02-26 Thread Max Reitz
On 2018-02-24 19:02, no-re...@patchew.org wrote: > Hi, > > This series failed build test on s390x host. Please find the details below. [...] > In file included from > /var/tmp/patchew-tester-tmp-wr4zoy33/src/include/qemu/osdep.h:36:0, > from /var/tmp/patchew-tester-tmp-wr4zoy33

Re: [Qemu-devel] [PATCH v6 00/23] RISC-V QEMU Port Submission

2018-02-26 Thread Andreas Schwab
This is being used to build openSUSE Factory for riscv64 with linux-user emulation: https://build.opensuse.org/project/show/openSUSE:Factory:RISCV Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for somethin

Re: [Qemu-devel] [PATCH v6 00/23] RISC-V QEMU Port Submission

2018-02-26 Thread Peter Maydell
On 26 February 2018 at 10:47, Daniel P. Berrangé wrote: > I accept that MIT is compatible with GPLv2+, so that's not an immediate legal > problem. The issue is that as we add more & more different licenses to QEMU, > it becomes a maintenance burden to developers, especially when doing code > refac

Re: [Qemu-devel] [PATCH v3 2/7] qapi: Add qobject_to()

2018-02-26 Thread Max Reitz
On 2018-02-24 21:57, Eric Blake wrote: > On 02/24/2018 09:40 AM, Max Reitz wrote: >> This is a dynamic casting macro that, given a QObject type, returns an >> object as that type or NULL if the object is of a different type (or >> NULL itself). >> >> The macro uses lower-case letters because: >> 1.

Re: [Qemu-devel] [PATCH v3 3/7] qapi: Replace qobject_to_X(o) by qobject_to(o, X)

2018-02-26 Thread Max Reitz
On 2018-02-24 22:04, Eric Blake wrote: > On 02/24/2018 09:40 AM, Max Reitz wrote: >> This patch was generated using the following Coccinelle script: >> > >> and a bit of manual fix-up for overly long lines and three places in >> tests/check-qjson.c that Coccinelle did not find. >> >> Signed-off-by

Re: [Qemu-devel] [PATCH v6 00/23] RISC-V QEMU Port Submission

2018-02-26 Thread Daniel P . Berrangé
On Mon, Feb 26, 2018 at 11:57:10AM +, Peter Maydell wrote: > On 26 February 2018 at 10:47, Daniel P. Berrangé wrote: > > I accept that MIT is compatible with GPLv2+, so that's not an immediate > > legal > > problem. The issue is that as we add more & more different licenses to QEMU, > > it be

Re: [Qemu-devel] [PATCH v3 21/36] rbd: Pass BlockdevOptionsRbd to qemu_rbd_connect()

2018-02-26 Thread Max Reitz
On 2018-02-23 20:25, Kevin Wolf wrote: > With the conversion to a QAPI options object, the function is now > prepared to be used in a .bdrv_co_create implementation. > > Signed-off-by: Kevin Wolf > --- > block/rbd.c | 109 > +--- > 1 file

Re: [Qemu-devel] [PATCH v3 23/36] rbd: Assign s->snap/image_name in qemu_rbd_open()

2018-02-26 Thread Max Reitz
On 2018-02-23 20:25, Kevin Wolf wrote: > Now that the options are already available in qemu_rbd_open() and not > only parsed in qemu_rbd_connect(), we can assign s->snap and > s->image_name there instead of passing the fields by reference to > qemu_rbd_connect(). > > Signed-off-by: Kevin Wolf > -

Re: [Qemu-devel] [PATCH v3 24/36] rbd: Use qemu_rbd_connect() in qemu_rbd_do_create()

2018-02-26 Thread Max Reitz
On 2018-02-23 20:25, Kevin Wolf wrote: > This is almost exactly the same code. The differences are that > qemu_rbd_connect() supports BlockdevOptionsRbd.server and that the cache > mode is set explicitly. > > Supporting 'server' is a welcome new feature for image creation. > Caching is disabled by

[Qemu-devel] [PATCH v7 0/4] cryptodev: add vhost support

2018-02-26 Thread Jay Zhou
From: Gonglei I posted the RFC verion a few months ago for DPDK vhost-crypto implmention, and now it's time to send the formal version. Because we need an user space scheme for better performance. The vhost user crypto server side patches had been sent to DPDK community, pls see [RFC PATCH 0/6]

[Qemu-devel] [PATCH v7 2/4] cryptodev: add vhost support

2018-02-26 Thread Jay Zhou
From: Gonglei Impliment the vhost-crypto's funtions, such as startup, stop and notification etc. Introduce an enum QCryptoCryptoDevBackendOptionsType in order to identify the cryptodev vhost backend is vhost-user or vhost-kernel-module (If exist). At this point, the cryptdoev-vhost-user works.

[Qemu-devel] [PATCH v7 3/4] cryptodev-vhost-user: add crypto session handler

2018-02-26 Thread Jay Zhou
From: Gonglei Introduce two vhost-user meassges: VHOST_USER_CREATE_CRYPTO_SESSION and VHOST_USER_CLOSE_CRYPTO_SESSION. At this point, the QEMU side support crypto operation in cryptodev host-user backend. Signed-off-by: Gonglei Signed-off-by: Longpeng(Mike) Signed-off-by: Jay Zhou --- backen

Re: [Qemu-devel] [PATCH v3 27/36] sheepdog: QAPIfy "redundancy" create option

2018-02-26 Thread Max Reitz
On 2018-02-23 20:25, Kevin Wolf wrote: > The "redundancy" option for Sheepdog image creation is currently a > string that can encode one or two integers depending on its format, > which at the same time implicitly selects a mode. > > This patch turns it into a QAPI union and converts the string in

[Qemu-devel] [PATCH v7 4/4] cryptodev-vhost-user: set the key length

2018-02-26 Thread Jay Zhou
From: Gonglei Signed-off-by: Gonglei --- backends/cryptodev-vhost-user.c | 4 include/sysemu/cryptodev-vhost-user.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-user.c index 9cd06c4..862d4f2 100644 --- a/backends/c

Re: [Qemu-devel] [PATCH v6 00/23] RISC-V QEMU Port Submission

2018-02-26 Thread Peter Maydell
On 26 February 2018 at 12:03, Daniel P. Berrangé wrote: > Eeek, I totally missed that as the top level LICENSE file only mentions > GPL and BSD licenses :-( I guess that's a trigger for a patch to improve > the text in the LICENSE file to better reflect reality... Paragraph (2) says "Parts of QE

Re: [Qemu-devel] [PATCH v3 28/36] sheepdog: Support .bdrv_co_create

2018-02-26 Thread Max Reitz
On 2018-02-23 20:25, Kevin Wolf wrote: > This adds the .bdrv_co_create driver callback to sheepdog, which enables > image creation over QMP. > > Signed-off-by: Kevin Wolf > --- > qapi/block-core.json | 24 - > block/sheepdog.c | 242 > +++

[Qemu-devel] [PATCH v7 1/4] cryptodev: add vhost-user as a new cryptodev backend

2018-02-26 Thread Jay Zhou
From: Gonglei Usage: -chardev socket,id=charcrypto0,path=/path/to/your/socket -object cryptodev-vhost-user,id=cryptodev0,chardev=charcrypto0 -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 Signed-off-by: Gonglei Signed-off-by: Longpeng(Mike) Signed-off-by: Jay Zhou --- backends/

Re: [Qemu-devel] [PATCH v2 32/36] ssh: Support .bdrv_co_create

2018-02-26 Thread Max Reitz
On 2018-02-21 14:54, Kevin Wolf wrote: > This adds the .bdrv_co_create driver callback to ssh, which enables > image creation over QMP. > > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > --- > qapi/block-core.json | 16 - > block/ssh.c | 92 >

Re: [Qemu-devel] [PATCH v2 32/36] ssh: Support .bdrv_co_create

2018-02-26 Thread Max Reitz
On 2018-02-26 13:40, Max Reitz wrote: > On 2018-02-21 14:54, Kevin Wolf wrote: >> This adds the .bdrv_co_create driver callback to ssh, which enables >> image creation over QMP. >> >> Signed-off-by: Kevin Wolf >> Reviewed-by: Max Reitz >> --- >> qapi/block-core.json | 16 - >> block/ssh.

Re: [Qemu-devel] [PATCH v3 32/36] ssh: Support .bdrv_co_create

2018-02-26 Thread Max Reitz
On 2018-02-23 20:25, Kevin Wolf wrote: > This adds the .bdrv_co_create driver callback to ssh, which enables > image creation over QMP. > > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > --- > qapi/block-core.json | 16 - > block/ssh.c | 92 >

Re: [Qemu-devel] [PATCH v2 36/36] qemu-iotests: Test ssh image creation over QMP

2018-02-26 Thread Max Reitz
On 2018-02-21 14:54, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > --- > tests/qemu-iotests/207 | 261 > + > tests/qemu-iotests/207.out | 75 + > tests/qemu-iotests/group | 1 + > 3 files changed, 337 in

Re: [Qemu-devel] [PATCH v3 36/36] qemu-iotests: Test ssh image creation over QMP

2018-02-26 Thread Max Reitz
On 2018-02-23 20:25, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > --- > tests/qemu-iotests/207 | 261 > + > tests/qemu-iotests/207.out | 75 + > tests/qemu-iotests/group | 1 + > 3 files changed, 337 in

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

2018-02-26 Thread Igor Mammedov
On Sat, 24 Feb 2018 03:11:30 + "Tan, Jianfeng" wrote: > > -Original Message- > > From: Tan, Jianfeng > > Sent: Saturday, February 24, 2018 11:08 AM > > To: 'Igor Mammedov' > > Cc: Paolo Bonzini; Jason Wang; Maxime Coquelin; qemu-devel@nongnu.org; > > Michael S . Tsirkin > > Subject: R

Re: [Qemu-devel] [PATCH v6 00/23] RISC-V QEMU Port Submission

2018-02-26 Thread Laurent Desnogues
On Mon, Feb 26, 2018 at 1:32 PM, Peter Maydell wrote: > Paragraph (3) isn't saying "BSD license is special", > it's saying "the TCG codegen code is special" -- it's a theoretically > well-defined reusable subset of code that has its own tighter standards > for what license we accept (see also tcg/

[Qemu-devel] [PATCH 1/1] serial: Open non-block

2018-02-26 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" On a real serial device, the open can block if the handshake lines are in a particular state. If a QEMU is passing the serial device to the guest, the QEMU startup is blocked opening the device (with a symptom seen as a timeout from libvirt). Open the serial port

[Qemu-devel] [Bug 1751264] Re: qemu-img convert issue in a tmpfs partition

2018-02-26 Thread Teddy VALETTE
** Description changed: qemu-img convert command is slow when the file to convert is located in a tmpfs formatted partition. v2.1.0 on debian/jessie x64, ext4: 10m14s v2.1.0 on debian/jessie x64, tmpfs: 10m15s v2.1.0 on debian/stretch x64, ext4: 11m9s v2.1.0 on debian/stretch x64

Re: [Qemu-devel] [RFC PATCH 1/2] qcow2: Allow checking and repairing corrupted internal snapshots

2018-02-26 Thread Max Reitz
On 2018-02-15 17:30, Alberto Garcia wrote: > The L1 table parameters of internal snapshots are generally not > checked by QEMU. This patch allows 'qemu-img check' to detect broken > snapshots and to skip them when doing the refcount consistency check. > > Since without an L1 table we don't have a

Re: [Qemu-devel] [PATCH v2] iotests: Test abnormally large size in compressed cluster descriptor

2018-02-26 Thread Alberto Garcia
On Fri 23 Feb 2018 02:30:14 PM CET, Eric Blake wrote: >> One possible task for the future is to make 'qemu-img check' verify >> the sizes of the compressed clusters, by trying to decompress the data >> and checking that the size stored in the L2 entry is correct. > > Indeed, but that means... > >>

Re: [Qemu-devel] [PATCH 1/1] serial: Open non-block

2018-02-26 Thread Paolo Bonzini
On 26/02/2018 14:04, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > On a real serial device, the open can block if the handshake > lines are in a particular state. If a QEMU is passing the serial > device to the guest, the QEMU startup is blocked opening the device > (w

Re: [Qemu-devel] [PATCH] hw/acpi-build: build SRAT memory affinity structures for NVDIMM

2018-02-26 Thread Igor Mammedov
On Thu, 22 Feb 2018 09:40:00 +0800 Haozhong Zhang wrote: > On 02/21/18 14:55 +0100, Igor Mammedov wrote: > > On Tue, 20 Feb 2018 17:17:58 -0800 > > Dan Williams wrote: > > > > > On Tue, Feb 20, 2018 at 6:10 AM, Igor Mammedov > > > wrote: > > > > On Sat, 17 Feb 2018 14:31:35 +0800 > > > >

Re: [Qemu-devel] [PATCH v8 09/21] null: Switch to .bdrv_co_block_status()

2018-02-26 Thread Kevin Wolf
Am 24.02.2018 um 00:38 hat Eric Blake geschrieben: > On 02/23/2018 11:05 AM, Kevin Wolf wrote: > > Am 23.02.2018 um 17:43 hat Eric Blake geschrieben: > > > > OFFSET_VALID | DATA might be excusable because I can see that it's > > > > convenient that a protocol driver refers to itself as *file instea

Re: [Qemu-devel] [PATCH] hw/acpi-build: build SRAT memory affinity structures for NVDIMM

2018-02-26 Thread Igor Mammedov
On Wed, 21 Feb 2018 06:51:11 -0800 Dan Williams wrote: > On Wed, Feb 21, 2018 at 5:55 AM, Igor Mammedov wrote: > > On Tue, 20 Feb 2018 17:17:58 -0800 > > Dan Williams wrote: > > > >> On Tue, Feb 20, 2018 at 6:10 AM, Igor Mammedov > >> wrote: > >> > On Sat, 17 Feb 2018 14:31:35 +0800 > >>

[Qemu-devel] [PATCH v3] iotests: Test abnormally large size in compressed cluster descriptor

2018-02-26 Thread Alberto Garcia
L2 entries for compressed clusters have a field that indicates the number of sectors used to store the data in the image. That's however not the size of the compressed data itself, just the number of sectors where that data is located. The actual data size is usually not a multiple of the sector s

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

2018-02-26 Thread Paolo Bonzini
On 26/02/2018 13:55, Igor Mammedov wrote: >>> So how about just adding a new option --mem-share to decide if that's a >>> private memory or shared memory? That seems much straightforward way > Above options are legacy (which we can't remove for compat reasons), > their replacement is 'memory-backen

Re: [Qemu-devel] [PATCH] hw/acpi-build: build SRAT memory affinity structures for NVDIMM

2018-02-26 Thread Haozhong Zhang
On 02/26/18 14:59 +0100, Igor Mammedov wrote: > On Thu, 22 Feb 2018 09:40:00 +0800 > Haozhong Zhang wrote: > > > On 02/21/18 14:55 +0100, Igor Mammedov wrote: > > > On Tue, 20 Feb 2018 17:17:58 -0800 > > > Dan Williams wrote: > > > > > > > On Tue, Feb 20, 2018 at 6:10 AM, Igor Mammedov > >

Re: [Qemu-devel] [PATCH v3] iotests: Test abnormally large size in compressed cluster descriptor

2018-02-26 Thread Eric Blake
On 02/26/2018 08:36 AM, Alberto Garcia wrote: L2 entries for compressed clusters have a field that indicates the number of sectors used to store the data in the image. One consequence of this is that even if the size field is larger than it needs to be QEMU can handle it just fine: it will r

Re: [Qemu-devel] [PATCH 1/1] serial: Open non-block

2018-02-26 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 26/02/2018 14:04, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > On a real serial device, the open can block if the handshake > > lines are in a particular state. If a QEMU is passing the serial > > device to the g

Re: [Qemu-devel] [PATCH v3] iotests: Test abnormally large size in compressed cluster descriptor

2018-02-26 Thread Alberto Garcia
On Mon 26 Feb 2018 04:12:22 PM CET, Eric Blake wrote: >> +# Create an empty image, fill half of it with data and compress it. >> +# The L2 entries of the two compressed clusters are located at >> +# 0x80 and 0x88, their original values are 0x400800a0 >> +# and 0x400800a00802 (5

Re: [Qemu-devel] [PATCH v6 03/23] RISC-V CPU Core Definition

2018-02-26 Thread Igor Mammedov
On Fri, 23 Feb 2018 13:11:49 +1300 Michael Clark wrote: > Add CPU state header, CPU definitions and initialization routines > > Reviewed-by: Richard Henderson > Signed-off-by: Michael Clark > --- > target/riscv/cpu.c | 391 + > target/riscv/cpu

[Qemu-devel] [PATCH v3] slirp: Add domainname option to slirp's DHCP server

2018-02-26 Thread Benjamin Drung
This patch will allow the user to include the domainname option in replies from the built-in DHCP server. Signed-off-by: Benjamin Drung --- net/slirp.c | 7 --- qapi/net.json| 4 qemu-options.hx | 7 +-- slirp/bootp.c| 8 slirp/libslirp.h | 2 +- slirp/sl

[Qemu-devel] [Bug 1751264] Re: qemu-img convert issue in a tmpfs partition

2018-02-26 Thread Max Reitz
Hi, This is a combination of (in our opinion) a bug in tmpfs (...and I think maybe btrfs as well?), the fact that the vmdk block driver is not very well optimized, and qemu-img convert assuming that the filesystem works as it thinks it does or that at least the block driver can work around this.

Re: [Qemu-devel] [PATCH v3 2/4] qcow2: Document some maximum size constraints

2018-02-26 Thread Alberto Garcia
On Thu 22 Feb 2018 04:59:20 PM CET, Eric Blake wrote: > While at it, notice that since we cannot map any virtual cluster to > any address higher than 64 PB (56 bits) (due to the L1/L2 field > encoding), it makes little sense to require the refcount table to > access host offsets beyond that point.

Re: [Qemu-devel] [PATCH v3 3/4] qcow2: Don't allow overflow during cluster allocation

2018-02-26 Thread Alberto Garcia
On Thu 22 Feb 2018 04:59:21 PM CET, Eric Blake wrote: > Our code was already checking that we did not attempt to > allocate more clusters than what would fit in an INT64 (the > physical maximimum if we can access a full off_t's worth of > data). But this does not catch smaller limits enforced by >

Re: [Qemu-devel] [PATCH v3 4/4] qcow2: Avoid memory over-allocation on compressed images

2018-02-26 Thread Alberto Garcia
On Thu 22 Feb 2018 08:02:44 PM CET, Eric Blake wrote: > On 02/22/2018 10:23 AM, Alberto Garcia wrote: >> On Thu 22 Feb 2018 04:59:22 PM CET, Eric Blake wrote: >>> sector_offset = coffset & 511; >>> csize = nb_csectors * 512 - sector_offset; >> [...] >>> +asse

Re: [Qemu-devel] [PATCH v4 0/3] s390x/sclp: 64 bit event masks

2018-02-26 Thread Cornelia Huck
On Fri, 23 Feb 2018 18:42:55 +0100 Claudio Imbrenda wrote: > Until 67915de9f0383ccf4a ("s390x/event-facility: variable-length event masks") > we only supported 32bit sclp event masks, even though the archiecture > allows the guests to set up sclp event masks up to 1021 bytes in length. > With tha

Re: [Qemu-devel] [PATCH v3 2/4] qcow2: Document some maximum size constraints

2018-02-26 Thread Eric Blake
On 02/26/2018 10:25 AM, Alberto Garcia wrote: On Thu 22 Feb 2018 04:59:20 PM CET, Eric Blake wrote: While at it, notice that since we cannot map any virtual cluster to any address higher than 64 PB (56 bits) (due to the L1/L2 field encoding), it makes little sense to require the refcount table t

Re: [Qemu-devel] [PATCH v3 2/4] qcow2: Document some maximum size constraints

2018-02-26 Thread Alberto Garcia
On Mon 26 Feb 2018 05:41:54 PM CET, Eric Blake wrote: >> But refcount blocks are not addressed by L2 tables, so in principle >> it should be possible to have refcount blocks after the first 64PB. > > But (if we don't make this change) that's about all you can usefully > have (and it would be a self

Re: [Qemu-devel] [PATCH v3 0/7] Call check and invalidate_cache from coroutine context

2018-02-26 Thread Kevin Wolf
Am 18.01.2018 um 13:43 hat Paolo Bonzini geschrieben: > Check and invalidate_cache share some parts of the implementation > with the regular I/O path. This is sometimes complicated because the > I/O path wants to use a CoMutex but that is not possible outside coroutine > context. By moving things

[Qemu-devel] [PATCH v2 1/2] nbd: BLOCK_STATUS constants

2018-02-26 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Expose the new constants and structs that will be used by both server and client implementations of NBD_CMD_BLOCK_STATUS (the command is currently experimental at https://github.com/NetworkBlockDevice/nbd/blob/extension-blockstatus/doc/proto.md but will hopefull

[Qemu-devel] [PATCH v2 0/2] nbd block status initial patches

2018-02-26 Thread Eric Blake
Here's the bits of 3/9 and 5/9 that I liked, but where I made further changes. I'd like to take these two, plus the original 2/9 as-is, as part of my next NBD PULL request, but want to make sure you are okay with my changes. Yes, I still need to follow up on the upstream NBD list what we are goin

Re: [Qemu-devel] [PATCH v4 3/3] s390x/sclp: extend SCLP event masks to 64 bits

2018-02-26 Thread Cornelia Huck
On Fri, 23 Feb 2018 18:42:58 +0100 Claudio Imbrenda wrote: > Extend the SCLP event masks to 64 bits. > > Notice that using any of the new bits results in a state that cannot be > migrated to an older version. > > Signed-off-by: Claudio Imbrenda > --- > hw/s390x/event-facility.c | 56

  1   2   3   >