Re: [Qemu-devel] [PATCH] hw/vfio: improve error message when cannot init vfio event notifiers

2017-11-10 Thread Jim Quigley
On 16/10/2017 19:07, Michael Tokarev wrote: 10.10.2017 13:22, Jim Quigley wrote: More information is required to assist trouble-shooting when QEMU fails to initialise the event notifications for devices assigned with VFIO-PCI. Instead of supplying the user with a cryptic error number only,

Re: [Qemu-devel] [Qemu-block] [PATCH v2 4/5] iotests: Make 083 less flaky

2017-11-10 Thread Alberto Garcia
On Thu 09 Nov 2017 09:30:24 PM CET, Max Reitz wrote: > +echo > "$TEST_DIR/nbd-fault-injector.out" > $PYTHON nbd-fault-injector.py $extra_args "$nbd_addr" > "$TEST_DIR/nbd-fault-injector.conf" >"$TEST_DIR/nbd-fault-injector.out" 2>&1 & It seems that in this patch you're indenting

Re: [Qemu-devel] [RFC v2 3/6] possible_cpus: add CPUArchId::type field

2017-11-10 Thread David Hildenbrand
On 10.11.2017 11:14, Cornelia Huck wrote: > On Thu, 9 Nov 2017 18:02:35 -0200 > Eduardo Habkost wrote: > >> On Thu, Nov 09, 2017 at 05:58:03PM +1100, David Gibson wrote: >>> On Tue, Nov 07, 2017 at 04:04:04PM +0100, Cornelia Huck wrote: On Mon, 6 Nov 2017 16:02:16

Re: [Qemu-devel] [PATCH 2/7] s390x/pci: rework PCI STORE

2017-11-10 Thread Yi Min Zhao
在 2017/11/10 上午12:50, Cornelia Huck 写道: On Tue, 7 Nov 2017 18:24:34 +0100 Pierre Morel wrote: Enhance the fault detection, correction of the fault reporting. Signed-off-by: Pierre Morel Reviewed-by: Yi Min Zhao

Re: [Qemu-devel] [Qemu-block] [PATCH] block: all I/O should be completed before removing throttle timers.

2017-11-10 Thread Alberto Garcia
On Sat 21 Oct 2017 07:34:00 AM CEST, Zhengui Li wrote: > From: Zhengui > > In blk_remove_bs, all I/O should be completed before removing throttle > timers. If there has inflight I/O, removing throttle timers here will > cause the inflight I/O never return. > This patch add

[Qemu-devel] [PATCH v12 09/12] Move related hwpoison page function to accel/kvm/ folder

2017-11-10 Thread Dongjiu Geng
kvm_hwpoison_page_add() and kvm_unpoison_all() will be used by both X86 and ARM platforms, so move them to a common accel/kvm/ folder to avoid duplicate code. Signed-off-by: Dongjiu Geng --- Moving related hwpoison page function to accel/kvm folder is suggested here:

[Qemu-devel] [PATCH v12 03/12] docs: APEI GHES generation description

2017-11-10 Thread Dongjiu Geng
Add APEI/GHES description document Signed-off-by: Dongjiu Geng --- docs/specs/acpi_hest_ghes.txt | 98 +++ 1 file changed, 98 insertions(+) create mode 100644 docs/specs/acpi_hest_ghes.txt diff --git

[Qemu-devel] [PATCH v12 04/12] ACPI: enable APEI GHES in the configure file and build it

2017-11-10 Thread Dongjiu Geng
Add CONFIG_ACPI_APEI configuration in the arm-softmmu.mak and add build choice in the Makefile.objs. Signed-off-by: Dongjiu Geng --- default-configs/arm-softmmu.mak | 1 + hw/acpi/Makefile.objs | 1 + 2 files changed, 2 insertions(+) diff --git

Re: [Qemu-devel] [Qemu devel PATCH] MAINTAINERS: Add entries for Smartfusion2

2017-11-10 Thread Peter Maydell
On 10 November 2017 at 00:22, Philippe Mathieu-Daudé wrote: > On 11/09/2017 08:55 PM, Peter Maydell wrote: >> I don't in general expect to take pull requests from >> everybody listed as a maintainer in the MAINTAINERS file. >> That just means "I'm going to be reviewing and should

Re: [Qemu-devel] [Qemu devel PATCH] MAINTAINERS: Add entries for Smartfusion2

2017-11-10 Thread sundeep subbaraya
Hi Guys, On Fri, Nov 10, 2017 at 5:52 AM, Philippe Mathieu-Daudé wrote: > On 11/09/2017 08:55 PM, Peter Maydell wrote: > > On 9 November 2017 at 21:46, Philippe Mathieu-Daudé > wrote: > >> Hi Subbaraya, > >> > >> On 11/09/2017 09:02 AM, Subbaraya Sundeep

[Qemu-devel] [PATCH] fix scripts/update-linux-headers.sh here document

2017-11-10 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- scripts/update-linux-headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 8b847e279b..e2b159aa3d 100755 --- a/scripts/update-linux-headers.sh +++

Re: [Qemu-devel] [PATCH v6 0/6] block: Don't compare strings in bdrv_reopen_prepare()

