Re: [Qemu-devel] [PATCH v3 5/7] pci: Make errp the last parameter of pci_add_capability()

2017-06-07 Thread Markus Armbruster
Mao Zhongyi writes: > Hi, Eduardo > > On 06/06/2017 10:52 PM, Eduardo Habkost wrote: >> On Tue, Jun 06, 2017 at 07:26:30PM +0800, Mao Zhongyi wrote: >>> Add Error argument for pci_add_capability() to leverage the errp >>> to pass info on errors. This way is helpful for its callers to >>> make a b

Re: [Qemu-devel] [PATCH] Add chardev-send-break monitor command

2017-06-07 Thread Markus Armbruster
Paolo Bonzini writes: >> >> Is there an obvious test that we can enhance to add coverage of the new >> >> QMP command? >> > >> > You could have a new test covering hw/char/serial.c, but I wouldn't let >> > that hold the patch. >> >> Holding patches is pretty much the only leverage I have to get

[Qemu-devel] [PATCH] pseries: Correct panic behaviour for pseries machine type

2017-06-07 Thread David Gibson
The pseries machine type doesn't usually use the 'pvpanic' device as such, because it has a firmware/hypervisor facility with roughly the same purpose. The 'ibm,os-term' RTAS call notifies the hypervisor that the guest has crashed. Our implementation of this call was sending a GUEST_PANICKED qmp

Re: [Qemu-devel] [PATCH] Add chardev-send-break monitor command

2017-06-07 Thread Paolo Bonzini
- Original Message - > From: "Markus Armbruster" > To: "Paolo Bonzini" > Cc: "Stefan Fritsch" , qemu-devel@nongnu.org, "Dr. David > Alan Gilbert" , > "Marc-André Lureau" > Sent: Wednesday, June 7, 2017 9:06:53 AM > Subject: Re: [Qemu-devel] [PATCH] Add chardev-send-break monitor comma

Re: [Qemu-devel] [PATCH v1 1/1] char-socket: Don't report TCP socket waiting as an error

2017-06-07 Thread Markus Armbruster
Paolo Bonzini writes: > On 06/06/2017 18:30, Alistair Francis wrote: >>> >>> This is somehow confusing. I don't think it is worth having another >>> qemu_log_stderr() function rather than using error_report() but this very >>> call might deserve a comment explaining this unusual use. What do you

Re: [Qemu-devel] [PATCH] pseries: Correct panic behaviour for pseries machine type

2017-06-07 Thread Paolo Bonzini
- Original Message - > From: "David Gibson" > To: mdr...@linux.vnet.ibm.com, th...@redhat.com, lviv...@redhat.com > Cc: pbonz...@redhat.com, qemu-...@nongnu.org, qemu-devel@nongnu.org, "David > Gibson" > Sent: Wednesday, June 7, 2017 9:07:32 AM > Subject: [PATCH] pseries: Correct panic

Re: [Qemu-devel] [PATCH] pseries: Correct panic behaviour for pseries machine type

2017-06-07 Thread Thomas Huth
On 07.06.2017 09:07, David Gibson wrote: > The pseries machine type doesn't usually use the 'pvpanic' device as such, > because it has a firmware/hypervisor facility with roughly the same > purpose. The 'ibm,os-term' RTAS call notifies the hypervisor that the > guest has crashed. > > Our implemen

[Qemu-devel] [[PATCH V7] 00/11] calculate blocktime for postcopy live migration

2017-06-07 Thread Alexey Perevalov
This is 7th version (V6 -> V7) 1. copied bitmap was placed into RAMBlock as another migration related bitmaps. 2. Ordering of mark_postcopy_blocktime_end call and ordering of checking copied bitmap were changed. 3. linewrap style defects 4. new patch "postcopy_place_page factoring

[Qemu-devel] [[PATCH V7] 06/11] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-06-07 Thread Alexey Perevalov
This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. PostcopyBlocktimeContext is incapsulated inside postcopy-ram.c, due to it's postcopy only feature. Also it defines PostcopyBlocktimeContext's instance live time. Information from Po

[Qemu-devel] [[PATCH V7] 01/11] userfault: add pid into uffd_msg & update UFFD_FEATURE_*

2017-06-07 Thread Alexey Perevalov
This commit duplicates header of "userfaultfd: provide pid in userfault msg" into linux kernel. Signed-off-by: Alexey Perevalov --- linux-headers/linux/userfaultfd.h | 4 1 file changed, 4 insertions(+) diff --git a/linux-headers/linux/userfaultfd.h b/linux-headers/linux/userfaultfd.h ind

[Qemu-devel] [[PATCH V7] 02/11] migration: pass MigrationIncomingState* into migration check functions

2017-06-07 Thread Alexey Perevalov
That tiny refactoring is necessary to be able to set UFFD_FEATURE_THREAD_ID while requesting features, and then to create downtime context in case when kernel supports it. Signed-off-by: Alexey Perevalov --- migration/migration.c| 3 ++- migration/postcopy-ram.c | 10 +- migration/p

[Qemu-devel] [[PATCH V7] 03/11] migration: fix hardcoded function name in error report

