Re: [Qemu-devel] [RFC] Defining firmware (OVMF, et al) metadata format & file

2018-03-07 Thread Gerd Hoffmann
Hi, > > [*] Open question: Who, between QEMU and libvirt, should define the said > > firmware metadata format and file? > > IMHO QEMU should be defining the format, because the file will contain > info about certain QEMU features associated with the firmware (eg smm). > Also there are potential

[Qemu-devel] [PULL] qemu-sparc updates

2018-03-07 Thread Mark Cave-Ayland
Hi Peter, Here are a couple of last-minute fixes for SPARC. Please pull. ATB, Mark. The following changes since commit f32408f3b472a088467474ab152be3b6285b2d7b: misc: don't use hwaddr as a type in trace events (2018-03-06 14:24:30 +) are available in the git repository at: https://

Re: [Qemu-devel] [PATCH v4] iotests: Tweak 030 in order to trigger a race condition with parallel jobs

2018-03-07 Thread Alberto Garcia
On Wed 07 Mar 2018 06:54:51 PM CET, Max Reitz wrote: >> v4: Mention that commit 1a63a907507fbbcfaee3f622907ec24 also >> contributes to solve the original bug (both commits need to >> reverted in order to reproduce this bug reliably). >> >> Rewrite the loop that writes data into the ima

Re: [Qemu-devel] [RFC] Defining firmware (OVMF, et al) metadata format & file

2018-03-07 Thread Gerd Hoffmann
> Suggested approach > -- > > Based on an upstream discussion on 'virt-tools'[1] mailing list and some > Bugzillas, Gerd Hoffmann, Laszlo Ersek and Dan Berrangé had a suggestion > to define a firmware metadata format and file (example in [1]): > > - For each firmware file we nee

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

2018-03-07 Thread Christian Borntraeger
On 03/07/2018 04:10 PM, 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 | 49 > +

[Qemu-devel] [PATCH] vga: fix region calculation

2018-03-07 Thread Gerd Hoffmann
Typically the scanline length and the line offset are identical. But case they are not our calculation for region_end is incorrect. Using line_offset is fine for all scanlines, except the last one where we have to use the actual scanline length. Fixes: CVE-2018- Cc: P J P Cc: Ross Lagerwall Si

Re: [Qemu-devel] [PATCH v6 05/11] linux-user: fix mmap/munmap/mprotect/mremap/shmat

2018-03-07 Thread Laurent Vivier
Le 07/03/2018 à 22:50, Max Filippov a écrit : > In linux-user QEMU that runs for a target with TARGET_ABI_BITS bigger > than L1_MAP_ADDR_SPACE_BITS an assertion in page_set_flags fires when > mmap, munmap, mprotect, mremap or shmat is called for an address outside > the guest address space. mmap an

Re: [Qemu-devel] [PATCH] hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices

2018-03-07 Thread Thomas Huth
On 08.03.2018 07:58, Hervé Poussineau wrote: > Le 07/03/2018 à 10:08, Thomas Huth a écrit : >> The global hack for creating SCSI devices has recently been removed, >> but this apparently broke SCSI devices on some boards that were not >> ready for this change yet. For the 40p machine you now get: >

Re: [Qemu-devel] [PATCH] hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices

2018-03-07 Thread Hervé Poussineau
Le 07/03/2018 à 10:08, Thomas Huth a écrit : The global hack for creating SCSI devices has recently been removed, but this apparently broke SCSI devices on some boards that were not ready for this change yet. For the 40p machine you now get: $ ppc64-softmmu/qemu-system-ppc64 -M 40p -cdrom x.iso

Re: [Qemu-devel] [PATCH] nbd/server: Honor FUA request on NBD_CMD_TRIM

2018-03-07 Thread Paolo Bonzini
> The NBD spec states that since trim requests can affect disk contents, > then they should allow for FUA semantics just like writes for ensuring > the disk has settled before returning. As bdrv_[co_]pdiscard() does > not (yet?) support a flags argument, we can't pass FUA down the block > layer s

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

2018-03-07 Thread Haozhong Zhang
Ping? On 02/28/18 15:25 +0800, Haozhong Zhang wrote: > 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. Otherwise, a ho

Re: [Qemu-devel] [PATCH v3 22/29] vhost+postcopy: Call wakeups

2018-03-07 Thread Peter Xu
On Tue, Mar 06, 2018 at 10:36:52AM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Fri, Feb 16, 2018 at 01:16:18PM +, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > Cause the vhost-user client to be woken up whenev

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-07 Thread Peter Xu
On Wed, Mar 07, 2018 at 04:06:53PM +0100, Paolo Bonzini wrote: > On 07/03/2018 13:40, Daniel P. Berrangé wrote: > > On Wed, Mar 07, 2018 at 12:36:50PM +, Daniel P. Berrangé wrote: > >> On Tue, Mar 06, 2018 at 01:33:20PM +0800, Peter Xu wrote: > >>> TLS handshake may create background GSource ta

Re: [Qemu-devel] [PATCH] virtio_net: flush uncompleted TX on reset