2017-11-10 Thread Markus Armbruster
Max Reitz writes: > bdrv_reopen_prepare() assumes that all BDS options are strings, which is > not necessarily correct. This series introduces a new qobject_is_equal() > function which can be used to test whether any options have changed, > independently of their type. Series

[Qemu-devel] [PATCH v12 00/12] Add RAS virtualization support in QEMU

2017-11-10 Thread Dongjiu Geng
In the ARMv8 platform, the CPU error type are synchronous external abort(SEA) and SError Interrupt (SEI). If guest happen exception, sometimes guest itself do the recovery is better, because host does not know guest's detailed info. For example, if a guest user-space application happen

[Qemu-devel] [PATCH v12 02/12] ACPI: Add APEI GHES table generation and CPER record support

2017-11-10 Thread Dongjiu Geng
This implements APEI GHES Table generation when OS boot and record CPER in runtime via fw_cfg blobs. After a CPER info is recorded into guest memory, it need to inject whatever interrupt (or assert whatever GPIO line) to notify the guest. About the detailed design or implementation, please see the

[Qemu-devel] [PATCH v12 07/12] target-arm: handle SError interrupt exception from the guest OS

2017-11-10 Thread Dongjiu Geng
When guest OS happens SError interrupt(SEI), it will trap to host. Host check the Asynchronous Error Type(ESR_ELx.AET). If it the error has not been propagated and has not (yet) been architecturally consumed by the PE, it will return to use space with error code KVM_SEI_SEV_RECOVERABLE. Qemu

Re: [Qemu-devel] [PATCH v12 09/12] Move related hwpoison page function to accel/kvm/ folder

2017-11-10 Thread Paolo Bonzini
On 10/11/2017 20:19, Dongjiu Geng wrote: > +typedef struct HWPoisonPage { > +ram_addr_t ram_addr; > +QLIST_ENTRY(HWPoisonPage) list; > +} HWPoisonPage; > + Is this actually needed outside accel/kvm/kvm-all.c? Thanks, Paolo

Re: [Qemu-devel] [PATCH 6/7] s390x/pci: move the memory region write from pcistg

2017-11-10 Thread Yi Min Zhao
在 2017/11/10 上午3:23, Cornelia Huck 写道: On Tue, 7 Nov 2017 18:24:38 +0100 Pierre Morel wrote: Let's move the memory region write from pcistg into a dedicated function. This allows us to prepare a later patch searching for subregions inside of the memory region.

Re: [Qemu-devel] [PATCH V5] hw/pcie-pci-bridge: restrict to X86 and ARM

2017-11-10 Thread Cornelia Huck
On Thu, 9 Nov 2017 17:46:45 +0200 Marcel Apfelbaum wrote: > The PCIE-PCI bridge is specific to "pure" PCIe systems > (on QEMU we have X86 and ARM), it does not make sense to > have it in other archs. > > Reported-by: Thomas Huth > Signed-off-by: Marcel

Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache

2017-11-10 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > >>> > >>> I tried this approach and it didn't work. > >>> I think iothread sets u16.high flag after resetting it in > >>> cpu_handle_interrupt. > >> > >> But why is this a problem? The TB would exit immediately and go again > >> to

Re: [Qemu-devel] [PATCH v6 6/6] tests: Add check-qobject for equality tests

2017-11-10 Thread Markus Armbruster
Max Reitz writes: > Add a new test file (check-qobject.c) for unit tests that concern > QObjects as a whole. > > Its only purpose for now is to test the qobject_is_equal() function. > > Signed-off-by: Max Reitz Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [RFC v2 3/6] possible_cpus: add CPUArchId::type field

2017-11-10 Thread Cornelia Huck
On Thu, 9 Nov 2017 18:02:35 -0200 Eduardo Habkost wrote: > On Thu, Nov 09, 2017 at 05:58:03PM +1100, David Gibson wrote: > > On Tue, Nov 07, 2017 at 04:04:04PM +0100, Cornelia Huck wrote: > > > On Mon, 6 Nov 2017 16:02:16 -0200 > > > Eduardo Habkost

Re: [Qemu-devel] [RfC PATCH 5/6] vfio/display: adding region support

2017-11-10 Thread Gerd Hoffmann
Hi, > The overhead of a VFIORegion seems to be that we setup a MemoryRegion > for r/w access to the vfio region and overlap that with one or more > MemoryRegions for the mmap(s). That's a bit of structural overhead, > but we'd simply never map those into a guest visible address space. > OTOH,

[Qemu-devel] [PATCH v12 06/12] target-arm: kvm64: detect whether can set vsesr_el2

2017-11-10 Thread Dongjiu Geng
Check if kvm can support to set vsesr_el2 value for vcpu. When guest takes a virtual SError interrupt exception, this value will provides syndrome value reported into ESR_EL1 ISS filed. Signed-off-by: Dongjiu Geng Signed-off-by: Quanming Wu ---

Re: [Qemu-devel] [Qemu devel PATCH] MAINTAINERS: Add entries for Smartfusion2

2017-11-10 Thread Philippe Mathieu-Daudé
Hi Sundeep, Peter. > On 11/09/2017 08:55 PM, Peter Maydell wrote: > > On 9 November 2017 at 21:46, Philippe Mathieu-Daudé > wrote: > >> Hi Subbaraya, > >> > >> On 11/09/2017 09:02 AM, Subbaraya Sundeep wrote: > >>> add