2017-06-07 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 10d39a0..9963ce4 100644 --- a/migration/postcopy-ram.c +++ b/migration/po

[Qemu-devel] [[PATCH V7] 07/11] migration: add bitmap for copied page

2017-06-07 Thread Alexey Perevalov
This patch adds ability to track down already copied pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure. Also it's necessary to solve shared memory issue in postcopy livemigration. Information about copied pages wi

[Qemu-devel] [[PATCH V7] 11/11] migration: postcopy_blocktime documentation

2017-06-07 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov --- docs/migration.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/migration.txt b/docs/migration.txt index 1b940a8..4b625ca 100644 --- a/docs/migration.txt +++ b/docs/migration.txt @@ -402,6 +402,16 @@

[Qemu-devel] [[PATCH V7] 04/11] migration: split ufd_version_check onto receive/request features part

2017-06-07 Thread Alexey Perevalov
This modification is necessary for userfault fd features which are required to be requested from userspace. UFFD_FEATURE_THREAD_ID is a one of such "on demand" feature, which will be introduced in the next patch. QEMU have to use separate userfault file descriptor, due to userfault context has int

[Qemu-devel] [[PATCH V7] 08/11] migration: postcopy_place_page factoring out

2017-06-07 Thread Alexey Perevalov
Need to set copied bitmap as closer as possible to mark_postcopy_blocktime_end. So postcopy_place_page is proper place. RAMBlock argument here could avoid additional RAMBlock lookup as well as reduce number of arguments (no need to pass pointer to copied bitmap). Signed-off-by: Alexey Perevalov -

[Qemu-devel] [[PATCH V7] 10/11] migration: add postcopy total blocktime into query-migrate

2017-06-07 Thread Alexey Perevalov
Postcopy total blocktime is available on destination side only. But query-migrate was possible only for source. This patch adds ability to call query-migrate on destination. To be able to see postcopy blocktime, need to request postcopy-blocktime capability. The query-migrate command will show fol

[Qemu-devel] [[PATCH V7] 09/11] migration: calculate vCPU blocktime on dst side

2017-06-07 Thread Alexey Perevalov
This patch provides blocktime calculation per vCPU, as a summary and as a overlapped value for all vCPUs. This approach was suggested by Peter Xu, as an improvements of previous approch where QEMU kept tree with faulted page address and cpus bitmask in it. Now QEMU is keeping array with faulted pa

Re: [Qemu-devel] [PATCH V6 08/10] migration: calculate vCPU blocktime on dst side

2017-06-07 Thread Alexey Perevalov
On 06/01/2017 01:57 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This patch provides blocktime calculation per vCPU, as a summary and as a overlapped value for all vCPUs. This approach was suggested by Peter Xu, as an improvements of previous approch whe

[Qemu-devel] [[PATCH V7] 05/11] migration: introduce postcopy-blocktime capability

2017-06-07 Thread Alexey Perevalov
Right now it could be used on destination side to enable vCPU blocktime calculation for postcopy live migration. vCPU blocktime - it's time since vCPU thread was put into interruptible sleep, till memory page was copied and thread awake. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey P

[Qemu-devel] [PATCH 0/5] Code cleanups with Coccinelle

2017-06-07 Thread Marc-André Lureau
Hi, Here is a few patches I came up with playing with some semantic patches. If necessary, I can split them further by unit/domains, but that will likely make a quite long series of patches. Marc-André Lureau (5): coccinelle: replace code with ROUND_UP macro coccinelle: use DIV_ROUND_UP arc

[Qemu-devel] [PATCH 1/5] coccinelle: replace code with ROUND_UP macro

2017-06-07 Thread Marc-André Lureau
I used a the following coccinelle script: @@ expression e1; @@ - ((e1) + (3)) / (4) * (4) + ROUND_UP(e1,4) @@ expression e1; expression e2; @@ -(ROUND_UP(e1,e2)) +ROUND_UP(e1,e2) I tried with various other values (4, 8, 16, 32), but got only the matches in this patch. Signed-off-by: Marc-André

[Qemu-devel] [PATCH 2/5] coccinelle: use DIV_ROUND_UP

2017-06-07 Thread Marc-André Lureau
The coccinelle/round.cocci script doesn't catch hard coded values. I used the following script over qemu code base: ( - ((e1) + 3) / (4) + DIV_ROUND_UP(e1,4) | - ((e1) + (3)) / (4) + DIV_ROUND_UP(e1,4) | - ((e1) + 7) / (8) + DIV_ROUND_UP(e1,8) | - ((e1) + (7)) / (8) + DIV_ROUND_UP(e1,8) | - ((e1)

[Qemu-devel] [PATCH 3/5] arch: introduce ELF_NOTE_SIZE macro

2017-06-07 Thread Marc-André Lureau
Factour out a common pattern to compute the ELF note size. Signed-off-by: Marc-André Lureau --- target/i386/arch_dump.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/target/i386/arch_dump.c b/target/i386/arch_dump.c index 158e056b59..4471f44e3d 1

[Qemu-devel] [PATCH 4/5] Replace g_malloc()+memcpy() with g_memdup()

