[Qemu-devel] [PULL 4/9] qcow2: Document some maximum size constraints

2018-11-19 Thread Kevin Wolf
From: Eric Blake Although off_t permits up to 63 bits (8EB) of file offsets, in practice, we're going to hit other limits first. Document some of those limits in the qcow2 spec (some are inherent, others are implementation choices of qemu), and how choice of cluster size can influence some of th

[Qemu-devel] [PULL 0/9] Block layer patches

2018-11-19 Thread Kevin Wolf
The following changes since commit 9436e082de18b2fb2ceed2e9d1beef641ae64f23: MAINTAINERS: clarify some of the tags (2018-11-19 11:19:23 +) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch changes up to 6d0a4a0fb5c8f10c8eb68b52cfd

[Qemu-devel] [PULL 6/9] iotests: Add new test 220 for max compressed cluster offset

2018-11-19 Thread Kevin Wolf
From: Eric Blake If you have a capable file system (tmpfs is good, ext4 not so much; run ./check with TEST_DIR pointing to a good location so as not to skip the test), it's actually possible to create a qcow2 file that expands to a sparse 512T image with just over 38M of content. The test is not

[Qemu-devel] [PULL 3/9] vvfat: Fix memory leak

2018-11-19 Thread Kevin Wolf
Don't leak 'cluster' in the mapping == NULL case. Found by Coverity (CID 1055918). Fixes: 8d9401c2791ee2d2805b741b1ee3006041edcd3e Signed-off-by: Kevin Wolf Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Liam Merwick Tested-by: Philippe Mathieu-Daudé --- block/vvfat.c | 6 +++--- 1 file cha

Re: [Qemu-devel] [PATCH] io: return 0 for EOF in TLS session read after shutdown

2018-11-19 Thread Eric Blake
On 11/19/18 7:42 AM, Daniel P. Berrangé wrote: GNUTLS takes a paranoid approach when seeing 0 bytes returned by the underlying OS read() function. It will consider this an error and return GNUTLS_E_PREMATURE_TERMINATION instead of propagating the 0 return value. It expects apps to arrange for cle

Re: [Qemu-devel] [PATCH 07/22] gpio/puv3_gpio: Convert sysbus init function to realize function

2018-11-19 Thread Peter Maydell
On 19 November 2018 at 12:08, Mao Zhongyi wrote: > Use DeviceClass rather than SysBusDeviceClass in > puv3_gpio_class_init(). > > Cc: g...@mprc.pku.edu.cn > > Signed-off-by: Mao Zhongyi > Signed-off-by: Zhang Shengju > --- > hw/gpio/puv3_gpio.c | 28 +--- > 1 file change

[Qemu-devel] [PULL 7/9] block: Always abort reopen after prepare succeeded

2018-11-19 Thread Kevin Wolf
From: Max Reitz bdrv_reopen_multiple() does not invoke bdrv_reopen_abort() for the element of the reopen queue for which bdrv_reopen_prepare() failed, because it assumes that the prepare function will have rolled back all changes already. However, bdrv_reopen_prepare() does not do this in every

[Qemu-devel] [PULL 9/9] iotests: Test file-posix locking and reopen

2018-11-19 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- tests/qemu-iotests/182 | 71 ++ tests/qemu-iotests/182.out | 9 + 2 files changed, 80 insertions(+) diff --git a/tests/qemu-iotests/182 b/tests/qemu

Re: [Qemu-devel] [PATCH 5/6] tests: add iotests helpers for dealing with TLS certificates

