Re: [Qemu-devel] [PATCH 0/5] Fix qemu-ga's behaviour on Windows

2017-07-22 Thread Sameeh Jubran
Ping. On Wed, Jul 5, 2017 at 10:54 AM, Sameeh Jubran wrote: > From: Sameeh Jubran > > This patch series fixes qemu-ga's main service behaviour on Windows > by listening to the virtio-serial device's events. > > For more info on why this series is needed checkout the commit message > of the thir

[Qemu-devel] [PATCH V2] vhost: fix a migration failed because of vhost region merge

2017-07-22 Thread Peng Hao
When a guest that has several hotplugged dimms is migrated, on destination it will fail to resume. Because regions on source are merged and on destination the order of realizing devices is different from on source with dimms, so when part of devices are realizd some region can not be merged.That ma

Re: [Qemu-devel] [PATCH] vhost: fix amigration failedbecause ofvhost region merge

2017-07-22 Thread peng.hao2
> On Sat, Jul 22, 2017 at 01:49:20PM +0800, peng.h...@zte.com.cn wrote: > > some regions can not merge when just part of devices have realized. > > > > when all devices are realized on destination, these regions can be merged > > again > > > > and the used slots can satisfy the vhost slot

Re: [Qemu-devel] [RFC PATCH v2 4/4] pci: enable RedHat PCI bridges to reserve additional buses on PCI init

2017-07-22 Thread Michael S. Tsirkin
On Sun, Jul 23, 2017 at 01:11:50AM +0300, Aleksandr Bezzubikov wrote: > In case of Red Hat PCI bridges reserve additional buses, which number is > provided > in a vendor-specific capability. > > Signed-off-by: Aleksandr Bezzubikov > --- > src/fw/pciinit.c | 14 -- > 1 file changed,

Re: [Qemu-devel] [RFC PATCH v2 3/4] pci: add QEMU-specific PCI capability structure

2017-07-22 Thread Michael S. Tsirkin
On Sun, Jul 23, 2017 at 01:11:49AM +0300, Aleksandr Bezzubikov wrote: > On PCI init PCI bridge devices may need some > extra info about bus number to reserve, IO, memory and > prefetchable memory limits. QEMU can provide this > with special vendor-specific PCI capability. > > This capability is in

Re: [Qemu-devel] [PATCH] vhost-user: fix watcher need be removed when vhost-user hotplug

2017-07-22 Thread Michael S. Tsirkin
On Sat, Jul 22, 2017 at 09:24:27AM +, Marc-André Lureau wrote: > > > On Sat, Jul 22, 2017 at 2:35 AM Michael S. Tsirkin wrote: > > On Fri, Jul 21, 2017 at 11:19:04AM +, Marc-André Lureau wrote: > > Hi > > > > On Fri, Jul 21, 2017 at 7:18 AM w00273186 > wrote: > > >

Re: [Qemu-devel] 答复: Re: 答复: Re: [PATCH] vhost: fix a migration failedbecause ofvhost region merge

2017-07-22 Thread Michael S. Tsirkin
On Sat, Jul 22, 2017 at 01:49:20PM +0800, peng.h...@zte.com.cn wrote: > some regions can not merge when just part of devices have realized. > > when all devices are realized on destination, these regions can be merged > again > > and the used slots can satisfy the vhost slot limit as on sourc