2017-06-07 Thread Marc-André Lureau
I found these pattern via grepping the source tree. I don't have a coccinelle script for it! Signed-off-by: Marc-André Lureau --- hw/9pfs/9p-synth.c | 3 +-- hw/i386/multiboot.c | 3 +-- hw/net/eepro100.c | 3 +-- tests/test-iov.c| 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-)

[Qemu-devel] [PATCH 5/5] coccinelle: prefer glib g_new/g_renew macros

2017-06-07 Thread Marc-André Lureau
The g_new() familly of macros is simpler and safer than g_malloc(). "The return pointer is cast to the given type... Care is taken to avoid overflow when calculating the size of the allocated block." I left out the common g_malloc(sizeof(*ptr)) pattern, since alternative "g_new(typeof(*ptr))" isn

Re: [Qemu-devel] [RFC PATCH 8/8] iommu: introduce hw/core/iommu

2017-06-07 Thread Liu, Yi L
Hi Peter, Some updates on it. > -Original Message- > From: Peter Xu [mailto:pet...@redhat.com] > Sent: Thursday, April 27, 2017 5:34 PM > To: qemu-devel@nongnu.org > Cc: Lan, Tianyu ; Paolo Bonzini ; > Tian, Kevin ; Liu, Yi L ; > pet...@redhat.com; Jason Wang ; David Gibson > ; Alex Willi

Re: [Qemu-devel] [PATCH v4 1/2] spapr: Add a "no HPT" encoding to HTAB migration stream

2017-06-07 Thread Bharata B Rao
On Thu, Jun 01, 2017 at 02:54:48PM +1000, David Gibson wrote: > On Wed, May 31, 2017 at 04:56:44PM +0530, Bharata B Rao wrote: > > Add a "no HPT" encoding (using value -1) to the HTAB migration > > stream (in the place of HPT size) when the guest doesn't allocate HPT. > > This will help the target

[Qemu-devel] [PATCH v5 0/2] ppc/spapr: Fix migration of radix guests

2017-06-07 Thread Bharata B Rao
This patchset fixes the migration of sPAPR radix guests. Changes in v5 - - Ensured that assert(kvm_enabled()) isn't touched in any HTAB savevm handlers except in htab_save_setup() where it is made conditional on htab_shift. v4: https://lists.gnu.org/archive/html/qemu-devel/2017-05

[Qemu-devel] [PATCH v5 2/2] spapr: Fix migration of Radix guests

2017-06-07 Thread Bharata B Rao
Fix migration of radix guests by ensuring that we issue KVM_PPC_CONFIGURE_V3_MMU for radix case post migration. Reported-by: Nageswara R Sastry Signed-off-by: Bharata B Rao Reviewed-by: Suraj Jitindar Singh --- hw/ppc/spapr.c | 12 1 file changed, 12 insertions(+) diff --git a/hw

[Qemu-devel] [PATCH v5 1/2] spapr: Add a "no HPT" encoding to HTAB migration stream

2017-06-07 Thread Bharata B Rao
Add a "no HPT" encoding (using value -1) to the HTAB migration stream (in the place of HPT size) when the guest doesn't allocate HPT. This will help the target side to match target HPT with the source HPT and thus enable successful migration. Suggested-by: David Gibson Signed-off-by: Bharata B Ra

[Qemu-devel] [PATCH] nvdimm acpi: fix region format interface code

2017-06-07 Thread Haozhong Zhang
Per ACPI 6.2, section 5.2.25.6 and JEDEC Annex L Release 3, the current region format interface code 0x201 indicates the block addressed function interface 1, rather than a byte addressable interface. Fix it by using 0x301 which indicates the byte addressable no energy backed function interface 1.

Re: [Qemu-devel] [PULL 01/17] migration: remove register_savevm()

2017-06-07 Thread Juan Quintela
Peter Maydell wrote: > On 6 June 2017 at 03:51, David Gibson wrote: >> From: Laurent Vivier >> >> We can replace the four remaining calls of register_savevm() by >> calls to register_savevm_live(). So we can remove the function and >> as we don't allocate anymore the ops pointer with g_new0() >>

Re: [Qemu-devel] [PATCH v3 11/16] virtio-scsi: Request BLK_PERM_AIO_CONTEXT_CHANGE for dataplane

2017-06-07 Thread Fam Zheng
On Wed, 05/24 10:52, Fam Zheng wrote: > blk_set_aio_context is audited by perm API, so follow the protocol and > request for permission first. > > Signed-off-by: Fam Zheng > --- > hw/scsi/virtio-scsi.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/

Re: [Qemu-devel] [[PATCH V7] 03/11] migration: fix hardcoded function name in error report

2017-06-07 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Subject: [Qemu-devel] [[PATCH V7] 03/11] migration: fix hardcoded function name in error report Message-id: 1496

[Qemu-devel] [PATCH] hw/ppc/spapr: Adjust firmware name for PCI bridges

2017-06-07 Thread Thomas Huth
SLOF uses "pci" as name for PCI bridges nodes in the device tree instead of "pci-bridges", so booting via bootindex from a device behind a PCI bridge currently does not work since QEMU passes the wrong name in the "qemu,boot-list" property. Fix it by changing the name of the PCI bridge nodes to "pc