Re: [Qemu-devel] [PATCH V4] hw/pci-host: Fix x86 Host Bridges 64bit PCI hole

2017-11-10 Thread Laszlo Ersek
Hi Marcel, On 11/09/17 18:27, Marcel Apfelbaum wrote: > Currently there is no MMIO range over 4G > reserved for PCI hotplug. Since the 32bit PCI hole > depends on the number of cold-plugged PCI devices > and other factors, it is very possible is too small > to hotplug PCI devices with large BARs.

Re: [Qemu-devel] Yet another git submodule rant

2017-11-10 Thread Daniel P. Berrange
On Fri, Nov 10, 2017 at 09:35:54PM +1100, Alexey Kardashevskiy wrote: > On 09/11/17 00:01, Daniel P. Berrange wrote: > > On Wed, Nov 08, 2017 at 09:26:01AM -0300, Philippe Mathieu-Daudé wrote: > >> On 11/08/2017 06:57 AM, Thomas Huth wrote: > >>> > >>> That automatic git submodule stuff now broke

[Qemu-devel] [PATCH v12 01/12] ACPI: add related GHES structures and macros definition

2017-11-10 Thread Dongjiu Geng
Add Generic Error Status Block structures and some macros definition, which refer to the ACPI 4.0 and ACPI 6.1. The HEST table generation and CPER record will use them. Signed-off-by: Dongjiu Geng --- It has been suggested to get rid of most structures that introduced in

[Qemu-devel] [PATCH v12 08/12] target-arm: kvm64: inject synchronous External Abort

2017-11-10 Thread Dongjiu Geng
Add synchronous external abort injection logic, setup spsr_elx, esr_elx, PSTATE, elr_elx etc, when switch to guest, guest will jump to the synchronous external abort vector table entry. The ESR_ELx.DFSC is set to Synchronous external abort(0x10), and ESR_ELx.FnV is set to not valid(0x1), which

[Qemu-devel] [PATCH v12 12/12] target-arm: kvm64: handle SIGBUS signal from kernel or KVM

2017-11-10 Thread Dongjiu Geng
Add SIGBUS signal handler. In this handler, it checks the SIGBUS type, translate the host VA which is delivered by host to guest PA, then fill this PA to CPER and fill the CPER to guest APEI GHES memory, finally notify guest according the SIGBUS type. There are two kinds of SIGBUS that QEMU need

Re: [Qemu-devel] [PATCH] target-i386: adds PV_TLB_FLUSH CPUID feature bit

2017-11-10 Thread Paolo Bonzini
On 10/11/2017 08:54, Wanpeng Li wrote: > 2017-11-10 15:45 GMT+08:00 Wanpeng Li : >> From: Wanpeng Li >> >> Adds PV_TLB_FLUSH CPUID feature bit. >> >> Cc: Paolo Bonzini >> Cc: Radim Krčmář >> Cc: Richard

Re: [Qemu-devel] [PATCH 6/7] s390x/pci: move the memory region write from pcistg

2017-11-10 Thread Cornelia Huck
On Fri, 10 Nov 2017 17:40:12 +0800 Yi Min Zhao wrote: > 在 2017/11/10 上午3:23, Cornelia Huck 写道: > > On Tue, 7 Nov 2017 18:24:38 +0100 > > Pierre Morel wrote: > > > >> Let's move the memory region write from pcistg into a dedicated > >>

Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache

2017-11-10 Thread Paolo Bonzini
On 10/11/2017 09:20, Pavel Dovgalyuk wrote: >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> On 03/11/2017 09:27, Pavel Dovgalyuk wrote: From: Paolo Bonzini [mailto:pbonz...@redhat.com] On 02/11/2017 12:33, Paolo Bonzini wrote: > On 02/11/2017 12:24, Pavel Dovgalyuk wrote:

Re: [Qemu-devel] [PATCH] build: Don't force preserving permissions on config-devices.mak.old

2017-11-10 Thread Markus Armbruster
Peter Maydell writes: > On 20 October 2017 at 20:08, Stefan Weil wrote: >> Am 20.10.2017 um 20:24 schrieb alind...@codeaurora.org: >>> On 2017-10-20 05:27, Peter Maydell wrote: Do we even need this code at all? As far as I can tell from the

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Stefan Hajnoczi
On Thu, Nov 09, 2017 at 09:43:15PM +0100, Max Reitz wrote: > Draining a BDS may lead to graph modifications, which in turn may result > in it and other BDS being stripped of their current references. If > bdrv_drain_all_begin() and bdrv_drain_all_end() do not keep strong > references themselves,

Re: [Qemu-devel] [RFC v3 00/27] QMP: out-of-band (OOB) execution support

2017-11-10 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [RFC v3 00/27] QMP: out-of-band (OOB) execution support Type: series Message-id: 20171106094643.14881-1-pet...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] Yet another git submodule rant

2017-11-10 Thread Alexey Kardashevskiy
On 09/11/17 00:01, Daniel P. Berrange wrote: > On Wed, Nov 08, 2017 at 09:26:01AM -0300, Philippe Mathieu-Daudé wrote: >> On 11/08/2017 06:57 AM, Thomas Huth wrote: >>> >>> That automatic git submodule stuff now broke my workflow again. I >>> usually keep the git repository on my laptop and then

