[Qemu-devel] [PULL 28/33] edu: fix memory leak on msi_broken platforms

2017-06-01 Thread Paolo Bonzini
If msi_init fails, the thread has already been created and the mutex/condvar are not destroyed. Initialize everything only after the point where pci_edu_realize cannot fail. Reported-by: Markus Armbruster Cc: Peter Xu Signed-off-by: Paolo Bonzini --- hw/misc/edu.c | 12 ++-- 1 file ch

[Qemu-devel] [PULL 31/33] hw/core: nmi.c can be compiled as common-obj nowadays

2017-06-01 Thread Paolo Bonzini
From: Thomas Huth The target-specific code in nmi.c has been removed with this commit: commit f7e981f29548fe4af7812f5920304fe607e5bf0d nmi: remove x86 specific nmi handling Signed-off-by: Thomas Huth Message-Id: <1496310843-28771-1-git-send-email-th...@redhat.com> Signed-off-by

[Qemu-devel] [PULL 20/33] target/i386: use multiple CPU AddressSpaces

2017-06-01 Thread Paolo Bonzini
This speeds up SMM switches. Later on it may remove the need to take the BQL, and it may also allow to reuse code between TCG and KVM. Signed-off-by: Paolo Bonzini --- target/i386/cpu.c| 15 +- target/i386/cpu.h| 11 +- target/i386/helper.c | 54 +

[Qemu-devel] [PULL 23/33] exec: fix address_space_get_iotlb_entry page mask

2017-06-01 Thread Paolo Bonzini
From: Peter Xu The IOTLB that it returned didn't guarantee that page_mask is indeed a so-called page mask. That won't affect current usage since now only vhost is using it (vhost API allows arbitary IOTLB range). However we have IOTLB scemantic and we should best follow it. This patch fixes this

Re: [Qemu-devel] [PATCH v2 08/10] migration: Create include for migration snapshots

2017-06-01 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Start removing migration code from sysemu/sysemu.h. > > Signed-off-by: Juan Quintela Yes, the names always confused me. Reviewed-by: Dr. David Alan Gilbert > --- > hmp.c| 5 +++-- > include/block/block_int.h| 4 ++-

[Qemu-devel] [PULL 29/33] i386/kvm: do not zero out segment flags if segment is unusable or not present

2017-06-01 Thread Paolo Bonzini
From: Roman Pen This is a fix for the problem [1], where VMCB.CPL was set to 0 and interrupt was taken on userspace stack. The root cause lies in the specific AMD CPU behaviour which manifests itself as unusable segment attributes on SYSRET[2]. Here in this patch flags are not touched even segm

[Qemu-devel] [PULL 33/33] kvm: don't register smram_listener when smm is off

2017-06-01 Thread Paolo Bonzini
From: Gonglei If the user set disable smm by '-machine smm=off', we should not register smram_listener so that we can avoid waster memory in kvm since the added sencond address space. Meanwhile we should assign value of the global kvm_state before invoking the kvm_arch_init(), because pc_machine

[Qemu-devel] [PULL 27/33] linuxboot_dma: compile for i486

2017-06-01 Thread Paolo Bonzini
The ROM uses the cmovne instruction, which is new in Pentium Pro and does not work when running QEMU with "-cpu 486". Avoid producing that instruction. Suggested-by: Richard W.M. Jones Suggested-by: Thomas Huth Reported-by: Rob Landley Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini -

[Qemu-devel] [RFC 1/1] qemu-ga: add missing libpcre to MSI build

2017-06-01 Thread Thomas Lamprecht
glib depends on libpcre which was not shipped with the MSI, thus starting of the qemu-ga.exe failed with the respective error message. Tell WIXL to ship this library with the MSI to avoid this problem. Signed-off-by: Thomas Lamprecht CC: Stefan Weil CC: Michael Roth --- I haven't done much wi

Re: [Qemu-devel] [PATCH v2 07/10] migration: Export rdma.c functions in its own file

2017-06-01 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela > --- > include/migration/migration.h | 4 > migration/migration.c | 1 + > migration/rdma.c | 1 + > migration/rdma.h | 25 + > 4 files changed, 27 insert

Re: [Qemu-devel] [PATCH v4 4/8] vmdk: Factor out metadata loading code out of vmdk_get_cluster_offset()

2017-06-01 Thread Fam Zheng
On Sat, 04/22 10:43, Ashijeet Acharya wrote: > Move the cluster tables loading code out of the existing > vmdk_get_cluster_offset() function and implement it in separate > get_cluster_table() and vmdk_L2load() functions. This patch will help Now vmdk_L2load is in lower case, "vmdk_l2load". > us a

[Qemu-devel] [PULL 32/33] nbd: make it thread-safe, fix qcow2 over nbd

2017-06-01 Thread Paolo Bonzini
NBD is not thread safe, because it accesses s->in_flight without a CoMutex. Fixing this will be required for multiqueue. CoQueue doesn't have spurious wakeups but, when another coroutine can run between qemu_co_queue_next's wakeup and qemu_co_queue_wait's re-locking of the mutex, the wait conditio

[Qemu-devel] [PATCH v2 3/4] kdump: add vmcoreinfo

2017-06-01 Thread Marc-André Lureau
kdump header provides offset and size of the vmcoreinfo note, append it if available. Signed-off-by: Marc-André Lureau --- dump.c | 48 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/dump.c b/dump.c index 6911ffad8b..ba7676a514 100

