[Qemu-devel] [PATCH v12 07/15] vfio: add aer support for vfio device

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com 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 chen.fan.f...@cn.fujitsu.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com

[Qemu-devel] [PATCH v12 01/15] vfio: extract vfio_get_hot_reset_info as a single function

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com 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 chen.fan.f...@cn.fujitsu.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- hw/vfio/pci.c | 65

[Qemu-devel] [PATCH v12 15/15] vfio: add 'aer' property to expose aercap

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com 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 chen.fan.f...@cn.fujitsu.com Signed-off-by: Chen Hanxiao

[Qemu-devel] [PATCH v12 09/15] pci: add bus reset_notifiers callbacks for host bus reset

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com 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

Re: [Qemu-devel] [PATCH v9 0/4] remove icc bus/bridge

2015-07-15 Thread Zhu Guihua
ping... On 07/03/2015 05:38 PM, Zhu Guihua wrote: ICC Bus was used for providing a hotpluggable bus for APIC and CPU, but now we use HotplugHandler to make hotplug. So ICC Bus is unnecessary. This code has passed the new pc-cpu-test. And I have tested with kvm along with kernel_irqchip=on/off,

Re: [Qemu-devel] [RFC PATCH qemu v3 2/4] vfio: Use different page size for different IOMMU types

2015-07-15 Thread Alex Williamson
On Thu, 2015-07-16 at 11:26 +1000, Alexey Kardashevskiy wrote: On 07/16/2015 04:26 AM, Alex Williamson wrote: On Tue, 2015-07-14 at 22:21 +1000, Alexey Kardashevskiy wrote: The existing memory listener is called on RAM or PCI address space which implies potentially different page size.

[Qemu-devel] [PATCH v12 00/15] vfio-pci: pass the aer error to guest

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com For now, when qemu receives an error from host aer report by vfio pci passthough devices, qemu just terminate the guest. Usually user want to know what error occurred rather than stop the guest. This patches add aer capability support for vfio device,

[Qemu-devel] memory hotplug fails with mem-merge option

2015-07-15 Thread Bharata B Rao
Hi, When I use -machine pc,mem-merge=off|on -m 1G,slots=4,maxmem=2G, adding memory-backend-ram object fails like below. Same failure is seen with -machine pseries,mem-merge=on|off. (qemu) object_add memory-backend-ram,id=ram0,size=1G qemu-system-x86_64: util/qemu-option.c:388:

Re: [Qemu-devel] [PATCH v2 for-2.4 12/12] axienet: Flush queued packets when rx is done

2015-07-15 Thread Fam Zheng
On Thu, 07/16 10:58, Jason Wang wrote: On 07/15/2015 06:19 PM, Fam Zheng wrote: eth_can_rx checks s-rxsize and returns false if it is non-zero. Because of the .can_receive semantics change, this will make the incoming queue disabled by peer, until it is explicitly flushed. So we should

[Qemu-devel] [PATCH 1/2] vfio/pci: Fix RTL8168 NIC quirks

2015-07-15 Thread Alex Williamson
The RTL8168 quirk correctly describes using bit 31 as a signal to mark a latch/completion, but the code mistakenly uses bit 28. This causes the Realtek driver to spin on this register for quite a while, 20k cycles on Windows 7 v7.092 driver. Then it gets frustrated and tries to set the bit

[Qemu-devel] [PATCH 0/2] vfio/pci: RTL8168 quirk fix cleanup

2015-07-15 Thread Alex Williamson
A small patch for stable plus a bigger patch to make tracing of this quirk useful and restructure and comment the read/write accessors. Thanks, Alex --- Alex Williamson (2): vfio/pci: Fix RTL8168 NIC quirks vfio/pci: Cleanup RTL8168 quirk and tracing hw/vfio/pci.c | 90

[Qemu-devel] [PATCH 2/2] vfio/pci: Cleanup RTL8168 quirk and tracing

2015-07-15 Thread Alex Williamson
There's quite a bit of cleanup that can be done to the RTL8168 quirk, as well as the tracing to prevent a spew of uninteresting accesses for anything else the driver might choose to use the window registers for besides the MSI-X table. There should be no functional change, but it's now possible

Re: [Qemu-devel] [PATCH v2 for-2.4 00/12] hw/net: Fix .can_receive() for NICs

2015-07-15 Thread Jason Wang
On 07/15/2015 06:19 PM, Fam Zheng wrote: v2: Don't use BH in patches 6 and 12. [Jason] Add Stefan's reviewed-by in all others. Drop trace point in patch 8 and move function body upward. [Michael] Since a90a742 tap: Drop tap_can_send, all nics that returns false from .can_receive()

Re: [Qemu-devel] [PATCH v3 for-2.4] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Jason Wang
On 07/15/2015 05:20 PM, Wen Congyang wrote: commit da51a335 adds all queues in .realize(). But if the guest doesn't support multiqueue, we forget to remove them. And we cannot handle the ctrl vq corretly. The guest will hang. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- Acked-by:

[Qemu-devel] [PATCH v12 05/15] vfio: add pcie extanded capability support

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com 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

[Qemu-devel] [PATCH v12 13/15] pcie_aer: expose pcie_aer_msg() interface

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com 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 chen.fan.f...@cn.fujitsu.com Reviewed-by: Marcel Apfelbaum mar...@redhat.com Signed-off-by: Chen Hanxiao

[Qemu-devel] [PATCH v12 11/15] vfio: modify vfio_pci_hot_reset to support bus reset

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com the vfio_pci_hot_reset differentiate the single and multi in-used devices for reset. but in multi case, when some dependent devices are not assigned to VM, the devices can not be recovered by driver. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com

[Qemu-devel] [PATCH v12 03/15] pcie: modify the capability size assert

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com Device's Offset and size can reach PCIE_CONFIG_SPACE_SIZE, fix the corresponding assert. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Reviewed-by: Marcel Apfelbaum mar...@redhat.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com ---

[Qemu-devel] [PATCH v12 02/15] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com squeeze out vfio_pci_do_hot_reset to do host bus reset when AER recovery. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- hw/vfio/pci.c | 75

[Qemu-devel] [PATCH v12 04/15] vfio: make the 4 bytes aligned for capability size

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com this function search the capability from the end, the last size should 0x100 - pos, not 0xff - pos. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- hw/vfio/pci.c | 3 ++- 1 file changed,

Re: [Qemu-devel] [PATCH v12 00/15] vfio-pci: pass the aer error to guest

2015-07-15 Thread Alex Williamson
On Thu, 2015-07-16 at 12:00 +0800, Chen Hanxiao wrote: From: Chen Fan chen.fan.f...@cn.fujitsu.com For now, when qemu receives an error from host aer report by vfio pci passthough devices, qemu just terminate the guest. Usually user want to know what error occurred rather than stop the

Re: [Qemu-devel] [PATCH] AioContext: fix broken ctx-dispatching optimization

2015-07-15 Thread Fam Zheng
On Wed, 07/15 19:13, Paolo Bonzini wrote: This patch rewrites the ctx-dispatching optimization I lost track, but what was the justification of this optimization? Anyway, awesome debugging and explanations! Fam

Re: [Qemu-devel] [PATCH v2 for-2.4 12/12] axienet: Flush queued packets when rx is done

2015-07-15 Thread Jason Wang
On 07/15/2015 06:19 PM, Fam Zheng wrote: eth_can_rx checks s-rxsize and returns false if it is non-zero. Because of the .can_receive semantics change, this will make the incoming queue disabled by peer, until it is explicitly flushed. So we should flush it when s-rxsize is becoming zero.

Re: [Qemu-devel] [RFC PATCH qemu v3 2/4] vfio: Use different page size for different IOMMU types

2015-07-15 Thread Alexey Kardashevskiy
On 07/16/2015 12:51 PM, Alex Williamson wrote: On Thu, 2015-07-16 at 11:26 +1000, Alexey Kardashevskiy wrote: On 07/16/2015 04:26 AM, Alex Williamson wrote: On Tue, 2015-07-14 at 22:21 +1000, Alexey Kardashevskiy wrote: The existing memory listener is called on RAM or PCI address space which

[Qemu-devel] [PATCH v12 12/15] vfio: do hot bus reset when do virtual secondary bus reset

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com 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 chen.fan.f...@cn.fujitsu.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com ---

[Qemu-devel] [PATCH v12 14/15] vfio-pci: pass the aer error to guest

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com 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

[Qemu-devel] [PATCH v12 08/15] vfio: add check host bus reset is support or not

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com when init vfio devices done, 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, all should attach to the VM and on the same slot. also,

[Qemu-devel] [PATCH v12 10/15] vfio: add sec_bus_reset notifier to notify physical bus reset is needed

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- hw/vfio/pci.c | 83 +++ 1 file changed, 83 insertions(+) diff --git a/hw/vfio/pci.c

[Qemu-devel] [PATCH v12 06/15] aer: impove pcie_aer_init to support vfio device

2015-07-15 Thread Chen Hanxiao
From: Chen Fan chen.fan.f...@cn.fujitsu.com 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

Re: [Qemu-devel] [RFC PATCH qemu v3 4/4] vfio: spapr: Add SPAPR IOMMU v2 support (DMA memory preregistering)

2015-07-15 Thread David Gibson
On Tue, Jul 14, 2015 at 10:21:54PM +1000, Alexey Kardashevskiy wrote: This makes use of the new memory registering feature. The idea is to provide the userspace ability to notify the host kernel about pages which are going to be used for DMA. Having this information, the host kernel can pin

Re: [Qemu-devel] [PATCH v2 for-2.4 12/12] axienet: Flush queued packets when rx is done

2015-07-15 Thread Jason Wang
On 07/16/2015 11:32 AM, Fam Zheng wrote: On Thu, 07/16 10:58, Jason Wang wrote: On 07/15/2015 06:19 PM, Fam Zheng wrote: eth_can_rx checks s-rxsize and returns false if it is non-zero. Because of the .can_receive semantics change, this will make the incoming queue disabled by peer, until