Re: [Qemu-devel] QMP event missed during startup

2017-11-10 Thread Ross Lagerwall
On 11/09/2017 02:14 PM, Markus Armbruster wrote: "Dr. David Alan Gilbert" writes: * Ross Lagerwall (ross.lagerw...@citrix.com) wrote: Hi, I have found an issue where QEMU emits the RESUME event during startup when it starts VM execution, but it is not possible to

[Qemu-devel] [PATCH v12 10/12] ARM: ACPI: Add _E04 for hardware error device

2017-11-10 Thread Dongjiu Geng
In ARM platform we implements a notification of error events via a GPIO pin. In this case of GPIO-signaled events, an _AEI object lists the appropriate GPIO pin. GPIO pin 4 is used for hardware error device (PNP0C33), so add _E04 in ACPI DSDT table. When GPIO-pin 4 signaled a events, the guest

[Qemu-devel] [PATCH v12 05/12] linux-headers: sync against Linux v4.14-rc8

2017-11-10 Thread Dongjiu Geng
Signed-off-by: Dongjiu Geng --- Suggested by here: https://lkml.org/lkml/2017/9/5/575 --- include/standard-headers/asm-s390/kvm_virtio.h | 1 + include/standard-headers/asm-s390/virtio-ccw.h | 1 + include/standard-headers/asm-x86/hyperv.h | 1 +

[Qemu-devel] [PATCH v12 11/12] hw/arm/virt: Add RAS platform version for migration

2017-11-10 Thread Dongjiu Geng
Support this feature since version 2.10, disable it by default in the old version. Signed-off-by: Dongjiu Geng --- Adding platform version is suggested here: https://lkml.org/lkml/2017/8/25/821 --- hw/arm/virt-acpi-build.c | 14 +- hw/arm/virt.c|

Re: [Qemu-devel] [Qemu-block] [PATCH] block: all I/O should be completed before removing throttle timers.

2017-11-10 Thread Alberto Garcia
On Sat 21 Oct 2017 07:34:00 AM CEST, Zhengui Li wrote: > From: Zhengui > > In blk_remove_bs, all I/O should be completed before removing throttle > timers. If there has inflight I/O, removing throttle timers here will > cause the inflight I/O never return. > This patch add

Re: [Qemu-devel] [RFC v2 3/6] possible_cpus: add CPUArchId::type field

2017-11-10 Thread David Hildenbrand
On 10.11.2017 13:58, Eduardo Habkost wrote: > On Fri, Nov 10, 2017 at 01:34:42PM +0100, David Hildenbrand wrote: >> On 10.11.2017 11:14, Cornelia Huck wrote: >>> On Thu, 9 Nov 2017 18:02:35 -0200 >>> Eduardo Habkost wrote: >>> On Thu, Nov 09, 2017 at 05:58:03PM +1100,

[Qemu-devel] [PULL 3/3] vmsvga: use ARRAY_SIZE macro

2017-11-10 Thread Gerd Hoffmann
From: Philippe Mathieu-Daudé Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170718061005.29518-23-f4...@amsat.org> Signed-off-by: Gerd Hoffmann ---

[Qemu-devel] [PULL 0/3] Vga 20171110 patches

2017-11-10 Thread Gerd Hoffmann
The following changes since commit b0fbe46ad82982b289a44ee2495b59b0bad8a842: Update version for v2.11.0-rc0 release (2017-11-07 16:05:28 +) are available in the git repository at: git://git.kraxel.org/qemu tags/vga-20171110-pull-request for you to fetch changes up

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Fam Zheng
On Fri, 11/10 14:17, Kevin Wolf wrote: > Am 10.11.2017 um 03:45 hat Fam Zheng geschrieben: > > On Thu, 11/09 21:43, Max Reitz wrote: > > > Draining a BDS may lead to graph modifications, which in turn may result > > > in it and other BDS being stripped of their current references. If > > >

[Qemu-devel] [PULL 2/2] ui: use QEMU_IS_ALIGNED macro

2017-11-10 Thread Gerd Hoffmann
From: Philippe Mathieu-Daudé Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170718061005.29518-9-f4...@amsat.org> Signed-off-by: Gerd Hoffmann ---

[Qemu-devel] [PULL 0/2] Ui 20171110 patches

2017-11-10 Thread Gerd Hoffmann
The following changes since commit b0fbe46ad82982b289a44ee2495b59b0bad8a842: Update version for v2.11.0-rc0 release (2017-11-07 16:05:28 +) are available in the git repository at: git://git.kraxel.org/qemu tags/ui-20171110-pull-request for you to fetch changes up

[Qemu-devel] [PATCH v3 10/13] tpm: Introduce condition in TPM backend for notification

2017-11-10 Thread Stefan Berger
TPM backends will suspend independently of the frontends. Also here we need to be able to wait for the TPM command to have been completely processed. Signed-off-by: Stefan Berger --- backends/tpm.c | 19 +++ include/sysemu/tpm_backend.h

Re: [Qemu-devel] [PATCH v3 0/6] Convert to realize and improve error handling

