Re: [Qemu-devel] [PATCH] exec: Stop using memory after free

2015-12-02 Thread Gonglei (Arei)
> Subject: RE: [PATCH] exec: Stop using memory after free > > > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > > > > On 30/11/2015 23:11, Don Slutz wrote: > > > memory_region_unref(mr) can free memory. > > > > > > For example I got: > > > > > > Program received signal SIGSEGV, Segmentation fau

Re: [Qemu-devel] [PATCH] virtio-pci: Set the QEMU_PCI_CAP_EXPRESS capability early in its DeviceClass realize method

2015-12-02 Thread Shmulik Ladkani
Thanks Marcel, On Tue, 1 Dec 2015 22:46:33 +0200, mar...@redhat.com wrote: > >> The reason is the device becomes express only if *all* the conditions > >> are met. > > > > I'm ok with either approaches. > > > > However it seems common practice to set QEMU_PCI_CAP_EXPRESS > > unconditionally for PC

Re: [Qemu-devel] [PATCH v4 08/11] dump-guest-memory: add qmp event DUMP_COMPLETED

2015-12-02 Thread Peter Xu
On Wed, Dec 02, 2015 at 09:11:31AM +0800, Fam Zheng wrote: > On Tue, 12/01 21:28, Peter Xu wrote: > > + > > +## > > +# @DUMP_COMPLETED > > +# > > +# Emitted when background dump has completed > > +# > > +# @error: #optional human-readable error string that provides > > +# hint on why dump f

Re: [Qemu-devel] [PATCH v13 12/14] qapi: Enforce (or whitelist) case conventions on qapi members

2015-12-02 Thread Markus Armbruster
Eric Blake writes: > On 11/27/2015 02:03 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> We document that members of enums and objects should be >>> 'lower-case', although we were not enforcing it. We have to >>> whitelist a few pre-existing entities that violate the norms. >>> Add t

Re: [Qemu-devel] Highlighting changes in QEMU 2.5

2015-12-02 Thread Stefan Hajnoczi
On Tue, Dec 01, 2015 at 05:46:05PM +0530, Amit Shah wrote: > I haven't received any responses so far, please let me know if you're > planning on doing this. I can record a video tomorrow about http://qemu-project.org/ChangeLog/2.5#Block_devices_and_tools (minus Berto's changes since he will send a

Re: [Qemu-devel] [PATCH v4 09/11] DumpState: adding total_size and written_size fields

2015-12-02 Thread Peter Xu
On Wed, Dec 02, 2015 at 09:32:57AM +0800, Fam Zheng wrote: > On Tue, 12/01 21:28, Peter Xu wrote: > > @@ -333,6 +333,8 @@ static void write_data(DumpState *s, void *buf, int > > length, Error **errp) > > if (ret < 0) { > > error_setg(errp, "dump: failed to save memory"); > > } >

Re: [Qemu-devel] [PATCH] migration: Clean up use of g_poll() in socket_writev_buffer()

2015-12-02 Thread Juan Quintela
Markus Armbruster wrote: > socket_writev_buffer() writes in a loop, using g_poll() to block. If > g_poll() fails, it tries to write more before the file descriptor is > ready. In theory, this could go into a tight loop. In practice, > errors other than EINTR are really unlikely, and when they h

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 1/8] hw/arm/virt: Add a GPIO controller

2015-12-02 Thread Pavel Fedin
Hello! > PSCI handles the actions initiated from the inside of OS. Examples > include system shutdown and hotplug (still inside OS). From this > perspective PSCI works well. However this communication is > one-direction: there isn't a way to communicate from the outside (e.g. > libvirt) to the gu

Re: [Qemu-devel] [PATCH] exec: Stop using memory after free