Re: [Qemu-devel] [PATCH V2] virtio-net: unbreak any layout

2015-07-15 Thread Jason Wang
On 07/15/2015 07:23 PM, Michael S. Tsirkin wrote: On Wed, Jul 15, 2015 at 03:56:07PM +0800, Jason Wang wrote: Commit 032a74a1c0fcdd5fd1c69e56126b4c857ee36611 (virtio-net: byteswap virtio-net header) breaks any layout by requiring out_sg[0].iov_len = n-guest_hdr_len. Fixing this by copying

Re: [Qemu-devel] [RFC PATCH qemu v3 1/4] memory: Add reporting of supported page sizes

2015-07-15 Thread Alexey Kardashevskiy
On 07/16/2015 04:26 AM, Alex Williamson wrote: On Tue, 2015-07-14 at 22:21 +1000, Alexey Kardashevskiy wrote: Every IOMMU has some granularity which MemoryRegionIOMMUOps::translate uses when translating, however this information is not available outside the translate context for various checks.

Re: [Qemu-devel] RFC: guest-side retrieval of fw_cfg file

2015-07-15 Thread Gabriel L. Somlo
On Wed, Jul 15, 2015 at 07:24:33PM +0300, Michael S. Tsirkin wrote: On Wed, Jul 15, 2015 at 06:01:42PM +0200, Igor Mammedov wrote: On Wed, 15 Jul 2015 17:08:27 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Jul 13, 2015 at 04:09:37PM -0400, Gabriel L. Somlo wrote: Hi,

Re: [Qemu-devel] [RFC PATCH qemu v3 2/4] vfio: Use different page size for different IOMMU types

2015-07-15 Thread Alexey Kardashevskiy
On 07/16/2015 04:26 AM, Alex Williamson wrote: On Tue, 2015-07-14 at 22:21 +1000, Alexey Kardashevskiy wrote: The existing memory listener is called on RAM or PCI address space which implies potentially different page size. Instead of guessing what page size should be used, this replaces a

Re: [Qemu-devel] [PATCH] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Jason Wang
On 07/15/2015 03:13 PM, Wen Congyang wrote: On 07/15/2015 02:59 PM, Jason Wang wrote: On 07/15/2015 02:23 PM, Wen Congyang wrote: commit da51a335 adds all queues in .realize(). But if the guest doesn't support multiqueue, we forget to remove them. And we cannot handle the ctrl vq corretly.

Re: [Qemu-devel] [PATCH v12 07/19] i.MX: Fix Coding style for CCM emulator

2015-07-15 Thread Peter Crosthwaite
On Fri, Jul 10, 2015 at 4:31 PM, Jean-Christophe Dubois j...@tribudubois.net wrote: Signed-off-by: Jean-Christophe Dubois j...@tribudubois.net Reviewed-by: Peter Crosthwaite crosthwaite.pe...@gmail.com --- Changes since v1: * not present on v1 Changes since v2: * not present on

Re: [Qemu-devel] [PATCH] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Wen Congyang
On 07/15/2015 03:41 PM, Jason Wang wrote: On 07/15/2015 03:13 PM, Wen Congyang wrote: On 07/15/2015 02:59 PM, Jason Wang wrote: On 07/15/2015 02:23 PM, Wen Congyang wrote: commit da51a335 adds all queues in .realize(). But if the guest doesn't support multiqueue, we forget to remove

Re: [Qemu-devel] [PATCH] migration: We also want to store the global state for savevm

2015-07-15 Thread Amit Shah
On (Wed) 15 Jul 2015 [10:19:04], Juan Quintela wrote: Amit Shah amit.s...@redhat.com wrote: On (Wed) 15 Jul 2015 [09:56:22], Juan Quintela wrote: Previous commit only stored a valid state for migration. It stored the empty string for savevm. Now, we are also storing the current state for

Re: [Qemu-devel] [RFC PATCH V2 2/3] cpus: add a tcg_executing flag.

2015-07-15 Thread Frederic Konrad
On 13/07/2015 17:56, Alex Bennée wrote: fred.kon...@greensocs.com writes: From: KONRAD Frederic fred.kon...@greensocs.com This flag indicates if the VCPU is currently executing TCG code. Signed-off-by: KONRAD Frederic fred.kon...@greensocs.com Changes V1 - V2: * do both tcg_executing = 0

Re: [Qemu-devel] [PATCH for-2.4 00/12] hw/net: Fix .can_receive() for NICs

2015-07-15 Thread Stefan Hajnoczi
On Tue, Jul 14, 2015 at 04:34:19PM +0800, Wen Congyang wrote: On 07/14/2015 03:53 PM, Fam Zheng wrote: Since a90a742 tap: Drop tap_can_send, all nics that returns false from .can_receive() are required to explicitly flush the incoming queue when the status of it is changing back to true,

Re: [Qemu-devel] [Qemu-block][PATCH]block/truncate: qcow2’s resize status is not showed to

