Re: [Qemu-devel] [PATCH 1/2] virtio-input: use fixed device config space size

2015-06-16 Thread Michael S. Tsirkin
On Mon, Jun 15, 2015 at 02:53:08PM +0200, Gerd Hoffmann wrote: > virtio-input doesn't support legacy, so config spice doesn't live in IO > address space (on virtio-pci) and size is not something we have to worry > about. There is a full page (in mmio bar) available anyway. > > Don't try to size i

[Qemu-devel] [PULL v2 3/6] linux-user: Fix length handling in host_to_target_cmsg

2015-06-16 Thread riku . voipio
From: Peter Maydell The previous code for handling payload length when converting cmsg structures from host to target had a number of problems: * we required the msg->msg_controllen to declare the buffer to have enough space for final trailing padding (we were checking against CMSG_SPACE),

[Qemu-devel] [PULL v2 2/6] linux-user: Use abi_ulong for TARGET_ELF_PAGESTART

2015-06-16 Thread riku . voipio
From: Yongbok Kim TARGET_ELF_PAGESTART is required to use abi_ulong to correctly handle addresses for different target bits width. This patch fixes a problem when running a 64-bit user mode application on 32-bit host machines. Signed-off-by: Yongbok Kim Reviewed-by: Peter Maydell Signed-off-by

[Qemu-devel] [PULL v2 0/6] linux-user patches for 2.4 softfreeze

2015-06-16 Thread riku . voipio
iku.voipio/qemu.git tags/pull-linux-user-20150616 for you to fetch changes up to 45c874ebbae661238bfa3c0534480ebe2940b112: linux-user: ioctl() command type is int (2015-06-16 09:37:17 +0300) linux-user patches for 2.4 softfreeze s

[Qemu-devel] [PULL v2 1/6] linux-user: Allocate thunk size dynamically

2015-06-16 Thread riku . voipio
From: Alexander Graf We store all struct types in an array of static size without ever checking whether we overrun it. Of course some day someone (like me in another, ancient ALSA enabling patch set) will run into the limit without realizing it. So let's make the allocation dynamic. We already k

[Qemu-devel] [PULL v2 4/6] linux-user: use __get_user and __put_user in cmsg conversions