Re: [Qemu-devel] [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-22 Thread Michael S. Tsirkin
On Fri, Jul 14, 2017 at 03:12:43PM +0800, Wei Wang wrote: > On 07/14/2017 04:19 AM, Michael S. Tsirkin wrote: > > On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: > > > On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: > > > > So the way I see it, there are several issues: > > > > > > > >

[Qemu-devel] [RFC PATCH v2 5/6] hw/pci: add bus_reserve property to pcie-root-port

2017-07-22 Thread Aleksandr Bezzubikov
To enable hotplugging of a newly created pcie-pci-bridge, we need to tell firmware (SeaBIOS in this case) to reserve additional buses for pcie-root-port, that allows us to hotplug pcie-pci-bridge into this root port. The number of buses to reserve is provided to the device via a corresponding prop

[Qemu-devel] [RFC PATCH v2 6/6] hw/pci: add hint capabilty for additional bus reservation to pcie-root-port

2017-07-22 Thread Aleksandr Bezzubikov
Signed-off-by: Aleksandr Bezzubikov --- hw/pci-bridge/pcie_root_port.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/pci-bridge/pcie_root_port.c b/hw/pci-bridge/pcie_root_port.c index b0e49e1..ca92d85 100644 --- a/hw/pci-bridge/pcie_root_port.c +++ b/hw/pci-bridge/pcie_root_port.c @

[Qemu-devel] [RFC PATCH v2 4/6] hw/pci: introduce bridge-only vendor-specific capability to provide some hints to firmware

2017-07-22 Thread Aleksandr Bezzubikov
On PCI init PCI bridges may need some extra info about bus number to reserve, IO, memory and prefetchable memory limits. QEMU can provide this with special vendor-specific PCI capability. Sizes of limits match ones from PCI Type 1 Configuration Space Header, number of buses to reserve occupies onl

[Qemu-devel] [RFC PATCH v2 0/6] Generic PCIE-PCI Bridge

2017-07-22 Thread Aleksandr Bezzubikov
This series introduces a new device - generic PCI Express to PCI bridge, and also makes all necessary changes to enable hotplug of the bridge itself and any device into the bridge. Obvious reasons to remain RFC: 1. The new PCI capability: layout, creation interface. 2. Windows SHPC issue - devices

[Qemu-devel] [RFC PATCH v2 1/6] hw/pci: introduce pcie-pci-bridge device

2017-07-22 Thread Aleksandr Bezzubikov
Signed-off-by: Aleksandr Bezzubikov --- hw/pci-bridge/Makefile.objs | 2 +- hw/pci-bridge/pcie_pci_bridge.c | 151 include/hw/pci/pci.h| 1 + 3 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 hw/pci-bridge/pcie_pci_b

[Qemu-devel] [RFC PATCH v2 2/6] hw/i386: allow SHPC for Q35 machine

2017-07-22 Thread Aleksandr Bezzubikov
Unmask previously masked SHPC feature in _OSC method. Signed-off-by: Aleksandr Bezzubikov --- hw/i386/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 6b7bade..0d99585 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i38

[Qemu-devel] [RFC PATCH v2 3/6] hw/pci: enable SHPC for PCIE-PCI bridge

2017-07-22 Thread Aleksandr Bezzubikov
Signed-off-by: Aleksandr Bezzubikov --- hw/pci-bridge/pcie_pci_bridge.c | 63 - 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/hw/pci-bridge/pcie_pci_bridge.c b/hw/pci-bridge/pcie_pci_bridge.c index 0991a7b..38f665f 100644 --- a/hw/pci-bridge

[Qemu-devel] [RFC PATCH v2 3/4] pci: add QEMU-specific PCI capability structure

2017-07-22 Thread Aleksandr Bezzubikov
On PCI init PCI bridge devices may need some extra info about bus number to reserve, IO, memory and prefetchable memory limits. QEMU can provide this with special vendor-specific PCI capability. This capability is intended to be used only for Red Hat PCI bridges, i.e. QEMU cooperation. Sizes of l

[Qemu-devel] [RFC PATCH v2 4/4] pci: enable RedHat PCI bridges to reserve additional buses on PCI init

2017-07-22 Thread Aleksandr Bezzubikov
In case of Red Hat PCI bridges reserve additional buses, which number is provided in a vendor-specific capability. Signed-off-by: Aleksandr Bezzubikov --- src/fw/pciinit.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c in

[Qemu-devel] [RFC PATCH v2 0/4] Allow RedHat PCI bridges reserve more buses than necessary during init

2017-07-22 Thread Aleksandr Bezzubikov
Now PCI bridges get a bus range number on a system init, basing on currently plugged devices. That's why when one wants to hotplug another bridge, it needs his child bus, which the parent is unable to provide (speaking about virtual device). The suggested workaround is to have vendor-specific cap

[Qemu-devel] [RFC PATCH v2 1/4] pci: refactor pci_find_capapibilty to get bdf as the first argument instead of the whole pci_device

2017-07-22 Thread Aleksandr Bezzubikov
Refactor pci_find_capability function to get bdf instead of a whole pci_device* as the only necessary field for this function is still bdf. It greatly helps when we have bdf but not pci_device. Signed-off-by: Aleksandr Bezzubikov --- src/fw/pciinit.c| 4 ++-- src/hw/pcidevice.c | 12 +

[Qemu-devel] [RFC PATCH v2 2/4] pci: add RedHat vendor ID

2017-07-22 Thread Aleksandr Bezzubikov
Signed-off-by: Aleksandr Bezzubikov --- src/hw/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hw/pci_ids.h b/src/hw/pci_ids.h index 4ac73b4..db2e694 100644 --- a/src/hw/pci_ids.h +++ b/src/hw/pci_ids.h @@ -2263,6 +2263,8 @@ #define PCI_DEVICE_ID_KORENIX_JETCARDF00x16

Re: [Qemu-devel] KVM "fake DAX" flushing interface - discussion

2017-07-22 Thread Dan Williams
On Fri, Jul 21, 2017 at 8:58 AM, Stefan Hajnoczi wrote: > On Fri, Jul 21, 2017 at 09:29:15AM -0400, Pankaj Gupta wrote: >> >> > > A] Problems to solve: >> > > -- >> > > >> > > 1] We are considering two approaches for 'fake DAX flushing interface'. >> > > >> > > 1.1] fake dax with

Re: [Qemu-devel] [PATCH v14 33/34] target/arm: Split out thumb_tr_translate_insn