Re: [Qemu-devel] [RFC PATCH 8/8] iommu: introduce hw/core/iommu

2017-06-07 Thread Peter Xu
On Wed, Jun 07, 2017 at 07:51:55AM +, Liu, Yi L wrote: > Hi Peter, > > Some updates on it. > > > -Original Message- > > From: Peter Xu [mailto:pet...@redhat.com] > > Sent: Thursday, April 27, 2017 5:34 PM > > To: qemu-devel@nongnu.org > > Cc: Lan, Tianyu ; Paolo Bonzini ; > > Tian, Ke

Re: [Qemu-devel] [PATCHv2 01/04] colo-compare: Use IOThread context timer to Check old packet regularly

2017-06-07 Thread Jason Wang
On 2017年06月05日 18:44, Yong Wang wrote: From: Wang Yong Remove the task which check old packet in the comparing thread, then use IOthread context timer to handle it. Signed-off-by: Wang Yong Signed-off-by: Wang Guang --- net/colo-compare.c | 62 +++

[Qemu-devel] [PATCH qemu v7] memory/iommu: QOM'fy IOMMU MemoryRegion

2017-06-07 Thread Alexey Kardashevskiy
This defines new QOM object - IOMMUMemoryRegion - with MemoryRegion as a parent. This moves IOMMU-related fields from MR to IOMMU MR. However to avoid dymanic QOM casting in fast path (address_space_translate, etc), this adds an @is_iommu boolean flag to MR and provides new helper to do simple cas

Re: [Qemu-devel] [PATCHv2 02/04] colo-compare: Process pactkets in the IOThread of the primary

2017-06-07 Thread Jason Wang
On 2017年06月05日 18:44, Yong Wang wrote: From: Wang Yong Process pactkets in the IOThread which arrived over the socket. we use qio_channel_set_aio_fd_handler to set the handlers on the IOThread AioContext.then the packets from the primary and the secondary are processed in the IOThread. Finall

[Qemu-devel] [RFC 1/8] update-linux-headers: import virtio_iommu.h

2017-06-07 Thread Eric Auger
Update the script to update the virtio_iommu.h header. Signed-off-by: Eric Auger --- scripts/update-linux-headers.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 2f906c4..03f6712 100755 --- a/scripts/update-linux-h

[Qemu-devel] [RFC 2/8] linux-headers: Update for virtio-iommu

2017-06-07 Thread Eric Auger
This is a partial linux header update against Jean-Philippe's branch: git://linux-arm.org/linux-jpb.git virtio-iommu/base (unstable) Signed-off-by: Eric Auger --- include/standard-headers/linux/virtio_ids.h | 1 + include/standard-headers/linux/virtio_iommu.h | 142 ++

[Qemu-devel] [RFC 0/8] VIRTIO-IOMMU device

2017-06-07 Thread Eric Auger
This series implements the virtio-iommu device. This is a proof of concept based on the virtio-iommu specification written by Jean-Philippe Brucker [1]. This was tested with a guest using the virtio-iommu driver [2] and exposed with a virtio-net-pci using dma ops. The device gets instantiated usin

[Qemu-devel] [RFC 3/8] virtio_iommu: add skeleton

2017-06-07 Thread Eric Auger
This patchs adds the skeleton for the virtio-iommu device. Signed-off-by: Eric Auger --- hw/virtio/Makefile.objs | 1 + hw/virtio/virtio-iommu.c | 247 +++ include/hw/virtio/virtio-iommu.h | 60 ++ 3 files changed, 308 insertions(+)

Re: [Qemu-devel] [PATCHv2 04/04] colo-compare: Update the COLO document to fix the processing of secondary packets in the main thread

2017-06-07 Thread Jason Wang
On 2017年06月05日 18:44, Yong Wang wrote: From: Wang Yong In my test, secondary does not process the packets comparing in the IOThread but in the qemu main thread processing. secondary's configuration " -chardev socket,id=compare1,host=3.3.3.3,port=9004,server,nowait" here,we should use 'wait'

[Qemu-devel] [RFC 4/8] virtio-iommu: Decode the command payload

2017-06-07 Thread Eric Auger
This patch adds the command payload decoding and introduces the functions that will do the actual command handling. Those functions are not yet implemented. Signed-off-by: Eric Auger --- hw/virtio/trace-events | 7 hw/virtio/virtio-iommu.c | 97 +++

[Qemu-devel] [RFC 5/8] virtio_iommu: Add the iommu regions

2017-06-07 Thread Eric Auger
This patch initializes the iommu memory regions so that PCIe end point transactions get translated. The translation function is not yet implemented at that stage. Signed-off-by: Eric Auger --- hw/virtio/trace-events | 1 + hw/virtio/virtio-iommu.c | 97

[Qemu-devel] [RFC 8/8] hw/arm/virt: Add virtio-iommu the virt board

2017-06-07 Thread Eric Auger
The specific virtio-mmio node is inconditionally added on machine init while the binding between this latter and the PCIe host bridge is done on machine init done notifier, only if -device virtio-iommu-device was added to the qemu command line. Signed-off-by: Eric Auger --- --- hw/arm/virt.c