2017-11-10 Thread Kevin Wolf
Am 19.09.2017 um 01:59 hat John Snow geschrieben: > On 09/18/2017 10:05 AM, Mao Zhongyi wrote: > > This series mainly implements the conversions of ide, floppy and nvme > > device to realize. Add some error handling messages and remove the local > > variable local_err, use errp to propagate the

[Qemu-devel] [PULL 2/3] vga: fix region checks in wraparound case

2017-11-10 Thread Gerd Hoffmann
Cc: "Dr. David Alan Gilbert" Signed-off-by: Gerd Hoffmann Reviewed-by: Dr. David Alan Gilbert Message-id: 20171030102830.4469-1-kra...@redhat.com --- hw/display/vga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [Qemu-devel] [Qemu devel PATCH] MAINTAINERS: Add entries for Smartfusion2

2017-11-10 Thread Philippe Mathieu-Daudé
On 11/10/2017 09:56 AM, Peter Maydell wrote: > On 10 November 2017 at 00:22, Philippe Mathieu-Daudé wrote: >> On 11/09/2017 08:55 PM, Peter Maydell wrote: >>> I don't in general expect to take pull requests from >>> everybody listed as a maintainer in the MAINTAINERS file. >>>

[Qemu-devel] [PULL 2/2] docker: correctly escape $BACKEND in the help output

2017-11-10 Thread Fam Zheng
From: Philippe Mathieu-Daudé In Makefiles the $ must be escaped as $$ in shell uses. Since 8a2390a4f47: $ make docker [...] NETWORK=1Enable virtual network interface with default backend. NETWORK=ACKEND Enable virtual network interface with

Re: [Qemu-devel] Yet another git submodule rant

2017-11-10 Thread Alexey Kardashevskiy
On 10/11/17 21:41, Daniel P. Berrange wrote: > On Fri, Nov 10, 2017 at 09:35:54PM +1100, Alexey Kardashevskiy wrote: >> On 09/11/17 00:01, Daniel P. Berrange wrote: >>> On Wed, Nov 08, 2017 at 09:26:01AM -0300, Philippe Mathieu-Daudé wrote: On 11/08/2017 06:57 AM, Thomas Huth wrote: >

Re: [Qemu-devel] Yet another git submodule rant

2017-11-10 Thread Peter Maydell
On 10 November 2017 at 13:46, Alexey Kardashevskiy wrote: > And it will still be > better than changing the $SRC_PATH when a user specifically asked not to do > that by calling "./configure --source-path='. I'm not terribly happy with the submodule stuff either, but that

[Qemu-devel] [PATCH v4] throttle-groups: drain before detaching ThrottleState

2017-11-10 Thread Stefan Hajnoczi
I/O requests hang after stop/cont commands at least since QEMU 2.10.0 with -drive iops=100: (guest)$ dd if=/dev/zero of=/dev/vdb oflag=direct count=1000 (qemu) stop (qemu) cont ...I/O is stuck... This happens because blk_set_aio_context() detaches the ThrottleState while requests may

[Qemu-devel] [PATCH for-2.12 v3 08/11] spapr: introduce a XICSFabric irq_is_lsi() operation

2017-11-10 Thread Cédric Le Goater
It will be used later on to distinguish the allocation of an LSI interrupt from an MSI and also to reduce the use of the ICSIRQState array of the ICSState object, which is on our way to introduce XIVE. The 'irq' parameter continues to refer to the global IRQ number space. On PowerNV, only the

[Qemu-devel] [PATCH for-2.12 v3 04/11] spapr: move current IRQ allocation under the machine

2017-11-10 Thread Cédric Le Goater
Use the new XICSFabric operations to handle the IRQ number allocation directly under the machine. These changes only move code and adapt it to take into account the new API which uses IRQ numbers. On PowerNV, only provide a basic irq_test() operation. For the moment, there is no need for more.

Re: [Qemu-devel] [PATCH] fix scripts/update-linux-headers.sh here document

2017-11-10 Thread Stefan Hajnoczi
On Fri, Nov 10, 2017 at 10:03:54AM +0100, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > scripts/update-linux-headers.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP

Re: [Qemu-devel] [Qemu-block] [PATCH] block: all I/O should be completed before removing throttle timers.

2017-11-10 Thread Stefan Hajnoczi
On Sat, Oct 21, 2017 at 01:34:00PM +0800, Zhengui Li wrote: > From: Zhengui > > In blk_remove_bs, all I/O should be completed before removing throttle > timers. If there has inflight I/O, removing throttle timers here will > cause the inflight I/O never return. > This patch

[Qemu-devel] [PULL 1/2] docker: Improved image checksum

2017-11-10 Thread Fam Zheng
When a base image locally defined by QEMU, such as in the debian images, is updated, the dockerfile checksum mechanism in docker.py still skips updating the derived image, because it only looks at the literal content of the dockerfile, without considering changes to the base image. For example we

Re: [Qemu-devel] [Qemu-block] [PATCH v2] throttle: fix a qemu crash problem when calling blk_delete

2017-11-10 Thread Alberto Garcia
On Thu 09 Nov 2017 06:12:10 PM CET, Stefan Hajnoczi wrote: >> diff --git a/block/block-backend.c b/block/block-backend.c >> index 45d9101..39c7cca 100644 >> --- a/block/block-backend.c >> +++ b/block/block-backend.c >> @@ -341,7 +341,7 @@ static void blk_delete(BlockBackend *blk) >>