2015-07-15 Thread Kevin Wolf
Am 15.07.2015 um 03:57 hat 김태하 geschrieben: To put it briefly, when resize qcow2 image, the file tool detected increased size. However, the ls, “stat”, and “du” utility still don't know increased size. The following patch enables to let userland tools - ls, du, stat - know and apply changed

[Qemu-devel] [PULL 4/6] migration: Register global state section before loadvm

2015-07-15 Thread Juan Quintela
Otherwise, it is not found Signed-off-by: Juan Quintela quint...@redhat.com --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 3f269dc..5856396 100644 --- a/vl.c +++ b/vl.c @@ -4615,6 +4615,7 @@ int main(int argc, char **argv, char **envp) }

[Qemu-devel] [PULL 0/6] Migration pull request

2015-07-15 Thread Juan Quintela
in the git repository at: git://github.com/juanquintela/qemu.git tags/migration/20150715 for you to fetch changes up to 4915a5ad93e6c8ac77e2e5a007be178d50c7b019: migration: We also want to store the global state for savevm (2015-07-15 10:51:05 +0200

[Qemu-devel] [PULL 5/6] migration: reduce the count of strlen call

2015-07-15 Thread Juan Quintela
From: Liang Li liang.z...@intel.com 'strlen' is called three times in 'save_page_header', it's inefficient. Signed-off-by: Liang Li liang.z...@intel.com Reviewed-by: Juan Quintela quint...@redhat.com Reviewed-by: Amit Shat amit.s...@redhat.com Signed-off-by: Juan Quintela quint...@redhat.com ---

[Qemu-devel] [PULL 1/6] migration: Only change state after migration has finished

2015-07-15 Thread Juan Quintela
On previous change, we changed state at post load time if it was not running, special casing the running change. Now, we change any states at the end of the migration. Signed-off-by: Juan Quintela quint...@redhat.com Tested-by: Christian Borntraeger borntrae...@de.ibm.com ---

Re: [Qemu-devel] [PATCH V2 1/5] virtio: get_features() can fail

2015-07-15 Thread Jason Wang
On 07/15/2015 05:01 PM, Cornelia Huck wrote: On Wed, 15 Jul 2015 13:29:57 +0800 Jason Wang jasow...@redhat.com wrote: Signed-off-by: Jason Wang jasow...@redhat.com --- hw/9pfs/virtio-9p-device.c | 3 ++- hw/block/virtio-blk.c | 3 ++- hw/char/virtio-serial-bus.c | 3 ++-

Re: [Qemu-devel] [PATCH V2 0/5] Set correct blk feature for virtio 1.0

2015-07-15 Thread Cornelia Huck
On Wed, 15 Jul 2015 13:29:56 +0800 Jason Wang jasow...@redhat.com wrote: Hi all: This series tries to set feature correctly for virtio-blk when virtio 1.0 is supported. Two isssues were addressed according to the spec: - scsi passthrough was not support in 1.0. This is done by, 1) disable

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

2015-07-15 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:29], Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@redhat.com 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

Re: [Qemu-devel] [PATCH v12 05/19] i.MX: Fix Coding style for AVIC emulator.

2015-07-15 Thread Peter Crosthwaite
On Fri, Jul 10, 2015 at 4:31 PM, Jean-Christophe Dubois j...@tribudubois.net wrote: Signed-off-by: Jean-Christophe Dubois j...@tribudubois.net Reviewed-by: Peter Crosthwaite crosthwaite.pe...@gmail.com --- Changes since v1: * not present on v1 Changes since v2: * not present on

Re: [Qemu-devel] [PATCH] target-mips: apply workaround for TCG optimizations for MFC1

2015-07-15 Thread Aurelien Jarno
On 2015-07-15 09:31, Paolo Bonzini wrote: Ok, I see your point. If you put it like this :) the fault definitely lies in the backends. What I'm proposing would be in a new tcg_reg_alloc_trunc function, and it would require implementing a non-noop trunc. Why not reusing the existing

Re: [Qemu-devel] [PATCH] migration: We also want to store the global state for savevm

2015-07-15 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: Previous commit only stored a valid state for migration. It stored the empty string for savevm. Now, we are also storing the current state for savevm. Signed-off-by: Juan Quintela quint...@redhat.com Reviewed-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH v2 for-2.4] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Jason Wang
On 07/15/2015 04:20 PM, Wen Congyang wrote: commit da51a335 adds all queues in .realize(). But if the guest doesn't support multiqueue, we forget to remove them. And we cannot handle the ctrl vq corretly. The guest will hang. Signed-off-by: Wen Congyang we...@cn.fujitsu.com ---

Re: [Qemu-devel] [PATCH v2 for-2.4] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Wen Congyang
On 07/15/2015 04:42 PM, Jason Wang wrote: On 07/15/2015 04:20 PM, Wen Congyang wrote: commit da51a335 adds all queues in .realize(). But if the guest doesn't support multiqueue, we forget to remove them. And we cannot handle the ctrl vq corretly. The guest will hang. Signed-off-by: Wen