2018-11-19 Thread Daniel P . Berrangé
On Mon, Nov 19, 2018 at 08:27:56AM -0600, Eric Blake wrote: > On 11/19/18 5:04 AM, Max Reitz wrote: > > > > > > +tls_dir="${TEST_DIR}/tls" > > > > > + > > > > > +function tls_x509_cleanup() > > > > > +{ > > > > > +rm -f ${tls_dir}/*.pem > > > > > +rm -f ${tls_dir}/*/*.pem > > > > > +rm

[Qemu-devel] [PULL 8/9] file-posix: Fix shared locks on reopen commit

2018-11-19 Thread Kevin Wolf
From: Max Reitz s->locked_shared_perm is the set of bits locked in the file, which is the inverse of the permissions actually shared. So we need to pass them as they are to raw_apply_lock_bytes() instead of inverting them again. Reported-by: Alberto Garcia Signed-off-by: Max Reitz Reviewed-by

Re: [Qemu-devel] [PULL 0/9] Block layer patches

2018-11-19 Thread Peter Maydell
On 19 November 2018 at 14:29, Kevin Wolf wrote: > The following changes since commit 9436e082de18b2fb2ceed2e9d1beef641ae64f23: > > MAINTAINERS: clarify some of the tags (2018-11-19 11:19:23 +) > > are available in the Git repository at: > > git://repo.or.cz/qemu/kevin.git tags/for-upstream

Re: [Qemu-devel] [PATCH for-3.1] nvme: fix out-of-bounds access to the CMB

2018-11-19 Thread Mark Kanda
For CVE-2018-16847, I just noticed Kevin pulled in Li's previous fix (as opposed to this one). Was this done in error? Thanks, -Mark On 11/16/2018 3:31 AM, Paolo Bonzini wrote: Because the CMB BAR has a min_access_size of 2, if you read the last byte it will try to memcpy *2* bytes from n->cm

Re: [Qemu-devel] [PATCH] MAINTAINERS: list myself as maintainer for various Arm boards

2018-11-19 Thread Peter Maydell
On 8 November 2018 at 13:41, Peter Maydell wrote: > In practice for most of the more-or-less orphan Arm board models, > I will review patches and put them in via the target-arm tree. > So list myself as an "Odd Fixes" status maintainer for them. > > This commit downgrades these boards to "Odd Fixe

Re: [Qemu-devel] [RFC PATCH 0/2] docker: Add gentoo-mipsr5900el-cross image

2018-11-19 Thread Fredrik Noring
Many thanks, Philippe! > The first patch adds a cross toolchain for the R5900 MIPS. > It is working correctly but the patches provided by Fredrik in [1] don't > have proper S-o-b, thus it is tagged RFC. > Fredrik: any update on the status of those patches upstream? With GCC 8.2.0 and a current Ge

Re: [Qemu-devel] [PATCH v5 00/24] ACPI reorganization for hardware-reduced API addition

2018-11-19 Thread Igor Mammedov
On Fri, 16 Nov 2018 17:37:54 +0100 Paolo Bonzini wrote: > On 16/11/18 17:29, Igor Mammedov wrote: > > General suggestions for this series: > > 1. Preferably don't do multiple changes within a patch > > neither post huge patches (unless it's pure code movement). > > (it's easy to squas

Re: [Qemu-devel] [RFC PATCH 1/2] docker: Add gentoo-mipsr5900el-cross image

2018-11-19 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > This image is based on Gentoo and the toolchain is built using crossdev. > > Recipe from: > https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg03944.html > > Suggested-by: Fredrik Noring > Signed-off-by: Philippe Mathieu-Daudé > --- > TODO: > - Add Fre

Re: [Qemu-devel] [PATCH v5 19/24] hw: acpi: Retrieve the PCI bus from AcpiPciHpState

2018-11-19 Thread Igor Mammedov
On Fri, 16 Nov 2018 19:42:08 + "Boeuf, Sebastien" wrote: > Hi Igor, > > On Fri, 2018-11-16 at 10:39 +0100, Igor Mammedov wrote: > > On Mon,  5 Nov 2018 02:40:42 +0100 > > Samuel Ortiz wrote: > > > > > > > > From: Sebastien Boeuf > > > > > > Instead of using the machine type specific m

Re: [Qemu-devel] [PATCH v2 01/10] pci/pcie: rename hotplug handler callbacks

2018-11-19 Thread Igor Mammedov
On Mon, 5 Nov 2018 11:20:35 +0100 David Hildenbrand wrote: > The callbacks are also called for cold plugged devices. Drop the "hot" > to better match the actual callback names. > > While at it, also rename pcie_cap_slot_hotplug_common() to > pcie_cap_slot_check_common(). > > Signed-off-by: Da

[Qemu-devel] [PATCH 0/3] fw_cfg: fix boot bootsplash and reboot-timeout error checking

2018-11-19 Thread Li Qiang
And also do some code cleanup. A lot of thanks to Markus's review and advice. Li Qiang (3): fw_cfg: fix -boot bootsplash error checking fw_cfg: fix -boot reboot-timeout error checking fw_cfg: make qemu_extra_params_fw locally hw/nvram/fw_cfg.c | 68 ++-

[Qemu-devel] [PATCH 1/3] fw_cfg: fix -boot bootsplash error checking

2018-11-19 Thread Li Qiang
fw_cfg_bootsplash() gets option parameter "splash-time" with qemu_opt_get(), then converts it to an integer by hand. It neglects to check that conversion for errors. This is needlessly complicated and error-prone. But as "splash-time not specified" is not the same as "splash-time=T" for any T, we n

[Qemu-devel] [PATCH 2/3] fw_cfg: fix -boot reboot-timeout error checking

2018-11-19 Thread Li Qiang
fw_cfg_reboot() gets option parameter "reboot-timeout" with qemu_opt_get(), then converts it to an integer by hand. It neglects to check that conversion for errors, and fails to reject negative values. Positive values above the limit get reported and replaced by the limit. This patch checks for con

[Qemu-devel] [PATCH 3/3] fw_cfg: make qemu_extra_params_fw locally

2018-11-19 Thread Li Qiang
qemu_extra_params_fw[] has external linkage, but is used only in fw_cfg_bootsplash(), it makes sense to make it locally. Suggested-by: Markus Armbruster Signed-off-by: Li Qiang --- hw/nvram/fw_cfg.c | 1 + include/sysemu/sysemu.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff

Re: [Qemu-devel] [PATCH v4] hw/arm: Add arm SBSA reference machine

2018-11-19 Thread Ard Biesheuvel
On Mon, 19 Nov 2018 at 04:44, Leif Lindholm wrote: > > On Fri, Nov 16, 2018 at 02:04:07PM -0800, Ard Biesheuvel wrote: > > > > > What is this using the exynos4210 USB device for? That > > > > > is definitely not correct for a generic board. > > > > > > > > > Checked the code: > > > > #define TYPE_

Re: [Qemu-devel] [RFC PATCH 0/2] docker: Add gentoo-mipsr5900el-cross image

2018-11-19 Thread Maciej W. Rozycki
On Mon, 19 Nov 2018, Fredrik Noring wrote: > > The first patch adds a cross toolchain for the R5900 MIPS. > > It is working correctly but the patches provided by Fredrik in [1] don't > > have proper S-o-b, thus it is tagged RFC. > > Fredrik: any update on the status of those patches upstream? > >

Re: [Qemu-devel] Block format 'raw' does not support the option 'serial'

2018-11-19 Thread Michal Suchánek
On Mon, 19 Nov 2018 14:20:59 + Daniel P. Berrangé wrote: > On Mon, Nov 19, 2018 at 03:15:27PM +0100, Michal Suchánek wrote: > > Hello, > > > > I tried to run my VM with qemu git and I am greeted with: > > > > Block format 'raw' does not support the option 'serial' > > > > Is there any sens

Re: [Qemu-devel] [RFC PATCH 1/2] docker: Add gentoo-mipsr5900el-cross image

2018-11-19 Thread Fredrik Noring
Hi Alex, > This fails to build glibc, but doesn't exactly give much info: > >* Log: /var/log/portage/cross-mipsr5900el-unknown-linux-gnu-binutils.log >* Emerging cross-binutils ...[ > ok ] >* Log: > /var/log/portage/cross-mipsr5900el-unkno

Re: [Qemu-devel] [PATCH v2 02/10] pci/shpc: rename hotplug handler callbacks

2018-11-19 Thread Igor Mammedov
On Mon, 5 Nov 2018 11:20:36 +0100 David Hildenbrand wrote: > The callbacks are also called for cold plugged devices. Drop the "hot" > to better match the actual callback names. > > While at it, also rename shpc_device_hotplug_common() to > shpc_device_plug_common(). > > Signed-off-by: David Hi

[Qemu-devel] [PULL 01/10] target/arm: Install ARMISARegisters from kvm host

2018-11-19 Thread Peter Maydell
From: Richard Henderson The ID registers are replacing (some of) the feature bits. We need (some of) these values to determine the set of data to be handled during migration. Signed-off-by: Richard Henderson Message-id: 20181113180154.17903-2-richard.hender...@linaro.org Reviewed-by: Peter Mayd

[Qemu-devel] [PULL 04/10] target/arm: Fill in ARMISARegisters for kvm32

2018-11-19 Thread Peter Maydell
From: Richard Henderson Signed-off-by: Richard Henderson Message-id: 20181113180154.17903-5-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/kvm32.c | 40 +++- 1 file changed, 35 insertions(+), 5 deletions(

[Qemu-devel] [PULL 10/10] MAINTAINERS: list myself as maintainer for various Arm boards

2018-11-19 Thread Peter Maydell
In practice for most of the more-or-less orphan Arm board models, I will review patches and put them in via the target-arm tree. So list myself as an "Odd Fixes" status maintainer for them. This commit downgrades these boards to "Odd Fixes": * Allwinner-A10 * Exynos * Calxeda Highbank * Canon

[Qemu-devel] [PULL 02/10] target/arm: Fill in ARMISARegisters for kvm64

2018-11-19 Thread Peter Maydell
From: Richard Henderson Signed-off-by: Richard Henderson Message-id: 20181113180154.17903-3-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/kvm64.c | 90 -- 1 file changed, 88 insertions(+), 2 dele

[Qemu-devel] [PULL 05/10] MAINTAINERS: Add entries for missing ARM boards

2018-11-19 Thread Peter Maydell
From: Thomas Huth Add entries for the boards "mcimx6ul-evk", "mcimx7d-sabre", "raspi2", "raspi3", "sabrelite", "vexpress-a15", "vexpress-a9" and "virt". While we're at it, also adjust the "i.MX31" section a little bit, so that the wildcards there do not match anymore for unrelated files (e.g. the

[Qemu-devel] [PULL 00/10] target-arm queue

2018-11-19 Thread Peter Maydell
linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20181119 for you to fetch changes up to a00d7f2048c2a1a6a4487ac195c804c78adcf60e: MAINTAINERS: list myself as maintainer for various Arm boards (2018-11-19 15:55:11 +) -

Re: [Qemu-devel] [PATCH v2 03/10] s390x/pci: rename hotplug handler callbacks

2018-11-19 Thread Igor Mammedov
On Mon, 5 Nov 2018 11:20:37 +0100 David Hildenbrand wrote: > The callbacks are also called for cold plugged devices. Drop the "hot" > to better match the actual callback names. > > Signed-off-by: David Hildenbrand Reviewed-by: Igor Mammedov > --- > hw/s390x/s390-pci-bus.c | 12 ++--

[Qemu-devel] [PULL 08/10] hw/block/onenand: Fix off-by-one error allowing out-of-bounds read

2018-11-19 Thread Peter Maydell
An off-by-one error in a switch case in onenand_read() allowed a misbehaving guest to read off the end of a block of memory. NB: the onenand device is used only by the "n800" and "n810" machines, which are usable only with TCG, not KVM, so this is not a security issue. Reported-by: Thomas Huth R

Re: [Qemu-devel] Block format 'raw' does not support the option 'serial'

2018-11-19 Thread Daniel P . Berrangé
On Mon, Nov 19, 2018 at 04:55:16PM +0100, Michal Suchánek wrote: > On Mon, 19 Nov 2018 14:20:59 + > Daniel P. Berrangé wrote: > > > On Mon, Nov 19, 2018 at 03:15:27PM +0100, Michal Suchánek wrote: > > > Hello, > > > > > > I tried to run my VM with qemu git and I am greeted with: > > > > > >

[Qemu-devel] [PULL 09/10] hw/block/onenand: use qemu_log_mask() for reporting

2018-11-19 Thread Peter Maydell
Update the onenand device to use qemu_log_mask() for reporting guest errors and unimplemented features, rather than plain fprintf() and hw_error(). (We leave the hw_error() in onenand_reset(), as that is triggered by a failure to read the underlying block device for the bootRAM, not by guest actio

[Qemu-devel] [PULL 07/10] target/arm: fix smc incorrectly trapping to EL3 when secure is off

2018-11-19 Thread Peter Maydell
From: Luc Michel This commit fixes a case where the CPU would try to go to EL3 when executing an smc instruction, even though ARM_FEATURE_EL3 is false. This case is raised when the PSCI conduit is set to smc, but the smc instruction does not lead to a valid PSCI call. QEMU crashes with an assert

[Qemu-devel] [PULL 06/10] hw/arm/stm32f205: Fix the UART and Timer region size

2018-11-19 Thread Peter Maydell
From: Seth Kintigh The UART and timer devices for the stm32f205 were being created with memory regions that were too large. Use the size specified in the chip datasheet. The old sizes were so large that the devices would overlap with each other in the SoC memory map, so this fixes a bug that cau

[Qemu-devel] [PULL 03/10] target/arm: Introduce read_sys_reg32 for kvm32

2018-11-19 Thread Peter Maydell
From: Richard Henderson Assert that the value to be written is the correct size. No change in functionality here, just mirroring the same function from kvm64. Signed-off-by: Richard Henderson Message-id: 20181113180154.17903-4-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-

Re: [Qemu-devel] [PATCH] docker: dockerfile for openSUSE Leap

2018-11-19 Thread Dario Faggioli
On Mon, 2018-11-19 at 01:02 +0100, Philippe Mathieu-Daudé wrote: > Hi Dario, > Hi, > On Sun, Nov 18, 2018 at 10:54 PM Dario Faggioli > wrote: > > On Sun, 2018-11-18 at 19:47 +, Alex Bennée wrote: > > > This hasn't been tested because the docker image fails to build > > > due > > > to > > > c

Re: [Qemu-devel] [Qemu-ppc] [PATCH for 3.1] spapr: Fix ibm, max-associativity-domains property number of nodes

2018-11-19 Thread Serhii Popovych
Laurent Vivier wrote: > On 19/11/2018 14:27, Greg Kurz wrote: >> On Mon, 19 Nov 2018 08:09:38 -0500 >> Serhii Popovych wrote: >> >>> Laurent Vivier reported off by one with maximum number of NUMA nodes >>> provided by qemu-kvm being less by one than required according to >>> description of "ibm,ma

[Qemu-devel] [PATCH for 3.1 v2] spapr: Fix ibm, max-associativity-domains property number of nodes

2018-11-19 Thread Serhii Popovych
Laurent Vivier reported off by one with maximum number of NUMA nodes provided by qemu-kvm being less by one than required according to description of "ibm,max-associativity-domains" property in LoPAPR. It appears that I incorrectly treated LoPAPR description of this property assuming it provides l

[Qemu-devel] [PATCH for-3.1] hw/xen/xen_pt_graphics: Don't trust the BIOS ROM contents so much

2018-11-19 Thread Peter Maydell
Coverity (CID 796599) points out that xen_pt_setup_vga() trusts the rom->size field in the BIOS ROM from a PCI passthrough VGA device, and uses it as an index into the memory which contains the BIOS image. A corrupt BIOS ROM could therefore cause us to index off the end of the buffer. Check that t

Re: [Qemu-devel] [RFC PATCH 0/2] docker: Add gentoo-mipsr5900el-cross image

2018-11-19 Thread Fredrik Noring
Hi Maciej, > Of course you can instead just set the default manually by using > `--with-llsc' when configuring GCC or specify `-mllsc' explicitly in > CFLAGS with a compiler that has been already built without that set by > default. There are ways to pass such flags to the crossdev command, b

Re: [Qemu-devel] [PATCH v2 06/10] pci/pcihp: overwrite hotplug handler recursively from the start

2018-11-19 Thread Igor Mammedov
On Mon, 5 Nov 2018 11:20:40 +0100 David Hildenbrand wrote: > For now, the hotplug handler is not called for devices that are > being cold plugged. The hotplug handler is setup when the machine > initialization is fully done. Only bridges that were cold plugged are > considered. > > Set the hotp

Re: [Qemu-devel] [RFC PATCH 0/2] docker: Add gentoo-mipsr5900el-cross image

2018-11-19 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20181118203312.5376-1-f4...@amsat.org Subject: [Qemu-devel] [RFC PATCH 0/2] docker: Add gentoo-mipsr5900el-cross image === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 to

Re: [Qemu-devel] KVM Forum block no[td]es

2018-11-19 Thread Alberto Garcia
On Fri 16 Nov 2018 04:18:34 PM CET, Kevin Wolf wrote: > Am 16.11.2018 um 16:03 hat Alberto Garcia geschrieben: >> > I don't think anything needs a way to generally block graph changes >> > around some node. We only need to prevent changes to very specific >> > sets of edges. This is something tha

Re: [Qemu-devel] [PATCH v6 07/16] gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo

2018-11-19 Thread Edgar E. Iglesias
On Mon, Nov 19, 2018 at 11:12:45AM +0100, Luc Michel wrote: > > > On 11/16/18 11:04 AM, Edgar E. Iglesias wrote: > > On Thu, Nov 15, 2018 at 10:41:58AM +0100, Luc Michel wrote: > >> Change the thread info related packets handling to support multiprocess > >> extension. > >> > >> Add the CPUs clas

Re: [Qemu-devel] [PATCH v2 08/10] pci/pcie: perform unplug via the hotplug handler

2018-11-19 Thread Igor Mammedov
On Mon, 5 Nov 2018 11:20:42 +0100 David Hildenbrand wrote: > Introduce and use the "unplug" callback. > > This is a preparation for multi-stage hotplug handlers, whereby the bus > hotplug handler is overwritten by the machine hotplug handler. This handler > will then pass control to the bus hot

Re: [Qemu-devel] [PATCH v4] hw/arm: Add arm SBSA reference machine

2018-11-19 Thread Leif Lindholm
On Mon, Nov 19, 2018 at 07:51:29AM -0800, Ard Biesheuvel wrote: > > > > I think what we *really* want is sysbus-xhci-generic. > > > > > > > > That'll be a bit more work though as xhci core and xhci pci needs to be > > > > splitted, simliar to how it was done for ehci in commit > > > > 5010d4dc618b6

Re: [Qemu-devel] [PULL 01/22] target/ppc: add external PID support

2018-11-19 Thread Peter Maydell
On 15 November 2018 at 10:22, Peter Maydell wrote: > Hi; Coverity reports an issue (CID1396864) with this function: > >> +/* dcbfep (external PID dcbf) */ >> +static void gen_dcbfep(DisasContext *ctx) >> +{ >> +/* XXX: specification says this is treated as a load by the MMU */ >> +TCGv t0;

Re: [Qemu-devel] [PATCH v2 07/10] pci/pcihp: perform unplug via the hotplug handler

2018-11-19 Thread Igor Mammedov
On Mon, 5 Nov 2018 11:20:41 +0100 David Hildenbrand wrote: > Introduce and use the "unplug" callback. > > This is a preparation for multi-stage hotplug handlers, whereby the bus > hotplug handler is overwritten by the machine hotplug handler. This handler > will then pass control to the bus hot

Re: [Qemu-devel] [Qemu-ppc] [PATCH for 3.1] spapr: Fix ibm, max-associativity-domains property number of nodes

2018-11-19 Thread Greg Kurz
On Mon, 19 Nov 2018 14:48:34 +0100 Laurent Vivier wrote: > On 19/11/2018 14:27, Greg Kurz wrote: > > On Mon, 19 Nov 2018 08:09:38 -0500 > > Serhii Popovych wrote: > > > >> Laurent Vivier reported off by one with maximum number of NUMA nodes > >> provided by qemu-kvm being less by one than req

Re: [Qemu-devel] [PATCH 6/6] tests: exercise NBD server in TLS mode

2018-11-19 Thread Eric Blake
On 11/19/18 4:37 AM, Daniel P. Berrangé wrote: Actually, I tracked this message down to using socat (which actually connects and then abruptly exits) when probing whether the socket is up and listening. That is, the message is being produced as a side effect of nbd_server_wait_for_tcp_socket ra

Re: [Qemu-devel] [PATCH 6/6] tests: exercise NBD server in TLS mode

2018-11-19 Thread Eric Blake
On 11/16/18 9:53 AM, Daniel P. Berrangé wrote: Add tests that validate it is possible to connect to an NBD server running TLS mode. Also test mis-matched TLS vs non-TLS connections correctly fail. --- +++ b/tests/qemu-iotests/common.nbd +function nbd_server_wait_for_tcp_socket() +{ +

Re: [Qemu-devel] [PATCH for-3.1] nvme: fix out-of-bounds access to the CMB

2018-11-19 Thread Paolo Bonzini
On 19/11/18 16:23, Mark Kanda wrote: > For CVE-2018-16847, I just noticed Kevin pulled in Li's previous fix (as > opposed to this one). Was this done in error? Probably. Kevin, can you revert and apply this one instead? I don't care if 3.1 or 3.2, but the previous fix is pointless complication.

Re: [Qemu-devel] [PATCH v2 09/10] pci/shpc: perform unplug via the hotplug handler

2018-11-19 Thread Igor Mammedov
On Mon, 5 Nov 2018 11:20:43 +0100 David Hildenbrand wrote: > Introduce and use the "unplug" callback. > > This is a preparation for multi-stage hotplug handlers, whereby the bus > hotplug handler is overwritten by the machine hotplug handler. This handler > will then pass control to the bus hot

Re: [Qemu-devel] [PATCH 7/6] iotests: Also test I/O over NBD TLS

2018-11-19 Thread Eric Blake
On 11/19/18 4:40 AM, Daniel P. Berrangé wrote: On Sat, Nov 17, 2018 at 08:24:03PM -0600, Eric Blake wrote: Enhance test 233 to also perform I/O beyond the initial handshake. Signed-off-by: Eric Blake --- Depends on my tweak to 2/6 to suppress an EIO error message on a failed read after NBD_CM

Re: [Qemu-devel] [PATCH v2 10/10] spapr_pci: perform unplug via the hotplug handler

2018-11-19 Thread Igor Mammedov
On Mon, 5 Nov 2018 11:20:44 +0100 David Hildenbrand wrote: > Introduce and use the "unplug" callback. > > This is a preparation for multi-stage hotplug handlers, whereby the bus > hotplug handler is overwritten by the machine hotplug handler. This handler > will then pass control to the bus hot

Re: [Qemu-devel] [PATCH v5 00/24] ACPI reorganization for hardware-reduced API addition

2018-11-19 Thread Paolo Bonzini
On 19/11/18 16:31, Igor Mammedov wrote: > I've tried to give suggestions how to restructure series > on per patch basis. In my opinion it quite possible to split > series in several smaller ones and it should really help with > making series cleaner and easier/faster to review/amend/merge > vs what

Re: [Qemu-devel] [PATCH v4] hw/arm: Add arm SBSA reference machine

2018-11-19 Thread Ard Biesheuvel
On Mon, 19 Nov 2018 at 08:44, Leif Lindholm wrote: > > On Mon, Nov 19, 2018 at 07:51:29AM -0800, Ard Biesheuvel wrote: > > > > > I think what we *really* want is sysbus-xhci-generic. > > > > > > > > > > That'll be a bit more work though as xhci core and xhci pci needs to > > > > > be > > > > > sp

[Qemu-devel] [PATCH for-3.1] iotests: Enhance 223 to cover multiple bitmap granularities

2018-11-19 Thread Eric Blake
Testing granularity at the same size as the cluster isn't quite as fun as what happens when it is larger or smaller. This enhancement also shows that qemu's nbd server can server the same disk over multiple exports simultaneously. Signed-off-by: Eric Blake --- Just a testsuite enhancement, so s

Re: [Qemu-devel] [PATCH for-3.1] iotests: Enhance 223 to cover multiple bitmap granularities

2018-11-19 Thread Eric Blake
On 11/19/18 11:29 AM, Eric Blake wrote: Testing granularity at the same size as the cluster isn't quite as fun as what happens when it is larger or smaller. This enhancement also shows that qemu's nbd server can server the s/server/serve/ same disk over multiple exports simultaneously. Sign

Re: [Qemu-devel] [PATCH for-3.1] nvme: fix out-of-bounds access to the CMB

2018-11-19 Thread Kevin Wolf
Am 19.11.2018 um 18:09 hat Paolo Bonzini geschrieben: > On 19/11/18 16:23, Mark Kanda wrote: > > For CVE-2018-16847, I just noticed Kevin pulled in Li's previous fix (as > > opposed to this one). Was this done in error? > > Probably. Kevin, can you revert and apply this one instead? I don't > ca

[Qemu-devel] [PULL 06/12] io: return 0 for EOF in TLS session read after shutdown

2018-11-19 Thread Eric Blake
From: Daniel P. Berrangé GNUTLS takes a paranoid approach when seeing 0 bytes returned by the underlying OS read() function. It will consider this an error and return GNUTLS_E_PREMATURE_TERMINATION instead of propagating the 0 return value. It expects apps to arrange for clean termination at the

[Qemu-devel] [PULL 03/12] qemu-iotests: Modern shell scripting (use $() instead of ``)

2018-11-19 Thread Eric Blake
From: Mao Zhongyi Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. For now, just do the qemu-iotests directory. Cc: kw...@redhat.com Cc: mre...@redhat.com Cc: ebl...@redhat.com Suggested-by: Eric Blake Signed-off-by: Mao

[Qemu-devel] [PULL 02/12] qemu-iotests: convert `pwd` and $(pwd) to $PWD

2018-11-19 Thread Eric Blake
From: Mao Zhongyi POSIX requires $PWD to be reliable, and we expect all shells used by qemu scripts to be relatively close to POSIX. Thus, it is smarter to avoid forking the pwd executable for something that is already available in the environment. So replace it with the following: sed -i 's/\

[Qemu-devel] [PULL 00/12] NBD patches for 3.1-rc2

2018-11-19 Thread Eric Blake
The following changes since commit e6ebbd46b6e539f3613136111977721d212c2812: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2018-11-19 14:31:48 +) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-nbd-2018-11-19 for you to

[Qemu-devel] [PULL 05/12] nbd/server: Ignore write errors when replying to NBD_OPT_ABORT

2018-11-19 Thread Eric Blake
Commit 37ec36f6 intentionally ignores errors when trying to reply to an NBD_OPT_ABORT request for plaintext clients, but did not make the same change for a TLS server. Since NBD_OPT_ABORT is documented as being a potential for an EPIPE when the client hangs up without waiting for our reply, we don

[Qemu-devel] [PULL 10/12] tests: exercise NBD server in TLS mode

2018-11-19 Thread Eric Blake
From: Daniel P. Berrangé Add tests that validate it is possible to connect to an NBD server running TLS mode. Also test mis-matched TLS vs non-TLS connections correctly fail. Signed-off-by: Daniel P. Berrangé Message-Id: <20181116155325.22428-7-berra...@redhat.com> Reviewed-by: Eric Blake Test

[Qemu-devel] [PULL 08/12] tests: check if qemu-nbd is still alive before waiting

2018-11-19 Thread Eric Blake
From: Daniel P. Berrangé If the qemu-nbd UNIX socket has not shown up, the tests will sleep a bit and then check again repeatedly for up to 30 seconds. This is pointless if the qemu-nbd process has quit due to an error, so check whether the pid is still alive before waiting and retrying. Signed-

[Qemu-devel] [PULL 04/12] nbd: fix whitespace in server error message

2018-11-19 Thread Eric Blake
From: Daniel P. Berrangé A space was missing after the option number was printed: Option 0x8not permitted before TLS becomes Option 0x8 not permitted before TLS This fixes commit 3668328303429f3bc93ab3365c66331600b06a2d Author: Eric Blake Date: Fri Oct 14 13:33:09 2016 -0500

[Qemu-devel] [PULL 09/12] tests: add iotests helpers for dealing with TLS certificates

2018-11-19 Thread Eric Blake
From: Daniel P. Berrangé Add helpers to common.tls for creating TLS certificates for a CA, server and client. Signed-off-by: Daniel P. Berrangé Message-Id: <20181116155325.22428-6-berra...@redhat.com> Reviewed-by: Eric Blake [eblake: spelling and quoting touchups] Signed-off-by: Eric Blake --

[Qemu-devel] [PULL 12/12] iotests: Drop use of bash keyword 'function'

2018-11-19 Thread Eric Blake
Bash allows functions to be declared with or without the leading keyword 'function'; but including the keyword does not comply with POSIX syntax, and is confusing to ksh users where the use of the keyword changes the scoping rules for functions. Stick to the POSIX form through iotests. Done mecha

[Qemu-devel] [PULL 07/12] tests: pull qemu-nbd iotest helpers into common.nbd file

2018-11-19 Thread Eric Blake
From: Daniel P. Berrangé The helpers for starting/stopping qemu-nbd in 058 will be useful in other test cases, so move them into a common.nbd file. Signed-off-by: Daniel P. Berrangé Message-Id: <20181116155325.22428-4-berra...@redhat.com> Reviewed-by: Eric Blake [eblake: fix shell quoting] Sig

Re: [Qemu-devel] [PATCH v5 19/24] hw: acpi: Retrieve the PCI bus from AcpiPciHpState

2018-11-19 Thread Boeuf, Sebastien
On Mon, 2018-11-19 at 16:37 +0100, Igor Mammedov wrote: > On Fri, 16 Nov 2018 19:42:08 + > "Boeuf, Sebastien" wrote: > > > > > Hi Igor, > > > > On Fri, 2018-11-16 at 10:39 +0100, Igor Mammedov wrote: > > > > > > On Mon,  5 Nov 2018 02:40:42 +0100 > > > Samuel Ortiz wrote: > > >    > > > >

[Qemu-devel] [PULL 01/12] qemu-iotests: remove unused variable 'here'

2018-11-19 Thread Eric Blake
From: Mao Zhongyi Running git grep '\$here' tests/qemu-iotests has 0 hits, which means we are setting a variable that has no use. It appears that commit e8f8624d removed the last use. So execute the following cmd to remove all of the 'here=...' lines as dead code. sed -i '/^here=/d' $(git gre

[Qemu-devel] [PULL 11/12] iotests: Also test I/O over NBD TLS

2018-11-19 Thread Eric Blake
Enhance test 233 to also perform I/O beyond the initial handshake. Signed-off-by: Eric Blake Message-Id: <20181118022403.2211483-1-ebl...@redhat.com> Reviewed-by: Daniel P. Berrangé --- tests/qemu-iotests/233 | 12 +++- tests/qemu-iotests/233.out | 10 ++ 2 files changed, 21

Re: [Qemu-devel] [PULL 0/8] Monitor patches for 2018-10-30

2018-11-19 Thread Markus Armbruster
Peter Xu writes: > On Mon, Nov 19, 2018 at 02:17:27PM +0800, Peter Xu wrote: >> I reproduced the error with a FreeBSD guest and this change (which >> possibly can be squashed into "tests: qmp-test: add queue full test") >> worked for me: >> >> diff --git a/tests/qmp-test.c b/tests/qmp-test.c >>

Re: [Qemu-devel] [PATCH for-4.0 v2] virtio: Provide version-specific variants of virtio PCI devices

2018-11-19 Thread Michael S. Tsirkin
On Mon, Nov 19, 2018 at 11:41:05AM +0100, Cornelia Huck wrote: > On Fri, 16 Nov 2018 01:45:51 -0200 > Eduardo Habkost wrote: > > > On Thu, Nov 15, 2018 at 05:29:24PM +0100, Andrea Bolognani wrote: > > > > One thing that I'm very much not convinced about is the naming, > > > specifically leaving

Re: [Qemu-devel] [PULL 00/10] target-arm queue

2018-11-19 Thread Peter Maydell
ging > (2018-11-19 14:31:48 +) > > are available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20181119 > > for you to fetch changes up to a00d7f2048c2a1a6a4487ac195c804c78adcf60e: > > MAINTAINERS: list

Re: [Qemu-devel] [PATCH v5 00/24] ACPI reorganization for hardware-reduced API addition

2018-11-19 Thread Michael S. Tsirkin
On Mon, Nov 19, 2018 at 06:14:26PM +0100, Paolo Bonzini wrote: > On 19/11/18 16:31, Igor Mammedov wrote: > > I've tried to give suggestions how to restructure series > > on per patch basis. In my opinion it quite possible to split > > series in several smaller ones and it should really help with >

Re: [Qemu-devel] [PATCH] migration: savevm: consult migration blockers

2018-11-19 Thread Paolo Bonzini
On 16/11/18 18:12, Dr. David Alan Gilbert wrote: > * Paolo Bonzini (pbonz...@redhat.com) wrote: >> There is really no difference between live migration and savevm, except >> that savevm does not require bdrv_invalidate_cache to be implemented >> by all disks. However, it is unlikely that savevm is

Re: [Qemu-devel] [PATCH] target/i386: kvm: add VMX and SVM migration blockers

2018-11-19 Thread Paolo Bonzini
On 16/11/18 17:56, Dr. David Alan Gilbert wrote: > * Paolo Bonzini (pbonz...@redhat.com) wrote: >> Nested VMX and SVM do not support live migration yet. Add a blocker >> until that is worked out. >> >> Signed-off-by: Paolo Bonzini >> --- >> target/i386/kvm.c | 25 + >> 1

[Qemu-devel] [PATCH v2] target/i386: kvm: add VMX migration blocker

2018-11-19 Thread Paolo Bonzini
Nested VMX does not support live migration yet. Add a blocker until that is worked out. Nested SVM only does not support it, but unfortunately it is enabled by default for -cpu host so we cannot really disable it. Signed-off-by: Paolo Bonzini --- target/i386/kvm.c | 12 1 file cha

Re: [Qemu-devel] [PATCH v5 05/24] hw: acpi: Implement XSDT support for RSDP

2018-11-19 Thread Michael S. Tsirkin
On Thu, Nov 08, 2018 at 03:16:23PM +0100, Igor Mammedov wrote: > On Mon, 5 Nov 2018 02:40:28 +0100 > Samuel Ortiz wrote: > > > XSDT is the 64-bit version of the legacy ACPI RSDT (Root System > > Description Table). RSDT only allow for 32-bit addressses and have thus > > been deprecated. Since AC

Re: [Qemu-devel] [PATCH for-4.0 v2] virtio: Provide version-specific variants of virtio PCI devices

2018-11-19 Thread Cornelia Huck
On Mon, 19 Nov 2018 13:07:59 -0500 "Michael S. Tsirkin" wrote: > On Mon, Nov 19, 2018 at 11:41:05AM +0100, Cornelia Huck wrote: > > On Fri, 16 Nov 2018 01:45:51 -0200 > > Eduardo Habkost wrote: > > > > > On Thu, Nov 15, 2018 at 05:29:24PM +0100, Andrea Bolognani wrote: > > > > And once tha

Re: [Qemu-devel] 3.1.0-rc{0,1} doesn't start

2018-11-19 Thread Dr. David Alan Gilbert
* baldu...@units.it (baldu...@units.it) wrote: > hi > > thanks for taking the time to reply > > Dr. David Alan Gilbert writes: > > > I suspect that this might be some problem on my side, as I couldn't > > > find any similar report (apart some old (qemu-2.8.50) threads, that > > > didn't help) > >

Re: [Qemu-devel] SeaBIOS booting time optimization

2018-11-19 Thread Stefano Garzarella
On Mon, Nov 19, 2018 at 3:15 PM Gerd Hoffmann wrote: > On Mon, Nov 19, 2018 at 01:07:13PM +, Stefan Hajnoczi wrote: > > On Mon, Nov 19, 2018 at 11:42:28AM +0100, Stefano Garzarella wrote: > > > On Mon, Nov 19, 2018 at 9:49 AM Gerd Hoffmann > wrote: > > > > > > > Why at runtime? What is bad

Re: [Qemu-devel] [PATCH for-4.0 v2] virtio: Provide version-specific variants of virtio PCI devices

2018-11-19 Thread Michael S. Tsirkin
On Mon, Nov 19, 2018 at 07:32:38PM +0100, Cornelia Huck wrote: > On Mon, 19 Nov 2018 13:07:59 -0500 > "Michael S. Tsirkin" wrote: > > > On Mon, Nov 19, 2018 at 11:41:05AM +0100, Cornelia Huck wrote: > > > On Fri, 16 Nov 2018 01:45:51 -0200 > > > Eduardo Habkost wrote: > > > > > > > On Thu, No

Re: [Qemu-devel] [PATCH] 9p: take write lock on fid path updates

2018-11-19 Thread P J P
+-- On Thu, 15 Nov 2018, Greg Kurz wrote --+ | Recent commit 5b76ef50f62079a fixed a race where v9fs_co_open2() could | possibly overwrite a fid path with v9fs_path_copy() while it is being | accessed by some other thread, ie, use-after-free that can be detected | by ASAN with a custom 9p client. |

Re: [Qemu-devel] [PATCH] Acceptance test: add coverage tests for -smp option

2018-11-19 Thread Wainer dos Santos Moschetta
On 11/12/2018 02:31 PM, Eduardo Habkost wrote: On Fri, Nov 09, 2018 at 02:58:00PM -0500, Wainer dos Santos Moschetta wrote: This adds tests for SMP option, by passing -smp with various combinations of cpus, cores, threads, and sockets values it checks that invalid topologies are not accepted

Re: [Qemu-devel] 3.1.0-rc{0,1} doesn't start

2018-11-19 Thread balducci
> A colleague has confirmed this on his FX-8320 on Fedora 29 with the > virt-next repo; so it's nothing that's special about your machine; > it's 3.1 that really doesn't like the old AMDs. ouch! does this mean that I must stop upgrading qemu or do you think that some development work will be dire

Re: [Qemu-devel] 3.1.0-rc{0,1} doesn't start

2018-11-19 Thread Dr. David Alan Gilbert
* baldu...@units.it (baldu...@units.it) wrote: > > A colleague has confirmed this on his FX-8320 on Fedora 29 with the > > virt-next repo; so it's nothing that's special about your machine; > > it's 3.1 that really doesn't like the old AMDs. > > ouch! does this mean that I must stop upgrading qem

Re: [Qemu-devel] [PATCH for-4.0 v2] virtio: Provide version-specific variants of virtio PCI devices

2018-11-19 Thread Cornelia Huck
On Mon, 19 Nov 2018 13:42:58 -0500 "Michael S. Tsirkin" wrote: > On Mon, Nov 19, 2018 at 07:32:38PM +0100, Cornelia Huck wrote: > > On Mon, 19 Nov 2018 13:07:59 -0500 > > "Michael S. Tsirkin" wrote: > > > And I strongly believe command line users really really do not want all > > > this mess. E

Re: [Qemu-devel] [PATCH] Acceptance test: add coverage tests for -smp option

2018-11-19 Thread Eduardo Habkost
On Mon, Nov 19, 2018 at 04:48:00PM -0200, Wainer dos Santos Moschetta wrote: > On 11/12/2018 02:31 PM, Eduardo Habkost wrote: > > On Fri, Nov 09, 2018 at 02:58:00PM -0500, Wainer dos Santos Moschetta wrote: > > > This adds tests for SMP option, by passing -smp with > > > various combinations of cpu

Re: [Qemu-devel] [PATCH for-4.0 v2] virtio: Provide version-specific variants of virtio PCI devices

2018-11-19 Thread Michael S. Tsirkin
On Mon, Nov 19, 2018 at 07:56:38PM +0100, Cornelia Huck wrote: > On Mon, 19 Nov 2018 13:42:58 -0500 > "Michael S. Tsirkin" wrote: > > > On Mon, Nov 19, 2018 at 07:32:38PM +0100, Cornelia Huck wrote: > > > On Mon, 19 Nov 2018 13:07:59 -0500 > > > "Michael S. Tsirkin" wrote: > > > > > And I stron

Re: [Qemu-devel] [PATCH v1 6/9] qapi: rewrite string-input-visitor

2018-11-19 Thread Markus Armbruster
Copying Igor and Eduardo for a hostmem.c bug. Search for "core dumped". David Hildenbrand writes: >>> >>> Tests have to be fixed up: >>> - Two BUGs were hardcoded that are fixed now >>> - The string-input-visitor now actually returns a parsed list and not >>> an ordered set. >> >> I'd expect

Re: [Qemu-devel] 3.1.0-rc{0,1} doesn't start

2018-11-19 Thread Cole Robinson
On 11/19/2018 01:35 PM, Dr. David Alan Gilbert wrote: * baldu...@units.it (baldu...@units.it) wrote: hi thanks for taking the time to reply Dr. David Alan Gilbert writes: I suspect that this might be some problem on my side, as I couldn't find any similar report (apart some old (qemu-2.8.50)

<    1   2   3   >