2015-06-16 Thread riku . voipio
From: Peter Maydell The target payloads in cmsg conversions may not have the alignment required by the host. Using the get_user and put_user functions is the easiest way to handle this and also do the byte-swapping we require. (Note that prior to this commit target_to_host_cmsg was incorrectly u

[Qemu-devel] [PULL v2 5/6] linux-user: fix the breakpoint inheritance in spawned threads

2015-06-16 Thread riku . voipio
From: Thierry Bultel When a thread is spawned, cpu_copy re-initializes the bp & wp lists of current thread, instead of the ones of the new thread. The effect is that breakpoints are no longer hit. Signed-off-by: Thierry Bultel Signed-off-by: Riku Voipio --- linux-user/main.c | 4 ++-- 1 file

[Qemu-devel] [PULL v2 6/6] linux-user: ioctl() command type is int

2015-06-16 Thread riku . voipio
From: Laurent Vivier When executing a 64bit target chroot on 64bit host, the ioctl() command can mismatch. It seems the previous commit doesn't solve the problem in my case: 9c6bf9c7 linux-user: Fix ioctl cmd type mismatch on 64-bit targets For example, a ppc64 chroot on an x86_64 host: b

Re: [Qemu-devel] CPU hot unplug support for x86_64

2015-06-16 Thread Fahri Cihan Demirci
On Mon, Jun 15, 2015 at 06:14:23PM +0200, Igor Mammedov wrote: > On Mon, 15 Jun 2015 15:34:24 +0300 > Fahri Cihan Demirci wrote: > > > On Mon, Jun 15, 2015 at 11:10:31AM +0200, Igor Mammedov wrote: > > > On Thu, 11 Jun 2015 10:39:05 +0300 > > > Fahri Cihan Demirci wrote: > > > > > > > On Tue, J

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-16 Thread Thibaut Collet
If my understanding is correct, on a resume operation, we have the following callback trace: 1. virtio_pci_restore function that calls all restore call back of virtio devices 2. virtnet_restore that calls try_fill_recv function for each virtual queues 3. try_fill_recv function kicks the virtual que

[Qemu-devel] [PATCH v2 3/5] cpus: Change tcg_cpu_exec arg to cpu, not env

2015-06-16 Thread Peter Crosthwaite
The sole caller of this function navigates the cpu->env_ptr only for this function to take it back the cpu pointer straight away. Pass in cpu pointer instead and grab the env pointer locally in the function. Removes a core code usage of ENV_GET_CPU(). Reviewed-by: Andreas Färber Signed-off-by: Pe

[Qemu-devel] [PATCH v2 0/5] More core code ENV_GET_CPU() removals

2015-06-16 Thread Peter Crosthwaite
Hi Andreas, Richard and all, I'm moving towards the goal of having no core code usages of ENV_GET_CPU. This has two advantages: 1: It means we are closer to common-obj'ing core code like exec.c, cpus.c and friends. 2: Multi arch is easier if ENV_GET_CPU() stays arch specific. It means I don't nee

[Qemu-devel] [PATCH v2 4/5] cpus: Change exec_init() arg to cpu, not env

2015-06-16 Thread Peter Crosthwaite
The callers (most of them in target-foo/cpu.c) to this function all have the cpu pointer handy. Just pass it to avoid an ENV_GET_CPU() from core code (in exec.c). Cc: Paolo Bonzini Cc: Richard Henderson Cc: Peter Maydell Cc: "Edgar E. Iglesias" Cc: "Andreas Färber" Cc: Eduardo Habkost Cc: Mi

[Qemu-devel] [PATCH v2 1/5] translate-all: Change tb_flush() env argument to cpu

2015-06-16 Thread Peter Crosthwaite
All of the core-code usages of this API have the cpu pointer handy so pass it in. There are only 3 architecture specific usages (2 of which are commented out) which can just use ENV_GET_CPU() locally to get the cpu pointer. The reduces core code usage of the CPU env, which brings us closer to commo

[Qemu-devel] [PATCH v2 2/5] gdbserver: _fork: Change fn to accept cpu instead of env

2015-06-16 Thread Peter Crosthwaite
All callsites to this function navigate the cpu->env_ptr only for the function to take the env ptr back to the original cpu ptr. Change the function to just pass in the CPU pointer instead. Removes a core code usage of ENV_GET_CPU (in gdbstub.c). Cc: Riku Voipio Reviewed-by: Andreas Färber Signe

[Qemu-devel] [PATCH v2 5/5] cpu-exec: Purge all uses of CPU_GET_ENV()

2015-06-16 Thread Peter Crosthwaite
Remove un-needed usages of CPU_GET_ENV() by converting the APIs to use CPUState pointers and retrieving the env_ptr as minimally needed. Scripted conversion for target-* change: for I in target-*/cpu.h; do sed -i \ 's/\(^int cpu_[^_]*_exec(\)[^ ][^ ]* \*s);$/\1CPUState *cpu);/' \ $I;

[Qemu-devel] [PATCH v3] QOM: object_property_add() performance improvement

2015-06-16 Thread Pavel Fedin
The function originally behaves very badly when adding properties with "[*]" suffix. Normally these are used for numbering IRQ pins. In order to find the correct starting number the function started from zero and checked for duplicates. This takes incredibly long time with large number of CPUs beca

Re: [Qemu-devel] [PULL 00/20] audio patch queue

2015-06-16 Thread Gerd Hoffmann
On Mo, 2015-06-15 at 18:05 +0100, Peter Maydell wrote: > On 15 June 2015 at 18:03, Peter Maydell wrote: > > On 15 June 2015 at 13:27, Gerd Hoffmann wrote: > >> > >> audio: remove obsolete backends (esd, fmod, winwave). > >> audio: s

[Qemu-devel] [PULL 1/5] virtio-gpu: fix error message

2015-06-16 Thread Gerd Hoffmann
iov limit was raised, but the error message still has the old limit ... Signed-off-by: Gerd Hoffmann --- hw/display/virtio-gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 4b10ca1..8c109b7 100644 --- a/hw/display/vi

[Qemu-devel] [PULL 4/5] virtio-vga: add '-vga virtio' support

2015-06-16 Thread Gerd Hoffmann
Some convinience fluff: Add support for '-vga virtio', also add virtio-vga to the list of vga cards so '-device virtio-vga' will turn off the default vga. Written by Dave Airlie and Gerd Hoffmann. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- hw/isa/isa-bus.c| 3 +++ hw

[Qemu-devel] [PULL 3/5] virtio-vga: add virtio gpu device with vga compatibility

2015-06-16 Thread Gerd Hoffmann
This patch adds a virtio-vga device. It is simliar to virtio-gpu-pci, but it also adds in vga compatibility, so guests without native virtio-gpu support can drive the device in vga mode. It is compatible with stdvga. Written by Dave Airlie and Gerd Hoffmann. Signed-off-by: Dave Airlie Signed-o

[Qemu-devel] [PULL 0/5] virtio-gpu: pci support bits and virtio-vga

2015-06-16 Thread Gerd Hoffmann
Hi, This pull request almost completes virtio-gpu support, by adding pci support (virtio-gpu-pci) and a variant with vga compatibility (virtio-vga). The remaining missing bit is the vgabios for virtio-vga, which will come with the seabios update later this week. please pull, Gerd The follow

[Qemu-devel] [PULL 2/5] virtio-gpu-pci: add virtio pci support

2015-06-16 Thread Gerd Hoffmann
This patch adds virtio-gpu-pci, which is the pci proxy for the virtio gpu device. With this patch in place virtio-gpu is functional. You need a linux guest with a virtio-gpu driver though, and output will appear pretty late in boot, once the kernel initialized drm and fbcon. Written by Dave Airl

[Qemu-devel] [PULL 5/5] virtio-vga: add vgabios configuration

2015-06-16 Thread Gerd Hoffmann
Add seavgabios configuration for virtio-vga, hook up the new vgabios in the makefiles. Signed-off-by: Gerd Hoffmann --- Makefile | 2 +- roms/Makefile | 2 +- roms/config.vga-virtio | 6 ++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 roms/confi

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-16 Thread Jason Wang
On 06/16/2015 03:24 PM, Thibaut Collet wrote: > If my understanding is correct, on a resume operation, we have the > following callback trace: > 1. virtio_pci_restore function that calls all restore call back of > virtio devices > 2. virtnet_restore that calls try_fill_recv function for each virt

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

2015-06-16 Thread Peter Maydell
On 15 June 2015 at 18:24, Peter Maydell wrote: > Mishmash of target-arm stuff; nothing earth-shaking. > > -- PMM > > > The following changes since commit b500e4db8e3e0b5f41a2dd14e2001200e5fc7d6b: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20150615-1' > into staging (2015-0

Re: [Qemu-devel] [SeaBIOS] qemu freeze, seabios release

2015-06-16 Thread Gerd Hoffmann
On Mo, 2015-06-15 at 10:36 -0400, Kevin O'Connor wrote: > On Mon, Jun 15, 2015 at 03:01:54PM +0200, Gerd Hoffmann wrote: > > On Fr, 2015-06-12 at 16:10 -0400, Kevin O'Connor wrote: > > > On Fri, Jun 12, 2015 at 09:00:19AM +0200, Gerd Hoffmann wrote: > > > > Hi, > > > > > > > > > should be cherry

[Qemu-devel] [RFC v10 03/19] pcie: modify the capability size assert

2015-06-16 Thread Chen Fan
because the capabilities need to be DWORD aligned, so the size should DWORD aligned too, and then the last capability size can to be the greatest 0x1000. e.g. if I have a capability starting 4 bytes from the end, 0xFFC. The max size should be 4 bytes, 0x1000 - 0xFFC, not 3 bytes, 0xFFF - 0xFFC. S

[Qemu-devel] [RFC v10 01/19] vfio: extract vfio_get_hot_reset_info as a single function

2015-06-16 Thread Chen Fan
the function is used to get affected devices by bus reset. so here extract it, and can used for aer soon. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 66 +++ 1 file changed, 48 insertions(+), 18 deletions(-) diff --git a/hw/vfio/pci.c b/hw

Re: [Qemu-devel] [RFC v9 14/18] vfio: improve vfio_pci_hot_reset to support more case

2015-06-16 Thread Chen Fan
On 06/10/2015 05:24 AM, Alex Williamson wrote: On Tue, 2015-06-09 at 11:37 +0800, Chen Fan wrote: the vfio_pci_hot_reset differentiate the single and multi in-used devices for reset. but sometimes we own the group without any devices, that also should support hot reset. Nope, did you try it?

[Qemu-devel] [RFC v10 00/19] vfio-pci: pass the aer error to guest

2015-06-16 Thread Chen Fan
For now, for vfio pci passthough devices when qemu receives an error from host aer report, there just terminate the guest, but usually user want to know what error occurred but stop the guest, so this patches add aer capability support for vfio device, and pass the error to guest, and have guest dr

[Qemu-devel] [RFC v10 02/19] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset

2015-06-16 Thread Chen Fan
squeeze out vfio_pci_do_hot_reset to do host bus reset when AER recovery. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 75 +++ 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 4a97ccc..e056c

[Qemu-devel] [RFC v10 08/19] vfio: add ref for group to support own affected groups

2015-06-16 Thread Chen Fan
Signed-off-by: Chen Fan --- hw/vfio/common.c | 14 +- include/hw/vfio/vfio-common.h | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index b1045da..67881f7 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -7

[Qemu-devel] [RFC v10 06/19] aer: impove pcie_aer_init to support vfio device

2015-06-16 Thread Chen Fan
pcie_aer_init was used to emulate an aer capability for pcie device, but for vfio device, the aer config space size is mutable and is not always equal to PCI_ERR_SIZEOF(0x48). it depends on where the TLP Prefix register required, so here we add a size argument. Signed-off-by: Chen Fan --- hw/pci

[Qemu-devel] [RFC v10 05/19] vfio: add pcie extanded capability support

2015-06-16 Thread Chen Fan
For vfio pcie device, we could expose the extended capability on PCIE bus. in order to avoid config space broken, we introduce a copy config for parsing extended caps. and rebuild the pcie extended config space. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 72 +

[Qemu-devel] [RFC v10 16/19] vfio: do hot bus reset when do virtual secondary bus reset

2015-06-16 Thread Chen Fan
when do virtual secondary bus reset, the vfio device under this bus need to do host bus reset to reset the device. so add this case. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index a86edab..5bdfa73 100644

[Qemu-devel] [RFC v10 07/19] vfio: add aer support for vfio device

2015-06-16 Thread Chen Fan
Calling pcie_aer_init to initilize aer related registers for vfio device, then reload physical related registers to expose device capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 89 +-- 1 file changed, 87 insertions(+), 2 deletions(

[Qemu-devel] [RFC v10 10/19] vfio: improve vfio_get_group to support adding as is NULL.

2015-06-16 Thread Chen Fan
Signed-off-by: Chen Fan --- hw/vfio/common.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index df3171d..15f19a2 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -808,11 +808,18 @@ VFIOGroup *vfio_get_group(int groupid, Add

[Qemu-devel] [RFC v10 04/19] vfio: make the 4 bytes aligned for capability size

2015-06-16 Thread Chen Fan
Signed-off-by: Chen Fan --- hw/vfio/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index e056c49..52e8ad4 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -2481,7 +2481,8 @@ static void vfio_unmap_bars(VFIOPCIDevice *vdev) */ static u

[Qemu-devel] [RFC v10 11/19] get all affected groups for each device support aer

2015-06-16 Thread Chen Fan
Add the affected groups without any devices into VM, it can keep the VM ownship the all groups. and use a reference to make the group visible. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 123 ++ 1 file changed, 116 insertions(+), 7 deletion

[Qemu-devel] [RFC v10 09/19] vfio: extract vfio_register_container_listener from vfio_connect_container

2015-06-16 Thread Chen Fan
Signed-off-by: Chen Fan --- hw/vfio/common.c | 60 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 67881f7..df3171d 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -631,6 +63

[Qemu-devel] [RFC v10 18/19] vfio-pci: pass the aer error to guest

2015-06-16 Thread Chen Fan
when the vfio device encounters an uncorrectable error in host, the vfio_pci driver will signal the eventfd registered by this vfio device, the results in the qemu eventfd handler getting invoked. this patch is to pass the error to guest and have the guest driver recover from the error. Signed-of

[Qemu-devel] [RFC v10 14/19] vfio: add sec_bus_reset notifier to notify physical bus reset is needed

2015-06-16 Thread Chen Fan
Signed-off-by: Chen Fan --- hw/vfio/pci.c | 81 +++ 1 file changed, 81 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 53fb544..fad6a80 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -156,6 +156,7 @@ typedef struct VFIOPCI

[Qemu-devel] [RFC v10 19/19] vfio: add 'aer' property to expose aercap

2015-06-16 Thread Chen Fan
add 'aer' property to let user able to decide whether expose the aer capability. by default we should disable aer feature, because it needs configuration restrictions. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c in

[Qemu-devel] [RFC v10 15/19] vfio: improve vfio_pci_hot_reset to support more case

2015-06-16 Thread Chen Fan
the vfio_pci_hot_reset differentiate the single and multi in-used devices for reset. but sometimes we own the group without any devices, that also should support hot reset. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/vfio/pci.c b/

[Qemu-devel] [RFC v10 12/19] vfio: add check host bus reset is support or not

2015-06-16 Thread Chen Fan
when init vfio device, we should test all the devices supported aer whether conflict with others. For each one, get the hot reset info for the affected device list. For each affected device, if it's attached to the VM, it needs to be on or below the bus of the target device. also, we should test a

[Qemu-devel] [PATCH v3] Enable vhost with vhostforce, vhost options for guests without MSI-X support

2015-06-16 Thread Pankaj Gupta
We use vhostforce to enable vhost even if Guests don't have MSI-X support and we fall back to QEMU virtio-net. This patch will enable vhost unconditionally whenever we have vhostforce='ON' or vhost='ON'. Initially, I wanted to remove vhostforce completely as an additional argument. But after d

[Qemu-devel] [RFC v10 13/19] pci: add bus reset_notifiers callbacks for host bus reset

2015-06-16 Thread Chen Fan
Particularly, For vfio devices, Once need to recovery devices by bus reset such as AER, we always need to reset the host bus to recovery the devices under the bus, so we need to add pci bus callbacks to specify to do host bus reset. Signed-off-by: Chen Fan --- hw/pci/pci.c | 16 +

[Qemu-devel] [RFC v10 17/19] pcie_aer: expose pcie_aer_msg() interface

2015-06-16 Thread Chen Fan
For vfio device, we need to propagate the aer error to Guest OS. we use the pcie_aer_msg() to send aer error to guest. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 2 +- include/hw/pci/pcie_aer.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci/pcie_aer.c b/

Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest

2015-06-16 Thread Thibaut Collet
For a live migration my understanding is there are a suspend resume operation: - The VM image is regularly copied from the old host to the new one (modified pages due to VM operation can be copied several time) - As soon as there are only few pages to copy the VM is suspended on the old host, the l

Re: [Qemu-devel] CPU hot unplug support for x86_64

2015-06-16 Thread Eduardo Otubo
On Tue, Jun 16, 2015 at 10=09=30AM +0300, Fahri Cihan Demirci wrote: > On Mon, Jun 15, 2015 at 06:14:23PM +0200, Igor Mammedov wrote: > > On Mon, 15 Jun 2015 15:34:24 +0300 > > Fahri Cihan Demirci wrote: > > > > > On Mon, Jun 15, 2015 at 11:10:31AM +0200, Igor Mammedov wrote: > > > > On Thu, 11 J

Re: [Qemu-devel] [RESEND PATCH v16 1/6] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2015-06-16 Thread Peter Maydell
On 15 June 2015 at 17:33, Eric Auger wrote: > This patch allows the instantiation of the vfio-calxeda-xgmac device > from the QEMU command line (-device vfio-calxeda-xgmac,host=""). > > A specialized device tree node is created for the guest, containing > compat, dma-coherent, reg and interrupts p

Re: [Qemu-devel] [PATCH 08/16] qapi: Fix to reject stray 't', 'f' and 'n'

2015-06-16 Thread Markus Armbruster
Eric Blake writes: > On 06/12/2015 08:51 AM, Markus Armbruster wrote: >> Screwed up in commit e53188a. >> > > And partly my fault for taking a patch written in python by someone > else, without being a python guru myself. :) > >> Signed-off-by: Markus Armbruster >> --- >> scripts/qapi.py | 26

Re: [Qemu-devel] [PATCH 11/16] tests/qapi-schema: New flat union array branch test case

2015-06-16 Thread Markus Armbruster
Eric Blake writes: > On 06/12/2015 08:51 AM, Markus Armbruster wrote: >> The new test demonstrates another generator crash. > > What, I missed one? An obscure one :) >> Signed-off-by: Markus Armbruster >> --- >> tests/Makefile | 3 ++- >> tests/qapi-schema/fla

Re: [Qemu-devel] [PATCH 3/3] block: Let bdrv_drain_all() to call aio_poll() for each AioContext

2015-06-16 Thread Stefan Hajnoczi
On Wed, Jun 10, 2015 at 02:38:17PM +0300, Alexander Yarygin wrote: > After the commit 9b536adc ("block: acquire AioContext in > bdrv_drain_all()") the aio_poll() function got called for every > BlockDriverState, in assumption that every device may have its own > AioContext. If we have thousands of

Re: [Qemu-devel] [PATCH 04/16] qapi: Eliminate superfluous QAPISchema attribute include_hist

2015-06-16 Thread Markus Armbruster
Eric Blake writes: > On 06/12/2015 08:51 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> scripts/qapi.py | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> > > Ah, I see - you're changing it from an object member to a local variable > (because it didn'

Re: [Qemu-devel] [RESEND PATCH v16 1/6] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2015-06-16 Thread Eric Auger
On 06/16/2015 10:29 AM, Peter Maydell wrote: > On 15 June 2015 at 17:33, Eric Auger wrote: >> This patch allows the instantiation of the vfio-calxeda-xgmac device >> from the QEMU command line (-device vfio-calxeda-xgmac,host=""). >> >> A specialized device tree node is created for the guest, cont

Re: [Qemu-devel] [PATCH v7 00/11] Support streaming to an intermediate layer

2015-06-16 Thread Alberto Garcia
Ping... https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg02580.html On Wed, May 13, 2015 at 04:27:30PM +0300, Alberto Garcia wrote: > v7: > - Rebased against the current master > - Updated bdrv_drain_all() to use the new block_job_next() API. > > v6: https://lists.gnu.org/archive/html/qe

Re: [Qemu-devel] [PATCH] vhost-user: part of virtio

2015-06-16 Thread Stefan Hajnoczi
On Mon, Jun 15, 2015 at 04:21:27PM +0200, Michael S. Tsirkin wrote: > vhost user is related to virtio, add it to the relevant entry. > > Signed-off-by: Michael S. Tsirkin > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) Acked-by: Stefan Hajnoczi pgpnIuLyXpyi2.pgp Description: PGP

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr_iommu: fix erroneous sanity check in h_put_tce_indirect()