[Qemu-devel] [PATCH v2 1/4] dump: add DumpInfo structure

2017-06-01 Thread Marc-André Lureau
One way or another, the guest could communicate various dump info (via guest agent or vmcoreinfo device) and populate that structure. It can then be used to augment the dump with various details, as done in the following patch. Signed-off-by: Marc-André Lureau --- include/sysemu/dump-info.h | 18

Re: [Qemu-devel] [PATCH v2 10/10] migration: Move include/migration/block.h into migration/

2017-06-01 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > All functions were internal, except blk_mig_init() that is exported in > misc.h now. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > include/migration/misc.h | 8 > migration/block.c

[Qemu-devel] [PATCH v2 0/4] dump: add vmcoreinfo note

2017-06-01 Thread Marc-André Lureau
Hi, In previously sent series "[PATCH 00/21] WIP: dump: add kaslr support (for after 2.9)", I proposed a qemu-ga change to provide kaslr-related details to qemu, and other patches to append the vmcoreinfo note to the various dump format and tools. Although it remains still undecided how to pass t

[Qemu-devel] [PATCH v2 4/4] scripts/dump-guest-memory.py: add vmcoreinfo

2017-06-01 Thread Marc-André Lureau
Add vmcoreinfo ELF note if qemu dump_info has been populated. Also modify it with NUMBER(phys_base)=.. if the guest doesn't provide it (on older kernel). Signed-off-by: Marc-André Lureau --- scripts/dump-guest-memory.py | 52 1 file changed, 52 inser

Re: [Qemu-devel] [PATCH v4 3/8] vmdk: Rename get_cluster_offset() to vmdk_get_cluster_offset()

2017-06-01 Thread Fam Zheng
On Sat, 04/22 10:43, Ashijeet Acharya wrote: > Rename the existing get_cluster_offset() to vmdk_get_cluster_offset() > and update name in all the callers accordingly. > > Signed-off-by: Ashijeet Acharya Reviewed-by: Fam Zheng

[Qemu-devel] [PATCH v2 2/4] dump: add vmcoreinfo ELF note

2017-06-01 Thread Marc-André Lureau
Read vmcoreinfo note from guest memory when dump_info provides the address, and write it as an ELF note in the dump. NUMBER(phys_base) in vmcoreinfo has only been recently introduced in Linux 4.10 ("kexec: export the value of phys_base instead of symbol address"). To accomadate for older kernels,

Re: [Qemu-devel] [PATCH v4 5/8] vmdk: Set maximum bytes allocated in one cycle

2017-06-01 Thread Fam Zheng
On Sat, 04/22 10:43, Ashijeet Acharya wrote: > Set the maximum bytes allowed to get allocated at once to be not more > than the extent size boundary to handle writes at two separate extents > appropriately. > > Signed-off-by: Ashijeet Acharya > --- > block/vmdk.c | 13 +++-- > 1 file cha

Re: [Qemu-devel] [PATCHv4 0/5] Clean up compatibility mode handling

2017-06-01 Thread Greg Kurz
On Thu, 1 Jun 2017 13:59:14 +0200 Cédric Le Goater wrote: > On 06/01/2017 08:52 AM, David Gibson wrote: > > On Wed, May 31, 2017 at 10:58:57AM +0200, Greg Kurz wrote: > >> On Wed, 31 May 2017 12:57:48 +1000 > >> David Gibson wrote: > >>> [...] > All old non-pseries machine types alrea

Re: [Qemu-devel] [PATCH v2 1/1] coroutine-lock: do not touch coroutine after another one has been entered

2017-06-01 Thread Stefan Hajnoczi
On Wed, May 31, 2017 at 03:23:25PM +0200, Roman Penyaev wrote: > On Wed, May 31, 2017 at 3:06 PM, Stefan Hajnoczi wrote: > > On Tue, May 30, 2017 at 12:07:36PM +0200, Roman Pen wrote: > >> diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c > >> index 6328eed26bc6..d589d8c66d5e 10

Re: [Qemu-devel] [Qemu-block] [PATCH v2 06/16] backup: Request BLK_PERM_AIO_CONTEXT_CHANGE on target

2017-06-01 Thread Stefan Hajnoczi
On Wed, May 31, 2017 at 05:57:46PM +0800, Fam Zheng wrote: > On Wed, 05/31 10:39, Stefan Hajnoczi wrote: > > On Wed, May 24, 2017 at 10:18:44AM +0800, Fam Zheng wrote: > > > On Thu, 05/11 15:41, Stefan Hajnoczi wrote: > > > > On Wed, Apr 19, 2017 at 05:43:46PM +0800, Fam Zheng wrote: > > > > > What

Re: [Qemu-devel] [PATCH 1/4] spapr: Move DRC RTAS calls into spapr_drc.c

2017-06-01 Thread Laurent Vivier
On 01/06/2017 03:52, David Gibson wrote: > Currently implementations of the RTAS calls related to DRCs are in > spapr_rtas.c. They belong better in spapr_drc.c - that way they're closer > to related code, and we'll be able to make some more things local. > > spapr_rtas.c was intended to contain t

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/4] spapr:DRC cleanups (part I)

2017-06-01 Thread Daniel Henrique Barboza
On 05/31/2017 10:52 PM, David Gibson wrote: The code managing DRCs[0] has quite a few things that are more complicated than they need to be. In particular the object representing a DRC has a bunch of method pointers, despite the fact that there are currently no subclasses, and even if there we

Re: [Qemu-devel] [PATCH 01/12] migration: Introduce announce parameters