Re: [Qemu-devel] [PATCH v2 for-2.4] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Jason Wang
On 07/15/2015 05:04 PM, Wen Congyang wrote: On 07/15/2015 04:42 PM, Jason Wang wrote: On 07/15/2015 04:20 PM, Wen Congyang wrote: commit da51a335 adds all queues in .realize(). But if the guest doesn't support multiqueue, we forget to remove them. And we cannot handle the ctrl vq

[Qemu-devel] [PATCH v3 for-2.4] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Wen Congyang
commit da51a335 adds all queues in .realize(). But if the guest doesn't support multiqueue, we forget to remove them. And we cannot handle the ctrl vq corretly. The guest will hang. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- hw/net/virtio-net.c | 110

Re: [Qemu-devel] [PATCH v12 03/19] i.MX:Fix Coding style for UART emulator.

2015-07-15 Thread Peter Crosthwaite
On Fri, Jul 10, 2015 at 4:31 PM, Jean-Christophe Dubois j...@tribudubois.net wrote: Signed-off-by: Jean-Christophe Dubois j...@tribudubois.net Reviewed-by: Peter Crosthwaite crosthwaite.pe...@gmail.com One minor optional nit below. --- Changes since v1: * not present on v1 Changes

Re: [Qemu-devel] [RFC PATCH V2 0/3] Multithread TCG async_safe_work part.

2015-07-15 Thread Frederic Konrad
On 13/07/2015 13:53, Paolo Bonzini wrote: On 10/07/2015 18:08, fred.kon...@greensocs.com wrote: From: KONRAD Frederic fred.kon...@greensocs.com This is the async_safe_work introduction bit of the Multithread TCG work. Rebased on current upstream (6169b60285fe1ff730d840a49527e721bfb30899). It

Re: [Qemu-devel] [PATCH v12 11/19] i.MX: Fix Coding style for GPT emulator

2015-07-15 Thread Peter Crosthwaite
On Fri, Jul 10, 2015 at 4:31 PM, Jean-Christophe Dubois j...@tribudubois.net wrote: Signed-off-by: Jean-Christophe Dubois j...@tribudubois.net Reviewed-by: Peter Crosthwaite crosthwaite.pe...@gmail.com --- Changes since v1: * not present on v1 Changes since v2: * not present on

Re: [Qemu-devel] [PATCH V2] virtio-net: unbreak any layout

2015-07-15 Thread Paolo Bonzini
On 15/07/2015 09:56, Jason Wang wrote: Commit 032a74a1c0fcdd5fd1c69e56126b4c857ee36611 (virtio-net: byteswap virtio-net header) breaks any layout by requiring out_sg[0].iov_len = n-guest_hdr_len. Fixing this by copying header to temporary buffer if swap is needed, and then use this buffer

Re: [Qemu-devel] [PULL v3 05/22] cpu: Convert cpu_index into a bitmap

2015-07-15 Thread Igor Mammedov
On Wed, 15 Jul 2015 09:12:48 +0530 Bharata B Rao bharata@gmail.com wrote: On Tue, Jul 14, 2015 at 5:17 PM, Igor Mammedov imamm...@redhat.com wrote: On Tue, 14 Jul 2015 16:08:54 +0530 Bharata B Rao bhar...@linux.vnet.ibm.com wrote: On Thu, Jul 09, 2015 at 03:23:55PM +0200, Andreas

Re: [Qemu-devel] [PATCH] migration: We also want to store the global state for savevm

2015-07-15 Thread Amit Shah
On (Wed) 15 Jul 2015 [09:56:22], Juan Quintela wrote: Previous commit only stored a valid state for migration. It stored the empty string for savevm. Now, we are also storing the current state for savevm. Can you include some more information in the commit message? Like the commit hash

Re: [Qemu-devel] [PATCH 2/2 v2] virtio-rng: Serve pending request if any after timer bumps up quota.

2015-07-15 Thread Amit Shah
On (Wed) 15 Jul 2015 [03:05:06], Pankaj Gupta wrote: - Original Message - From: Amit Shah amit.s...@redhat.com To: Pankaj Gupta pagu...@redhat.com Cc: qemu-devel@nongnu.org, m...@redhat.com Sent: Wednesday, 15 July, 2015 12:09:57 PM Subject: Re: [Qemu-devel] [PATCH 2/2 v2]

Re: [Qemu-devel] [PATCH v2 for-2.4] virtio-net: remove virtio queues if the guest doesn't support multiqueue

2015-07-15 Thread Wen Congyang
On 07/15/2015 04:42 PM, Jason Wang wrote: On 07/15/2015 04:20 PM, Wen Congyang wrote: commit da51a335 adds all queues in .realize(). But if the guest doesn't support multiqueue, we forget to remove them. And we cannot handle the ctrl vq corretly. The guest will hang. Signed-off-by: Wen

[Qemu-devel] [PULL 3/6] migration: Write documetation for events capabilites