2015-06-16 Thread Alexey Kardashevskiy
On 06/16/2015 03:28 AM, Greg Kurz wrote: According to PAPR+ 3.2.2.2, the TCE is implemented as follows: bits 0-51: real page number bits 52-61: reserved for future use bits 62-63: page protection (read-only, write-only, read-write) tce_list is not a TCE, it is "The lo

[Qemu-devel] [PATCH v1] pci: Don't register a specialized 'config_write' if default behavior is intended

2015-06-16 Thread Shmulik Ladkani
Few devices have their specialized 'config_write' methods which simply call 'pci_default_write_config' followed by a 'msix_write_config' or 'msi_write_config' calls, using exact same arguments. This is unnecessary as 'pci_default_write_config' already invokes 'msi_write_config' and 'msix_write_con

Re: [Qemu-devel] [RESEND PATCH v16 1/6] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2015-06-16 Thread Peter Maydell
On 16 June 2015 at 09:44, Eric Auger wrote: > On 06/16/2015 10:29 AM, Peter Maydell wrote: >> In virt.c the magic numbers in cells 0 and 2 have #defines >> (GIC_FDT_IRQ_TYPE_SPI and GIC_FDT_IRQ_FLAGS_LEVEL_HI). >> >> (1) maybe we should pull those out into a header so you can use them here > OK ma