Re: [Qemu-devel] [[PATCH V7] 09/11] migration: calculate vCPU blocktime on dst side

2017-06-07 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Type: series Message-id: 1496820931-27416-10-git-send-email-a.pereva...@samsung.com Subject: [Qemu-devel] [[PATCH V7] 09/11] migration: calculate vCPU blocktime on dst side === TEST SCRIPT BEGIN === #!/bin/bash # Te

[Qemu-devel] [RFC 7/8] hw/arm/virt: Add 2.10 machine type

2017-06-07 Thread Eric Auger
The new machine type allows virtio-iommu instantiation. Signed-off-by: Eric Auger --- a Veuillez saisir le message de validation pour vos modifications. Les lignes --- hw/arm/virt.c | 24 ++-- include/hw/arm/virt.h | 1 + 2 files changed, 23 insertions(+), 2 deleti

[Qemu-devel] [RFC 6/8] virtio-iommu: Implement the translation and commands

2017-06-07 Thread Eric Auger
This patch adds the actual implementation for the translation routine and the virtio-iommu commands. Signed-off-by: Eric Auger --- hw/virtio/trace-events | 6 ++ hw/virtio/virtio-iommu.c | 202 +-- 2 files changed, 202 insertions(+), 6 deletions(-)

Re: [Qemu-devel] [PATCH V3 0/3] COLO-compare: Make COLO-compare support remote COLO-frame

2017-06-07 Thread Jason Wang
On 2017年06月06日 16:12, Zhang Chen wrote: This series focus on COLO-proxy remote colo-frame support. Xen COLO-frame is the first user. We add a new chardev socket in colo-compare as the way of communicate with remote COLO-frame. And remote COLO-frame notify colo-proxy part depend on this serise:

[Qemu-devel] [Bug 779151] Re: qemu-nbd crash during using with chroot

2017-06-07 Thread Thomas Huth
** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/779151 Title: qemu-nbd crash during using with chroot Status in QEMU: Incomplete Bug descripti

[Qemu-devel] [Bug 816860] Re: Guest machine freezes when NFS mount goes offline

2017-06-07 Thread Thomas Huth
Can you still reproduce this problem with the latest version of QEMU (currently version 2.9.0)? ** Changed in: qemu Status: Confirmed => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bug

[Qemu-devel] [Bug 796480] Re: Addresses with 4GB differences are consider as one single address in QEMU

2017-06-07 Thread Thomas Huth
Can you still reproduce this problem with the latest version of QEMU (currently version 2.9.0)? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/7964

[Qemu-devel] [Bug 893956] Re: qemu-img bug with dynamic vhd

2017-06-07 Thread Thomas Huth
Can you still reproduce this problem with the latest version of QEMU (currently version 2.9.0)? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/8939

Re: [Qemu-devel] [RFC] q35/mch: implement extended TSEG sizes

2017-06-07 Thread Laszlo Ersek
On 06/07/17 07:52, Gerd Hoffmann wrote: > Hi, > > Patch looks sane overall. > >> Invent a new, QEMU-specific register in the config space of the DRAM >> Controller, at offset 0x50, in order to allow guest firmware to query >> the >> TSEG (SMRAM) size. > > Hmm, 0x50 appears to be the only unuse

Re: [Qemu-devel] [PATCH] target/m68k: implement rtd

2017-06-07 Thread John Paul Adrian Glaubitz
> Add "Return and Deallocate" (rtd) instruction. > > RTD #d > > (SP) -> PC > SP + 4 + d -> SP Tested-By: John Paul Adrian Glaubitz -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-

[Qemu-devel] [Bug 965867] Re: 9p virtual file system on qemu slow

2017-06-07 Thread Thomas Huth
Can you still reproduce this problem with the latest version of QEMU (currently version 2.9.0)? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/9658

Re: [Qemu-devel] [PATCH 2/5] coccinelle: use DIV_ROUND_UP

2017-06-07 Thread Peter Maydell
On 7 June 2017 at 08:46, Marc-André Lureau wrote: > The coccinelle/round.cocci script doesn't catch hard coded values. > > I used the following script over qemu code base: > > ( > - ((e1) + 3) / (4) > + DIV_ROUND_UP(e1,4) > | > - ((e1) + (3)) / (4) > + DIV_ROUND_UP(e1,4) Why do we need both of th

Re: [Qemu-devel] [RFC 0/8] VIRTIO-IOMMU device

2017-06-07 Thread Jason Wang
On 2017年06月07日 16:35, Eric Auger wrote: This series implements the virtio-iommu device. This is a proof of concept based on the virtio-iommu specification written by Jean-Philippe Brucker [1]. This was tested with a guest using the virtio-iommu driver [2] and exposed with a virtio-net-pci using

Re: [Qemu-devel] [[PATCH V7] 09/11] migration: calculate vCPU blocktime on dst side

2017-06-07 Thread Fam Zheng
On Wed, 06/07 01:40, no-re...@patchew.org wrote: > Hi, > > This series failed build test on s390x host. Please find the details below. So what happened is the double '[[' in the subject line confused Patchew, and each patch in this series is treated as a standalone patch. Fam