2015-12-02 Thread Paolo Bonzini
On 02/12/2015 08:59, Gonglei (Arei) wrote: static void phys_section_destroy(MemoryRegion *mr) { +bool have_sub_page = mr->subpage; + memory_region_unref(mr); -if (mr->subpage) { +if (have_sub_page) { subpage_t *subpage = containe

Re: [Qemu-devel] [PATCH v4 09/11] DumpState: adding total_size and written_size fields

2015-12-02 Thread Fam Zheng
On Wed, 12/02 16:49, Peter Xu wrote: > On Wed, Dec 02, 2015 at 09:32:57AM +0800, Fam Zheng wrote: > > > @@ -1301,6 +1303,7 @@ static void write_dump_pages(DumpState *s, Error > > > **errp) > > > goto out; > > > } > > > } > > > +s->written_size += TARG

Re: [Qemu-devel] [PATCH] virtio-pci: Set the QEMU_PCI_CAP_EXPRESS capability early in its DeviceClass realize method

2015-12-02 Thread Marcel Apfelbaum
On 12/02/2015 10:01 AM, Shmulik Ladkani wrote: Thanks Marcel, On Tue, 1 Dec 2015 22:46:33 +0200, mar...@redhat.com wrote: The reason is the device becomes express only if *all* the conditions are met. I'm ok with either approaches. However it seems common practice to set QEMU_PCI_CAP_EXPRESS

Re: [Qemu-devel] [PATCH v4 08/11] dump-guest-memory: add qmp event DUMP_COMPLETED

2015-12-02 Thread Fam Zheng
On Wed, 12/02 16:20, Peter Xu wrote: > On Wed, Dec 02, 2015 at 09:11:31AM +0800, Fam Zheng wrote: > > On Tue, 12/01 21:28, Peter Xu wrote: > > > + > > > +## > > > +# @DUMP_COMPLETED > > > +# > > > +# Emitted when background dump has completed > > > +# > > > +# @error: #optional human-readable error

Re: [Qemu-devel] [PATCH v3 1/6] pc: Move compat boolean globals to PCMachineClass

2015-12-02 Thread Marcel Apfelbaum
On 12/02/2015 12:58 AM, Eduardo Habkost wrote: This way the compat flags can be initialized in the machine_options() function. This will help us to eventually eliminate the pc_compat_*() functions. Hi, I have only a minor comment here, Signed-off-by: Eduardo Habkost --- hw/i386/pc.c

Re: [Qemu-devel] [PATCH v3 1/6] pc: Move compat boolean globals to PCMachineClass

2015-12-02 Thread Marcel Apfelbaum
On 12/02/2015 11:57 AM, Marcel Apfelbaum wrote: On 12/02/2015 12:58 AM, Eduardo Habkost wrote: This way the compat flags can be initialized in the machine_options() function. This will help us to eventually eliminate the pc_compat_*() functions. Hi, I have only a minor comment here, Signed-

Re: [Qemu-devel] [PATCH v3 2/6] pc: Move legacy_acpi_table_size global to PCMachineClass

2015-12-02 Thread Marcel Apfelbaum
On 12/02/2015 12:58 AM, Eduardo Habkost wrote: This way we can set legacy_acpi_table_size on the machine_options() functions, instead of requirng code in pc_compat_*() functions. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c| 40 +++- include/hw

Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-12-02 Thread Paolo Bonzini
On 02/12/2015 06:13, Ming Lin wrote: > On Tue, 2015-12-01 at 11:59 -0500, Paolo Bonzini wrote: >>> What do you think about virtio-nvme+vhost-nvme? >> >> What would be the advantage over virtio-blk? Multiqueue is not supported >> by QEMU but it's already supported by Linux (commit 6a27b656fc). >

Re: [Qemu-devel] [PATCH v3 3/6] pc: Move acpi_data_size global to PCMachineClass

2015-12-02 Thread Marcel Apfelbaum
On 12/02/2015 12:58 AM, Eduardo Habkost wrote: This way we don't need code in pc_compat_*() functions to set the legacy acpi_data_size value. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 17 ++--- hw/i386/pc_piix.c| 2 +- hw/i386/pc_q35.c | 2 +- include/

Re: [Qemu-devel] [2.5 issue] virtio-1 in virtio-net and old vhost

2015-12-02 Thread Cornelia Huck
On Wed, 2 Dec 2015 13:54:09 +0800 Jason Wang wrote: > I wonder instead of rolling back in post_plugged(), maybe we could just > delay the region setups to post_plugged(). If this is the saner thing to do for pci, sure. > Or just call transport > specific device_plugged() after get_features() c

Re: [Qemu-devel] [PATCH v3 6/6] pc: Move option_rom_has_mr/rom_file_has_mr globals to MachineClass

2015-12-02 Thread Marcel Apfelbaum
On 12/02/2015 12:58 AM, Eduardo Habkost wrote: This way, these settings can be simply set on the corresponding machine_options() function, instead of requiring code in pc_compat_*() functions. Signed-off-by: Eduardo Habkost --- hw/core/loader.c| 10 +- hw/core/machine.c | 1 +

Re: [Qemu-devel] [PATCH for-2.5] ui/cocoa.m: Prevent activation clicks from going to guest

2015-12-02 Thread Peter Maydell
On 26 November 2015 at 15:19, Peter Maydell wrote: > When QEMU is brought to the foreground, the click event that activates QEMU > should not go to the guest. Accidents happen when they do go to the guest > without giving the user a chance to handle them. In particular, if the > guest input device

Re: [Qemu-devel] Regression: Xen guest with 5G of RAM on 32bit fail to boot

2015-12-02 Thread Paolo Bonzini
On 01/12/2015 18:53, Anthony PERARD wrote: > The problem is in qemu_ram_alloc_internal() where 'size' and 'maxsize' are > now been truncate to 32bit, due to 'qemu_host_page_size' been an uintptr_t > in the HOST_PAGE_ALIGN macro. Isn't it qemu_host_page_mask that causes the problem? This should

Re: [Qemu-devel] [PATCH] tests/vhost-user-test: Fix potential use-after-free

2015-12-02 Thread Marc-André Lureau
Hi - Original Message - > ae31fb5 "vhost-user-test: wrap server in TestServer struct" cleaned up > the handling of the test server in vhost-user-test. Unfortunately it > introduced a subtle use-after-free if a race goes the wrong way. > > When the server structure is freed inside test_se

Re: [Qemu-devel] Highlighting changes in QEMU 2.5

2015-12-02 Thread Amit Shah
On (Tue) 01 Dec 2015 [13:44:03], Andreas Färber wrote: > Hi, > > Am 01.12.2015 um 13:16 schrieb Amit Shah: > > Ping. > > > > I haven't received any responses so far, please let me know if you're > > planning on doing this. > > No. I don't recall merging any big 2.5 feature worth describing, OK.

Re: [Qemu-devel] [PATCH v4 09/11] DumpState: adding total_size and written_size fields

2015-12-02 Thread Peter Xu
On Wed, Dec 02, 2015 at 05:49:18PM +0800, Fam Zheng wrote: > On Wed, 12/02 16:49, Peter Xu wrote: > > On Wed, Dec 02, 2015 at 09:32:57AM +0800, Fam Zheng wrote: > > > > @@ -1301,6 +1303,7 @@ static void write_dump_pages(DumpState *s, Error > > > > **errp) > > > > goto out; > > > >

Re: [Qemu-devel] Highlighting changes in QEMU 2.5

2015-12-02 Thread Amit Shah
On (Tue) 01 Dec 2015 [11:45:15], John Snow wrote: > > > On 12/01/2015 07:16 AM, Amit Shah wrote: > > Ping. > > > > I haven't received any responses so far, please let me know if you're > > planning on doing this. > > > > Thanks, > > > > I did amend the changelog on the wiki for my part, but I

[Qemu-devel] [For 2.5?? PATCH 1/1] qemu_{real_}host_page_[size|mask] change types to ram_addr_t

2015-12-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Anthony reported that >4GB guests on Xen with 32bit QEMU broke after my 4ed023c (Round up RAMBlock sizes). In that patch I mask sizes against qemu_host_page_size/mask which are uintptr_t, and thus 32bit on a 32bit QEMU, even though the ram space might be bigger tha

Re: [Qemu-devel] Regression: Xen guest with 5G of RAM on 32bit fail to boot

2015-12-02 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 01/12/2015 18:53, Anthony PERARD wrote: > > The problem is in qemu_ram_alloc_internal() where 'size' and 'maxsize' are > > now been truncate to 32bit, due to 'qemu_host_page_size' been an uintptr_t > > in the HOST_PAGE_ALIGN macro. > > Isn't

Re: [Qemu-devel] [PATCH 12/15] nbd: implement TLS support in the protocol negotiation

2015-12-02 Thread Daniel P. Berrange
On Sat, Nov 28, 2015 at 11:28:55AM +0100, Wouter Verhelst wrote: > Minor nitpick: > > On Fri, Nov 27, 2015 at 12:20:50PM +, Daniel P. Berrange wrote: > [...] > > @@ -563,6 +659,14 @@ static int nbd_receive_options(NBDClient *client) > > case NBD_OPT_EXPORT_NAME: > >

Re: [Qemu-devel] [For 2.5?? PATCH 1/1] qemu_{real_}host_page_[size|mask] change types to ram_addr_t

2015-12-02 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Anthony reported that >4GB guests on Xen with 32bit QEMU > broke after my 4ed023c (Round up RAMBlock sizes). > > In that patch I mask sizes against qemu_host_page_size/mask > which are uintptr_t, and thus 32bit on a 32bit

Re: [Qemu-devel] [For 2.5?? PATCH 1/1] qemu_{real_}host_page_[size|mask] change types to ram_addr_t

2015-12-02 Thread Paolo Bonzini
On 02/12/2015 11:47, Juan Quintela wrote: > Reviewed-by: Juan Quintela > > If nobody complains, I will sent this on next migration pull requset. > > Paolo, I think that I preffer this that trusting the intptr_t sign > extension, but I can be convinced either way. What do you think? It's not

Re: [Qemu-devel] [PATCH v13 12/14] qapi: Enforce (or whitelist) case conventions on qapi members

2015-12-02 Thread Markus Armbruster
Eric Blake writes: > On 11/27/2015 02:42 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> We document that members of enums and objects should be >>> 'lower-case', although we were not enforcing it. We have to >>> whitelist a few pre-existing entities that violate the norms. >>> Add t

Re: [Qemu-devel] [PULL for-2.5] TCG highwater fix

2015-12-02 Thread Peter Maydell
On 1 December 2015 at 22:40, Richard Henderson wrote: > A last-minute fix for -rc2. > > > r~ > > > The following changes since commit a2485925f76d01795f041fd63663d8582139fda4: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.5-20151130' > into staging (2015-11-30 17:09:35 +)

Re: [Qemu-devel] [PULL 0/2] virtio-9p fixes for 2.5

2015-12-02 Thread Greg Kurz
On Tue, 1 Dec 2015 16:30:09 + Peter Maydell wrote: > On 30 November 2015 at 16:11, Greg Kurz wrote: > > The following changes since commit 714487515dbe0c65d5904251e796cd3a5b3579fb: > > > > Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' > > into staging (2015-11-27 1

Re: [Qemu-devel] [For 2.5?? PATCH 1/1] qemu_{real_}host_page_[size|mask] change types to ram_addr_t

2015-12-02 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" wrote: > > From: "Dr. David Alan Gilbert" > > > > Anthony reported that >4GB guests on Xen with 32bit QEMU > > broke after my 4ed023c (Round up RAMBlock sizes). > > > > In that patch I mask sizes against qemu_host_page_

Re: [Qemu-devel] [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-12-02 Thread Michael S. Tsirkin
On Tue, Dec 01, 2015 at 10:36:33AM -0800, Alexander Duyck wrote: > On Tue, Dec 1, 2015 at 9:37 AM, Michael S. Tsirkin wrote: > > On Tue, Dec 01, 2015 at 09:04:32AM -0800, Alexander Duyck wrote: > >> On Tue, Dec 1, 2015 at 7:28 AM, Michael S. Tsirkin wrote: > > >> > There are several components t

[Qemu-devel] [PATCH] vhost: drop dead code

2015-12-02 Thread Michael S. Tsirkin
We dropped the implementation of vhost_dev_query, drop it from the header file as well. Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhost.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 7437fd4..b60d758 100644 --- a/inc

Re: [Qemu-devel] [PATCH v14 13/15] qapi: Enforce (or whitelist) case conventions on qapi members

2015-12-02 Thread Markus Armbruster
This is the fixup I mentioned in the v13 thread. The "Unreachable and not implemented" hunk should probably be its own patch. diff --git a/scripts/qapi.py b/scripts/qapi.py index 6d38d7c..870e476 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -63,7 +63,6 @@ returns_whitelist = [ case_whit

[Qemu-devel] KVMonitor-like technology

2015-12-02 Thread Mike Guidry
I have a project where I would like to inspect a QEMU Guest. I came across KVMonitor and really like some of the concepts. I'd like to use shared memory/file backed memory to read guest memory immediately using CR3 for Guest->Host memory address translation. Has anyone has experience doing this?

Re: [Qemu-devel] Regression: Xen guest with 5G of RAM on 32bit fail to boot

2015-12-02 Thread Paolo Bonzini
On 02/12/2015 11:30, Paolo Bonzini wrote: > diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h > index f9998b9..87a4145 100644 > --- a/include/exec/cpu-all.h > +++ b/include/exec/cpu-all.h > @@ -174,11 +174,10 @@ extern unsigned long reserved_va; > #define TARGET_PAGE_MASK ~(TARGET_PAG

Re: [Qemu-devel] Regression: Xen guest with 5G of RAM on 32bit fail to boot

2015-12-02 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 02/12/2015 11:30, Paolo Bonzini wrote: > > diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h > > index f9998b9..87a4145 100644 > > --- a/include/exec/cpu-all.h > > +++ b/include/exec/cpu-all.h > > @@ -174,11 +174,10 @@ extern unsign

[Qemu-devel] [PATCH for-2.5] translate-all: ensure host page mask is always extended with 1's

2015-12-02 Thread Paolo Bonzini
Anthony reported that >4GB guests on Xen with 32bit QEMU broke after commit 4ed023c ("Round up RAMBlock sizes to host page sizes", 2015-11-05). In that patch sizes are masked against qemu_host_page_size/mask which are uintptr_t, and thus 32bit on a 32bit QEMU, even though the ram space might be bi

Re: [Qemu-devel] Regression: Xen guest with 5G of RAM on 32bit fail to boot

2015-12-02 Thread Juan Quintela
Paolo Bonzini wrote: > On 02/12/2015 11:30, Paolo Bonzini wrote: >> diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h >> index f9998b9..87a4145 100644 >> --- a/include/exec/cpu-all.h >> +++ b/include/exec/cpu-all.h >> @@ -174,11 +174,10 @@ extern unsigned long reserved_va; >> #define T

Re: [Qemu-devel] [PATCH v2 0/8] Add system_powerdown support on ARM for ACPI and DT

2015-12-02 Thread Igor Mammedov
On Fri, 27 Nov 2015 17:18:06 + Peter Maydell wrote: > On 29 October 2015 at 14:27, Shannon Zhao wrote: > > ACPI SPEC 5.0 defines GPIO-signaled ACPI Events for Hardware-reduced > > platforms(like ARM). It uses GPIO pin to trigger an event to the guest. > > For QEMU, here we add PL061 GPIO con

[Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-02 Thread P J P
Hello Dmitry, all A memory leakage issue was reported by Mr Qinghao Tang, CC'd here. In that, the Qemu VMXNET3 paravirtual device emulator does not check if the device is already active, before activating it. This leads to host memory leakage via calls to vmxnet_tx_pkt_init(), which calls g_

Re: [Qemu-devel] [PATCH v2 1/9] drivers/hv: replace enum hv_message_type by u32

2015-12-02 Thread Paolo Bonzini
On 30/11/2015 17:22, Andrey Smetanin wrote: > enum hv_message_type inside struct hv_message, hv_post_message > is not size portable. Replace enum by u32. It's only non-portable inside structs. Okay to apply just these: @@ -172,7 +174,7 @@ union hv_message_flags { /* Define synthetic interrup

Re: [Qemu-devel] [2.5 issue] virtio-1 in virtio-net and old vhost

2015-12-02 Thread Michael S. Tsirkin
On Wed, Dec 02, 2015 at 11:11:28AM +0100, Cornelia Huck wrote: > On Wed, 2 Dec 2015 13:54:09 +0800 > Jason Wang wrote: > > > I wonder instead of rolling back in post_plugged(), maybe we could just > > delay the region setups to post_plugged(). > > If this is the saner thing to do for pci, sure.

Re: [Qemu-devel] [PATCH for-2.6 0/3] iotests: 124: Don't reopen qcow2 file

2015-12-02 Thread Kevin Wolf
Am 02.12.2015 um 00:16 hat John Snow geschrieben: > Kevin caught me being Naughty, and because I don't want Santa to be > mad at me, I have corrected my ways. > > Split iotest 124 into two classes so that the iotest that requires > a blkdebug filter from the get-go can forego the standard setUp >

Re: [Qemu-devel] [PATCH v4 09/11] DumpState: adding total_size and written_size fields

2015-12-02 Thread Fam Zheng
On Wed, 12/02 18:41, Peter Xu wrote: > On Wed, Dec 02, 2015 at 05:49:18PM +0800, Fam Zheng wrote: > > On Wed, 12/02 16:49, Peter Xu wrote: > > > On Wed, Dec 02, 2015 at 09:32:57AM +0800, Fam Zheng wrote: > > > > > @@ -1301,6 +1303,7 @@ static void write_dump_pages(DumpState *s, > > > > > Error **e

Re: [Qemu-devel] [PATCH 00/15] Implement TLS support to QEMU NBD server & client

2015-12-02 Thread Wouter Verhelst
Hi Daniel, Something occurred to me earlier today: On Fri, Nov 27, 2015 at 12:20:38PM +, Daniel P. Berrange wrote: > As is, if the client connects to a TLS enabled NBD server and then > immediately sends NBD_OPT_EXPORT_NAME, it is not possible for us > to send back NBD_REP_ERR_TLS_REQD as the

Re: [Qemu-devel] [PATCH] vhost: drop dead code

2015-12-02 Thread Yuanhan Liu
On Wed, Dec 02, 2015 at 01:50:35PM +0200, Michael S. Tsirkin wrote: > We dropped the implementation of vhost_dev_query, > drop it from the header file as well. > > Signed-off-by: Michael S. Tsirkin Reviewed-by: Yuanhan Liu --yliu > --- > include/hw/virtio/vhost.h | 1 - > 1 file cha

Re: [Qemu-devel] [PATCH] virtio-pci: Set the QEMU_PCI_CAP_EXPRESS capability early in its DeviceClass realize method

2015-12-02 Thread Shmulik Ladkani
Hi, On Wed, 2 Dec 2015 11:51:46 +0200, mar...@redhat.com wrote: > 2. We still have pci_is_express returning true, this is error prone because > one can use this function assuming the device is express. Maybe we should > call it "can_be_express" ? > > If you think this is good enough, you can simp

Re: [Qemu-devel] 回复: some confusion on qemu i/o pocess and the qcow2format

2015-12-02 Thread Stefan Hajnoczi
On Tue, Dec 01, 2015 at 03:14:14PM +0800, 浩樊啊 wrote: > I read the source code of qcow2. > I can see > bdrv_co_do_readv---bdrv_co_do_preadv---bdrv_aligned_preadv---drv->bdrv_co_readv > (here drv.bdrv_co_readv=qcow2_co_readv) > but when I read > qcow2_co_readv->bdrv_co_readv->bdrv_co_do_readv->b

Re: [Qemu-devel] [PATCH 00/15] Implement TLS support to QEMU NBD server & client

2015-12-02 Thread Daniel P. Berrange
On Wed, Dec 02, 2015 at 01:56:30PM +0100, Wouter Verhelst wrote: > Hi Daniel, > > Something occurred to me earlier today: > > On Fri, Nov 27, 2015 at 12:20:38PM +, Daniel P. Berrange wrote: > > As is, if the client connects to a TLS enabled NBD server and then > > immediately sends NBD_OPT_EX

Re: [Qemu-devel] [PATCH v14 13/15] qapi: Enforce (or whitelist) case conventions on qapi members

2015-12-02 Thread Eric Blake
On 12/02/2015 04:51 AM, Markus Armbruster wrote: > This is the fixup I mentioned in the v13 thread. The "Unreachable and > not implemented" hunk should probably be its own patch. In fact, that hunk... > > diff --git a/scripts/qapi.py b/scripts/qapi.py > index 6d38d7c..870e476 100644 > --- a/scr

Re: [Qemu-devel] [PATCH v5 01/10] vl: Don't allow CPU toplogies with partially filled cores

2015-12-02 Thread Igor Mammedov
On Fri, 20 Nov 2015 18:24:30 +0530 Bharata B Rao wrote: > Prevent guests from booting with CPU topologies that have partially > filled CPU cores or can result in partially filled CPU cores after > CPU hotplug like > > -smp 15,sockets=1,cores=4,threads=4,maxcpus=16 or > -smp 15,sockets=1,cores=4,

[Qemu-devel] [yuanhan....@linux.intel.com: [PATCH 2/2] vhost: don't send RESET_OWNER at stop]

2015-12-02 Thread Michael S. Tsirkin
Cc qemu-sta...@nongnu.org as this fixes some clients. - Forwarded message from Yuanhan Liu - Date: Fri, 13 Nov 2015 15:24:10 +0800 From: Yuanhan Liu To: qemu-devel@nongnu.org Cc: m...@redhat.com, Yuanhan Liu Subject: [PATCH 2/2] vhost: don't send RESET_OWNER at stop Message-Id: <144739

Re: [Qemu-devel] [PATCH] virtio-pci: Set the QEMU_PCI_CAP_EXPRESS capability early in its DeviceClass realize method

2015-12-02 Thread Marcel Apfelbaum
On 12/02/2015 03:30 PM, Shmulik Ladkani wrote: Hi, On Wed, 2 Dec 2015 11:51:46 +0200, mar...@redhat.com wrote: 2. We still have pci_is_express returning true, this is error prone because one can use this function assuming the device is express. Maybe we should call it "can_be_express" ? If you

Re: [Qemu-devel] [Qemu-block] [PATCH v2 07/21] block: Pass driver-specific options to .bdrv_refresh_filename()

2015-12-02 Thread Alberto Garcia
On Mon 23 Nov 2015 04:59:46 PM CET, Kevin Wolf wrote: > In order to decide whether a blkdebug: filename can be produced or a > json: one is necessary, blkdebug checked whether bs->options had more > options than just "config", "x-image" or "image" (the latter including > nested options). That does

Re: [Qemu-devel] [RFC PATCH V2 00/10] Qemu: Add live migration support for SRIOV NIC

2015-12-02 Thread Lan, Tianyu
On 12/1/2015 11:02 PM, Michael S. Tsirkin wrote: But it requires guest OS to do specific configurations inside and rely on bonding driver which blocks it work on Windows. From performance side, putting VF and virtio NIC under bonded interface will affect their performance even when not do migrat

[Qemu-devel] [PATCH for-2.5] virtio: handle non-virtio-1-capable backend

2015-12-02 Thread Cornelia Huck
If you run a qemu advertising VERSION_1 with an old kernel where vhost did not yet support VERSION_1, you'll end up with a device that is {modern pci|ccw revision 1} but does not advertise VERSION_1. This is not a sensible configuration and is rejected by the Linux guest drivers. To fix this, add

Re: [Qemu-devel] [PATCH v14 13/15] qapi: Enforce (or whitelist) case conventions on qapi members

2015-12-02 Thread Eric Blake
On 12/02/2015 04:51 AM, Markus Armbruster wrote: > This is the fixup I mentioned in the v13 thread. The "Unreachable and > not implemented" hunk should probably be its own patch. > > +++ b/tests/qapi-schema/args-member-case.err > @@ -1 +1 @@ > -tests/qapi-schema/args-member-case.json:3: Member '

Re: [Qemu-devel] [PATCH v4 09/11] DumpState: adding total_size and written_size fields

2015-12-02 Thread Peter Xu
On Wed, Dec 02, 2015 at 08:51:48PM +0800, Fam Zheng wrote: > On Wed, 12/02 18:41, Peter Xu wrote: > > On Wed, Dec 02, 2015 at 05:49:18PM +0800, Fam Zheng wrote: > > Label "out" is out of the loop. So, when error happens, it sets the > > errp and directly jump out of the loop. Did I miss anything? >

Re: [Qemu-devel] [PATCH v5 01/10] vl: Don't allow CPU toplogies with partially filled cores

2015-12-02 Thread Eduardo Habkost
On Wed, Dec 02, 2015 at 02:52:39PM +0100, Igor Mammedov wrote: > On Fri, 20 Nov 2015 18:24:30 +0530 > Bharata B Rao wrote: > > > Prevent guests from booting with CPU topologies that have partially > > filled CPU cores or can result in partially filled CPU cores after > > CPU hotplug like > > > >

Re: [Qemu-devel] [PATCH] mirror: Quiesce source during "mirror_exit"

2015-12-02 Thread Jeff Cody
On Mon, Nov 23, 2015 at 10:28:04AM +0800, Fam Zheng wrote: > With dataplane, the ioeventfd events could be dispatched after > mirror_run releases the dirty bitmap, but before mirror_exit actually > does the device switch, because the iothread will still be running, and > it will cause silent data l

Re: [Qemu-devel] [Qemu-block] [PATCH v2 09/21] block: Allow specifying child options in reopen

2015-12-02 Thread Alberto Garcia
On Mon 23 Nov 2015 04:59:48 PM CET, Kevin Wolf wrote: > If the child was defined in the same context (-drive argument or > blockdev-add QMP command) as its parent, a reopen of the parent should > work the same and allow changing options of the child. > > Signed-off-by: Kevin Wolf > Reviewed-by: Ma

Re: [Qemu-devel] [PATCH] virtio-pci: Set the QEMU_PCI_CAP_EXPRESS capability early in its DeviceClass realize method

2015-12-02 Thread Shmulik Ladkani
Hi, On Wed, 2 Dec 2015 16:00:41 +0200, mar...@redhat.com wrote: > > As I can't decide what's better, I'm following your initial suggestion > > and submit for maintainers to review. > > Sure, and thanks for the patience to get to the bottom of it. Sorry, your initial suggestion testing 'pci_bus_i

[Qemu-devel] [PULL 1/1] mirror: Quiesce source during "mirror_exit"

2015-12-02 Thread Jeff Cody
From: Fam Zheng With dataplane, the ioeventfd events could be dispatched after mirror_run releases the dirty bitmap, but before mirror_exit actually does the device switch, because the iothread will still be running, and it will cause silent data loss. Fix this by adding a bdrv_drained_begin/end

[Qemu-devel] [PULL 0/1] Block patches for 2.5

2015-12-02 Thread Jeff Cody
The following changes since commit 680617ed43a2811318ac2df63e686f6b7bc22f55: Merge remote-tracking branch 'remotes/weil/tags/pull-wxx-20151130' into staging (2015-11-30 15:35:20 +) are available in the git repository at: g...@github.com:codyprime/qemu-kvm-jtc.git tags/block-pull-reques

Re: [Qemu-devel] Highlighting changes in QEMU 2.5

2015-12-02 Thread Eduardo Habkost
On Tue, Dec 01, 2015 at 05:46:05PM +0530, Amit Shah wrote: > Ping. > > I haven't received any responses so far, please let me know if you're > planning on doing this. Sorry for taking so long to reply. I don't feel comfortable recording a video, but I have just updated http://qemu-project.org/Cha

Re: [Qemu-devel] [RFC PATCH V2 00/10] Qemu: Add live migration support for SRIOV NIC

2015-12-02 Thread Michael S. Tsirkin
On Wed, Dec 02, 2015 at 10:08:25PM +0800, Lan, Tianyu wrote: > On 12/1/2015 11:02 PM, Michael S. Tsirkin wrote: > >>But > >>it requires guest OS to do specific configurations inside and rely on > >>bonding driver which blocks it work on Windows. > >> From performance side, > >>putting VF and virtio

[Qemu-devel] [PATCH v2 for-2.5] virtio-pci: Set the QEMU_PCI_CAP_EXPRESS capability early in its DeviceClass realize method

2015-12-02 Thread Shmulik Ladkani
In 1811e64 'hw/virtio: Add PCIe capability to virtio devices', the QEMU_PCI_CAP_EXPRESS capability was added to virtio's pci_dev, within 'virtio_pci_realize' - the pci device object realization method. This occurs to late, as 'pci_qdev_realize' (DeviceClass.realize of TYPE_PCI_DEVICE) has already

Re: [Qemu-devel] [Qemu-block] [PATCH v2 18/21] blkdebug: Enable reopen

2015-12-02 Thread Alberto Garcia
On Mon 23 Nov 2015 04:59:57 PM CET, Kevin Wolf wrote: > Just reopening the children (as block.c does now) is enough. > > Signed-off-by: Kevin Wolf Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [PATCH v5 01/10] vl: Don't allow CPU toplogies with partially filled cores

2015-12-02 Thread Bharata B Rao
On Wed, Dec 02, 2015 at 12:14:59PM -0200, Eduardo Habkost wrote: > On Wed, Dec 02, 2015 at 02:52:39PM +0100, Igor Mammedov wrote: > > On Fri, 20 Nov 2015 18:24:30 +0530 > > Bharata B Rao wrote: > > > > > Prevent guests from booting with CPU topologies that have partially > > > filled CPU cores or

Re: [Qemu-devel] [PATCH v4 08/11] dump-guest-memory: add qmp event DUMP_COMPLETED

2015-12-02 Thread Eric Blake
On 12/01/2015 06:11 PM, Fam Zheng wrote: > On Tue, 12/01 21:28, Peter Xu wrote: >> One new QMP event DUMP_COMPLETED is added. When a dump finishes, one >> DUMP_COMPLETED event will occur to notify the user. >> >> Signed-off-by: Peter Xu >> --- >> +++ b/qapi/event.json >> @@ -356,3 +356,16 @@ >>

Re: [Qemu-devel] [PATCH 00/15] Implement TLS support to QEMU NBD server & client

2015-12-02 Thread Wouter Verhelst
On Wed, Dec 02, 2015 at 01:37:08PM +, Daniel P. Berrange wrote: > On Wed, Dec 02, 2015 at 01:56:30PM +0100, Wouter Verhelst wrote: > > Hi Daniel, > > > > Something occurred to me earlier today: > > > > On Fri, Nov 27, 2015 at 12:20:38PM +, Daniel P. Berrange wrote: > > > As is, if the cli

Re: [Qemu-devel] [PATCH v2 for-2.5] virtio-pci: Set the QEMU_PCI_CAP_EXPRESS capability early in its DeviceClass realize method

2015-12-02 Thread Marcel Apfelbaum
On 12/02/2015 04:33 PM, Shmulik Ladkani wrote: In 1811e64 'hw/virtio: Add PCIe capability to virtio devices', the QEMU_PCI_CAP_EXPRESS capability was added to virtio's pci_dev, within 'virtio_pci_realize' - the pci device object realization method. This occurs to late, as 'pci_qdev_realize' (Dev

[Qemu-devel] [PULL 0/4] QEMU changes for 2.5.0-rc3

2015-12-02 Thread Paolo Bonzini
The following changes since commit 9d7b969ea6d9663a94760c6c131481b366f4d38a: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20151201' into staging (2015-12-02 10:16:53 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fet

[Qemu-devel] [PULL 3/4] main-loop: suppress warnings under qtest

2015-12-02 Thread Paolo Bonzini
From: "Michael S. Tsirkin" commit 01c22f2cdd4fcf02276ea10f48253850a5fd7259 ("main-loop: Suppress "I/O thread spun" warnings for qtest") doesn't actually disable the warning for everyone since some tests don't run under the qtest accelerator. Check qtest_driver instead. Cc: Peter Maydell Signed

[Qemu-devel] [PULL 2/4] qemu-char: retry g_poll on EINTR

2015-12-02 Thread Paolo Bonzini
This is a case where pty_chr_update_read_handler_locked's lack of error checking can produce incorrect values. We are not using SIGUSR1 anymore, so this is quite theoretical, but easy to fix. Reported-by: Markus Armbruster Reviewed-by: Markus Armbruster Signed-off-by: Paolo Bonzini --- qemu-c

[Qemu-devel] [PULL 4/4] translate-all: ensure host page mask is always extended with 1's

2015-12-02 Thread Paolo Bonzini
Anthony reported that >4GB guests on Xen with 32bit QEMU broke after commit 4ed023c ("Round up RAMBlock sizes to host page sizes", 2015-11-05). In that patch sizes are masked against qemu_host_page_size/mask which are uintptr_t, and thus 32bit on a 32bit QEMU, even though the ram space might be bi

[Qemu-devel] [PULL 1/4] exec: Stop using memory after free

2015-12-02 Thread Paolo Bonzini
From: Don Slutz memory_region_unref(mr) can free memory. For example I got: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f43280d4700 (LWP 4462)] 0x7f43323283c0 in phys_section_destroy (mr=0x7f43259468b0) at /home/don/xen/tools/qemu-xen-dir/exec.c:1023 102

Re: [Qemu-devel] [PATCH v14 13/15] qapi: Enforce (or whitelist) case conventions on qapi members

2015-12-02 Thread Eric Blake
On 12/02/2015 06:41 AM, Eric Blake wrote: > On 12/02/2015 04:51 AM, Markus Armbruster wrote: >> This is the fixup I mentioned in the v13 thread. The "Unreachable and >> not implemented" hunk should probably be its own patch. > > In fact, that hunk... > >> >> diff --git a/scripts/qapi.py b/script

Re: [Qemu-devel] [PATCH v5 01/10] vl: Don't allow CPU toplogies with partially filled cores

2015-12-02 Thread Eduardo Habkost
On Wed, Dec 02, 2015 at 08:08:23PM +0530, Bharata B Rao wrote: > On Wed, Dec 02, 2015 at 12:14:59PM -0200, Eduardo Habkost wrote: > > On Wed, Dec 02, 2015 at 02:52:39PM +0100, Igor Mammedov wrote: > > > On Fri, 20 Nov 2015 18:24:30 +0530 > > > Bharata B Rao wrote: > > > > > > > Prevent guests fro

Re: [Qemu-devel] [PATCH v4 08/11] dump-guest-memory: add qmp event DUMP_COMPLETED

2015-12-02 Thread Peter Xu
On Wed, Dec 02, 2015 at 07:45:52AM -0700, Eric Blake wrote: > On 12/01/2015 06:11 PM, Fam Zheng wrote: > > Please explicitly mention that successful dump emits DUMP_COMPLETED without > > error, and failed dump emits DUMP_COMPLETED that has an error str. > > In fact, I wonder if it would also be wo

[Qemu-devel] [PATCH v2 2/5] vmxnet3: Change the offset of the MSIX PBA table

2015-12-02 Thread Shmulik Ladkani
Place the PBA table at 0x1000, as placed by VMware virtual hardware. The 'x-old-msi-offsets' property is used for backwards compatability. Signed-off-by: Shmulik Ladkani --- hw/net/vmxnet3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxne

[Qemu-devel] [PATCH v2 1/5] vmxnet3: Change offsets of msi/msix pci capabilities

2015-12-02 Thread Shmulik Ladkani
Place device reported PCI capabilities at the same offsets as placed by the VMware virtual hardware: MSI at [84], MSI-X at [9c]. For compatability, preserve old offsets using 'x-old-msi-offsets' toggle. Signed-off-by: Shmulik Ladkani --- hw/net/vmxnet3.c| 20 +--- include/hw

[Qemu-devel] [PATCH v2 0/5] Fine-tune device capabilities

2015-12-02 Thread Shmulik Ladkani
Various fixes to what the vmxnet3 device reports in its PCI configuration space, in order to be aligned with VMware virtual hardware exposed by ESXi/Workstation. Since v1: Added migration compatability, per Jason Wang's comment Shmulik Ladkani (5): vmxnet3: Change offsets of msi/msix pci capabi

[Qemu-devel] [PATCH v2 3/5] vmxnet3: coding: Introduce VMXNET3Class

2015-12-02 Thread Shmulik Ladkani
Introduce a class type for vmxnet3, and the usual DEVICE_CLASS/DEVICE_GET_CLASS macros. No semantic change. Signed-off-by: Shmulik Ladkani --- hw/net/vmxnet3.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index b176138..d007314 100644 --- a

[Qemu-devel] [PATCH v2 5/5] vmxnet3: Report the Device Serial Number capability

2015-12-02 Thread Shmulik Ladkani
Report the DSN extended PCI capability at 0x100. DSN value is a transformation of device MAC address, as calculated by VMware virtual hardware. DSN is reported only if device is pcie. Signed-off-by: Shmulik Ladkani --- hw/net/vmxnet3.c | 28 ++-- 1 file changed, 26 inser

[Qemu-devel] [PATCH v2 4/5] vmxnet3: The vmxnet3 device is a PCIE endpoint

2015-12-02 Thread Shmulik Ladkani
Report the 'express endpoint' capability if on a PCIE bus. The 'x-disable-pcie' property is used for backwards compatability. Signed-off-by: Shmulik Ladkani --- hw/net/vmxnet3.c| 55 - include/hw/compat.h | 4 2 files changed, 58 ins

[Qemu-devel] [PATCH] fixup! qapi: Enforce (or whitelist) case conventions on qapi members

2015-12-02 Thread Eric Blake
Whitelist must now include implicit names, and update the testsuite to use names that match returns-whitelist Signed-off-by: Eric Blake --- To be applied on top of Markus' fixup, if we indeed want to drop info['name'] and allow implicit names in the whitelist. scripts/qapi.py

Re: [Qemu-devel] [PULL 0/1] Block patches for 2.5

2015-12-02 Thread Peter Maydell
On 2 December 2015 at 14:27, Jeff Cody wrote: > The following changes since commit 680617ed43a2811318ac2df63e686f6b7bc22f55: > > Merge remote-tracking branch 'remotes/weil/tags/pull-wxx-20151130' into > staging (2015-11-30 15:35:20 +) > > are available in the git repository at: > > > g...

Re: [Qemu-devel] [PULL 0/1] Block patches for 2.5

2015-12-02 Thread Jeff Cody
On Wed, Dec 02, 2015 at 03:40:42PM +, Peter Maydell wrote: > On 2 December 2015 at 14:27, Jeff Cody wrote: > > The following changes since commit 680617ed43a2811318ac2df63e686f6b7bc22f55: > > > > Merge remote-tracking branch 'remotes/weil/tags/pull-wxx-20151130' into > > staging (2015-11-30

[Qemu-devel] [PULL v2 1/1] mirror: Quiesce source during "mirror_exit"

2015-12-02 Thread Jeff Cody
From: Fam Zheng With dataplane, the ioeventfd events could be dispatched after mirror_run releases the dirty bitmap, but before mirror_exit actually does the device switch, because the iothread will still be running, and it will cause silent data loss. Fix this by adding a bdrv_drained_begin/end

Re: [Qemu-devel] [PATCH v13 12/14] qapi: Enforce (or whitelist) case conventions on qapi members

2015-12-02 Thread Eric Blake
On 12/02/2015 01:20 AM, Markus Armbruster wrote: > Hmm, this shows my use of "qapi-introspect.py -u" to find the externally > visible part of QAPI is flawed. > > To make it work, we'd need QOM introspection, which we might want > anyway. > > Additionally, a way to output just JSON rather than JS

[Qemu-devel] [PULL v2 0/1] Block patches for 2.5

2015-12-02 Thread Jeff Cody
The following changes since commit 9d7b969ea6d9663a94760c6c131481b366f4d38a: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20151201' into staging (2015-12-02 10:16:53 +) are available in the git repository at: g...@github.com:codyprime/qemu-kvm-jtc.git tags/block-pull-request

Re: [Qemu-devel] [PATCH v3 2/3] qemu-iotests: s390x: fix test 051

2015-12-02 Thread Max Reitz
On 01.12.2015 08:35, tu bo wrote: > Hi Max: > > 在 2015/12/1 3:38, Max Reitz 写道: >> On 26.11.2015 10:53, Bo Tu wrote: >>> From: Bo Tu >>> >>> The tests for device type "ide_cd" should only be tested for the pc >>> platform. >>> The default device id of hard disk on the s390 platform differs to tha

Re: [Qemu-devel] [PATCH v7 14/24] nbd: Switch from close to eject notifier

2015-12-02 Thread Max Reitz
On 01.12.2015 14:16, Kevin Wolf wrote: > Am 30.11.2015 um 18:22 hat Max Reitz geschrieben: >> On 30.11.2015 16:36, Kevin Wolf wrote: >>> Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: The NBD code uses the BDS close notifier to determine when a medium is ejected. However, now it should

[Qemu-devel] [PATCH v2 0/2] target-i386: MMReg struct cleanup

2015-12-02 Thread Eduardo Habkost
Changes v1 -> v2: * Other patches from v1 are already in x86-next branch * MMREG_UNION argument is now the number of bits * Removed [RFC] tag Eduardo Habkost (2): target-i386: Define MMREG_UNION macro target-i386: Add suffixes to MMReg struct fields target-i386/cpu.h | 73 +++

[Qemu-devel] [PATCH v2 1/2] target-i386: Define MMREG_UNION macro

2015-12-02 Thread Eduardo Habkost
This will simplify the definitions of ZMMReg and MMXReg. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Change MMREG_UNION argument to be number of bits --- target-i386/cpu.h | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/target-i386/cpu

  1   2   3   >