2015-07-15 Thread Juan Quintela
Reported-by: Jiri Denemark jdene...@redhat.com Signed-off-by: Juan Quintela quint...@redhat.com --- qmp-commands.hx | 1 + 1 file changed, 1 insertion(+) diff --git a/qmp-commands.hx b/qmp-commands.hx index e1bcc60..ba630b1 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -3406,6 +3406,7 @@

[Qemu-devel] [PULL 2/6] migration: Trace event and migration event are different things

2015-07-15 Thread Juan Quintela
We can want the trace event even without migration events enabled. Reported-by: Wen Congyang ghost...@gmail.com Signed-off-by: Juan Quintela quint...@redhat.com Reviewed-by: Dr. David Alan Gilbert dgilb...@redhat.com --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Qemu-devel] [PATCH V2 2/5] virtio-blk: advertise scsi only when scsi is set

2015-07-15 Thread Jason Wang
On 07/15/2015 03:57 PM, Paolo Bonzini wrote: On 15/07/2015 07:29, Jason Wang wrote: Cc: Stefan Hajnoczi stefa...@redhat.com Cc: Kevin Wolf kw...@redhat.com Cc: qemu-bl...@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- hw/block/virtio-blk.c | 4 +++- 1 file changed, 3

[Qemu-devel] [PATCH qemu v11 08/11] spapr_vfio_pci: Remove redundant spapr-pci-vfio-host-bridge

2015-07-15 Thread Alexey Kardashevskiy
sPAPRTCETable is handling 2 TCE tables already: 1) guest view of the TCE table - emulated devices use only this table; 2) hardware IOMMU table - VFIO PCI devices use it for actual work but it does not replace 1) and it is not visible to the guest. The initialization of this table is driven by

[Qemu-devel] [PATCH qemu v11 01/11] vmstate: Define VARRAY with VMS_ALLOC

2015-07-15 Thread Alexey Kardashevskiy
This allows dynamic allocation for migrating arrays. Already existing VMSTATE_VARRAY_UINT32 requires an array to be pre-allocated, however there are cases when the size is not known in advance and there is no real need to enforce it. This defines another variant of VMSTATE_VARRAY_UINT32 with

[Qemu-devel] [PATCH qemu v11 03/11] spapr_iommu: Move table allocation to helpers

2015-07-15 Thread Alexey Kardashevskiy
At the moment presence of vfio-pci devices on a bus affect the way the guest view table is allocated. If there is no vfio-pci on a PHB and the host kernel supports KVM acceleration of H_PUT_TCE, a table is allocated in KVM. However, if there is vfio-pci and we do yet not KVM acceleration for

[Qemu-devel] [PATCH qemu v11 09/11] spapr_pci: Enable vfio-pci hotplug

2015-07-15 Thread Alexey Kardashevskiy
sPAPR IOMMU is managing two copies of an TCE table: 1) a guest view of the table - this is what emulated devices use and this is where H_GET_TCE reads from; 2) a hardware TCE table - only present if there is at least one vfio-pci device on a PHB; it is updated via a memory listener on a PHB

[Qemu-devel] [PATCH qemu v11 02/11] spapr_pci: Convert finish_realize() to dma_capabilities_update()+dma_init_window()

2015-07-15 Thread Alexey Kardashevskiy
This reworks finish_realize() which used to finalize DMA setup with an assumption that it will not change later. New callbacks supports various window parameters such as page and windows sizes. The new callback return error code rather than Error**. This is a mechanical change so no change in

[Qemu-devel] [PATCH qemu v11 04/11] spapr_iommu: Introduce enabled state for TCE table

2015-07-15 Thread Alexey Kardashevskiy
Currently TCE tables are created once at start and their size never changes. We are going to change that by introducing a Dynamic DMA windows support where DMA configuration may change during the guest execution. This changes spapr_tce_new_table() to create an empty stub object. Only LIOBN is

[Qemu-devel] [PATCH qemu v11 11/11] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2015-07-15 Thread Alexey Kardashevskiy
This adds support for Dynamic DMA Windows (DDW) option defined by the SPAPR specification which allows to have additional DMA window(s) This implements DDW for emulated and VFIO devices. As all TCE root regions are mapped at 0 and 64bit long (and actual tables are child regions), this replaces

Re: [Qemu-devel] [PATCH] target-mips: apply workaround for TCG optimizations for MFC1

2015-07-15 Thread Richard Henderson
On 07/14/2015 05:38 PM, Leon Alrae wrote: There seems to be an issue when trying to keep a pointer in bottom 32-bits of a 64-bit floating point register. Load and store instructions accessing this address for some reason use the whole 64-bit content of floating point register rather than

[Qemu-devel] [PATCH qemu v11 06/11] spapr_iommu: Add root memory region

2015-07-15 Thread Alexey Kardashevskiy
We are going to have multiple DMA windows at different offsets on a PCI bus. For the sake of migration, we will have as many TCE table objects pre-created as many windows supported. So we need a way to map windows dynamically onto a PCI bus when migration of a table is completed but at this stage