Re: [Qemu-devel] [PATCH 2/5] coccinelle: use DIV_ROUND_UP

2017-06-07 Thread Marc-André Lureau
Hi - Original Message - > On 7 June 2017 at 08:46, Marc-André Lureau > wrote: > > The coccinelle/round.cocci script doesn't catch hard coded values. > > > > I used the following script over qemu code base: > > > > ( > > - ((e1) + 3) / (4) > > + DIV_ROUND_UP(e1,4) > > | > > - ((e1) + (3))

Re: [Qemu-devel] [[PATCH V7] 09/11] migration: calculate vCPU blocktime on dst side

2017-06-07 Thread Alexey Perevalov
On 06/07/2017 12:24 PM, Fam Zheng wrote: On Wed, 06/07 01:40, no-re...@patchew.org wrote: Hi, This series failed build test on s390x host. Please find the details below. So what happened is the double '[[' in the subject line confused Patchew, and each patch in this series is treated as a stan

[Qemu-devel] [PULL 1/1] target/m68k: implement rtd

2017-06-07 Thread Laurent Vivier
Add "Return and Deallocate" (rtd) instruction. RTD #d (SP) -> PC SP + 4 + d -> SP Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Tested-By: John Paul Adrian Glaubitz Message-Id: <20170605100014.22981-1-laur...@vivier.eu> --- target/m68k/cpu.c | 2 ++ target/m68

Re: [Qemu-devel] [[PATCH V7] 03/11] migration: fix hardcoded function name in error report

2017-06-07 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Subject: [Qemu-devel] [[PATCH V7] 03/11] migration: fix hardcoded function name in error report Message-id: 1496820931-27416-4-git-send-email-a.pereva...@samsung.com Type: series === TEST SCRIPT BEGIN === #!/bin/bas

[Qemu-devel] [PULL 0/1] M68k for 2.10 patches

2017-06-07 Thread Laurent Vivier
The following changes since commit 65dfad62a176f5265f801683be64149c5ad55f7d: Merge remote-tracking branch 'remotes/xtensa/tags/20170606-xtensa' into staging (2017-06-06 17:00:12 +0100) are available in the git repository at: git://github.com/vivier/qemu-m68k.git tags/m68k-for-2.10-pull-requ

Re: [Qemu-devel] [PATCH v3 5/7] pci: Make errp the last parameter of pci_add_capability()

2017-06-07 Thread Mao Zhongyi
Hi, Markus On 06/07/2017 03:05 PM, Markus Armbruster wrote: Mao Zhongyi writes: Hi, Eduardo On 06/06/2017 10:52 PM, Eduardo Habkost wrote: On Tue, Jun 06, 2017 at 07:26:30PM +0800, Mao Zhongyi wrote: Add Error argument for pci_add_capability() to leverage the errp to pass info on errors. T

Re: [Qemu-devel] [Qemu-block] [PATCH] blockjob: cancel blockjobs before stopping all iothreads