[Qemu-devel] [PATCH v3 13/13] tpm_tis: extend TPM TIS with state migration support

2017-11-10 Thread Stefan Berger
Extend the TPM TIS interface with state migration support. We need to synchronize with the backend thread to make sure that a command being processed by the external TPM emulator has completed and its response been received. In case the bottom half did not run, we run the function it is supposed

[Qemu-devel] [PATCH v3 06/13] tpm_tis: move r/w_offsets to TPMState

2017-11-10 Thread Stefan Berger
Now that we have a single buffer, we also only need a single set of read/write offsets into that buffer. This works since only one locality can be active. Signed-off-by: Stefan Berger --- hw/tpm/tpm_tis.c | 57 +++-

Re: [Qemu-devel] Yet another git submodule rant

2017-11-10 Thread Daniel P. Berrange
On Sat, Nov 11, 2017 at 12:46:36AM +1100, Alexey Kardashevskiy wrote: > On 10/11/17 21:41, Daniel P. Berrange wrote: > > On Fri, Nov 10, 2017 at 09:35:54PM +1100, Alexey Kardashevskiy wrote: > >> On 09/11/17 00:01, Daniel P. Berrange wrote: > >>> On Wed, Nov 08, 2017 at 09:26:01AM -0300, Philippe

[Qemu-devel] [PATCH for-2.12 v3 09/11] spapr: split the IRQ number space for LSI interrupts

2017-11-10 Thread Cédric Le Goater
The type of an interrupt, MSI or LSI, is stored under the flag attribute of the ICSIRQState array. To reduce the use of this array and consequently of the ICSState object (This is needed to introduce the new XIVE model), we choose to split the IRQ number space of the machine in two: first the LSIs

Re: [Qemu-devel] [v21 RESEND 0/2] virtio-crypto: virtio crypto device specification

2017-11-10 Thread Stefan Hajnoczi
On Mon, Nov 06, 2017 at 10:39:24AM +, Gonglei (Arei) wrote: > Hi guys, > > What a long time iteration it is. > > Hoping this is the final version if no big arguments exist as > discussed with Stefan at KVM Forum 2017 this October. People > can submit patches to fix some grammar issues or

Re: [Qemu-devel] NBD BLOCK_STATUS

2017-11-10 Thread Eric Blake
On 11/09/2017 06:42 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi! > > Interesting fact: list/set_meta_context options are per-export, > so, in the server we should keep context selection per client per export. > > And it is possible for client to set contexts for one export and than > proceed >

Re: [Qemu-devel] [PULL 0/3] ppc-for-2.11 queue 20171108