[Qemu-devel] [PATCH qemu v11 05/11] spapr_iommu: Remove vfio_accel flag from sPAPRTCETable

2015-07-15 Thread Alexey Kardashevskiy
sPAPRTCETable has a vfio_accel flag which is passed to kvmppc_create_spapr_tce() and controls whether to create a guest view table in KVM as this depends on the host kernel ability to accelerate H_PUT_TCE for VFIO devices. We would set this flag at the moment when sPAPRTCETable is created in

[Qemu-devel] [PATCH qemu v11 07/11] spapr_pci: Do complete reset of DMA config when resetting PHB

2015-07-15 Thread Alexey Kardashevskiy
On a system reset, DMA configuration has to reset too. At the moment it clears the table content. This is enough for the single table case but with DDW, we will also have to disable all DMA windows except the default one. Furthermore according to sPAPR, if the guest removed the default window and

[Qemu-devel] [PATCH qemu v11 10/11] spapr_pci_vfio: Enable multiple groups per container

2015-07-15 Thread Alexey Kardashevskiy
This enables multiple IOMMU groups in one VFIO container which means that multiple devices from different groups can share the same IOMMU table (or tables if DDW). This removes a group id from vfio_container_ioctl(). The kernel support is required for this; if the host kernel does not have the

[Qemu-devel] [PATCH qemu v11 00/11] spapr: vfio: Enable Dynamic DMA windows (DDW)

2015-07-15 Thread Alexey Kardashevskiy
Each Partitionable Endpoint (IOMMU group) has an address range on a PCI bus where devices are allowed to do DMA. These ranges are called DMA windows. By default, there is a single DMA window, 1 or 2GB big, mapped at zero on a PCI bus. PAPR defines a DDW RTAS API which allows pseries guests

[Qemu-devel] [RFC PATCH v0] spapr: Abort when hash table size requirement isn't met

2015-07-15 Thread Bharata B Rao
[This patch addresses an issue which is not prominently seen in mainline, but seen frequently only in David's spapr-next branch. Though it is possible to see this issue with mainline too, the current version of the patch is intended for David's tree.] QEMU requests for hash table allocation

Re: [Qemu-devel] [PATCH] target-mips: apply workaround for TCG optimizations for MFC1

2015-07-15 Thread Richard Henderson
On 07/15/2015 09:06 AM, Aurelien Jarno wrote: On 2015-07-15 09:31, Paolo Bonzini wrote: Ok, I see your point. If you put it like this :) the fault definitely lies in the backends. What I'm proposing would be in a new tcg_reg_alloc_trunc function, and it would require implementing a non-noop

Re: [Qemu-devel] [PATCH] migration: reduce the count of strlen call

2015-07-15 Thread Juan Quintela
Liang Li liang.z...@intel.com wrote: 'strlen' is called three times in 'save_page_header', it's inefficient. Signed-off-by: Liang Li liang.z...@intel.com Reviewed-by: Juan Quintela quint...@redhat.com Applied --- migration/ram.c | 10 +- 1 file changed, 5 insertions(+), 5

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

