Re: [Qemu-devel] [PATCH 3/3] nvdimm: platform capabilities command line option

2018-05-16 Thread Igor Mammedov
On Tue, 15 May 2018 17:03:51 -0600 Ross Zwisler wrote: > On Thu, May 10, 2018 at 03:28:48PM +0200, Igor Mammedov wrote: [...] > > > Also an extra patch to for make check that will test setting 'cap' > > would be nice (an extra testcase in tests/bios-tables-test.c) > > Hmm...I've been looking

Re: [Qemu-devel] [PATCH] memfd: Avoid Coverity warning about integer overflow

2018-05-16 Thread Paolo Bonzini
On 15/05/2018 19:27, Peter Maydell wrote: > Coverity complains about qemu_memfd_create() (CID 1385858) because > we calculate a bit position htsize which could be up to 63, but > then use it in "1 << htsize" which is a 32-bit integer calculation > and could push the 1 off the top of the value. > >

Re: [Qemu-devel] [PATCH] exec.c: Initialize sa_flags passed to sigaction()

2018-05-16 Thread Paolo Bonzini
On 15/05/2018 20:27, Peter Maydell wrote: > Coverity points out that in the user-only version of cpu_abort() we > call sigaction() with a partially initialized struct sigaction > (CID 1005351). Correct the omission. > > Signed-off-by: Peter Maydell > --- > exec.c | 1 + > 1 file changed, 1 inser

Re: [Qemu-devel] [PATCH] WHPX Add signature CPUID

2018-05-16 Thread Paolo Bonzini
On 16/05/2018 01:55, Alessandro Pilotti wrote: > Hi Paolo, > > The main reason for different signatures is to allow guest workloads > to be aware of the differences between the two platforms (eg VirtIO > vs VMBus). Why does it matter? CPUID tells you about the enlightenments that the hypervisor

Re: [Qemu-devel] Problem with data miscompare using scsi-hd, cache=none and io=threads

2018-05-16 Thread Paolo Bonzini
On 15/05/2018 23:25, Daniel Henrique Barboza wrote: > This is the current status of this investigation. I decided to start a > discussion here, see if someone can point me something that I overlooked > or got it wrong, before I started changing the POSIX thread pool > behavior to see if I can enfor

Re: [Qemu-devel] [PATCH v6 3/4] slirp: Add "query-usernet" QMP command

2018-05-16 Thread Markus Armbruster
Fam Zheng writes: > HMP "info usernet" has been available but it isn't ideal for programmed > use cases. This closes the gap in QMP by adding a counterpart > "query-usernet" command. It is basically translated from > the HMP slirp_connection_info() loop, which now calls the QMP > implementation a

Re: [Qemu-devel] [PATCH 2/2] migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect

2018-05-16 Thread 858585 jemmy
On Tue, May 15, 2018 at 3:27 AM, Dr. David Alan Gilbert wrote: > * 858585 jemmy (jemmy858...@gmail.com) wrote: >> On Sat, May 12, 2018 at 2:03 AM, Dr. David Alan Gilbert >> wrote: >> > * 858585 jemmy (jemmy858...@gmail.com) wrote: >> >> On Wed, May 9, 2018 at 2:40 AM, Dr. David Alan Gilbert >> >>

Re: [Qemu-devel] [PATCH] xen-hvm: stop faking I/O to access PCI config space

2018-05-16 Thread Paul Durrant
Anthony, Stefano, Ping? Paul > -Original Message- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 03 May 2018 12:19 > To: xen-de...@lists.xenproject.org; qemu-devel@nongnu.org > Cc: Paul Durrant ; Stefano Stabellini > ; Anthony Perard ; > Michael S. Tsirkin ; Marcel Apf

[Qemu-devel] [PATCH v2] iothread: fix epollfd leak in the process of delIOThread

2018-05-16 Thread Jie Wang
From: w00251574 When we call addIOThread, the epollfd created in aio_context_setup, but not close it in the process of delIOThread, so the epollfd will leak. Signed-off-by: Jie Wang --- include/block/aio.h | 8 util/aio-posix.c| 7 +++ util/aio-win32.c| 4 util/async.

Re: [Qemu-devel] [PATCH v6 0/3] target/arm: Add a dynamic XML-description of the cp-registers to GDB

2018-05-16 Thread Alex Bennée
Peter Maydell writes: > On 10 May 2018 at 14:12, Alex Bennée wrote: >> >> Abdallah Bouassida writes: >> >>> The previous version: >>> http://patchwork.ozlabs.org/project/qemu-devel/list/?series=33714 >>> >>> Abdallah Bouassida (3): >>> target/arm: Add "ARM_CP_NO_GDB" as a new bit field for A

Re: [Qemu-devel] [PATCH v5 3/6] s390x/cpumodel: Set up CPU model for AP device support

2018-05-16 Thread Pierre Morel
On 15/05/2018 17:03, Tony Krowiak wrote: On 05/15/2018 08:00 AM, Pierre Morel wrote: On 08/05/2018 14:25, Tony Krowiak wrote: A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. CPU model features: 1. The KVM_S390_VM_CPU_FEAT_AP CPU m

Re: [Qemu-devel] [PATCH v2] iothread: fix epollfd leak in the process of delIOThread

2018-05-16 Thread Fam Zheng
On Wed, 05/16 14:39, Jie Wang wrote: > From: w00251574 > > When we call addIOThread, the epollfd created in aio_context_setup, > but not close it in the process of delIOThread, so the epollfd will leak. > > Signed-off-by: Jie Wang > --- > include/block/aio.h | 8 > util/aio-posix.c

Re: [Qemu-devel] [PATCH v5 4/6] s390x/vfio: ap: Introduce VFIO AP device