2017-11-10 Thread Peter Maydell
On 8 November 2017 at 08:12, David Gibson wrote: > The following changes since commit b0fbe46ad82982b289a44ee2495b59b0bad8a842: > > Update version for v2.11.0-rc0 release (2017-11-07 16:05:28 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Kevin Wolf
Am 10.11.2017 um 16:23 hat Max Reitz geschrieben: > On 2017-11-10 14:32, Fam Zheng wrote: > > On Fri, 11/10 14:17, Kevin Wolf wrote: > >> Do you actually need to keep references to all BDSes in the whole list > >> while using the iterator or would it be enough to just keep a reference > >> to the

Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache

2017-11-10 Thread Paolo Bonzini
On 10/11/2017 13:29, Pavel Dovgalyuk wrote: >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > > I tried this approach and it didn't work. > I think iothread sets u16.high flag after resetting it in > cpu_handle_interrupt. But why is this a problem? The TB would exit

[Qemu-devel] [PULL 1/2] ui: fix dcl unregister

2017-11-10 Thread Gerd Hoffmann
register checks for dcl->ds being NULL, to avoid registering the same dcl twice. Therefore dcl->ds must be cleared on unregister, otherwise un-registering and re-registering doesn't work. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1510809 Signed-off-by: Gerd Hoffmann

[Qemu-devel] [PATCH v3 08/13] tpm: Implement tpm_sized_buffer_reset

2017-11-10 Thread Stefan Berger
Move the definition of TPMSizedBuffer out of tpm_tis.c into tpm_util.h and implement tpm_sized_buffer_reset() for the following patches to use. Signed-off-by: Stefan Berger --- hw/tpm/tpm_tis.c | 5 - hw/tpm/tpm_util.c | 7 +++ hw/tpm/tpm_util.h | 7 +++

[Qemu-devel] [PATCH v3 09/13] tpm: Introduce condition to notify waiters of completed command

2017-11-10 Thread Stefan Berger
Introduce a lock and a condition to notify anyone waiting for the completion of the execution of a TPM command by the backend (thread). The backend uses the condition to signal anyone waiting for command completion. We need to place the condition in two locations: one is invoked by the backend

[Qemu-devel] [PATCH for-2.12 v3 07/11] spapr: introduce an 'irq_base' number

2017-11-10 Thread Cédric Le Goater
'irq_base' is a base IRQ number which lets us allocate only the subset of the IRQ numbers used on the sPAPR platform. It is sync with the ICSState 'offset' attribute and this is slightly redundant. We could also choose to waste some extra bytes (512) and allocate the whole number space. To be

[Qemu-devel] [PATCH for-2.12 v3 10/11] sparp: merge ics_set_irq_type() in irq_alloc_block() operation

2017-11-10 Thread Cédric Le Goater
Setting the XICS_FLAGS_IRQ_LSI (or XICS_FLAGS_IRQ_MSI) for older pseries machines can now be done directly under the irq_alloc_block() operation. Signed-off-by: Cédric Le Goater --- hw/intc/xics.c| 8 hw/intc/xics_spapr.c | 7 +-- hw/ppc/pnv_psi.c |

Re: [Qemu-devel] [PATCH] virtio: fix descriptor counting in virtqueue_pop

2017-11-10 Thread Stefan Hajnoczi
On Thu, Oct 05, 2017 at 08:03:35PM +0200, Alexandre DERUMIER wrote: > Hi, > > has somebody reviewed this patch ? > > I'm also able de reproduce the vm crash like the proxmox user. > This patch is fixing it for me too. This patch should go through Michael Tsirkin's tree. I have pinged him

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Max Reitz
On 2017-11-10 17:05, Kevin Wolf wrote: > Am 10.11.2017 um 16:23 hat Max Reitz geschrieben: >> On 2017-11-10 14:32, Fam Zheng wrote: >>> On Fri, 11/10 14:17, Kevin Wolf wrote: Do you actually need to keep references to all BDSes in the whole list while using the iterator or would it be

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Kevin Wolf
Am 10.11.2017 um 03:45 hat Fam Zheng geschrieben: > On Thu, 11/09 21:43, Max Reitz wrote: > > Draining a BDS may lead to graph modifications, which in turn may result > > in it and other BDS being stripped of their current references. If > > bdrv_drain_all_begin() and bdrv_drain_all_end() do not

[Qemu-devel] [PULL 0/2] Docker patches

2017-11-10 Thread Fam Zheng
The following changes since commit b0fbe46ad82982b289a44ee2495b59b0bad8a842: Update version for v2.11.0-rc0 release (2017-11-07 16:05:28 +) are available in the git repository at: git://github.com/famz/qemu.git tags/docker-pull-request for you to fetch changes up to

[Qemu-devel] [PATCH v3 07/13] tpm_tis: merge r/w_offset into rw_offset

2017-11-10 Thread Stefan Berger
We can now merge the r_offset and w_offset into a single rw_offset. This is possible since when the offset is used for writing in RECEPTION state then reads are ignore. Conversly, when the offset is used for reading when in COMPLETION state, then writes are ignored. Signed-off-by: Stefan Berger

[Qemu-devel] [PATCH v3 05/13] tpm_tis: merge read and write buffer into single buffer

2017-11-10 Thread Stefan Berger
Since we can only be in read or write mode, we can merge the buffers into a single buffer. Signed-off-by: Stefan Berger --- hw/tpm/tpm_tis.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/hw/tpm/tpm_tis.c

[Qemu-devel] [PATCH for-2.12 v3 00/11] spapr: introduce an IRQ allocator at the machine level

2017-11-10 Thread Cédric Le Goater
Hello, Currently, the ICSState 'ics' object of the sPAPR machine acts as the global interrupt source handler and also as the IRQ number allocator for the machine. Some IRQ numbers are allocated very early in the machine initialization sequence to populate the device tree, and this is a problem to

[Qemu-devel] [PATCH for-2.12 v3 02/11] ppc/xics: remove useless if condition

2017-11-10 Thread Cédric Le Goater
The previous code section uses a 'first < 0' test and returns. Therefore, there is no need to test the 'first' variable against '>= 0' afterwards. Signed-off-by: Cédric Le Goater --- hw/intc/xics_spapr.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Max Reitz
On 2017-11-10 14:32, Fam Zheng wrote: > On Fri, 11/10 14:17, Kevin Wolf wrote: >> Am 10.11.2017 um 03:45 hat Fam Zheng geschrieben: >>> On Thu, 11/09 21:43, Max Reitz wrote: Draining a BDS may lead to graph modifications, which in turn may result in it and other BDS being stripped of

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Fam Zheng
On Fri, 11/10 16:23, Max Reitz wrote: > But bdrv_unref() is safe only in the main loop. Without having checked, > I'm not sure whether all callers of bdrv_next() are running in the main > loop. They must be. The reasoning is simple: 1) one needs to acquire the ctx of all the BDSes for safe

Re: [Qemu-devel] [Qemu-block] [PATCH v2 4/5] iotests: Make 083 less flaky

2017-11-10 Thread Alberto Garcia
On Fri 10 Nov 2017 04:18:15 PM CET, Max Reitz wrote: > On 2017-11-10 11:02, Alberto Garcia wrote: >> On Thu 09 Nov 2017 09:30:24 PM CET, Max Reitz wrote: >>> +echo > "$TEST_DIR/nbd-fault-injector.out" >>> $PYTHON nbd-fault-injector.py $extra_args "$nbd_addr" >>>

Re: [Qemu-devel] [Qemu-arm] [PATCH] highbank: validate register offset before access

2017-11-10 Thread Philippe Mathieu-Daudé
Hi Prasad, Moguofang. On 11/09/2017 08:58 AM, P J P wrote: > From: Prasad J Pandit > > An 'offset' parameter sent to highbank register r/w functions > could be greater than number(NUM_REGS=0x200) of hb registers, > leading to an OOB access issue. Add check to avoid it. >

[Qemu-devel] [PATCH v3 04/13] tpm_tis: move buffers from localities into common location

2017-11-10 Thread Stefan Berger
One read buffer and one write buffer is sufficient for all localities. The localities cannot all be active at the same time, and only the active locality can use the r/w buffers. Inactive localities will require the COMMAND_READY flag to be set on the STS register to move to the READY state, which

[Qemu-devel] [PATCH v3 01/13] tpm_tis: convert uint32_t to size_t

2017-11-10 Thread Stefan Berger
Signed-off-by: Stefan Berger --- hw/tpm/tpm_tis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index dd43630..69fe531 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm/tpm_tis.c @@ -974,7 +974,7 @@ static const

[Qemu-devel] [PATCH v3 00/13] tpm: Extend TPM with state migration support (not 2.11)

2017-11-10 Thread Stefan Berger
This set of patches implements support for migrating the state of the external 'swtpm' TPM emulator as well as that of the emulated device interfaces. I have primarily tested this with the TIS and TPM 1.2 so far, but it also seems to work with TPM 2. The TIS is simplified first by reducing the

[Qemu-devel] [Bug 1713825] Re: Booting Windows 2016 with qxl video crashes qemu

2017-11-10 Thread Thomas Huth
** Changed in: qemu Status: Incomplete => New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1713825 Title: Booting Windows 2016 with qxl video crashes qemu Status in QEMU: New Bug

[Qemu-devel] [PATCH v3 02/13] tpm_tis: limit size of buffer from backend

2017-11-10 Thread Stefan Berger
This is a preparatory patch for the subsequent ones where we get rid of the flexibility of supporting any kind of buffer size that the backend may support. We keep the size at 4096, which is also the size the external emulator supports. So, limit the size of the buffer we can support and pass it

[Qemu-devel] [PATCH v3 11/13] tpm: implement tpm_backend_wait_cmd_completed

2017-11-10 Thread Stefan Berger
Implement tpm_backend_wait_cmd_completed to synchronize with the backend (thread) for the completion of a command. Signed-off-by: Stefan Berger --- backends/tpm.c | 10 ++ include/sysemu/tpm_backend.h | 8 2 files changed, 18

[Qemu-devel] [PATCH v3 12/13] tpm: extend TPM emulator with state migration support

2017-11-10 Thread Stefan Berger
Extend the TPM emulator backend device with state migration support. The external TPM emulator 'swtpm' provides a protocol over its control channel to retrieve its state blobs. We implement functions for getting and setting the different state blobs. Since we have an external TPM emulator, we

Re: [Qemu-devel] [Qemu-block] [PATCH v2 4/5] iotests: Make 083 less flaky

2017-11-10 Thread Max Reitz
On 2017-11-10 11:02, Alberto Garcia wrote: > On Thu 09 Nov 2017 09:30:24 PM CET, Max Reitz wrote: >> +echo > "$TEST_DIR/nbd-fault-injector.out" >> $PYTHON nbd-fault-injector.py $extra_args "$nbd_addr" >> "$TEST_DIR/nbd-fault-injector.conf" >"$TEST_DIR/nbd-fault-injector.out" 2>&1 >>

[Qemu-devel] [PATCH for-2.12 v3 05/11] spapr: introduce an IRQ allocator using a bitmap

2017-11-10 Thread Cédric Le Goater
Let's define a new set of XICSFabric IRQ operations for the latest pseries machine. These simply use a a bitmap 'irq_map' as a IRQ number allocator. The previous pseries machines keep the old set of IRQ operations using the ICSIRQState array. Signed-off-by: Cédric Le Goater ---

[Qemu-devel] [PATCH for-2.12 v3 11/11] spapr: use sPAPRMachineState in spapr_ics_ prototypes

2017-11-10 Thread Cédric Le Goater
The routines manipulating the IRQ numbers for the sPAPR machine do not have any relation with the ICSState anymore. So use a sPAPRMachineState parameter in their prototype and prefix them with spapr_irq_. Signed-off-by: Cédric Le Goater --- hw/intc/xics_spapr.c | 30

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Max Reitz
On 2017-11-10 10:19, Stefan Hajnoczi wrote: > On Thu, Nov 09, 2017 at 09:43:15PM +0100, Max Reitz wrote: >> Draining a BDS may lead to graph modifications, which in turn may result >> in it and other BDS being stripped of their current references. If >> bdrv_drain_all_begin() and

Re: [Qemu-devel] [PATCH] fix scripts/update-linux-headers.sh here document

2017-11-10 Thread Roman Kagan
On Fri, Nov 10, 2017 at 10:03:54AM +0100, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > scripts/update-linux-headers.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh >

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Max Reitz
On 2017-11-10 17:22, Kevin Wolf wrote: > Am 10.11.2017 um 17:13 hat Max Reitz geschrieben: >> On 2017-11-10 17:05, Kevin Wolf wrote: >>> Am 10.11.2017 um 16:23 hat Max Reitz geschrieben: On 2017-11-10 14:32, Fam Zheng wrote: > On Fri, 11/10 14:17, Kevin Wolf wrote: >> Do you actually

  1   2   3   >