Re: [Qemu-devel] [PATCH 3/3] block: Let bdrv_drain_all() to call aio_poll() for each AioContext

2015-06-16 Thread Alexander Yarygin
Stefan Hajnoczi writes: > On Wed, Jun 10, 2015 at 02:38:17PM +0300, Alexander Yarygin wrote: >> After the commit 9b536adc ("block: acquire AioContext in >> bdrv_drain_all()") the aio_poll() function got called for every >> BlockDriverState, in assumption that every device may have its own >> AioC

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr_iommu: fix erroneous sanity check in h_put_tce_indirect()

2015-06-16 Thread Greg Kurz
On Tue, 16 Jun 2015 18:53:51 +1000 Alexey Kardashevskiy wrote: > On 06/16/2015 03:28 AM, Greg Kurz wrote: > > According to PAPR+ 3.2.2.2, the TCE is implemented as follows: > > bits 0-51: real page number > > bits 52-61: reserved for future use > > bits 62-63: page protection (read-o

Re: [Qemu-devel] [PULL v2 0/6] linux-user patches for 2.4 softfreeze

2015-06-16 Thread Peter Maydell
re available in the git repository at: > > git://git.linaro.org/people/riku.voipio/qemu.git > tags/pull-linux-user-20150616 > > for you to fetch changes up to 45c874ebbae661238bfa3c0534480ebe2940b112: > > linux-user:

Re: [Qemu-devel] [PATCH] throttle: Check current timers before updating any_timer_armed[]

2015-06-16 Thread Stefan Hajnoczi
On Mon, Jun 15, 2015 at 06:41:15PM +0300, Alberto Garcia wrote: > Calling throttle_group_config() cancels all timers from a particular > BlockDriverState, so any_timer_armed[] should be updated accordingly. > > However, with the current code it may happen that a timer is armed in > a different Blo

[Qemu-devel] [PATCH] spapr_iommu: drop erroneous check in h_put_tce_indirect() and useless enum

2015-06-16 Thread Greg Kurz
The tce_list variable is not a TCE but the address to a TCE: we shouldn't clear permission bits as we do now. And this is dead code anyway since we check tce_list is 4K aligned a few lines above. While we're here, since we drop its last user, let's kill the sPAPRTCEAccess enum as well. This patch

Re: [Qemu-devel] [RFC v10 13/19] pci: add bus reset_notifiers callbacks for host bus reset

2015-06-16 Thread Michael S. Tsirkin
On Tue, Jun 16, 2015 at 04:10:57PM +0800, Chen Fan wrote: > Particularly, For vfio devices, Once need to recovery devices > by bus reset such as AER, we always need to reset the host bus > to recovery the devices under the bus, so we need to add pci bus > callbacks to specify to do host bus reset.

[Qemu-devel] [PATCH v7 03/42] Init page sizes in qtest

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" One of my patches used a loop that was based on host page size; it dies in qtest since qtest hadn't bothered init'ing it. Signed-off-by: Dr. David Alan Gilbert --- qtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qtest.c b/qtest.c index 05cefd2..8e1034

[Qemu-devel] [PATCH v7 04/42] qemu_ram_block_from_host

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Postcopy sends RAMBlock names and offsets over the wire (since it can't rely on the order of ramaddr being the same), and it starts out with HVA fault addresses from the kernel. qemu_ram_block_from_host translates a HVA into a RAMBlock, an offset in the RAMBlock an

[Qemu-devel] [PATCH v7 00/42] Postcopy implementation

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This is the 7th cut of my version of postcopy; it is designed for use with the Linux kernel additions posted by Andrea Arcangeli here: git clone --reference linux -b userfault21 git://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git Note this API is slightl

[Qemu-devel] [PATCH v7 02/42] Provide runtime Target page information

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The migration code generally is built target-independent, however there are a few places where knowing the target page size would avoid artificially moving stuff into migration/ram.c. Provide 'qemu_target_page_bits()' that returns TARGET_PAGE_BITS to other bits of

[Qemu-devel] [PATCH v7 05/42] Add qemu_get_buffer_less_copy to avoid copies some of the time

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" qemu_get_buffer always copies the data it reads to a users buffer, however in many cases the file buffer inside qemu_file could be given back to the caller, avoiding the copy. This isn't always possible depending on the size and alignment of the data. Thus 'qemu_g

[Qemu-devel] [PATCH v7 01/42] Start documenting how postcopy works.

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert --- docs/migration.txt | 167 + 1 file changed, 167 insertions(+) diff --git a/docs/migration.txt b/docs/migration.txt index f6df4be..b4b93d1 100644 --- a/docs/migration.txt

[Qemu-devel] [PATCH v7 09/42] Rename save_live_complete to save_live_complete_precopy

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" In postcopy we're going to need to perform the complete phase for postcopiable devices at a different point, start out by renaming all of the 'complete's to make the difference obvious. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah --- hw/ppc/spap

[Qemu-devel] [PATCH v7 10/42] Return path: Open a return path on QEMUFile for sockets

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Postcopy needs a method to send messages from the destination back to the source, this is the 'return path'. Wire it up for 'socket' QEMUFile's. Signed-off-by: Dr. David Alan Gilbert --- include/migration/qemu-file.h | 7 + migration/qemu-file-unix.c| 6

[Qemu-devel] [PATCH v7 07/42] ram_debug_dump_bitmap: Dump a migration bitmap as text

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Useful for debugging the migration bitmap and other bitmaps of the same format (including the sentmap in postcopy). The bitmap is printed to stderr. Lines that are all the expected value are excluded so the output can be quite compact for many bitmaps. Signed-off-

[Qemu-devel] [PATCH v7 13/42] Return path: Control commands

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add two src->dest commands: * OPEN_RETURN_PATH - To request that the destination open the return path * PING - Request an acknowledge from the destination Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson --- include/migration/migration.h |

[Qemu-devel] [PATCH v7 06/42] Add wrapper for setting blocking status on a QEMUFile

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a wrapper to change the blocking status on a QEMUFile rather than having to use qemu_set_block(qemu_get_fd(f)); it seems best to avoid exposing the fd since not all QEMUFile's really have one. With this wrapper we could move the implementation down to be differ

[Qemu-devel] [PATCH v7 14/42] Return path: Send responses from destination to source

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add migrate_send_rp_message to send a message from destination to source along the return path. (It uses a mutex to let it be called from multiple threads) Add migrate_send_rp_shut to send a 'shut' message to indicate the destination is finished with the RP. Ad

[Qemu-devel] [PATCH v7 08/42] migrate_init: Call from savevm

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Suspend to file is very much like a migrate, and it makes life easier if we have the Migration state available, so initialise it in the savevm.c code for suspending. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson --- include/migration/migration.

[Qemu-devel] [PATCH v7 22/42] migrate_start_postcopy: Command to trigger transition to postcopy

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Once postcopy is enabled (with migrate_set_capability), the migration will still start on precopy mode. To cause a transition into postcopy the: migrate_start_postcopy command must be issued. Postcopy will start sometime after this (when it's next checked in t

[Qemu-devel] [PATCH v7 16/42] Rework loadvm path for subloops

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Postcopy needs to have two migration streams loading concurrently; one from memory (with the device state) and the other from the fd with the memory transactions. Split the core of qemu_loadvm_state out so we can use it for both. Allow the inner loadvm loop to qui

[Qemu-devel] [PATCH v7 17/42] Add migration-capability boolean for postcopy-ram.

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The 'postcopy ram' capability allows postcopy migration of RAM; note that the migration starts off in precopy mode until postcopy mode is triggered (see the migrate_start_postcopy patch later in the series). Signed-off-by: Dr. David Alan Gilbert --- include/migra

[Qemu-devel] [PATCH v7 11/42] Return path: socket_writev_buffer: Block even on non-blocking fd's

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The destination sets the fd to non-blocking on incoming migrations; this also affects the return path from the destination, and thus we need to make sure we can safely write to the return path. Signed-off-by: Dr. David Alan Gilbert --- migration/qemu-file-unix.c

[Qemu-devel] [PATCH v7 23/42] MIGRATION_STATUS_POSTCOPY_ACTIVE: Add new migration state

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" 'MIGRATION_STATUS_POSTCOPY_ACTIVE' is entered after migrate_start_postcopy 'migration_postcopy_phase' is provided for other sections to know if they're in postcopy. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson Reviewed-by: Eric Blake --- inc

[Qemu-devel] [PATCH v7 19/42] MIG_CMD_PACKAGED: Send a packaged chunk of migration stream

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" MIG_CMD_PACKAGED is a migration command that wraps a chunk of migration stream inside a package whose length can be determined purely by reading its header. The destination guarantees that the whole MIG_CMD_PACKAGED is read off the stream prior to parsing the conte

[Qemu-devel] [PATCH v7 18/42] Add wrappers and handlers for sending/receiving the postcopy-ram migration messages.

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The state of the postcopy process is managed via a series of messages; * Add wrappers and handlers for sending/receiving these messages * Add state variable that track the current state of postcopy Signed-off-by: Dr. David Alan Gilbert --- include/migration

[Qemu-devel] [PATCH v7 25/42] Postcopy: Maintain sentmap and calculate discard

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Where postcopy is preceeded by a period of precopy, the destination will have received pages that may have been dirtied on the source after the page was sent. The destination must throw these pages away before starting it's CPUs. Maintain a 'sentmap' of pages that

[Qemu-devel] [PATCH v7 12/42] Migration commands

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Create QEMU_VM_COMMAND section type for sending commands from source to destination. These commands are not intended to convey guest state but to control the migration process. For use in postcopy. Signed-off-by: Dr. David Alan Gilbert --- include/migration/mig

[Qemu-devel] [PATCH v7 24/42] Add qemu_savevm_state_complete_postcopy

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add qemu_savevm_state_complete_postcopy to complement qemu_savevm_state_complete_precopy together with a new save_live_complete_postcopy method on devices. The save_live_complete_precopy method is called on all devices during a precopy migration, and all non-postco

[Qemu-devel] [PATCH v7 26/42] postcopy: Incoming initialisation

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson --- include/migration/migration.h| 3 + include/migration/postcopy-ram.h | 12 migration/postcopy-ram.c | 116 +++ migration/ram.c

[Qemu-devel] [PATCH v7 15/42] Return path: Source handling of return path

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Open a return path, and handle messages that are received upon it. Signed-off-by: Dr. David Alan Gilbert --- include/migration/migration.h | 8 ++ migration/migration.c | 177 +- trace-events | 1

[Qemu-devel] [PATCH v7 27/42] postcopy: ram_enable_notify to switch on userfault

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Mark the area of RAM as 'userfault' Start up a fault-thread to handle any userfaults we might receive from it (to be filled in later) Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson --- include/migration/migration.h| 3 ++ include/migration/

[Qemu-devel] [PATCH v7 30/42] Page request: Add MIG_RP_MSG_REQ_PAGES reverse command

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add MIG_RP_MSG_REQ_PAGES command on Return path for the postcopy destination to request a page from the source. Signed-off-by: Dr. David Alan Gilbert --- include/migration/migration.h | 4 +++ migration/migration.c | 70 ++

[Qemu-devel] [PATCH v7 20/42] Modify save_live_pending for postcopy

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Modify save_live_pending to return separate postcopiable and non-postcopiable counts. Signed-off-by: Dr. David Alan Gilbert --- include/migration/vmstate.h | 5 +++-- include/sysemu/sysemu.h | 4 +++- migration/block.c | 7 +-- migration/migr

[Qemu-devel] [PATCH v7 32/42] Page request: Consume pages off the post-copy queue

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When transmitting RAM pages, consume pages that have been queued by MIG_RPCOMM_REQPAGE commands and send them ahead of normal page scanning. Note: a) After a queued page the linear walk carries on from after the unqueued page; there is a reasonable chance that th

[Qemu-devel] [PATCH v7 31/42] Page request: Process incoming page request

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" On receiving MIG_RPCOMM_REQ_PAGES look up the address and queue the page. Signed-off-by: Dr. David Alan Gilbert --- include/migration/migration.h | 21 +++ migration/migration.c | 36 + migration/ram.c | 6

[Qemu-devel] [PATCH v7 21/42] postcopy: OS support test

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Provide a check to see if the OS we're running on has all the bits needed for postcopy. Creates postcopy-ram.c which will get most of the other helpers we need. Signed-off-by: Dr. David Alan Gilbert --- include/migration/postcopy-ram.h | 19 + migration/Mak

[Qemu-devel] [PATCH v7 33/42] postcopy_ram.c: place_page and helpers

2015-06-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" postcopy_place_page (etc) provide a way for postcopy to place a page into guests memory atomically (using the copy ioctl on the ufd). Signed-off-by: Dr. David Alan Gilbert --- include/migration/migration.h| 1 + include/migration/postcopy-ram.h | 16

  1   2   3   4   >