2015-07-15 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:28], Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@redhat.com Open a return path, and handle messages that are received upon it. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com -/* migration thread support */ +/* + *

Re: [Qemu-devel] [PATCH for-2.4 08/12] milkymist-minimac2: Flush queued packets when link comes up

2015-07-15 Thread Michael Walle
Am 2015-07-14 13:07, schrieb Fam Zheng: On Tue, 07/14 13:02, Michael Walle wrote: Am 2015-07-14 09:53, schrieb Fam Zheng: Drop .can_receive and move the semantics into minimac2_rx, by returning 0. That is once minimac2_rx returns 0, incoming packets will be queued until the queue is explicitly

Re: [Qemu-devel] [PATCH v12 09/19] i.MX: Fix Coding style for EPIT emulator

2015-07-15 Thread Peter Crosthwaite
On Fri, Jul 10, 2015 at 4:31 PM, Jean-Christophe Dubois j...@tribudubois.net wrote: Signed-off-by: Jean-Christophe Dubois j...@tribudubois.net Reviewed-by: Peter Crosthwaite crosthwaite.pe...@gmail.com --- Changes since v1: * not present on v1 Changes since v2: * not present on

Re: [Qemu-devel] [PATCH for-2.4 06/12] etsec: Flush queue when rx buffer is consumed

2015-07-15 Thread Fam Zheng
On Wed, 07/15 15:38, Jason Wang wrote: On 07/15/2015 02:01 PM, Fam Zheng wrote: On Wed, 07/15 13:10, Jason Wang wrote: And can we do this without a bh? Otherwise, we may need to stop and restart the bh during vm stop and start? A bh doesn't hurt when vm stop and restart (we get

Re: [Qemu-devel] [PATCH] migration: use call_rcu instead of synchronize_rcu

2015-07-15 Thread Juan Quintela
Li Zhijian lizhij...@cn.fujitsu.com wrote: from commit 2ff6403, we make a mistake to call synchronize_rcu() within rcu_read_lock()/rcu_read_unlock() Signed-off-by: Li Zhijian lizhij...@cn.fujitsu.com Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Li Zhijian

Re: [Qemu-devel] [PATCH] migration: We also want to store the global state for savevm

2015-07-15 Thread Christian Borntraeger
Am 15.07.2015 um 10:18 schrieb Dr. David Alan Gilbert: * Juan Quintela (quint...@redhat.com) wrote: Previous commit only stored a valid state for migration. It stored the empty string for savevm. Now, we are also storing the current state for savevm. Signed-off-by: Juan Quintela

Re: [Qemu-devel] [PATCH] migration: use call_rcu instead of synchronize_rcu

2015-07-15 Thread Paolo Bonzini
On 15/07/2015 10:31, Juan Quintela wrote: Li Zhijian lizhij...@cn.fujitsu.com wrote: from commit 2ff6403, we make a mistake to call synchronize_rcu() within rcu_read_lock()/rcu_read_unlock() Signed-off-by: Li Zhijian lizhij...@cn.fujitsu.com Signed-off-by: Wen Congyang

Re: [Qemu-devel] [PATCH V2 2/5] virtio-blk: advertise scsi only when scsi is set

2015-07-15 Thread Paolo Bonzini
On 15/07/2015 10:31, Jason Wang wrote: This must only be done for newer machine types only, or you change guest ABI for scsi=off. Effectively you have to split it in two properties, scsi and always_set_f_scsi. And always_set_f_scsi is true only for legacy machine types? s/legacy/older/

Re: [Qemu-devel] [PATCH V2 1/5] virtio: get_features() can fail

2015-07-15 Thread Cornelia Huck
On Wed, 15 Jul 2015 13:29:57 +0800 Jason Wang jasow...@redhat.com wrote: Signed-off-by: Jason Wang jasow...@redhat.com --- hw/9pfs/virtio-9p-device.c | 3 ++- hw/block/virtio-blk.c | 3 ++- hw/char/virtio-serial-bus.c | 3 ++- hw/display/virtio-gpu.c | 3 ++-

Re: [Qemu-devel] [PATCH 2/2 v2] virtio-rng: Serve pending request if any after timer bumps up quota.

2015-07-15 Thread Pankaj Gupta
On (Wed) 15 Jul 2015 [03:05:06], Pankaj Gupta wrote: - Original Message - From: Amit Shah amit.s...@redhat.com To: Pankaj Gupta pagu...@redhat.com Cc: qemu-devel@nongnu.org, m...@redhat.com Sent: Wednesday, 15 July, 2015 12:09:57 PM Subject: Re: [Qemu-devel] [PATCH

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

2015-07-15 Thread Amit Shah
On (Tue) 16 Jun 2015 [16:58:17], Dr. David Alan Gilbert wrote: * Eric Blake (ebl...@redhat.com) wrote: On 06/16/2015 04:26 AM, Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@redhat.com The 'postcopy ram' capability allows postcopy migration of RAM; note

Re: [Qemu-devel] [PATCH V2 0/5] Set correct blk feature for virtio 1.0

2015-07-15 Thread Jason Wang
On 07/15/2015 05:11 PM, Cornelia Huck wrote: On Wed, 15 Jul 2015 13:29:56 +0800 Jason Wang jasow...@redhat.com wrote: Hi all: This series tries to set feature correctly for virtio-blk when virtio 1.0 is supported. Two isssues were addressed according to the spec: - scsi passthrough was

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

2015-07-15 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:30], Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@redhat.com 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

[Qemu-devel] [PATCH 4/7] ipxe: disable load file protocol

2015-07-15 Thread Gerd Hoffmann
Activate the opt-out added by one ipxe patch. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- roms/config.ipxe.general.h | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/config.ipxe.general.h b/roms/config.ipxe.general.h index 619ee4c..2df042a 100644 --- a/roms/config.ipxe.general.h

[Qemu-devel] [PATCH 2/7] ipxe: update to 87981bb (qemu)

2015-07-15 Thread Gerd Hoffmann
Add two patches we've been struggling to get upstream. They are available from git://git.qemu.org/ipxe.git qemu git shortlog Gerd Hoffmann (1): [efi] make load file protocol optional Laszlo Ersek (1): efi_snp: improve compliance with the EFI_SIMPLE_NETWORK_PROTOCOL spec

[Qemu-devel] [PATCH 3/7] ipxe: rm local config in cleanup

2015-07-15 Thread Gerd Hoffmann
ipxe build now generates empty local header files in case they are not preset. Let's remove them on cleanup to make sure we store a fresh copy on the next build. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- roms/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/Makefile

[Qemu-devel] [PATCH 6/7] ipxe: don't override GITVERSION

2015-07-15 Thread Gerd Hoffmann
We had build problems due to the git version checking in the ipxe build system in the past. Don't remember the details, but the problem seems to be gone now, so lets remove the workaround. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- roms/Makefile | 4 ++-- 1 file changed, 2

  1   2   3   >