2018-03-07 Thread Nageswara R Sastry
Greg Kurz wrote on 08/03/2018 12:27:37 AM: > From: Greg Kurz > To: qemu-devel@nongnu.org > Cc: "Michael S. Tsirkin" , Jason Wang > , R Nageswara Sastry > Date: 08/03/2018 12:27 AM > Subject: [PATCH] virtio_net: flush uncompleted TX on reset > > If the backend could not transmit a packet right

Re: [Qemu-devel] [PATCH] ppc440_pcix: Add dummy implementation of BRDGOPT registers

2018-03-07 Thread Thomas Huth
On 07.03.2018 21:43, BALATON Zoltan wrote: > I don't know what should be the correct implementation for these so > these are just stored and returned as is without doing anything for > now only to silence warnings when u-boot accesses these registers. > > Signed-off-by: BALATON Zoltan > --- > hw

Re: [Qemu-devel] [PATCH] hw/sparc/sun4m: Fix implicit creation of "-drive if=scsi" devices

2018-03-07 Thread Thomas Huth
On 07.03.2018 19:43, Mark Cave-Ayland wrote: > On 07/03/18 09:39, Thomas Huth wrote: > >> The global hack for creating SCSI devices has recently been removed, >> but this apparently broke SCSI devices on some boards that were not >> ready for this change yet. For the sun4m machines you now get: >>

Re: [Qemu-devel] [PATCH v2] pc-bios/s390-ccw: Move string arrays from bootmap header to .c file

2018-03-07 Thread Thomas Huth
On 08.03.2018 00:11, Eric Blake wrote: > On 03/06/2018 12:18 AM, Thomas Huth wrote: >> bootmap.h can currently only be included once - otherwise the linker >> complains about multiple definitions of the "magic" strings. > > My first thought when reading that was "Huh? bootmap.h has a proper[*] > d

Re: [Qemu-devel] [PATCH v4 1/5] pc-dimm: make qmp_pc_dimm_device_list() sort devices by address

2018-03-07 Thread Bharata B Rao
On Thu, Mar 08, 2018 at 10:33:33AM +0800, Haozhong Zhang wrote: > Make qmp_pc_dimm_device_list() return sorted by start address > list of devices so that it could be reused in places that > would need sorted list*. Reuse existing pc_dimm_built_list() > to get sorted list. > > While at it hide recu

Re: [Qemu-devel] [PATCH 1/4] eth: add speed and duplex definitions

2018-03-07 Thread Jason Baron via Qemu-devel
On 03/06/2018 01:15 PM, Michael S. Tsirkin wrote: > On Tue, Mar 06, 2018 at 12:53:14PM -0500, Jason Baron wrote: >> >> >> On 03/02/2018 12:54 PM, Michael S. Tsirkin wrote: >>> On Thu, Mar 01, 2018 at 10:46:33PM -0500, Jason Baron wrote: Pull in definitions for SPEED_UNKNOWN, DUPLEX_UNKNOWN,

Re: [Qemu-devel] [PATCH v3 0/4] vl: introduce vm_shutdown()

2018-03-07 Thread Fam Zheng
On Wed, 03/07 14:42, Stefan Hajnoczi wrote: > v3: > * Rebase on qemu.git/master after AIO_WAIT_WHILE() was merged [Fam] > v2: > * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd >from a BH in the IOThread [Fam] > > There are several race conditions in virtio-blk/vir

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-07 Thread Peter Xu
On Wed, Mar 07, 2018 at 12:36:50PM +, Daniel P. Berrangé wrote: [...] > > diff --git a/chardev/char-socket.c b/chardev/char-socket.c > > index bd40864f87..997c70dd7d 100644 > > --- a/chardev/char-socket.c > > +++ b/chardev/char-socket.c > > @@ -31,6 +31,7 @@ > > #include "qemu/option.h" > >

[Qemu-devel] [PATCH v2 0/3] virtio-net: allow linkspeed and duplex setting

2018-03-07 Thread Jason Baron via Qemu-devel
Hi, Linux can now read linkspeed and duplex settings as set by the hypervisor: faa9b39 virtio_net: propagate linkspeed/duplex settings from the hypervisor This series thus adds qemu support. Also, this patchset depends on this header sync: https://lists.gnu.org/archive/html/qemu-devel/2018-02/

[Qemu-devel] [PATCH v2 1/3] scripts/update-linux-headers: add ethtool.h and update to 4.16.0-rc4

2018-03-07 Thread Jason Baron via Qemu-devel
A subsequent patch to add support for setting linkspeed/duplex in virtio-net, requires a few definitions from ethtool.h, which ends up pulling in kernel.h and sysinfo.h as well. Signed-off-by: Jason Baron Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: virtio-...@lists.oasis-open.org --- include/s

[Qemu-devel] [PATCH v2 3/3] virtio-net: add linkspeed and duplex settings to virtio-net

2018-03-07 Thread Jason Baron via Qemu-devel
Although linkspeed and duplex can be set in a linux guest via 'ethtool -s', this requires custom ethtool commands for virtio-net by default. Introduce a new feature flag, VIRTIO_NET_F_SPEED_DUPLEX, which allows the hypervisor to export a linkspeed and duplex setting. The user can subsequently over