2018-05-16 Thread Pierre Morel
On 15/05/2018 17:09, Tony Krowiak wrote: On 05/15/2018 03:55 AM, Pierre Morel wrote: On 14/05/2018 21:26, Tony Krowiak wrote: On 05/11/2018 05:02 AM, Pierre Morel wrote: On 10/05/2018 15:10, Tony Krowiak wrote: On 05/09/2018 10:28 AM, Halil Pasic wrote: On 05/08/2018 02:25 PM, Tony Krowiak

Re: [Qemu-devel] [PATCH v2] iothread: fix epollfd leak in the process of delIOThread

2018-05-16 Thread Peter Xu
On Wed, May 16, 2018 at 02:39:44PM +0800, Jie Wang wrote: > From: w00251574 (Maybe you'd prefer to still use "Jie Wang" here? :) > > When we call addIOThread, the epollfd created in aio_context_setup, > but not close it in the process of delIOThread, so the epollfd will leak. > > Signed-off-by

[Qemu-devel] [PATCH] kvm: Delete the slot only when KVM_MEM_READONLY flag is changed

2018-05-16 Thread Shannon Zhao
According to KVM commit 75d61fbc, it needs to delete the slot before changing the KVM_MEM_READONLY flag. But QEMU commit 235e8982 only check whether KVM_MEM_READONLY flag is set instead of changing. It doesn't need to delete the slot if the KVM_MEM_READONLY flag is not changed. This fixes a issue

Re: [Qemu-devel] [PATCH v5 3/6] s390x/cpumodel: Set up CPU model for AP device support

2018-05-16 Thread David Hildenbrand
On 16.05.2018 11:05, Pierre Morel wrote: > On 15/05/2018 17:03, Tony Krowiak wrote: >> On 05/15/2018 08:00 AM, Pierre Morel wrote: >>> On 08/05/2018 14:25, Tony Krowiak wrote: A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. >>

Re: [Qemu-devel] [PATCH] HACKING: document preference for g_new instead of g_malloc

2018-05-16 Thread David Hildenbrand
On 15.05.2018 15:49, Murilo Opsfelder Araujo wrote: > This patch documents the preference for g_new instead of g_malloc. The > reasons were adapted from commit b45c03f585ea9bb1af76c73e82195418c294919d. > > Discussion in QEMU's mailing list: > http://lists.nongnu.org/archive/html/qemu-devel/2018-

Re: [Qemu-devel] [edk2] [PATCH 0/4] RFC: ovmf: Add support for TPM Physical Presence interface

2018-05-16 Thread Laszlo Ersek
Hi Marc-André, On 05/15/18 14:30, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > The following series adds basic TPM PPI 1.3 support for OVMF-on-QEMU > with TPM2 (I haven't tested TPM1, for lack of interest). I got the review of this patch series added to my TODO list,

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 02/18] memory-device: introduce separate config option

2018-05-16 Thread David Hildenbrand
On 15.05.2018 17:21, Eric Blake wrote: > On 05/14/2018 07:20 PM, Murilo Opsfelder Araujo wrote: >> On Mon, May 14, 2018 at 12:00:07PM +0200, David Hildenbrand wrote: >>> Some architectures might support memory devices, while they don't >>> support DIMM/NVDIMM. So let's >>> - Rename CONFIG_MEM_HOTPL

Re: [Qemu-devel] [PATCH v3 5/6] migration: implement bi-directional RDMA QIOChannel

2018-05-16 Thread 858585 jemmy
On Tue, May 15, 2018 at 10:54 PM, Paolo Bonzini wrote: > On 05/05/2018 16:35, Lidong Chen wrote: >> @@ -2635,12 +2637,20 @@ static ssize_t qio_channel_rdma_writev(QIOChannel >> *ioc, >> { >> QIOChannelRDMA *rioc = QIO_CHANNEL_RDMA(ioc); >> QEMUFile *f = rioc->file; >> -RDMAContext

Re: [Qemu-devel] [qemu-s390x] [PATCH] pc-bios/s390-ccw: struct tpi_info must be declared as aligned(4)

2018-05-16 Thread David Hildenbrand
On 08.05.2018 12:17, Thomas Huth wrote: > I've run into a compilation error today with the current version of GCC 8: > > In file included from s390-ccw.h:49, > from main.c:12: > cio.h:128:1: error: alignment 1 of 'struct tpi_info' is less than 4 > [-Werror=packed-not-aligned] >

Re: [Qemu-devel] [PATCH 2/2] migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect

2018-05-16 Thread Dr. David Alan Gilbert
* 858585 jemmy (jemmy858...@gmail.com) wrote: > On Tue, May 15, 2018 at 3:27 AM, Dr. David Alan Gilbert > wrote: > > * 858585 jemmy (jemmy858...@gmail.com) wrote: > >> On Sat, May 12, 2018 at 2:03 AM, Dr. David Alan Gilbert > >> wrote: > >> > * 858585 jemmy (jemmy858...@gmail.com) wrote: > >> >>

Re: [Qemu-devel] [PATCH 2/2] migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect

2018-05-16 Thread 858585 jemmy
On Wed, May 16, 2018 at 5:39 PM, Dr. David Alan Gilbert wrote: > * 858585 jemmy (jemmy858...@gmail.com) wrote: >> On Tue, May 15, 2018 at 3:27 AM, Dr. David Alan Gilbert >> wrote: >> > * 858585 jemmy (jemmy858...@gmail.com) wrote: >> >> On Sat, May 12, 2018 at 2:03 AM, Dr. David Alan Gilbert >> >

Re: [Qemu-devel] Problem with data miscompare using scsi-hd, cache=none and io=threads

2018-05-16 Thread Dr. David Alan Gilbert
* Daniel Henrique Barboza (danie...@linux.ibm.com) wrote: > Hi, > > I've been working in the last two months in a miscompare issue that happens > when using a raid device and a SATA as scsi-hd (emulated SCSI) with > cache=none and io=threads during a hardware stress test. I'll summarize it > here

Re: [Qemu-devel] [PATCH 2/2] migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect

2018-05-16 Thread Dr. David Alan Gilbert
* 858585 jemmy (jemmy858...@gmail.com) wrote: > On Wed, May 16, 2018 at 5:39 PM, Dr. David Alan Gilbert > wrote: > > * 858585 jemmy (jemmy858...@gmail.com) wrote: > >> On Tue, May 15, 2018 at 3:27 AM, Dr. David Alan Gilbert > >> wrote: > >> > * 858585 jemmy (jemmy858...@gmail.com) wrote: > >> >>

Re: [Qemu-devel] [Xen-devel] [PATCH] xen-hvm: stop faking I/O to access PCI config space

2018-05-16 Thread Roger Pau Monné
On Thu, May 03, 2018 at 12:18:40PM +0100, Paul Durrant wrote: > This patch removes the current hackery where IOREQ_TYPE_PCI_CONFIG > reqyests are handled by faking PIO to 0xcf8 and 0xcfc and replaces it > with direct calls to pci_host_config_read/write_common(). > Doing so necessitates mapping BDFs

[Qemu-devel] [PATCH v3] iothread: fix epollfd leak in the process of delIOThread

2018-05-16 Thread Jie Wang
From: w00251574 When we call addIOThread, the epollfd created in aio_context_setup, but not close it in the process of delIOThread, so the epollfd will leak. Signed-off-by: Jie Wang --- include/block/aio.h | 8 util/aio-posix.c| 9 + util/aio-win32.c| 4 util/asyn

Re: [Qemu-devel] [PATCH v2 3/3] WHPX: fix some compiler warnings

2018-05-16 Thread Paolo Bonzini
On 15/05/2018 19:35, petrutlucia...@gmail.com wrote: > From: Lucian Petrut > > This patch fixes a few compiler warnings, especially in case of > x86 targets, where the number of registers was not properly handled > and could cause an overflow. > > Signed-off-by: Alessandro Pilotti > Signed-off-

Re: [Qemu-devel] [PATCH v2 2/3] WHPX: dynamically load WHP libraries

2018-05-16 Thread Paolo Bonzini
On 15/05/2018 19:35, petrutlucia...@gmail.com wrote: > From: Lucian Petrut > > We're currently linking against import libraries of the WHP DLLs. > > By dynamically loading the libraries, we ensure that QEMU will work > on previous Windows versions, where the WHP DLLs will be missing > (assuming

Re: [Qemu-devel] [PATCH v2 3/3] WHPX: fix some compiler warnings

2018-05-16 Thread Lucian Petrut
Hi, Thanks for reviewing those changes. “can you send a patch with the bugfix only” By “the bugfix only” you mean the previous commit, the one that dynamically loads the DLLs? FWIW, without this patch, i386 targets won’t compile, so I’d consider that an improvement. Probably I should’ve explic

Re: [Qemu-devel] [PATCH 0/4] exec: reintroduce MemoryRegion caching

2018-05-16 Thread Auger Eric
Hi Paolo, On 04/17/2018 04:07 PM, Paolo Bonzini wrote: > MemoryRegionCache was reverted to "normal" address_space_* operations > for 2.9, due to lack of support for IOMMUs. This series reinstates > optimizations, caching only the IOMMU translation but not the IOMMU > lookup and target AddressSpac

Re: [Qemu-devel] [PATCH v2 3/3] WHPX: fix some compiler warnings

2018-05-16 Thread Paolo Bonzini
On 16/05/2018 12:21, Lucian Petrut wrote: > Hi, > > Thanks for reviewing those changes. > > /“can you send a patch with the bugfix only”/ > > By “the bugfix only” you mean the previous commit, the one that > dynamically loads the DLLs? > > FWIW, without this patch, i386 targets won’t compile, s

Re: [Qemu-devel] [PATCH v5 3/6] s390x/cpumodel: Set up CPU model for AP device support

2018-05-16 Thread Tony Krowiak
On 05/16/2018 05:23 AM, David Hildenbrand wrote: On 16.05.2018 11:05, Pierre Morel wrote: On 15/05/2018 17:03, Tony Krowiak wrote: On 05/15/2018 08:00 AM, Pierre Morel wrote: On 08/05/2018 14:25, Tony Krowiak wrote: A new CPU model feature and two new CPU model facilities are introduced to su

Re: [Qemu-devel] [PATCH v5 4/6] s390x/vfio: ap: Introduce VFIO AP device

2018-05-16 Thread Tony Krowiak
On 05/16/2018 05:09 AM, Pierre Morel wrote: On 15/05/2018 17:09, Tony Krowiak wrote: On 05/15/2018 03:55 AM, Pierre Morel wrote: On 14/05/2018 21:26, Tony Krowiak wrote: On 05/11/2018 05:02 AM, Pierre Morel wrote: On 10/05/2018 15:10, Tony Krowiak wrote: On 05/09/2018 10:28 AM, Halil Pasic w

Re: [Qemu-devel] [PATCH 0/4] exec: reintroduce MemoryRegion caching

2018-05-16 Thread Paolo Bonzini
On 16/05/2018 12:41, Auger Eric wrote: > This patch seems to cause a regression with ARM vsmmu + > virtio-blk-pci. Reverting it looks to fix the issue. Otherwise I > get: What's the command line for a reproducer? Thanks, Paolo

Re: [Qemu-devel] [PATCH v2 3/3] WHPX: fix some compiler warnings

2018-05-16 Thread Lucian Petrut
Oh, right, got it. Sorry for the confusion, I’ll take that out of the patch. Thanks, Lucian Petrut From: Paolo Bonzini Sent: Wednesday, May 16, 2018 1:42 PM To: Lucian Petrut; petrutlucia...@gmail.com

[Qemu-devel] [PATCH v4] iothread: fix epollfd leak in the process of delIOThread

2018-05-16 Thread Jie Wang
When we call addIOThread, the epollfd created in aio_context_setup, but not close it in the process of delIOThread, so the epollfd will leak. Signed-off-by: Jie Wang --- include/block/aio.h | 8 util/aio-posix.c| 9 + util/aio-win32.c| 4 util/async.c| 1 +

Re: [Qemu-devel] [PATCH 17/42] job: Move defer_to_main_loop to Job

2018-05-16 Thread Max Reitz
On 2018-05-15 14:17, Kevin Wolf wrote: > Am 14.05.2018 um 17:52 hat Max Reitz geschrieben: >> On 2018-05-09 18:26, Kevin Wolf wrote: >>> Signed-off-by: Kevin Wolf >>> --- >>> include/block/blockjob.h | 5 >>> include/block/blockjob_int.h | 19 --- >>> include/qemu/job.h

Re: [Qemu-devel] [PATCH 32/42] job: Move completion and cancellation to Job

2018-05-16 Thread Max Reitz
On 2018-05-15 14:59, Kevin Wolf wrote: > Am 14.05.2018 um 22:53 hat Max Reitz geschrieben: >> On 2018-05-09 18:26, Kevin Wolf wrote: >>> This moves the top-level job completion and cancellation functions from >>> BlockJob to Job. >>> >>> Signed-off-by: Kevin Wolf > >>> @@ -3362,7 +3362,7 @@ stati

Re: [Qemu-devel] [PATCH 39/42] job: Add lifecycle QMP commands

2018-05-16 Thread Max Reitz
On 2018-05-15 16:08, Kevin Wolf wrote: > Am 15.05.2018 um 00:31 hat Max Reitz geschrieben: >> On 2018-05-09 18:26, Kevin Wolf wrote: >>> This adds QMP commands that control the transition between states of the >>> job lifecycle. >>> >>> Signed-off-by: Kevin Wolf >>> --- >>> qapi/job.json | 112 ++

Re: [Qemu-devel] [PATCH V7 RESEND 04/17] COLO: integrate colo compare with colo frame

2018-05-16 Thread Dr. David Alan Gilbert
* Zhang Chen (zhangc...@gmail.com) wrote: > For COLO FT, both the PVM and SVM run at the same time, > only sync the state while it needs. > > So here, let SVM runs while not doing checkpoint, change > DEFAULT_MIGRATE_X_CHECKPOINT_DELAY to 200*100. > > Besides, we forgot to release colo_checkpoint

Re: [Qemu-devel] [PATCH v4] iothread: fix epollfd leak in the process of delIOThread

2018-05-16 Thread WangJie (Pluto)
Hi, Peter Xu: If call aio_epoll_disable() here, aio_epoll_disable() will return before close ctx->epollfd, Because the ctx->epoll_enabled is false in the moment. In the process of addIOThread, aio_context_setup created epoll without call aio_epoll_try_enable, so ctx->epoll

Re: [Qemu-devel] [PATCH V7 RESEND 00/17] COLO: integrate colo frame with block replication and COLO proxy

2018-05-16 Thread Dr. David Alan Gilbert
Hi Jason, Patches 1,2,3,14,15 seem mostly networky to me; can you have a look? Dave * Zhang Chen (zhangc...@gmail.com) wrote: > The RESEND version just fix code style in patch 11/17. > > Hi~ All~ > > COLO Frame, block replication and COLO proxy(colo-compare,filter-mirror, > filter-redirector,

Re: [Qemu-devel] [PATCH v4] iothread: fix epollfd leak in the process of delIOThread

2018-05-16 Thread WangJie (Pluto)
Hi, Peter Xu: If call aio_epoll_disable() in aio_context_destroy, aio_epoll_disable() will return before close(ctx->epollfd), Because the ctx->epoll_enabled is false in the moment. In the process of addIOThread, aio_context_setup created epoll without call aio_epoll_try_enable

Re: [Qemu-devel] [PATCH 40/42] job: Add query-jobs QMP command

2018-05-16 Thread Kevin Wolf
Am 15.05.2018 um 01:09 hat Max Reitz geschrieben: > On 2018-05-09 18:26, Kevin Wolf wrote: > > This adds a minimal query-jobs implementation that shouldn't pose many > > design questions. It can later be extended to expose more information, > > and especially job-specific information. > > > > Sign

[Qemu-devel] [PATCH] block: fix QEMU crash with scsi-hd and drive_del

2018-05-16 Thread Greg Kurz
Removing a drive with drive_del while it is being used to run an I/O intensive workload can cause QEMU to crash. An AIO flush can yield at some point: blk_aio_flush_entry() blk_co_flush(blk) bdrv_co_flush(blk->root->bs) ... qemu_coroutine_yield() and let the HMP command to run, free bl

Re: [Qemu-devel] [PATCH 40/42] job: Add query-jobs QMP command

2018-05-16 Thread Max Reitz
On 2018-05-16 13:21, Kevin Wolf wrote: > Am 15.05.2018 um 01:09 hat Max Reitz geschrieben: >> On 2018-05-09 18:26, Kevin Wolf wrote: >>> This adds a minimal query-jobs implementation that shouldn't pose many >>> design questions. It can later be extended to expose more information, >>> and especial

Re: [Qemu-devel] [RFC 00/10] [TESTING NEEDED] python: futurize --stage1 (Python 3 compatibility)

2018-05-16 Thread Max Reitz
On 2018-05-12 00:20, Eduardo Habkost wrote: > TESTING NEEDED: Due to the amount of changes, I didn't test all > scripts touched by this series. If you are responsible for any > of the touched files, I would appreciate help on testing the > series. All the iotests* still pass, so for my part: Tes

Re: [Qemu-devel] [PATCH v4] iothread: fix epollfd leak in the process of delIOThread

2018-05-16 Thread Peter Xu
On Wed, May 16, 2018 at 07:14:53PM +0800, WangJie (Pluto) wrote: > Hi, Peter Xu: > If call aio_epoll_disable() here, aio_epoll_disable() will return > before close ctx->epollfd, > Because the ctx->epoll_enabled is false in the moment. > In the process of addIOThread, aio_context_se

Re: [Qemu-devel] [PATCH V7 RESEND 00/17] COLO: integrate colo frame with block replication and COLO proxy

2018-05-16 Thread Jason Wang
On 2018年05月16日 19:18, Dr. David Alan Gilbert wrote: Hi Jason, Patches 1,2,3,14,15 seem mostly networky to me; can you have a look? Dave Sure, will review. Thanks * Zhang Chen (zhangc...@gmail.com) wrote: The RESEND version just fix code style in patch 11/17. Hi~ All~ COLO Frame, bl

Re: [Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-05-16 Thread Eduardo Habkost
On Sat, May 12, 2018 at 01:12:59AM +0300, Michael S. Tsirkin wrote: > On Thu, Apr 19, 2018 at 06:53:20PM -0300, Eduardo Habkost wrote: > > On Thu, Apr 19, 2018 at 11:32:16PM +0200, Paolo Bonzini wrote: > > > On 19/04/2018 21:56, Eduardo Habkost wrote: > > > > On Thu, Apr 19, 2018 at 05:48:57PM +020

Re: [Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-05-16 Thread Paolo Bonzini
On 12/05/2018 00:12, Michael S. Tsirkin wrote: >> Maybe it's a better idea than overloading an option that is only >> expected to control a CPUID bit. > Well -realtime would be a bit confusing in that it enables mlock by > default. Currently, the only suboption of "-realtime" is mlock, which means

Re: [Qemu-devel] Restoring bitmaps after failed/cancelled migration

2018-05-16 Thread Kevin Wolf
Am 14.05.2018 um 12:09 hat Vladimir Sementsov-Ogievskiy geschrieben: > 14.05.2018 09:41, Fam Zheng wrote: > > On Wed, 04/18 17:00, Vladimir Sementsov-Ogievskiy wrote: > > > Is it possible, that target will change the disk, and then we return > > > control > > > to the source? In this case bitmaps

Re: [Qemu-devel] [PATCH 2/2] migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect

2018-05-16 Thread 858585 jemmy
On Wed, May 16, 2018 at 5:53 PM, Dr. David Alan Gilbert wrote: > * 858585 jemmy (jemmy858...@gmail.com) wrote: >> On Wed, May 16, 2018 at 5:39 PM, Dr. David Alan Gilbert >> wrote: >> > * 858585 jemmy (jemmy858...@gmail.com) wrote: >> >> On Tue, May 15, 2018 at 3:27 AM, Dr. David Alan Gilbert >> >

[Qemu-devel] [PATCH 0/1] USB CCID packet handling issue

2018-05-16 Thread jjelen
From: Jakub Jelen while working on libcacard, I encountered an issue with USB "packet fragmentation" (for the lack of better knowledge how to call it) in the CCID code. It happens if I try to send exactly 34 B from the virtualized Smart Card to the guest. These 34 B are packed into 64 B payload

Re: [Qemu-devel] [PATCH v9 3/7] i386: Populate AMD Processor Cache Information for cpuid 0x8000001D

2018-05-16 Thread Eduardo Habkost
On Mon, May 14, 2018 at 11:49:30PM +, Moger, Babu wrote: > > > -Original Message- > > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > > Sent: Monday, May 14, 2018 2:47 PM > > To: Moger, Babu > > Cc: m...@redhat.com; marcel.apfelb...@gmail.com; pbonz...@redhat.com; > > r...@twiddl

[Qemu-devel] [PATCH 1/1] hw/usb/dev-smartcard-reader: Handle 64 B USB packets

2018-05-16 Thread jjelen
From: Jakub Jelen The current code was not correctly handling 64 B (Max USB 1.1 payload size) packets and therefore preventing some of the messages from smart card to pass through to the guest. If the smart card in host responded with 34 B of data in APDU layer, the CCID headers added up to 64 B

Re: [Qemu-devel] [PATCH 2/2] migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect

2018-05-16 Thread Dr. David Alan Gilbert
* 858585 jemmy (jemmy858...@gmail.com) wrote: > >> >> > I wonder why dereg_mr takes so long - I could understand if reg_mr > >> >> > took a long time, but why for dereg, that sounds like the easy side. > >> >> > >> >> I use perf collect the information when ibv_dereg_mr is invoked. > >> >> > >>

Re: [Qemu-devel] [PATCH v6 1/2] qmp: adding 'wakeup-suspend-support' in query-target

2018-05-16 Thread Daniel Henrique Barboza
On 05/15/2018 12:45 PM, Markus Armbruster wrote: Daniel Henrique Barboza writes: When issuing the qmp/hmp 'system_wakeup' command, what happens in a nutshell is: - qmp_system_wakeup_request set runstate to RUNNING, sets a wakeup_reason and notify the event - in the main_loop, all vcpus are

Re: [Qemu-devel] [PATCH V7 11/17] qapi: Add new command to query colo status

2018-05-16 Thread Zhang Chen
On Tue, May 15, 2018 at 10:26 PM, Markus Armbruster wrote: > Zhang Chen writes: > > > Libvirt or other high level software can use this command query colo > status. > > You can test this command like that: > > {'execute':'query-colo-status'} > > > > Signed-off-by: Zhang Chen > > --- > > migrat

[Qemu-devel] [PATCH 1/1] virtio-ccw: clean up notify

2018-05-16 Thread Halil Pasic
Coverity recently started complaining about virtio_ccw_notify(). Turns out, there is a couple of things that can be cleaned up. Let's clean! Reported-by: Peter Maydell Fixes: CID 1390619 Signed-off-by: Halil Pasic --- hw/s390x/virtio-ccw.c | 13 + 1 file changed, 9 insertions(+),

Re: [Qemu-devel] [PATCH RFC 2/2] vfio-ccw: support for halt/clear subchannel

2018-05-16 Thread Pierre Morel
On 15/05/2018 18:10, Cornelia Huck wrote: On Fri, 11 May 2018 11:33:35 +0200 Pierre Morel wrote: On 09/05/2018 17:48, Cornelia Huck wrote: Currently, vfio-ccw only relays start subchannel requests to the real hardware, which is enough in many cases but falls short e.g. during error recovery.

Re: [Qemu-devel] [PATCH 0/4] exec: reintroduce MemoryRegion caching

2018-05-16 Thread Auger Eric
Hi Paolo On 05/16/2018 12:42 PM, Paolo Bonzini wrote: > On 16/05/2018 12:41, Auger Eric wrote: >> This patch seems to cause a regression with ARM vsmmu + >> virtio-blk-pci. Reverting it looks to fix the issue. Otherwise I >> get: > > What's the command line for a reproducer? > > Thanks, > > Pao

Re: [Qemu-devel] [PATCH V7 10/17] qmp event: Add COLO_EXIT event to notify users while exited COLO

2018-05-16 Thread Zhang Chen
On Tue, May 15, 2018 at 10:29 PM, Markus Armbruster wrote: > Zhang Chen writes: > > > From: zhanghailiang > > > > If some errors happen during VM's COLO FT stage, it's important to > > notify the users of this event. Together with 'x-colo-lost-heartbeat', > > Users can intervene in COLO's failo

Re: [Qemu-devel] [PATCH v3 1/1] migration: calculate expected_downtime with ram_bytes_remaining()

2018-05-16 Thread Laurent Vivier
Hi Bala, I've tested you patch migrating a pseries between a P9 host and a P8 host with 1G huge page size on the P9 side and 16MB on P8 side and the information are strange now. "remaining ram" doesn't change, and after a while it can be set to "0" and estimated downtime is 0 too, but the migrati

Re: [Qemu-devel] [PATCH v6 00/28] softfloat patch roundup

2018-05-16 Thread Alex Bennée
Richard Henderson writes: > This is my SNaN patch set, Alex's float-float refactor, and a couple > of other random outstanding fpu patches. This has been reordered so > as to be bisectable, since the float-float refactor requires the snan > work to avoid breakage. > > The edition of pm215/targe

Re: [Qemu-devel] [PATCH v6 26/28] fpu/softfloat: Define floatN_default_nan in terms of parts_default_nan

2018-05-16 Thread Alex Bennée
Richard Henderson writes: > Isolate the target-specific choice to 2 functions instead of 6. > > The code in float16_default_nan was only correct for ARM, MIPS, and X86. > Though float16 support is rare among our targets. > > The code in float128_default_nan was arguably wrong for Sparc. While >

Re: [Qemu-devel] [PATCH v6 28/28] fpu/softfloat: Define floatN_silence_nan in terms of parts_silence_nan

2018-05-16 Thread Alex Bennée
Richard Henderson writes: > Isolate the target-specific choice to 3 functions instead of 6. > > The code in floatx80_default_nan tried to be over-general. There are > only two targets that support this format: x86 and m68k. Thus there > is no point in inventing a mechanism for snan_bit_is_one.

Re: [Qemu-devel] [PATCH 0/4] exec: reintroduce MemoryRegion caching

2018-05-16 Thread Auger Eric
Hi Paolo, On 05/16/2018 03:38 PM, Auger Eric wrote: > Hi Paolo > > On 05/16/2018 12:42 PM, Paolo Bonzini wrote: >> On 16/05/2018 12:41, Auger Eric wrote: >>> This patch seems to cause a regression with ARM vsmmu + >>> virtio-blk-pci. Reverting it looks to fix the issue. Otherwise I >>> get: >> >>

Re: [Qemu-devel] [PATCH v3 1/8] xen_backend: add grant table helpers

2018-05-16 Thread Anthony PERARD
On Fri, May 04, 2018 at 08:26:00PM +0100, Paul Durrant wrote: > This patch adds grant table helper functions to the xen_backend code to > localize error reporting and use of xen_domid. > > The patch also defers the call to xengnttab_open() until just before the > initialise method in XenDevOps is

Re: [Qemu-devel] [PATCH v6 2/2] qga: update guest-suspend-ram and guest-suspend-hybrid descriptions

2018-05-16 Thread Daniel Henrique Barboza
On 05/15/2018 12:35 PM, Markus Armbruster wrote: Daniel Henrique Barboza writes: This patch updates the descriptions of 'guest-suspend-ram' and 'guest-suspend-hybrid' to mention that both commands relies now on the existence of 'system_wakeup' and also on the proper support for wake up from

[Qemu-devel] [Bug 1771570] [NEW] qemu-aarch64 $program > $file doesn't pipe output to file in 2.12.0

2018-05-16 Thread Juho Hiltunen
Public bug reported: Running qemu-aarch64 $program > $file doesn't pipe anything to $file. The file is created but empty. qemu-aarch64 --help > $file works, so piping output in my system seems to work. qemu-x86_64 $program > $file works, too. I'm running version 2.12.0 build from source with ./c

Re: [Qemu-devel] [PATCH RFC 1/2] vfio-ccw: forward halt/clear to device if supported

2018-05-16 Thread Pierre Morel
On 15/05/2018 18:01, Cornelia Huck wrote: On Fri, 11 May 2018 11:53:52 +0200 Pierre Morel wrote: On 09/05/2018 17:49, Cornelia Huck wrote: The initial version of vfio-ccw did not support forwarding of the halt or clear functions to the device, and we had to emulate them instead. For versions

Re: [Qemu-devel] [PATCH V7 RESEND 04/17] COLO: integrate colo compare with colo frame

2018-05-16 Thread Zhang Chen
On Wed, May 16, 2018 at 7:12 PM, Dr. David Alan Gilbert wrote: > * Zhang Chen (zhangc...@gmail.com) wrote: > > For COLO FT, both the PVM and SVM run at the same time, > > only sync the state while it needs. > > > > So here, let SVM runs while not doing checkpoint, change > > DEFAULT_MIGRATE_X_CHE

Re: [Qemu-devel] [PATCH v2 00/10] intel-iommu: nested vIOMMU, cleanups, bug fixes

2018-05-16 Thread Jason Wang
On 2018年05月16日 14:30, Peter Xu wrote: On Fri, May 04, 2018 at 11:08:01AM +0800, Peter Xu wrote: v2: - fix patchew code style warnings - interval tree: postpone malloc when inserting; simplify node remove a bit where proper [Jason] - fix up comment and commit message for iommu lock patch [Ke

Re: [Qemu-devel] [PATCH V7 RESEND 06/17] COLO: Remove colo_state migration struct

2018-05-16 Thread Zhang Chen
On Wed, May 16, 2018 at 12:02 AM, Dr. David Alan Gilbert < dgilb...@redhat.com> wrote: > * Zhang Chen (zhangc...@gmail.com) wrote: > > We need to know if migration is going into COLO state for > > incoming side before start normal migration. > > > > Instead by using the VMStateDescription to send

[Qemu-devel] [PATCH 2/2] hw/arm/smmu-common: Fix coverity issue in get_block_pte_address

2018-05-16 Thread Eric Auger
Coverity points out that this can overflow if n > 31, because it's only doing 32-bit arithmetic. Let's use 1ULL instead of 1. Also the formulae used to compute n can be replaced by the level_shift() macro. Reported-by: Peter Maydell Signed-off-by: Eric Auger --- hw/arm/smmu-common.c | 4 ++-- 1

[Qemu-devel] [PATCH 0/2] ARM SMMUv3: Fix a couple of Coverity issues

2018-05-16 Thread Eric Auger
This series includes 2 patches that fix Coverity issues respectively in smmuv3 and smmu-common code. Eric Auger (2): hw/arm/smmuv3: Fix Coverity issue in smmuv3_record_event hw/arm/smmu-common: Fix coverity issue in get_block_pte_address hw/arm/smmu-common.c | 4 ++-- hw/arm/smmuv3.c |

Re: [Qemu-devel] [PATCH v3 1/8] xen_backend: add grant table helpers

2018-05-16 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 16 May 2018 14:50 > To: Paul Durrant > Cc: xen-de...@lists.xenproject.org; qemu-bl...@nongnu.org; qemu- > de...@nongnu.org; Stefano Stabellini > Subject: Re: [PATCH v3 1/8] xen_backend: add grant table

[Qemu-devel] [PATCH 1/2] hw/arm/smmuv3: Fix Coverity issue in smmuv3_record_event

2018-05-16 Thread Eric Auger
Coverity complains about use of uninitialized Evt struct. The EVT_SET_TYPE and similar setters use deposit32() on fields in the struct, so they read the uninitialized existing values. In cases where we don't set all the fields in the event struct we'll end up leaking random uninitialized data from

Re: [Qemu-devel] [PATCH RFC] qemu-error: introduce error_report_once

2018-05-16 Thread Eric Blake
On 05/15/2018 10:07 PM, Peter Xu wrote: +static bool __print_once; \ Double-underscore names are reserved for the compiler's use, not ours. Better would be naming this: static bool print_once_; with a trailing underscore, or at most a single leading underscore. +

Re: [Qemu-devel] [PATCH v3 2/8] xen_disk: remove open-coded use of libxengnttab

2018-05-16 Thread Anthony PERARD
On Fri, May 04, 2018 at 08:26:01PM +0100, Paul Durrant wrote: > Now that helpers are present in xen_backend, this patch removes open-coded > calls to libxengnttab from the xen_disk code. > > This patch also fixes one whitspace error in the assignment of the > XenDevOps initialise method. > > Sign

Re: [Qemu-devel] [PATCH v3 3/8] xen: remove other open-coded use of libxengnttab

2018-05-16 Thread Anthony PERARD
On Fri, May 04, 2018 at 08:26:02PM +0100, Paul Durrant wrote: > Now that helpers are available in xen_backend, use them throughout all > Xen PV backends. > > Signed-off-by: Paul Durrant > --- > diff --git a/hw/net/xen_nic.c b/hw/net/xen_nic.c > index 20c43a6..73d6f1b 100644 > --- a/hw/net/xen_nic

Re: [Qemu-devel] [PATCH] WHPX Add signature CPUID

2018-05-16 Thread Justin Terry (VM) via Qemu-devel
Hey Paolo, I agree that in the future it would be great if the Windows Hypervisor Platform supported that and if that happens there is no reason to differentiate the two. However, today WHPX actually doesn’t support any of the synthetic enlightenments that Hyper-V does. We are really trying to

Re: [Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-05-16 Thread Michael S. Tsirkin
On Wed, May 16, 2018 at 02:44:24PM +0200, Paolo Bonzini wrote: > On 12/05/2018 00:12, Michael S. Tsirkin wrote: > >> Maybe it's a better idea than overloading an option that is only > >> expected to control a CPUID bit. > > Well -realtime would be a bit confusing in that it enables mlock by > > def

Re: [Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-05-16 Thread Michael S. Tsirkin
On Wed, May 16, 2018 at 09:34:52AM -0300, Eduardo Habkost wrote: > On Sat, May 12, 2018 at 01:12:59AM +0300, Michael S. Tsirkin wrote: > > On Thu, Apr 19, 2018 at 06:53:20PM -0300, Eduardo Habkost wrote: > > > On Thu, Apr 19, 2018 at 11:32:16PM +0200, Paolo Bonzini wrote: > > > > On 19/04/2018 21:5

Re: [Qemu-devel] [PATCH v3 3/8] xen: remove other open-coded use of libxengnttab

2018-05-16 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 16 May 2018 15:14 > To: Paul Durrant > Cc: xen-de...@lists.xenproject.org; qemu-bl...@nongnu.org; qemu- > de...@nongnu.org; Stefano Stabellini ; Greg Kurz > ; Paolo Bonzini ; Jason Wang > ; Gerd Hoffmann

[Qemu-devel] [PATCH 0/3] ARM SMMUv3: IOTLB Emulation and VHOST Support

2018-05-16 Thread Eric Auger
Those patches were previously included in [1]. Now that the core implementation is upstream let's try to optimize it. The first 2 patches implement configuration structure caching and IOTLB emulation. The last patch implements VHOST integration and allows to run VSMMUv3 along with VHOST emulated

[Qemu-devel] [PATCH 1/3] hw/arm/smmuv3: Cache/invalidate config data

2018-05-16 Thread Eric Auger
Let's cache config data to avoid fetching and parsing STE/CD structures on each translation. We invalidate them on data structure invalidation commands. Signed-off-by: Eric Auger --- v11 -> v12: - only insert the new config if decode_cfg succeeds - use smmu_get_sid for trace_* and store hits/mi

[Qemu-devel] [PATCH 3/3] hw/arm/smmuv3: Add notifications on invalidation

2018-05-16 Thread Eric Auger
On TLB invalidation commands, let's call registered IOMMU notifiers. Those can only be UNMAP notifiers. SMMUv3 does not support notification on MAP (VFIO). This patch allows vhost use case where IOTLB API is notified on each guest IOTLB invalidation. Signed-off-by: Eric Auger --- hw/arm/smmu-co

[Qemu-devel] [PATCH 2/3] hw/arm/smmuv3: IOTLB emulation

2018-05-16 Thread Eric Auger
We emulate a TLB cache of size SMMU_IOTLB_MAX_SIZE=256. It is implemented as a hash table whose key is a combination of the 16b asid and 48b IOVA. Entries are invalidated on TLB invalidation commands, either globally, or per asid, or per asid/iova. Signed-off-by: Eric Auger --- v11 -> v12: - A

Re: [Qemu-devel] [PATCH v2] numa: clarify error message when node index is out of range in -numa dist, ...

2018-05-16 Thread Igor Mammedov
On Tue, 15 May 2018 19:37:02 +0200 Markus Armbruster wrote: > Eric Blake writes: > > > On 05/15/2018 10:26 AM, Andrew Jones wrote: > >> On Tue, May 15, 2018 at 04:48:33PM +0200, Igor Mammedov wrote: > >>> When using following CLI: > >>>-numa dist,src=128,dst=1,val=20 > >>> user gets a r

Re: [Qemu-devel] [PATCH v3 4/8] xen_backend: add an emulation of grant copy

2018-05-16 Thread Anthony PERARD
On Fri, May 04, 2018 at 08:26:03PM +0100, Paul Durrant wrote: > Not all Xen environments support the xengnttab_grant_copy() operation. > E.g. where the OS is FreeBSD or Xen is older than 4.8.0. > > This patch introduces an emulation of that operation using > xengnttab_map_domain_grant_refs() and m

Re: [Qemu-devel] [PATCH v3 4/8] xen_backend: add an emulation of grant copy

2018-05-16 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 16 May 2018 15:31 > To: Paul Durrant > Cc: xen-de...@lists.xenproject.org; qemu-bl...@nongnu.org; qemu- > de...@nongnu.org; Stefano Stabellini > Subject: Re: [PATCH v3 4/8] xen_backend: add an emulation

Re: [Qemu-devel] [PATCH v2] numa: clarify error message when node index is out of range in -numa dist, ...

2018-05-16 Thread Eric Blake
On 05/16/2018 09:32 AM, Igor Mammedov wrote: Actually, error_setg() is documented as taking a single phrase (no '.' included), and that if you need a second sentence, it's better to use error_append_hint(). well, using append_hint makes it less readable, before using it we get following error:

Re: [Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-05-16 Thread Paolo Bonzini
On 16/05/2018 16:22, Michael S. Tsirkin wrote: >> kvm-hint-dedicated=on only sets the CPUID bit, which Linux for example >> uses that to disable pv spinlocks. "-realtime dedicated-cpus=on" only >> disables the vmexits. You can use the two independently. > > But when would you want to use the two

Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches

2018-05-16 Thread Anton Nefedov
On 15/5/2018 8:40 PM, Markus Armbruster wrote: Eric Blake writes: On 05/15/2018 02:01 AM, Markus Armbruster wrote: QAPI language design alternatives: 1. Having unions cover all discriminator values explicitly is useful. 2. Having unions repeat all the discriminator values explicitly is

[Qemu-devel] [PATCH v4] numa: clarify error message when node index is out of range in -numa dist, ...

2018-05-16 Thread Igor Mammedov
When using following CLI: -numa dist,src=128,dst=1,val=20 user gets a rather confusing error message: "Invalid node 128, max possible could be 128" Where 128 is number of nodes that QEMU supports (MAX_NODES), while src/dst is an index up to that limit, so it should be MAX_NODES - 1 in error m

Re: [Qemu-devel] Restoring bitmaps after failed/cancelled migration

2018-05-16 Thread Vladimir Sementsov-Ogievskiy
16.05.2018 15:47, Kevin Wolf wrote: Am 14.05.2018 um 12:09 hat Vladimir Sementsov-Ogievskiy geschrieben: 14.05.2018 09:41, Fam Zheng wrote: On Wed, 04/18 17:00, Vladimir Sementsov-Ogievskiy wrote: Is it possible, that target will change the disk, and then we return control to the source? In th

Re: [Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-05-16 Thread Michael S. Tsirkin
On Wed, May 16, 2018 at 05:04:41PM +0200, Paolo Bonzini wrote: > On 16/05/2018 16:22, Michael S. Tsirkin wrote: > >> kvm-hint-dedicated=on only sets the CPUID bit, which Linux for example > >> uses that to disable pv spinlocks. "-realtime dedicated-cpus=on" only > >> disables the vmexits. You can

  1   2   3   4   >