2017-06-01 Thread Vlad Yasevich
On 06/01/2017 03:02 AM, Jason Wang wrote: > > > On 2017年05月31日 02:57, Dr. David Alan Gilbert wrote: >> * Vlad Yasevich (vyase...@redhat.com) wrote: >>> On 05/26/2017 12:03 AM, Jason Wang wrote: On 2017å¹´05月25æ—¥ 02:05, Vladislav Yasevich wrote: > Add parameters that control RARP/GARP

Re: [Qemu-devel] [RESEND PATCH 1/2] nvdimm: warn if the backend is not a DAX device

2017-06-01 Thread Dan Williams
[ adding linux-fsdevel ] On Thu, Jun 1, 2017 at 5:00 AM, Xiao Guangrong wrote: > > > On 05/26/2017 10:32 AM, Haozhong Zhang wrote: > >> +static void nvdimm_check_dax(HostMemoryBackend *hostmem) >> +{ >> +char *mem_path = >> +object_property_get_str(OBJECT(hostmem), "mem-path", NULL);

[Qemu-devel] [PATCH] virtio: add virtqueue_alloc_element tracepoint

2017-06-01 Thread Paolo Bonzini
This tracepoint can help diagnosing failures due to memory fragmentation in the guest. Signed-off-by: Paolo Bonzini --- hw/virtio/trace-events | 1 + hw/virtio/virtio.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events index 1f7a7c1ae1..e24

Re: [Qemu-devel] [PATCH v2 3/6] vhost: extend ring information update for IOTLB to all rings

2017-06-01 Thread Michael S. Tsirkin
On Tue, May 30, 2017 at 11:06:54PM +0200, Maxime Coquelin wrote: > Hi Michael, > > On 05/30/2017 08:12 PM, Michael S. Tsirkin wrote: > > On Fri, May 26, 2017 at 04:28:55PM +0200, Maxime Coquelin wrote: > > > Vhost-kernel backend need > > > > needs > > > > > to receive IOTLB entry for used ring >

Re: [Qemu-devel] [PATCH v2 3/6] vhost: extend ring information update for IOTLB to all rings

2017-06-01 Thread Michael S. Tsirkin
On Wed, May 31, 2017 at 05:20:21PM +0200, Maxime Coquelin wrote: > Hi Michael, > > On 05/30/2017 11:11 PM, Maxime Coquelin wrote: > > > > > > On 05/30/2017 11:06 PM, Maxime Coquelin wrote: > > > Hi Michael, > > > > > > On 05/30/2017 08:12 PM, Michael S. Tsirkin wrote: > > > > On Fri, May 26, 20

Re: [Qemu-devel] [PATCH v4 6/8] vmdk: New functions to assist allocating multiple clusters

2017-06-01 Thread Fam Zheng
On Sat, 04/22 10:43, Ashijeet Acharya wrote: > Introduce two new helper functions handle_alloc() and > vmdk_alloc_cluster_offset(). handle_alloc() helps to allocate multiple > clusters at once starting from a given offset on disk and performs COW > if necessary for first and last allocated clusters

Re: [Qemu-devel] [PATCH v2 0/6] vhost-user: Specify and implement device IOTLB support

2017-06-01 Thread Michael S. Tsirkin
On Wed, May 31, 2017 at 04:33:33PM +0800, Jason Wang wrote: > > > On 2017年05月31日 02:20, Michael S. Tsirkin wrote: > > On Fri, May 26, 2017 at 04:28:52PM +0200, Maxime Coquelin wrote: > > > This series aims at specifying ans implementing the protocol update > > > required to support device IOTLB w

Re: [Qemu-devel] [PATCH 2/4] spapr: Abolish DRC get_fdt method

2017-06-01 Thread Laurent Vivier
On 01/06/2017 03:52, David Gibson wrote: > The DRConnectorClass includes a get_fdt method. However > * There's only one implementation, and there's only likely to ever be one > * Both callers are local to spapr_drc > * Each caller only uses one half of the actual implementation > > So aboli

Re: [Qemu-devel] [PULL v2 0/5] Queued target/sh4 patches

2017-06-01 Thread Peter Maydell
On 30 May 2017 at 20:15, Aurelien Jarno wrote: > The following changes since commit 0748b3526e8cb78b9cd64208426bfc3d54a72b04: > > Merge remote-tracking branch 'kwolf/tags/for-upstream' into staging > (2017-05-30 14:15:15 +0100) > > are available in the git repository at: > > git://git.aurel32

Re: [Qemu-devel] [PATCH 01/12] migration: Introduce announce parameters

2017-06-01 Thread Dr. David Alan Gilbert
* Vlad Yasevich (vyase...@redhat.com) wrote: > On 06/01/2017 03:02 AM, Jason Wang wrote: > > > > > > On 2017年05月31日 02:57, Dr. David Alan Gilbert wrote: > >> * Vlad Yasevich (vyase...@redhat.com) wrote: > >>> On 05/26/2017 12:03 AM, Jason Wang wrote: > On 2017å¹´05月25æ—¥ 02:05, Vladislav Y

Re: [Qemu-devel] [RFC] Making 'block-stream', and 'block-commit' accept node-name

2017-06-01 Thread Kashyap Chamarthy
On Wed, May 31, 2017 at 04:57:20PM +0200, Kashyap Chamarthy wrote: > On Tue, May 30, 2017 at 04:53:23PM +0200, Alberto Garcia wrote: > > On Mon 29 May 2017 09:03:22 PM CEST, Kashyap Chamarthy wrote: [...] > > > While we have `blockdev-{mirror, backup}` as 'node-name'-alternatives > > > for `drive

Re: [Qemu-devel] [PATCH v2 08/45] tests: add more int/number ranges checks

2017-06-01 Thread Markus Armbruster
Marc-André Lureau writes: > Suggested by Markus Armbruster: > > We should systematically cover the integers, in particular the > boundaries (because that's where bugs like to hide): > > * Integers in [-2^63,0) can be visited with visit_type_int() and > visit_type_number(). > > * Integers in [0,

Re: [Qemu-devel] [PATCH V5 6/9] net/colo-compare.c: Make colo-compare support vnet_hdr_len

2017-06-01 Thread Zhang Chen
On 05/26/2017 01:36 PM, Jason Wang wrote: On 2017年05月26日 13:35, Jason Wang wrote: On 2017年05月25日 21:18, Zhang Chen wrote: @@ -472,7 +474,10 @@ static void colo_compare_connection(void *opaque, void *user_data) } if (result) { -ret = compare_chr_send(&s->c

Re: [Qemu-devel] [PATCH v2 1/2] scripts: use build_ prefix for string not piped through cgen()

2017-06-01 Thread Eric Blake
On 06/01/2017 07:41 AM, Marc-André Lureau wrote: No 0/2 cover letter? > Suggested by Markus Armbruster: > > The gen_ prefix is awkward. Generated C should go through cgen() > exactly once (see commit 1f9a7a1). The common way to get this wrong is > passing a foo=gen_foo() keyword argument to mc

Re: [Qemu-devel] [PATCH v2 2/2] qapi: add location comment for generated types

2017-06-01 Thread Eric Blake
On 06/01/2017 07:41 AM, Marc-André Lureau wrote: > This may help to find where the origin of the type was declared in the > json (when greping isn't easy enough). > > Generates the following kind of C comment before types: > > /* /home/elmarco/src/qemu/qapi/introspect.json:94 */ > typedef str

Re: [Qemu-devel] [PULL 00/22] Docker and block patches

2017-06-01 Thread Fam Zheng
On Fri, 05/26 15:52, Fam Zheng wrote: > The following changes since commit 9964e96dccf7f7c936ee854a795415d19b60: > > Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging > (2017-05-23 15:01:31 +0100) > > are available in the git repository at: > > git://github.com/

Re: [Qemu-devel] [PATCH v4 7/8] vmdk: Update metadata for multiple clusters

2017-06-01 Thread Fam Zheng
On Sat, 04/22 10:43, Ashijeet Acharya wrote: > Include a next pointer in VmdkMetaData struct to point to the previous > allocated L2 table. Modify vmdk_L2update to start updating metadata for > allocation of multiple clusters at once. > > Signed-off-by: Ashijeet Acharya > --- > block/vmdk.c | 12

Re: [Qemu-devel] [PATCH] tests: Add unit tests for the VM Generation ID feature

2017-06-01 Thread Michael S. Tsirkin
On Thu, Jun 01, 2017 at 08:10:27AM +, Marc-André Lureau wrote: > Hi > > On Mon, May 29, 2017 at 7:18 PM Ben Warren via Qemu-devel < > qemu-devel@nongnu.org> wrote: > > From: Ben Warren > > The following tests are implemented: > * test that a GUID passed in by command line is pro

[Qemu-devel] [Bug 1694998] [NEW] PPC: msgsnd instruction leads to assertion

2017-06-01 Thread Kurban Mallachiev
Public bug reported: I tried to send doorbells (using msgsnd) between cores in guest OS. On QEMU v2.9.0 usage of msgsnd instruction leads to error: ERROR: <...>/qemu-new/translate-common.c:34:tcg_handle_interrupt: assertion failed: (qemu_mutex_iothread_locked()) QEMU v2.8.0 works fine. QEMU r

Re: [Qemu-devel] [Qemu-ppc] [PATCHv4 3/5] pseries: Move CPU compatibility property to machine

2017-06-01 Thread David Gibson
On Thu, Jun 01, 2017 at 09:29:08AM +0200, Greg Kurz wrote: > On Thu, 01 Jun 2017 15:44:40 +1000 > Suraj Jitindar Singh wrote: > > > On Fri, 2017-05-26 at 15:23 +1000, David Gibson wrote: > > > Server class POWER CPUs have a "compat" property, which is used to > > > set the > > > backwards compati

Re: [Qemu-devel] [PATCH] msi: remove return code for msi_init()

2017-06-01 Thread Paolo Bonzini
On 01/06/2017 10:27, Marcel Apfelbaum wrote: > On 31/05/2017 11:28, Paolo Bonzini wrote: >> No, for now I'd rather just go and remove msi_nonbroken. When someone >> reports a bug, we can add back "msi_broken". > > Hi, > I agree with the direction, but I am concerned msi_nonbroken is there > for

Re: [Qemu-devel] [PULL 00/33] Misc patches for 2017-06-01

2017-06-01 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. Message-id: 1496320911-51305-1-git-send-email-pbonz...@redhat.com Type: series Subject: [Qemu-devel] [PULL 00/33] Misc patches

Re: [Qemu-devel] [PATCH] cpus: reset throttle_thread_scheduled after sleep

2017-06-01 Thread Dr. David Alan Gilbert
* Jason J. Herne (jjhe...@linux.vnet.ibm.com) wrote: > On 05/19/2017 05:29 PM, Felipe Franciosi wrote: > > Currently, the throttle_thread_scheduled flag is reset back to 0 before > > sleeping (as part of the throttling logic). Given that throttle_timer > > (well, any timer) may tick with a slight d

Re: [Qemu-devel] [PATCH 1/2] qcow2: add reduce image support

2017-06-01 Thread Kevin Wolf
Am 31.05.2017 um 16:43 hat Pavel Butsykin geschrieben: > This patch adds the reduction of the image file for qcow2. As a result, this > allows us to reduce the virtual image size and free up space on the disk > without > copying the image. Image can be fragmented and reduction is done by punching

Re: [Qemu-devel] [PATCH] tests: Add unit tests for the VM Generation ID feature

2017-06-01 Thread Ben Warren via Qemu-devel
> On Jun 1, 2017, at 7:21 AM, Michael S. Tsirkin wrote: > > On Thu, Jun 01, 2017 at 08:10:27AM +, Marc-André Lureau wrote: >> Hi >> >> On Mon, May 29, 2017 at 7:18 PM Ben Warren via Qemu-devel < >> qemu-devel@nongnu.org> wrote: >> >>From: Ben Warren >> >>The following tests are i

Re: [Qemu-devel] [PATCH v4 0/8] Optimize VMDK I/O by allocating multiple clusters

2017-06-01 Thread Fam Zheng
On Sat, 04/22 10:43, Ashijeet Acharya wrote: > Changes in v4: > - fix commit message in patch 1 (fam) > - drop size_to_clusters() function (fam) > - fix grammatical errors in function documentations (fam) > - factor out metadata loading coding in a separate patch (patch 4) (fam) > - rename vmdk_all

[Qemu-devel] [PATCH v2 0/4] some gdbstub fixes for debug and vcont

2017-06-01 Thread Alex Bennée
Hi, This is a follow up v2 of the patches I posted yesterday. There are two new patches. The first is a simple name change to make the purpose of the function clearer. The second new patch now fixes the bug by making the thread-id consistent when reporting it via the gdbstub. It also reduces the s

[Qemu-devel] [PATCH v2 4/4] gdbstub: don't fail on vCont; C04:0; c packets

2017-06-01 Thread Alex Bennée
The thread-id of 0 means any CPU but we then ignore the fact we find the first_cpu in this case who can have an index of 0. Instead of bailing out just test if we have managed to match up thread-id to a CPU. Otherwise you get: gdb_handle_packet: command='vCont;C04:0;c' put_packet: reply='E22'

[Qemu-devel] [PATCH v2 3/4] qom/cpu: remove host_tid field

2017-06-01 Thread Alex Bennée
This was only used by the gdbstub and even then was only being set for subsequent threads. Rather the continue duplicating the number just make the gdbstub get the information from TaskState structure. Now the tid is correctly reported for all threads the bug I was seeing with "vCont;C04:0;c" pack

[Qemu-devel] [PATCH v2 2/4] gdbstub: rename cpu_index -> cpu_gdb_index

2017-06-01 Thread Alex Bennée
This is to make it clear the index is purely a gdbstub function and should not be confused with the value of cpu->cpu_index. Signed-off-by: Alex Bennée --- gdbstub.c | 12 ++-- include/exec/gdbstub.h | 7 ++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git

[Qemu-devel] [PATCH v2 1/4] gdbstub: modernise DEBUG_GDB

2017-06-01 Thread Alex Bennée
Convert the a gdb_debug helper which compiles away to nothing when not used but still ensures the format strings are checked. There is some minor code motion for the incorrect checksum message to report it before we attempt to send the reply. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathi

Re: [Qemu-devel] [PULL 0/5] Migration pull request

2017-06-01 Thread Peter Maydell
On 31 May 2017 at 10:15, Juan Quintela wrote: > Hi > > This are the migration patches ready for inclusion: > - autoconverge improvements: (felipe franciosi) > - create savem.h > > Please, Apply. > > The following changes since commit 0748b3526e8cb78b9cd64208426bfc3d54a72b04: > > Merge remote-tra

Re: [Qemu-devel] [PATCH] tests: Add unit tests for the VM Generation ID feature

2017-06-01 Thread Michael S. Tsirkin
On Thu, Jun 01, 2017 at 07:46:24AM -0700, Ben Warren wrote: > > > On Jun 1, 2017, at 7:21 AM, Michael S. Tsirkin wrote: > > > > On Thu, Jun 01, 2017 at 08:10:27AM +, Marc-André Lureau wrote: > >> Hi > >> > >> On Mon, May 29, 2017 at 7:18 PM Ben Warren via Qemu-devel < > >> qemu-devel@nongnu

Re: [Qemu-devel] [PATCH v3 10/13] hmp: add hmp analogue for qmp-chardev-change

2017-06-01 Thread Dr. David Alan Gilbert
* Anton Nefedov (anton.nefe...@virtuozzo.com) wrote: > Signed-off-by: Anton Nefedov > Reviewed-by: Vladimir Sementsov-Ogievskiy > CC: Dr. David Alan Gilbert Thanks, with Marc-Andre's comments, this looks fine from the HMP point. If you can find a way to add a test to tests/test-hmp.c it would

Re: [Qemu-devel] [PATCH] cpus: reset throttle_thread_scheduled after sleep

2017-06-01 Thread Felipe Franciosi
> On 1 Jun 2017, at 15:36, Dr. David Alan Gilbert wrote: > > * Jason J. Herne (jjhe...@linux.vnet.ibm.com) wrote: >> On 05/19/2017 05:29 PM, Felipe Franciosi wrote: >>> Currently, the throttle_thread_scheduled flag is reset back to 0 before >>> sleeping (as part of the throttling logic). Given t

Re: [Qemu-devel] [PATCH] cpus: reset throttle_thread_scheduled after sleep

2017-06-01 Thread Dr. David Alan Gilbert
* Felipe Franciosi (fel...@nutanix.com) wrote: > > > On 1 Jun 2017, at 15:36, Dr. David Alan Gilbert wrote: > > > > * Jason J. Herne (jjhe...@linux.vnet.ibm.com) wrote: > >> On 05/19/2017 05:29 PM, Felipe Franciosi wrote: > >>> Currently, the throttle_thread_scheduled flag is reset back to 0 bef

Re: [Qemu-devel] [PULL 00/33] Misc patches for 2017-06-01

2017-06-01 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1496320911-51305-1-git-send-email-pbonz...@redhat.com Subject: [Qemu-devel] [PULL 00/33] Misc patches for 2017-06-01 === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 tota

Re: [Qemu-devel] [PATCH 3/4] spapr: Abolish DRC set_configured method

2017-06-01 Thread Laurent Vivier
On 01/06/2017 03:52, David Gibson wrote: > DRConnectorClass has a set_configured method, however: > * There is only one implementation, and only ever likely to be one > * There's exactly one caller, and that's (now) local > * The implementation is very straightforward > > So abolish the meth

Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: rename cpu_index -> cpu_gdb_index

2017-06-01 Thread Greg Kurz
On Thu, 1 Jun 2017 15:49:13 +0100 Alex Bennée wrote: > This is to make it clear the index is purely a gdbstub function and > should not be confused with the value of cpu->cpu_index. > > Signed-off-by: Alex Bennée > --- Reviewed-by: Greg Kurz > gdbstub.c | 12 ++-- > in

[Qemu-devel] [PATCH v2 04/15] qcow2: alloc space for COW in one chunk

2017-06-01 Thread Anton Nefedov
From: "Denis V. Lunev" Currently each single write operation can result in 3 write operations if guest offsets are not cluster aligned. One write is performed for the real payload and two for COW-ed areas. Thus the data possibly lays non-contiguously on the host filesystem. This will reduce furth

[Qemu-devel] [PATCH v2 10/15] qcow2: handle_prealloc(): find out if area zeroed by earlier preallocation

2017-06-01 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Signed-off-by: Denis V. Lunev --- block/qcow2-cluster.c | 2 ++ block/qcow2.c | 8 +++- block/qcow2.h | 4 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index c39e825..ed65961 100

[Qemu-devel] [PATCH v2 01/15] block: introduce BDRV_REQ_ALLOCATE flag

2017-06-01 Thread Anton Nefedov
The flag is supposed to indicate that the region of the disk image has to be sufficiently allocated so it reads as zeroes. The call with the flag set has to return -ENOTSUP if allocation cannot be done efficiently (i.e. without falling back to writing actual buffers) Signed-off-by: Anton Nefedov

[Qemu-devel] [PATCH v2 02/15] file-posix: support BDRV_REQ_ALLOCATE

2017-06-01 Thread Anton Nefedov
Current write_zeroes implementation is good enough to satisfy this flag too Signed-off-by: Anton Nefedov --- block/file-posix.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index de2d3a2..117bbee 100644 --- a/block/file-posix

[Qemu-devel] [PATCH v2 03/15] blkdebug: support BDRV_REQ_ALLOCATE

2017-06-01 Thread Anton Nefedov
Support the flag if the underlying BDS supports it Signed-off-by: Anton Nefedov --- block/blkdebug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index a5196e8..8b1401b 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -415,7 +41

[Qemu-devel] [PATCH v2 09/15] qcow2: check space leak at the end of the image

2017-06-01 Thread Anton Nefedov
From: Pavel Butsykin Preallocating memory in the image may remain unused after the fall, for the qcow2_check adds the ability to identify and fix it, so as not to store extra memory on the host. Signed-off-by: Pavel Butsykin Signed-off-by: Denis V. Lunev Signed-off-by: Anton Nefedov --- bloc

[Qemu-devel] [PATCH v2 06/15] qcow2: preallocation at image expand

2017-06-01 Thread Anton Nefedov
From: "Denis V. Lunev" This patch adds image preallocation at expand to provide better locality of QCOW2 image file and optimize this procedure for some distributed storages where this procedure is slow. Image expand requests have to be suspended until the allocation is performed which is done v

[Qemu-devel] [PATCH v2 00/15] qcow2: space preallocation and COW improvements

2017-06-01 Thread Anton Nefedov
Changes in v2: - introduce new BDRV flag for write_zeroes() instead of using driver callback directly. Skipped introducing new functions like bdrv_co_pallocate() for now: 1. it seems ok to keep calling this write_zeroes() as zeroes are expected; 2. most of the code can

[Qemu-devel] [PATCH v2 07/15] qcow2: set inactive flag

2017-06-01 Thread Anton Nefedov
Qcow2State and BlockDriverState flags have to be in sync Signed-off-by: Anton Nefedov --- block/qcow2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2.c b/block/qcow2.c index c6fb714..b090833 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1932,6 +1932,7 @@ static int qcow2_i

[Qemu-devel] [PATCH v2 11/15] qcow2: fix misleading comment about L2 linking

2017-06-01 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Signed-off-by: Denis V. Lunev --- block/qcow2-cluster.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index ed65961..3dafd19 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c

[Qemu-devel] [PATCH v2 05/15] qcow2: do not COW the empty areas

2017-06-01 Thread Anton Nefedov
If COW area of the newly allocated cluster is zeroes, there is no reason to write zero sectors in perform_cow() again now as whole clusters are zeroed out in single chunks by handle_alloc_space(). Introduce QCowL2Meta field "reduced", since the existing fields (offset and nb_bytes) still has to ke

[Qemu-devel] [PATCH v2 13/15] qcow2-cluster: make handle_dependencies() logic easier to follow

2017-06-01 Thread Anton Nefedov
Avoid complicated nested conditions; return or continue asap instead. The logic is not changed. Signed-off-by: Anton Nefedov Signed-off-by: Denis V. Lunev --- block/qcow2-cluster.c | 45 ++--- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git

[Qemu-devel] [PATCH v2 08/15] qcow2: truncate preallocated space

2017-06-01 Thread Anton Nefedov
From: "Denis V. Lunev" This could be done after calculation of the end of data and metadata in the qcow2 image. Signed-off-by: Denis V. Lunev Signed-off-by: Anton Nefedov --- block/qcow2-cluster.c | 9 + block/qcow2-refcount.c | 7 +++ block/qcow2.c | 8 block/q

[Qemu-devel] [PATCH v2 12/15] qcow2-cluster: slightly refactor handle_dependencies()

2017-06-01 Thread Anton Nefedov
- assert the alignment on return if the allocation has to stop (at the start of a running allocation) - make use of const specifiers for local variables Signed-off-by: Anton Nefedov Signed-off-by: Denis V. Lunev --- block/qcow2-cluster.c | 20 +++- 1 file changed, 11 ins

Re: [Qemu-devel] [PULL 24/33] nbd: Fully initialize client in case of failed negotiation

2017-06-01 Thread Eric Blake
On 06/01/2017 07:41 AM, Paolo Bonzini wrote: > From: Eric Blake > > If a non-NBD client connects to qemu-nbd, we would end up with > a SIGSEGV in nbd_cilent_put() because we were trying to Since it looks like you have to respin this pull request for other reasons, you could s/cilent/client/ whil

Re: [Qemu-devel] [RFC PATCH] OvmfPkg/AcpiPlatformDxe: lift 4 GB alloc limit for modern ACPI systems

2017-06-01 Thread Igor Mammedov
On Thu, 1 Jun 2017 14:25:48 +0200 Laszlo Ersek wrote: > On 06/01/17 13:22, Ard Biesheuvel wrote: > > ACPI supports architectures such as arm64, which did not exist when the > > original 32-bit ACPI 1.0 was introduced. These days, ACPI tables can all > > support 64-bit memory addresses, and so QEM

[Qemu-devel] [PATCH v2 14/15] qcow2: allow concurrent unaligned writes to the same clusters

2017-06-01 Thread Anton Nefedov
If COW area of a write request to unallocated cluster is empty, concurrent write requests can be allowed with a little bit of extra synchronization; so they don't have to wait until L2 is filled. Let qcow2_cluster.c::handle_dependencies() do the most of the job: if there is an in-flight request

[Qemu-devel] [PATCH v2 15/15] iotest 046: test simultaneous cluster write error case

2017-06-01 Thread Anton Nefedov
Signed-off-by: Anton Nefedov --- tests/qemu-iotests/046 | 38 +- tests/qemu-iotests/046.out | 23 +++ 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046 index f2ebecf..c210b55 1

Re: [Qemu-devel] [PATCH v2 07/10] migration: Export rdma.c functions in its own file

2017-06-01 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Signed-off-by: Juan Quintela >> --- >> include/migration/migration.h | 4 >> migration/migration.c | 1 + >> migration/rdma.c | 1 + >> migration/rdma.h | 25 ++

Re: [Qemu-devel] [PATCH v2 06/10] migration: Export tls.c functions in its own file

2017-06-01 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Just for the functions exported from tls.c. Notice that we can't >> remove the migration/migration.h include from tls.c because it access >> directly MigrationState for the tls params. >> +++ b/migration/tls.h >> @

Re: [Qemu-devel] [PATCH] vhost_dev:qemu will quit when vhost_dev is null

2017-06-01 Thread Michael S. Tsirkin
On Thu, Jun 01, 2017 at 10:51:27AM -0400, indiff...@126.com wrote: > From: "yin.zuowei" > > Signed-off-by: yin.zuowei > > when ovdk socket is not ok, this vhost_dev is null ,then qemu will be quit. > We think ovdk is just a network devices, should not cause an exit . It is called like this:

[Qemu-devel] [PATCH] vhost_dev:qemu will quit when vhost_dev is null

2017-06-01 Thread indiffPig
From: "yin.zuowei" Signed-off-by: yin.zuowei when ovdk socket is not ok, this vhost_dev is null ,then qemu will be quit. We think ovdk is just a network devices, should not cause an exit . --- hw/virtio/vhost-user.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/virtio/vhost-user.c

Re: [Qemu-devel] [PATCH v2 3/4] qom/cpu: remove host_tid field

2017-06-01 Thread Greg Kurz
On Thu, 1 Jun 2017 15:49:14 +0100 Alex Bennée wrote: > This was only used by the gdbstub and even then was only being set for > subsequent threads. Rather the continue duplicating the number just > make the gdbstub get the information from TaskState structure. > > Now the tid is correctly repor

Re: [Qemu-devel] [PATCH v2 02/10] migration: Split qemu-file.h

2017-06-01 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Split the file into public and internal interfaces. I have to rename >> the external one because we can't have two include files with the same >> name in the same directory. Build system gets confused. The only >>

Re: [Qemu-devel] [PATCH 4/4] spapr: Make DRC get_index and get_type methods into plain functions

2017-06-01 Thread Laurent Vivier
On 01/06/2017 03:52, David Gibson wrote: > These two methods only have one implementation, and the spec they're > implementing means any other implementation is unlikely, verging on > impossible. > > So replace them with simple functions. > > Signed-off-by: David Gibson Reviewed-by: Laurent Viv

Re: [Qemu-devel] [PATCH 3/4] spapr: Abolish DRC set_configured method

2017-06-01 Thread Michael Roth
Quoting David Gibson (2017-05-31 20:52:17) > DRConnectorClass has a set_configured method, however: > * There is only one implementation, and only ever likely to be one > * There's exactly one caller, and that's (now) local > * The implementation is very straightforward > > So abolish the me

Re: [Qemu-devel] [PULL 00/15] Misc linux-user updates

2017-06-01 Thread Peter Maydell
On 31 May 2017 at 14:08, wrote: > From: Riku Voipio > > The following changes since commit 9964e96dccf7f7c936ee854a795415d19b60: > > Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging > (2017-05-23 15:01:31 +0100) > > are available in the git repository at: > > g

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/4] spapr:DRC cleanups (part I)

2017-06-01 Thread Daniel Henrique Barboza
On 06/01/2017 02:30 AM, David Gibson wrote: On Wed, May 31, 2017 at 11:25:41PM -0500, Michael Roth wrote: Quoting Bharata B Rao (2017-05-31 23:06:46) On Thu, Jun 01, 2017 at 11:52:14AM +1000, David Gibson wrote: The code managing DRCs[0] has quite a few things that are more complicated than

Re: [Qemu-devel] [Qemu-ppc] [PATCHv4 3/5] pseries: Move CPU compatibility property to machine

2017-06-01 Thread Greg Kurz
On Thu, 1 Jun 2017 22:24:47 +1000 David Gibson wrote: [...] > > > > Yeah. This basically does: > > > > inpieces[i + 1] = inpieces[i]; > > > > and we end up overwriting the terminal NULL pointer with a non-NULL > > pointer. > > > > What about simplifying the loop to: > > > > /* inpiece

Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: rename cpu_index -> cpu_gdb_index

2017-06-01 Thread Claudio Imbrenda
On Thu, 1 Jun 2017 15:49:13 +0100 Alex Bennée wrote: > This is to make it clear the index is purely a gdbstub function and > should not be confused with the value of cpu->cpu_index. > > Signed-off-by: Alex Bennée > --- > gdbstub.c | 12 ++-- > include/exec/gdbstub.h | 7

Re: [Qemu-devel] [PATCH v2 07/10] migration: Export rdma.c functions in its own file

2017-06-01 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert" wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > >> Signed-off-by: Juan Quintela > >> --- > >> include/migration/migration.h | 4 > >> migration/migration.c | 1 + > >> migration/rdma.c |

Re: [Qemu-devel] [PATCH v2 3/4] qom/cpu: remove host_tid field

2017-06-01 Thread Philippe Mathieu-Daudé
On 06/01/2017 11:49 AM, Alex Bennée wrote: This was only used by the gdbstub and even then was only being set for subsequent threads. Rather the continue duplicating the number just make the gdbstub get the information from TaskState structure. Now the tid is correctly reported for all threads t

Re: [Qemu-devel] [PATCH v2 4/4] gdbstub: don't fail on vCont; C04:0; c packets

2017-06-01 Thread Philippe Mathieu-Daudé
On 06/01/2017 11:49 AM, Alex Bennée wrote: The thread-id of 0 means any CPU but we then ignore the fact we find the first_cpu in this case who can have an index of 0. Instead of bailing out just test if we have managed to match up thread-id to a CPU. Otherwise you get: gdb_handle_packet: comma

Re: [Qemu-devel] [PATCH v2 3/4] qom/cpu: remove host_tid field

2017-06-01 Thread Claudio Imbrenda
On Thu, 1 Jun 2017 17:32:13 +0200 Greg Kurz wrote: > On Thu, 1 Jun 2017 15:49:14 +0100 > Alex Bennée wrote: > > > This was only used by the gdbstub and even then was only being set > > for subsequent threads. Rather the continue duplicating the number > > just make the gdbstub get the informat

Re: [Qemu-devel] [PATCH v2 4/4] gdbstub: don't fail on vCont; C04:0; c packets

2017-06-01 Thread Claudio Imbrenda
On Thu, 1 Jun 2017 15:49:15 +0100 Alex Bennée wrote: > The thread-id of 0 means any CPU but we then ignore the fact we find > the first_cpu in this case who can have an index of 0. Instead of > bailing out just test if we have managed to match up thread-id to a > CPU. > > Otherwise you get: >

Re: [Qemu-devel] [PATCH v2 06/10] migration: Export tls.c functions in its own file

2017-06-01 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert" wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > >> Just for the functions exported from tls.c. Notice that we can't > >> remove the migration/migration.h include from tls.c because it access > >> directly MigrationS

  1   2   3   4   5   >