[Qemu-devel] [PATCH v2 2/3] virtio-net: use 64-bit values for feature flags

2018-03-07 Thread Jason Baron via Qemu-devel
In prepartion for using some of the high order feature bits, make sure that virtio-net uses 64-bit values everywhere. Signed-off-by: Jason Baron Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: virtio-...@lists.oasis-open.org --- hw/net/virtio-net.c| 55 +

Re: [Qemu-devel] [RFC v10 00/24] Multifd

2018-03-07 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180307110010.2205-1-quint...@redhat.com Subject: [Qemu-devel] [RFC v10 00/24] Multifd === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log --oneline $BASE..

Re: [Qemu-devel] [PATCH v4 0/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices

2018-03-07 Thread Haozhong Zhang
On 03/08/18 10:33 +0800, Haozhong Zhang wrote: > (Patch 5 is only for reviewers to run test cases in patch 4) > > ACPI 6.2A Table 5-129 "SPA Range Structure" requires the proximity > domain of a NVDIMM SPA range must match with corresponding entry in > SRAT table. > > The address ranges of vNVDIM

Re: [Qemu-devel] [PATCH] tests/boot-serial: Check the 40p machine, too

2018-03-07 Thread David Gibson
On Wed, Mar 07, 2018 at 01:15:15PM +0100, Thomas Huth wrote: > The "40p" machine is using the Open Hack'Ware BIOS, just like the "prep" > machine, so we can test it accordingly with the boot-serial tester, too. > While we're at it, also change the strings that we are using for the > "prep" machine,

Re: [Qemu-devel] [PATCH v10 10/24] migration: In case of error just end the migration

2018-03-07 Thread Eric Blake
On 03/07/2018 05:52 AM, Daniel P. Berrangé wrote: On Wed, Mar 07, 2018 at 11:59:56AM +0100, Juan Quintela wrote: Signed-off-by: Juan Quintela --- migration/socket.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Daniel P. Berrangé It will only return NULL if

Re: [Qemu-devel] [PATCH] hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices

2018-03-07 Thread David Gibson
On Wed, Mar 07, 2018 at 10:08:14AM +0100, Thomas Huth wrote: > The global hack for creating SCSI devices has recently been removed, > but this apparently broke SCSI devices on some boards that were not > ready for this change yet. For the 40p machine you now get: > > $ ppc64-softmmu/qemu-system-pp

Re: [Qemu-devel] [PATCH] hw/misc/macio: Mark the macio devices with user_creatable = false

2018-03-07 Thread David Gibson
On Wed, Mar 07, 2018 at 03:22:54PM +0100, Thomas Huth wrote: > The macio devices currently cause a crash when the user tries to > instantiate them on a different machine: > > $ ppc64-softmmu/qemu-system-ppc64 -device macio-newworld > Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222:

[Qemu-devel] [PATCH v4 2/5] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList

2018-03-07 Thread Haozhong Zhang
It may need to treat PC-DIMM and NVDIMM differently, e.g., when deciding the necessity of non-volatile flag bit in SRAT memory affinity structures. NVDIMMDeviceInfo, which inherits from PCDIMMDeviceInfo, is added to union type MemoryDeviceInfo to record information of NVDIMM devices. The NVDIMM-sp

[Qemu-devel] [PATCH v4 3/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices

2018-03-07 Thread Haozhong Zhang
ACPI 6.2A Table 5-129 "SPA Range Structure" requires the proximity domain of a NVDIMM SPA range must match with corresponding entry in SRAT table. The address ranges of vNVDIMM in QEMU are allocated from the hot-pluggable address space, which is entirely covered by one SRAT memory affinity structu

[Qemu-devel] [PATCH v4 4/5] tests/bios-tables-test: add test cases for DIMM proximity

2018-03-07 Thread Haozhong Zhang
QEMU now builds one SRAT memory affinity structure for each PC-DIMM and NVDIMM device presented at boot time with the proximity domain specified in the device option 'node', rather than only one SRAT memory affinity structure covering the entire hotpluggable address space with the proximity domain

[Qemu-devel] [PATCH v4 5/5] [DO NOT APPLY] test/acpi-test-data: add ACPI tables for dimmpxm test

2018-03-07 Thread Haozhong Zhang
Reviewers can use ACPI tables in this patch to run test_acpi_{piix4,q35}_tcg_dimm_pxm cases. Signed-off-by: Haozhong Zhang --- tests/acpi-test-data/pc/APIC.dimmpxm | Bin 0 -> 144 bytes tests/acpi-test-data/pc/DSDT.dimmpxm | Bin 0 -> 6803 bytes tests/acpi-test-data/pc/NFIT.dimmpxm | Bin 0 ->

[Qemu-devel] [PATCH v4 0/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices

2018-03-07 Thread Haozhong Zhang
(Patch 5 is only for reviewers to run test cases in patch 4) ACPI 6.2A Table 5-129 "SPA Range Structure" requires the proximity domain of a NVDIMM SPA range must match with corresponding entry in SRAT table. The address ranges of vNVDIMM in QEMU are allocated from the hot-pluggable address space,

[Qemu-devel] [PATCH v4 1/5] pc-dimm: make qmp_pc_dimm_device_list() sort devices by address

2018-03-07 Thread Haozhong Zhang
Make qmp_pc_dimm_device_list() return sorted by start address list of devices so that it could be reused in places that would need sorted list*. Reuse existing pc_dimm_built_list() to get sorted list. While at it hide recursive callbacks from callers, so that: qmp_pc_dimm_device_list(qdev_get_m

Re: [Qemu-devel] [edk2] [PATCH v2 2/8] SecurityPkg/Tcg2Pei: drop PeiReadOnlyVariable from Depex

2018-03-07 Thread Zhang, Chao B
Hi Lureau: I think we can remove same dependency in TcgPei. -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of marcandre.lur...@redhat.com Sent: Wednesday, March 7, 2018 11:58 PM To: edk2-de...@lists.01.org Cc: qemu-devel@nongnu.org; javi...@redh

Re: [Qemu-devel] [PATCH v2 1/8] SecurityPkg: also clear HashInterfaceHob.SupportedHashMask

2018-03-07 Thread Zeng, Star
Reviewed-by: Star Zeng Thanks, Star -Original Message- From: Zhang, Chao B Sent: Thursday, March 8, 2018 8:35 AM To: marcandre.lur...@redhat.com; edk2-de...@lists.01.org Cc: pjo...@redhat.com; Yao, Jiewen ; stef...@linux.vnet.ibm.com; ler...@redhat.com; qemu-devel@nongnu.org; javi...@r

Re: [Qemu-devel] [PATCH v2 1/8] SecurityPkg: also clear HashInterfaceHob.SupportedHashMask

2018-03-07 Thread Zhang, Chao B
Reviewed-by: Chao Zhang -Original Message- From: marcandre.lur...@redhat.com [mailto:marcandre.lur...@redhat.com] Sent: Wednesday, March 7, 2018 11:58 PM To: edk2-de...@lists.01.org Cc: pjo...@redhat.com; Yao, Jiewen ; stef...@linux.vnet.ibm.com; ler...@redhat.com; qemu-devel@nongnu.org;

Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] block/ssh: Implement .bdrv_refresh_filename()

2018-03-07 Thread Fam Zheng
On Wed, 03/07 12:50, John Snow wrote: > It's something I'd like to see patchew do, actually: > > "Here's a list of what's on the list that has no reviews or NACKs, and > needs some love" It's not hard to define a search condition for that: http://patchew.org/search-help http://patchew.org/searc

Re: [Qemu-devel] block migration and dirty bitmap reset

2018-03-07 Thread Fam Zheng
On Wed, 03/07 09:06, Peter Lieven wrote: > Hi, > > while looking at the code I wonder if the blk_aio_preadv and the > bdrv_reset_dirty_bitmap order must > be swapped in mig_save_device_bulk: > > qemu_mutex_lock_iothread(); > aio_context_acquire(blk_get_aio_context(bmds->blk)); > blk-

[Qemu-devel] QEMU hackers in the Portland area next week

2018-03-07 Thread Michael Clark
Hi Folks, FYI. SiFive is hosting a RISC-V hackathon in Portland at the Embedded Linux Conference next week: Date: Monday, March 12 – Wednesday, March 14 Time: 10:30am Monday – 1:00pm Wednesday Location: Embedded Linux Conference, Hilton Portland Downtown, Skyline II, Floor 23 QEMU is being

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

2018-03-07 Thread Fam Zheng
On Thu, Mar 8, 2018 at 4:35 AM, Brijesh Singh wrote: > Hi, > > I have root caused and fixed the build issue seen with mingw32 compiler, > the patch is very trivial (see below). > > I am looking for direction on how to submit the fix, should I resubmit > the whole series or just send the updated p

Re: [Qemu-devel] [PATCH 0/2] vmmouse: convert qdev pointer property to QOM link relationship

2018-03-07 Thread Zihan Yang
Hi Philippe, Thanks for reviewing my patch. Yes I though about it, a specific header file with only several lines seems not worth it, but otherwise I would have to define redundant macro in vmmouse.c. Currently rebundant macro is ok but if we need some more macros, we would end on creating a spec

Re: [Qemu-devel] [RFC PATCH v2 00/22] remove i386/pc dependency: generic SuperIO

2018-03-07 Thread Philippe Mathieu-Daudé
Hi Paolo, On 03/07/2018 01:52 PM, Paolo Bonzini wrote: > On 05/03/2018 22:19, Philippe Mathieu-Daudé wrote: >> Since v1: >> - complete rewrite, split out the PIIX devices for another series >> >> In this rewrite I extract the common SuperIO code from pc87312.c; use it in >> few MIPS boards; then a

Re: [Qemu-devel] [PATCH 0/2] block: fix nbd-server-stop crash after blockdev-snapshot-sync

2018-03-07 Thread Eric Blake
On 03/06/2018 02:48 PM, Stefan Hajnoczi wrote: The blockdev-snapshot-sync command uses bdrv_append() to update all parents to point at the external snapshot node. This breaks BlockBackend's blk_add/remove_aio_context_notifier(), which doesn't expect a BDS change. Patch 1 fixes this by tracking

Re: [Qemu-devel] [PATCHv1 07/14] target/mips: convert to DisasContextBase

2018-03-07 Thread Philippe Mathieu-Daudé
On 03/01/2018 07:53 PM, Emilio G. Cota wrote: > Cc: Aurelien Jarno > Cc: Yongbok Kim > Signed-off-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daudé > --- > target/mips/translate.c | 346 > > 1 file changed, 175 insertions(+), 171 deletio

Re: [Qemu-devel] [PATCH v2] block: make BDRV_POLL_WHILE() re-entrancy safe

2018-03-07 Thread Eric Blake
On 03/07/2018 06:46 AM, Stefan Hajnoczi wrote: Nested BDRV_POLL_WHILE() calls can occur. Currently assert(!wait_->wakeup) fails in AIO_WAIT_WHILE() when this happens. This patch converts the bool wait_->need_kick flag to an unsigned wait_->num_waiters counter. Nesting works correctly because o

Re: [Qemu-devel] [PATCHv1 08/14] target/mips: use *ctx for DisasContext

2018-03-07 Thread Philippe Mathieu-Daudé
On 03/01/2018 07:53 PM, Emilio G. Cota wrote: > No changes to the logic here; this is just to make the diff > that follows easier to read. > > While at it, remove the unnecessary 'struct' in > 'struct TranslationBlock'. > > Note that checkpatch complains with a false positive: > ERROR: space pr

Re: [Qemu-devel] [PATCHv1 06/14] target/mips: convert to DisasJumpType

2018-03-07 Thread Philippe Mathieu-Daudé
On 03/01/2018 07:53 PM, Emilio G. Cota wrote: > Cc: Aurelien Jarno > Cc: Yongbok Kim > Signed-off-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daudé > --- > target/mips/translate.c | 186 > +++- > 1 file changed, 91 insertions(+), 95 deletions

Re: [Qemu-devel] [PATCH v2] pc-bios/s390-ccw: Move string arrays from bootmap header to .c file

2018-03-07 Thread Eric Blake
On 03/06/2018 12:18 AM, Thomas Huth wrote: bootmap.h can currently only be included once - otherwise the linker complains about multiple definitions of the "magic" strings. My first thought when reading that was "Huh? bootmap.h has a proper[*] double-inclusion header guard, and therefore a sec

Re: [Qemu-devel] [PATCH] slirp: disable Nagle in outgoing connections

2018-03-07 Thread Samuel Thibault
Philippe Mathieu-Daudé, on mer. 07 mars 2018 19:57:28 -0300, wrote: > Reviewed-by: Philippe Mathieu-Daudé Thanks!

[Qemu-devel] [PATCH] nbd/server: Honor FUA request on NBD_CMD_TRIM

2018-03-07 Thread Eric Blake
The NBD spec states that since trim requests can affect disk contents, then they should allow for FUA semantics just like writes for ensuring the disk has settled before returning. As bdrv_[co_]pdiscard() does not (yet?) support a flags argument, we can't pass FUA down the block layer stack, and m

Re: [Qemu-devel] [PATCH] slirp: disable Nagle in outgoing connections

2018-03-07 Thread Philippe Mathieu-Daudé
On 03/07/2018 07:34 PM, Samuel Thibault wrote: > Hello, > > Thanks for the Cc. > > I have applied it to my tree. I don't think there is any reason to > avoid the same change for ingoing connections? Could one of your review > the attached patch doing it? attached patch: Reviewed-by: Philippe M

Re: [Qemu-devel] [PATCH qemu] slirp/debug: Print IP addresses in human readable form

2018-03-07 Thread Samuel Thibault
Hello, Remember to Cc the maintainer, I just can't read qemu-devel fully to find slirp mails. Thomas Huth, on mer. 07 mars 2018 07:24:16 +0100, wrote: > >> diff --git a/slirp/arp_table.c b/slirp/arp_table.c > >> index 3547043..bac608f 100644 > >> --- a/slirp/arp_table.c > >> +++ b/slirp/arp_table

Re: [Qemu-devel] [PATCH] slirp: disable Nagle in outgoing connections

2018-03-07 Thread Samuel Thibault
Hello, Thanks for the Cc. I have applied it to my tree. I don't think there is any reason to avoid the same change for ingoing connections? Could one of your review the attached patch doing it? Samuel commit 99a9a5028e0e15aa3b17d6f884c1e5f48dccea90 Author: Samuel Thibault Date: Wed Mar 7 23

Re: [Qemu-devel] [RFC PATCH qemu] slirp: Update forwarding IP address if guest receiver non-default IP

2018-03-07 Thread Samuel Thibault
Hello, Thomas Huth, on mer. 07 mars 2018 07:30:29 +0100, wrote: > On 07.03.2018 04:39, Alexey Kardashevskiy wrote: > > On 08/02/18 15:29, Alexey Kardashevskiy wrote: > >> On 01/02/18 20:36, Alexey Kardashevskiy wrote: > >>> If we run QEMU with -netdev user,id=USER0,hostfwd=tcp::-:22, it starts

[Qemu-devel] [PATCH v6 05/11] linux-user: fix mmap/munmap/mprotect/mremap/shmat

2018-03-07 Thread Max Filippov
In linux-user QEMU that runs for a target with TARGET_ABI_BITS bigger than L1_MAP_ADDR_SPACE_BITS an assertion in page_set_flags fires when mmap, munmap, mprotect, mremap or shmat is called for an address outside the guest address space. mmap and mprotect should return ENOMEM in such case. Change

Re: [Qemu-devel] [PATCH v4 00/37] x-blockdev-create for protocols and qcow2

2018-03-07 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180307185946.29366-1-kw...@redhat.com Subject: [Qemu-devel] [PATCH v4 00/37] x-blockdev-create for protocols and qcow2 === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

[Qemu-devel] [PATCH] ppc440_pcix: Add dummy implementation of BRDGOPT registers

2018-03-07 Thread BALATON Zoltan
I don't know what should be the correct implementation for these so these are just stored and returned as is without doing anything for now only to silence warnings when u-boot accesses these registers. Signed-off-by: BALATON Zoltan --- hw/ppc/ppc440_pcix.c | 18 ++ 1 file change

Re: [Qemu-devel] [PATCHv1 00/14] Translation loop conversion for sh4/sparc/mips/s390x/openrisc targets

2018-03-07 Thread Mark Cave-Ayland
On 05/03/18 22:43, Emilio G. Cota wrote: On Mon, Mar 05, 2018 at 21:58:52 +, Mark Cave-Ayland wrote: I don't have enough knowledge of TCG internals to review this myself, however I can run it through my complete set of OpenBIOS test images for qemu-system-sparc and qemu-system-sparc64 if th

Re: [Qemu-devel] [Qemu-block] Limiting coroutine stack usage

2018-03-07 Thread Peter Lieven
Am 06.03.2018 um 12:51 schrieb Stefan Hajnoczi: > On Tue, Feb 20, 2018 at 06:04:02PM +0100, Peter Lieven wrote: >> I remember we discussed a long time ago to limit the stack usage of all >> functions that are executed in a coroutine >> context to a very low value to be able to safely limit the cor

Re: [Qemu-devel] [Qemu-block] block migration and MAX_IN_FLIGHT_IO

2018-03-07 Thread Peter Lieven
Am 07.03.2018 um 10:47 schrieb Stefan Hajnoczi: > On Wed, Mar 7, 2018 at 7:55 AM, Peter Lieven wrote: >> Am 06.03.2018 um 17:35 schrieb Peter Lieven: >>> Am 06.03.2018 um 17:07 schrieb Stefan Hajnoczi: On Mon, Mar 05, 2018 at 02:52:16PM +, Dr. David Alan Gilbert wrote: > * Peter Lieve

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

2018-03-07 Thread Brijesh Singh
Hi, I have root caused and fixed the build issue seen with mingw32 compiler, the patch is very trivial (see below). I am looking for direction on how to submit the fix, should I resubmit the whole series or just send the updated  patch marked as "Patch v11.1 ..." ? The "patch v11 11/28" included

Re: [Qemu-devel] [PATCH 0/2] vmmouse: convert qdev pointer property to QOM link relationship

2018-03-07 Thread Philippe Mathieu-Daudé
Hi Zihan Yang, On 03/07/2018 01:55 PM, Zihan Yang wrote: > Hi all, this is a bitesized patch from me a while ago, it seems a little > old but I wonder if there is any opinion about it? Is it still valid? For a single TYPE use, I'm not sure use a specific header is useful (patch #1). The 2nd patc

[Qemu-devel] [Bug 1726733] Re: ‘qemu-img info replication:’ causes segfault

2018-03-07 Thread Fabiano Rosas
** Changed in: qemu Assignee: (unassigned) => Fabiano Rosas (farosas) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1726733 Title: ‘qemu-img info replication:’ causes segfault Status in QEMU:

[Qemu-devel] [Bug 1754038] Re: ARM M: Systick first wrap delayed (qemu-timers/icount prb?)

2018-03-07 Thread Peter Maydell
OK, I will see if I can find some time to investigate this. Can you attach your guest binary, please? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1754038 Title: ARM M: Systick first wrap delayed

Re: [Qemu-devel] [PATCH v5 05/11] linux-user: fix mmap/munmap/mprotect/mremap/shmat

2018-03-07 Thread Laurent Vivier
Le 07/03/2018 à 18:45, Max Filippov a écrit : > On Wed, Mar 7, 2018 at 2:08 AM, Laurent Vivier wrote: >>> +static inline int guest_range_valid(unsigned long start, unsigned long len) >>> +{ >>> +if (len) >>> +return guest_addr_valid(len - 1) && start <= GUEST_ADDR_MAX - len >>> + 1; >

Re: [Qemu-devel] [PATCH v11 21/28] sev/i386: add debug encrypt and decrypt commands

2018-03-07 Thread Dr. David Alan Gilbert
* Brijesh Singh (brijesh.si...@amd.com) wrote: > > > On 3/7/18 12:24 PM, Dr. David Alan Gilbert wrote: > > * Brijesh Singh (brijesh.si...@amd.com) wrote: > >> > >> On 03/07/2018 11:27 AM, Dr. David Alan Gilbert wrote: > >> > >> [...] > >> > +{ > +SEVState *s = (SEVState *)handle; >

Re: [Qemu-devel] [PATCH] tests/boot-serial: Check the 40p machine, too

2018-03-07 Thread Hervé Poussineau
Le 07/03/2018 à 13:15, Thomas Huth a écrit : The "40p" machine is using the Open Hack'Ware BIOS, just like the "prep" machine, so we can test it accordingly with the boot-serial tester, too. While we're at it, also change the strings that we are using for the "prep" machine, so that this test now

Re: [Qemu-devel] [PATCH v4 05/37] qcow2: Pass BlockdevCreateOptions to qcow2_co_create()

2018-03-07 Thread Eric Blake
On 03/07/2018 12:59 PM, Kevin Wolf wrote: All of the simple options are now passed to qcow2_co_create() in a BlockdevCreateOptions object. Still missing: node-name and the encryption options. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/qcow2.c | 189 +++

Re: [Qemu-devel] [PATCH v4 33/37] ssh: Support .bdrv_co_create

2018-03-07 Thread Max Reitz
On 2018-03-07 19:59, Kevin Wolf wrote: > This adds the .bdrv_co_create driver callback to ssh, which enables > image creation over QMP. > > Signed-off-by: Kevin Wolf > --- > qapi/block-core.json | 16 +- > block/ssh.c | 83 > ++--

Re: [Qemu-devel] [PATCH v11 21/28] sev/i386: add debug encrypt and decrypt commands

2018-03-07 Thread Brijesh Singh
On 3/7/18 12:24 PM, Dr. David Alan Gilbert wrote: > * Brijesh Singh (brijesh.si...@amd.com) wrote: >> >> On 03/07/2018 11:27 AM, Dr. David Alan Gilbert wrote: >> >> [...] >> +{ +SEVState *s = (SEVState *)handle; + +/* If policy does not allow debug then no need to regi

Re: [Qemu-devel] [PATCH v4 22/37] rbd: Pass BlockdevOptionsRbd to qemu_rbd_connect()

2018-03-07 Thread Max Reitz
On 2018-03-07 19:59, 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 | 115 > +--- > 1 file

Re: [Qemu-devel] [PATCH v4 03/37] qcow2: Rename qcow2_co_create2() to qcow2_co_create()

2018-03-07 Thread Eric Blake
On 03/07/2018 12:59 PM, Kevin Wolf wrote: The functions originally known as qcow2_create() and qcow2_create2() are now called qcow2_co_create_opts() and qcow2_co_create(), which matches the names of the BlockDriver callbacks that they will implement at the end of this patch series. Signed-off-by

Re: [Qemu-devel] [PATCH v4 03/37] qcow2: Rename qcow2_co_create2() to qcow2_co_create()

2018-03-07 Thread Max Reitz
On 2018-03-07 19:59, Kevin Wolf wrote: > The functions originally known as qcow2_create() and qcow2_create2() > are now called qcow2_co_create_opts() and qcow2_co_create(), which > matches the names of the BlockDriver callbacks that they will implement > at the end of this patch series. > > Signed

[Qemu-devel] [PATCH v4 36/37] qemu-iotests: Test qcow2 over file image creation with QMP

2018-03-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/206 | 436 + tests/qemu-iotests/206.out | 209 ++ tests/qemu-iotests/group | 1 + 3 files changed, 646 insertions(+) create mode 100755 tests/qemu-iote

[Qemu-devel] [PATCH v4 37/37] qemu-iotests: Test ssh image creation over QMP

2018-03-07 Thread Kevin Wolf
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 insertions(+) create mode 100755 tests/qemu-iotests/207

[Qemu-devel] [PATCH v4 28/37] sheepdog: QAPIfy "redundancy" create option

2018-03-07 Thread Kevin Wolf
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 into such a QAPI object before interpreting the val

[Qemu-devel] [PATCH v4 35/37] block: Fail bdrv_truncate() with negative size

2018-03-07 Thread Kevin Wolf
Most callers have their own checks, but something like this should also be checked centrally. As it happens, x-blockdev-create can pass negative image sizes to format drivers (because there is no QAPI type that would reject negative numbers) and triggers the check added by this patch. Signed-off-b

[Qemu-devel] [PATCH v4 22/37] rbd: Pass BlockdevOptionsRbd to qemu_rbd_connect()

2018-03-07 Thread Kevin Wolf
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 | 115 +--- 1 file changed, 55 insertions(+), 60 deletions(-) diff --git a

Re: [Qemu-devel] [PATCH v2 5/7] qcow2: Check snapshot L1 table in qcow2_snapshot_goto()

2018-03-07 Thread Eric Blake
On 03/06/2018 10:14 AM, Alberto Garcia wrote: This function copies a snapshot's L1 table into the active one without validating it first. We now have a function to take care of this, so let's use it. Signed-off-by: Alberto Garcia Cc: Eric Blake --- block/qcow2-snapshot.c | 9 +

[Qemu-devel] [PATCH v4 30/37] ssh: Use QAPI BlockdevOptionsSsh object

2018-03-07 Thread Kevin Wolf
Create a BlockdevOptionsSsh object in connect_to_ssh() and take the options from there. 'host_key_check' is still processed separately because it's not in the schema yet. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/ssh.c | 137 +++--

[Qemu-devel] [PATCH v4 21/37] rbd: Remove non-schema options from runtime_opts

2018-03-07 Thread Kevin Wolf
Instead of the QemuOpts in qemu_rbd_connect(), we want to use QAPI objects. As a preparation, fetch those options directly from the QDict that .bdrv_open() supports in the rbd driver and that are not in the schema. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/rbd.c | 55 ++

[Qemu-devel] [PATCH v4 34/37] file-posix: Fix no-op bdrv_truncate() with falloc preallocation

2018-03-07 Thread Kevin Wolf
If bdrv_truncate() is called, but the requested size is the same as before, don't call posix_fallocate(), which returns -EINVAL for length zero and would therefore make bdrv_truncate() fail. The problem can be triggered by creating a zero-sized raw image with 'falloc' preallocation mode. Signed-o

[Qemu-devel] [PATCH v4 26/37] nfs: Use QAPI options in nfs_client_open()

2018-03-07 Thread Kevin Wolf
Using the QAPI visitor to turn all options into QAPI BlockdevOptionsNfs simplifies the code a lot. It will also be useful for implementing the QAPI based .bdrv_co_create callback. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/nfs.c | 176 ++--

[Qemu-devel] [PATCH v4 18/37] gluster: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to gluster, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- qapi/block-core.json | 18 ++- block/gluster.c | 135 ++- 2 fi

[Qemu-devel] [PATCH v4 33/37] ssh: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to ssh, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 16 +- block/ssh.c | 83 ++-- 2 files changed, 63 insertions(+), 36 deletions(-) dif

[Qemu-devel] [PATCH v4 31/37] ssh: QAPIfy host-key-check option

2018-03-07 Thread Kevin Wolf
This makes the host-key-check option available in blockdev-add. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qapi/block-core.json | 63 +++-- block/ssh.c | 88 +--- 2 files changed, 117 insertions(+

[Qemu-devel] [PATCH v4 27/37] nfs: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to nfs, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qapi/block-core.json | 16 ++- block/nfs.c | 76 +--- 2 files changed, 75 insertions

[Qemu-devel] [PATCH v4 16/37] file-posix: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to file, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- qapi/block-core.json | 20 - block/file-posix.c | 79 +--- 2

[Qemu-devel] [PATCH v4 32/37] ssh: Pass BlockdevOptionsSsh to connect_to_ssh()

2018-03-07 Thread Kevin Wolf
Move the parsing of the QDict options up to the callers, in preparation for the .bdrv_co_create implementation that directly gets a QAPI type. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/ssh.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions

[Qemu-devel] [PATCH v4 29/37] sheepdog: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to sheepdog, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qapi/block-core.json | 24 - block/sheepdog.c | 243 +++ 2 files changed, 192 insertion

[Qemu-devel] [PATCH v4 20/37] rbd: Factor out qemu_rbd_connect()

2018-03-07 Thread Kevin Wolf
The code to establish an RBD connection is duplicated between open and create. In order to be able to share the code, factor out the code from qemu_rbd_open() as a first step. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/rbd.c | 100

[Qemu-devel] [PATCH v4 13/37] qcow2: Use visitor for options in qcow2_create()

2018-03-07 Thread Kevin Wolf
Instead of manually creating the BlockdevCreateOptions object, use a visitor to parse the given options into the QAPI object. This involves translation from the old command line syntax to the syntax mandated by the QAPI schema. Option names are still checked against qcow2_create_opts, so only the

[Qemu-devel] [PATCH v4 23/37] rbd: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to rbd, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qapi/block-core.json | 19 ++- block/rbd.c | 150 ++- 2 files changed, 118 insertions(+

[Qemu-devel] [PATCH v4 15/37] block: x-blockdev-create QMP command

2018-03-07 Thread Kevin Wolf
This adds a synchronous x-blockdev-create QMP command that can create qcow2 images on a given node name. We don't want to block while creating an image, so this is not the final interface in all aspects, but BlockdevCreateOptionsQcow2 and .bdrv_co_create() are what they actually might look like in

[Qemu-devel] [PATCH v4 25/37] rbd: Use qemu_rbd_connect() in qemu_rbd_do_create()

2018-03-07 Thread Kevin Wolf
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 default, so leave it that way. Signed-off-by: Kev

[Qemu-devel] [PATCH v4 14/37] block: Make bdrv_is_whitelisted() public

2018-03-07 Thread Kevin Wolf
We'll use a separate source file for image creation, and we need to check there whether the requested driver is whitelisted. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- include/block/block.h | 1 + block.c | 2 +- 2 files changed, 2 insertions(+),

  1   2   3   4   >