2017-07-22 Thread Richard Henderson
On 07/21/2017 02:35 PM, Emilio G. Cota wrote: static void arm_post_translate_insn(CPUARMState *env, DisasContext *dc) { +if (dc->condjmp && !dc->base.is_jmp) { +gen_set_label(dc->condlabel); +dc->condjmp = 0; +} + Thanks for the catch. I have merged the !dc->base.is

Re: [Qemu-devel] [PATCH v14 07/34] target/arm: Set is_jmp properly after single-stepping

2017-07-22 Thread Richard Henderson
On 07/21/2017 11:37 AM, Emilio G. Cota wrote: gen_exception_internal_insn(dc, 0, EXCP_DEBUG); +dc->is_jmp = DISAS_NORETURN; gen_exception_internal_insn already sets dc->is_jmp to DISAS_NORETURN, as per patch 04/34: @@ -304,7 +304,7 @@ static voi

Re: [Qemu-devel] [PATCH v14 03/34] target/i386: Use generic DISAS_* enumerators

2017-07-22 Thread Richard Henderson
On 07/21/2017 12:35 PM, Lluís Vilanova wrote: +#define DISAS_TOO_MANY 5 Why is this one not added as a generic define too (like DISAS_NORETURN in prev patch)? Because I use NORETURN in the arm cleanup, prior to conversion to the enum, whereas I do not use TOO_MANY outside the i386 port. I s

[Qemu-devel] [PATCH v5 4/4] sockets: Handle race condition between binds to the same port

2017-07-22 Thread Knut Omang
If an offset of ports is specified to the inet_listen_saddr function(), and two or more processes tries to bind from these ports at the same time, occasionally more than one process may be able to bind to the same port. The condition is detected by listen() but too late to avoid a failure. This fu

Re: [Qemu-devel] [PATCH] vhost-user: fix watcher need be removed when vhost-user hotplug

2017-07-22 Thread Marc-André Lureau
On Sat, Jul 22, 2017 at 2:35 AM Michael S. Tsirkin wrote: > On Fri, Jul 21, 2017 at 11:19:04AM +, Marc-André Lureau wrote: > > Hi > > > > On Fri, Jul 21, 2017 at 7:18 AM w00273186 > wrote: > > > > From: Yunjian Wang > > > > "nc" is freed after hotplug vhost-user, but the watcher don

Re: [Qemu-devel] [PATCH v14 32/34] target/arm: Move ss check to init_disas_context

2017-07-22 Thread Lluís Vilanova
Richard Henderson writes: > We can check for single-step just once. > Signed-off-by: Richard Henderson Reviewed-by: Lluís Vilanova > --- > target/arm/translate.c | 13 - > 1 file changed, 8 insertions(+), 5 deletions(-) > diff --git a/target/arm/translate.c b/target/arm/translat

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-iotests: add a "how to" to ./README

2017-07-22 Thread Manos Pitsidianakis
On Fri, Jul 21, 2017 at 10:34:16AM +0100, Stefan Hajnoczi wrote: There is not much getting started documentation for qemu-iotests. This patch explains how to create a new test and covers the overall testing approach. Cc: Ishani Chugh Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/READM

[Qemu-devel] [PATCH v5 1/4] tests: Add test-listen - a stress test for QEMU socket listen

2017-07-22 Thread Knut Omang
There's a potential race condition between multiple bind()'s attempting to bind to the same port, which occasionally allows more than one bind to succeed against the same port. When a subsequent listen() call is made with the same socket only one will succeed. The current QEMU code does however n

Re: [Qemu-devel] [PATCH 2/3] Unified Datagram Socket Transport - GRE support

2017-07-22 Thread Anton Ivanov
## If I read this right port is mandatory, correct? Okay, so it sounds like reusing InetSocket directly may not be possible. But there's still the interface question of whether we want dual 'ipv4' and 'ipv6' switches to allow finer-grain control over which (or both) families to be used. I

[Qemu-devel] [PATCH v5 3/4] sockets: factor out a new try_bind() function

2017-07-22 Thread Knut Omang
Another refactoring step to prepare for the problem exposed by the test-listen test. This time simplify and reorganize the IPv6 specific extra measures and move it out of the for loop to increase code readability. No semantic changes. Signed-off-by: Knut Omang --- util/qemu-sockets.c | 69 +

[Qemu-devel] [PATCH v5 2/4] sockets: factor out create_fast_reuse_socket

2017-07-22 Thread Knut Omang
First refactoring step to prepare for fixing the problem exposed with the test-listen test in the previous commit Signed-off-by: Knut Omang --- util/qemu-sockets.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/util/qemu-sockets.c b/util/qemu-socket

[Qemu-devel] [PATCH v5 0/4] Unit test+fix for problem with QEMU handling of multiple bind()s to the same port

2017-07-22 Thread Knut Omang
This series contains: * a unit test that exposes a race condition which causes QEMU to fail to find a port even when there is plenty of available ports. * a refactor of the qemu-sockets inet_listen_saddr() function to better handle this situation. Changes from v4: * Move the complexity of recr