2017-06-07 Thread Alberto Garcia
On Sat 03 Jun 2017 07:48:37 AM CEST, sochin.jiang wrote: > --- a/block.c > +++ b/block.c > @@ -3084,9 +3084,16 @@ static void bdrv_close(BlockDriverState *bs) > bdrv_drained_end(bs); > } > > +void bdrv_cancel_all(void) > +{ > +if (!block_jobs_is_empty()) { > +block_job_cancel_s

[Qemu-devel] [PATCH v8 00/11] calculate blocktime for postcopy live migration

2017-06-07 Thread Alexey Perevalov
This is 8th version. The rationale for that idea is following: vCPU could suspend during postcopy live migration until faulted page is not copied into kernel. Downtime on source side it's a value - time interval since source turn vCPU off, till destination start runnig vCPU. But that value was pro

[Qemu-devel] [PATCH v8 08/11] migration: postcopy_place_page factoring out

2017-06-07 Thread Alexey Perevalov
Need to mark paged copied as closer as possible place where it tracks down. That will be necessary in futher patch. Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 13 - migration/postcopy-ram.h | 4 ++-- migration/ram.c | 4 ++-- 3 files changed, 12 inserti

[Qemu-devel] [PATCH v8 05/11] migration: introduce postcopy-blocktime capability

2017-06-07 Thread Alexey Perevalov
Right now it could be used on destination side to enable vCPU blocktime calculation for postcopy live migration. vCPU blocktime - it's time since vCPU thread was put into interruptible sleep, till memory page was copied and thread awake. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey P

[Qemu-devel] [PATCH v8 06/11] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-06-07 Thread Alexey Perevalov
This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. PostcopyBlocktimeContext is incapsulated inside postcopy-ram.c, due to it's postcopy only feature. Also it defines PostcopyBlocktimeContext's instance live time. Information from Po

[Qemu-devel] [PATCH v8 09/11] migration: calculate vCPU blocktime on dst side

2017-06-07 Thread Alexey Perevalov
This patch provides blocktime calculation per vCPU, as a summary and as a overlapped value for all vCPUs. This approach was suggested by Peter Xu, as an improvements of previous approch where QEMU kept tree with faulted page address and cpus bitmask in it. Now QEMU is keeping array with faulted pa

[Qemu-devel] [PATCH v8 01/11] userfault: add pid into uffd_msg & update UFFD_FEATURE_*

2017-06-07 Thread Alexey Perevalov
This commit duplicates header of "userfaultfd: provide pid in userfault msg" into linux kernel. Signed-off-by: Alexey Perevalov --- linux-headers/linux/userfaultfd.h | 4 1 file changed, 4 insertions(+) diff --git a/linux-headers/linux/userfaultfd.h b/linux-headers/linux/userfaultfd.h ind

[Qemu-devel] [PATCH v8 03/11] migration: fix hardcoded function name in error report

2017-06-07 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 10d39a0..8838901 100644 --- a/migration/postcopy-ram.c +++ b/migration/po

[Qemu-devel] [PATCH v8 07/11] migration: add bitmap for copied page

2017-06-07 Thread Alexey Perevalov
This patch adds ability to track down already copied pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure. Also it's necessary to solve shared memory issue in postcopy livemigration. Information about copied pages wi

[Qemu-devel] [PATCH v8 10/11] migration: add postcopy total blocktime into query-migrate

2017-06-07 Thread Alexey Perevalov
Postcopy total blocktime is available on destination side only. But query-migrate was possible only for source. This patch adds ability to call query-migrate on destination. To be able to see postcopy blocktime, need to request postcopy-blocktime capability. The query-migrate command will show fol

Re: [Qemu-devel] [RFC PATCH 1/3] vmstate: error hint for failed equal checks

2017-06-07 Thread Dr. David Alan Gilbert
* Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > In some cases a failing VMSTATE_*_EQUAL does not mean we detected a bug > (it's actually the best we can do). Especially in these cases a verbose > error message is required. > > Let's introduce infrastructure for specifying a error hint to be used

[Qemu-devel] [PATCH v8 04/11] migration: split ufd_version_check onto receive/request features part

2017-06-07 Thread Alexey Perevalov
This modification is necessary for userfault fd features which are required to be requested from userspace. UFFD_FEATURE_THREAD_ID is a one of such "on demand" feature, which will be introduced in the next patch. QEMU have to use separate userfault file descriptor, due to userfault context has int

[Qemu-devel] [PATCH v8 11/11] migration: postcopy_blocktime documentation

2017-06-07 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov --- docs/migration.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/migration.txt b/docs/migration.txt index 1b940a8..4b625ca 100644 --- a/docs/migration.txt +++ b/docs/migration.txt @@ -402,6 +402,16 @@

[Qemu-devel] [PATCH v8 02/11] migration: pass MigrationIncomingState* into migration check functions

2017-06-07 Thread Alexey Perevalov
That tiny refactoring is necessary to be able to set UFFD_FEATURE_THREAD_ID while requesting features, and then to create downtime context in case when kernel supports it. Signed-off-by: Alexey Perevalov --- migration/migration.c| 3 ++- migration/postcopy-ram.c | 10 +- migration/p

[Qemu-devel] [PATCH V6 04/10] net/net.c: Add vnet_hdr support in SocketReadState

2017-06-07 Thread Zhang Chen
We add a flag to dicide whether net_fill_rstate() to read the vnet_hdr_len or not. Signed-off-by: Zhang Chen Suggested-by: Jason Wang --- include/net/net.h | 6 +- net/filter-mirror.c | 1 + net/net.c | 33 ++--- 3 files changed, 36 insertions(+), 4

[Qemu-devel] [PATCH V6 01/10] net: Add vnet_hdr_len arguments in NetClientState

2017-06-07 Thread Zhang Chen
Add vnet_hdr_len arguments in NetClientState that make other module get real vnet_hdr_len easily. Signed-off-by: Zhang Chen --- include/net/net.h | 1 + net/net.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 99b28d5..9a92c70 100644 ---

[Qemu-devel] [PATCH V6 05/10] net/colo.c: Make vnet_hdr_len as packet property

2017-06-07 Thread Zhang Chen
We can use this property flush and send packet with vnet_hdr_len. Signed-off-by: Zhang Chen --- net/colo-compare.c| 8 ++-- net/colo.c| 3 ++- net/colo.h| 4 +++- net/filter-rewriter.c | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/net/col

[Qemu-devel] [PATCH V6 08/10] net/colo-compare.c: Add vnet packet's tcp/udp/icmp compare

2017-06-07 Thread Zhang Chen
COLO-Proxy just focus on packet payload, So we skip vnet header. Signed-off-by: Zhang Chen --- net/colo-compare.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index e33cf7e..ad1c3d5 100644 --- a/net/colo-compare.c +++ b/net/c

[Qemu-devel] [PATCH V6 02/10] net/filter-mirror.c: Make filter mirror support vnet support.

2017-06-07 Thread Zhang Chen
We add the vnet_hdr_support option for filter-mirror, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0,vnet_hdr_support If have vnet_hdr_support flag, we will change the send packe

[Qemu-devel] [PATCH V6 00/10] Add COLO-proxy virtio-net support

2017-06-07 Thread Zhang Chen
If user use -device virtio-net-pci, virtio-net driver will add a header to raw net packet that colo-proxy can't handle it. COLO-proxy just focus on the packet payload, so we skip the virtio-net header to compare the sent packet that primary guest's to secondary guest's. V6: - p1: Remove the using

[Qemu-devel] [PATCH V6 10/10] docs/colo-proxy.txt: Update colo-proxy usage of net driver with vnet_header

2017-06-07 Thread Zhang Chen
Signed-off-by: Zhang Chen --- docs/colo-proxy.txt | 26 ++ 1 file changed, 26 insertions(+) diff --git a/docs/colo-proxy.txt b/docs/colo-proxy.txt index c4941de..f6a624f 100644 --- a/docs/colo-proxy.txt +++ b/docs/colo-proxy.txt @@ -182,6 +182,32 @@ Secondary(ip:3.3.3.8):

[Qemu-devel] [PATCH V6 09/10] net/filter-rewriter.c: Make filter-rewriter support vnet_hdr_len

2017-06-07 Thread Zhang Chen
We add the vnet_hdr_support option for filter-rewriter, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-rewriter,id=rew0,netdev=hn0,queue=all,vnet_hdr_support We get the vnet_hdr_len from NetClientState that make us parse net p

[Qemu-devel] [PATCH V6 03/10] net/filter-mirror.c: Add new option to enable vnet support for filter-redirector

2017-06-07 Thread Zhang Chen
We add the vnet_hdr_support option for filter-redirector, default is disable. If you use virtio-net-pci net driver, please enable it. Because colo-compare or other modules needs the vnet_hdr_len to parse packet, so we add this new option send the len to others. You can use it for example: -object f

[Qemu-devel] [PULL 4/7] ram: Move ZERO_TARGET_PAGE inside XBZRLE

2017-06-07 Thread Juan Quintela
It was only used by XBZRLE anyways. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu --- migration/ram.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 701a1e6..ac30e9e 100644 --- a/m

[Qemu-devel] [PULL 0/7] Migration PULL requset

2017-06-07 Thread Juan Quintela
'remotes/xtensa/tags/20170606-xtensa' into staging (2017-06-06 17:00:12 +0100) are available in the git repository at: git://github.com/juanquintela/qemu.git tags/migration/20170607 for you to fetch changes up to eefff991d059d299b917627d2a95bce34d2f97f3: qemu/migration: fix the d

Re: [Qemu-devel] [PATCH 1/5] coccinelle: replace code with ROUND_UP macro

2017-06-07 Thread Juan Quintela
Marc-André Lureau wrote: > I used a the following coccinelle script: > > @@ > expression e1; > @@ > - ((e1) + (3)) / (4) * (4) > + ROUND_UP(e1,4) > > @@ > expression e1; > expression e2; > @@ > -(ROUND_UP(e1,e2)) > +ROUND_UP(e1,e2) > > I tried with various other values (4, 8, 16, 32), but got only

[Qemu-devel] [PATCH V6 07/10] net/colo.c: Add vnet packet parse feature in colo-proxy

2017-06-07 Thread Zhang Chen
Make colo-compare and filter-rewriter can parse vnet packet. Signed-off-by: Zhang Chen --- net/colo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/colo.c b/net/colo.c index 180eaed..28ce7c8 100644 --- a/net/colo.c +++ b/net/colo.c @@ -43,11 +43,11 @@ int parse_pa

[Qemu-devel] [PULL 1/7] ram: Unfold get_xbzrle_cache_stats() into populate_ram_info()

2017-06-07 Thread Juan Quintela
They were called consecutively always. Signed-off-by: Juan Quintela Reviewed-by: Eric Blake --- migration/migration.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 48c94c9..b1e68c0 100644 -

Re: [Qemu-devel] [PATCH 4/5] Replace g_malloc()+memcpy() with g_memdup()

2017-06-07 Thread Juan Quintela
Marc-André Lureau wrote: > I found these pattern via grepping the source tree. I don't have a > coccinelle script for it! > > Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela

[Qemu-devel] [PATCH V6 06/10] net/colo-compare.c: Make colo-compare support vnet_hdr_len

2017-06-07 Thread Zhang Chen
We add the vnet_hdr_support option for colo-compare, default is disable. If you use virtio-net-pci or other driver needs vnet_hdr, please enable it. You can use it for example: -object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0,vnet_hdr_support COLO-comp

[Qemu-devel] [PULL 2/7] ram: We only print throttling information sometimes

2017-06-07 Thread Juan Quintela
Change it to be consistent with everything else. Signed-off-by: Juan Quintela Reviewed-by: Eric Blake --- migration/migration.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index b1e68c0..9c5ff57 100644 --- a/migrat

[Qemu-devel] [PULL 3/7] ram: Call migration_page_queue_free() at ram_migration_cleanup()

2017-06-07 Thread Juan Quintela
We shouldn't be using memory later than that. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu --- migration/migration.c | 2 -- migration/ram.c | 5 +++-- migration/ram.h | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/mi

  1   2   3   4   5   >