Re: [Qemu-devel] [PATCH] migration: remove register_savevm()

2017-05-25 Thread Juan Quintela
Laurent Vivier wrote: D> We can replace the four remaining calls of register_savevm() by > calls to register_savevm_live(). So we can remove the function and > as we don't allocate anymore the ops pointer with g_new0() > we don't have to free it then. > > Signed-off-by: Laurent Vivier Reviewed-b

Re: [Qemu-devel] [PATCH] pc: ACPI BIOS: use highest NUMA node for hotplug mem hole SRAT entry

2017-05-25 Thread Ladi Prosek
On Wed, May 24, 2017 at 11:38 AM, Igor Mammedov wrote: > On Wed, 24 May 2017 11:16:14 +0200 > Ladi Prosek wrote: > >> On Wed, May 24, 2017 at 11:07 AM, Laszlo Ersek wrote: >> > On 05/24/17 10:09, Ladi Prosek wrote: >> >> For reasons unknown, Windows won't online all memory, both at command >> >>

[Qemu-devel] [PATCH v2] pc: ACPI BIOS: use highest NUMA node for hotplug mem hole SRAT entry

2017-05-25 Thread Ladi Prosek
For reasons unknown, Windows won't online all memory, both at command line and hot-plugged later, unless the hotplug mem hole SRAT entry specifies a node greater than or equal to the ones where memory is added. Using the highest node on the machine makes recent versions of Windows happy. With thi

Re: [Qemu-devel] [PATCH v2 0/9] QOM'ify work for sparc

2017-05-25 Thread Mark Cave-Ayland
On 20/05/17 01:28, 赵小强 wrote: > 在 2017年5月20日,08:09,Philippe Mathieu-Daudé 写道: > >>> >>> changes since v1: >>> * rebased on the latest master >>> >>> xiaoqiang zhao (9): >>> hw/misc: QOM'ify eccmemctl.c >>> hw/dma: QOM'ify sparc32_dma.c >>> hw/dma: QOM'ify sun4m_iommu.c >>> hw/misc: QOM'ify s

Re: [Qemu-devel] [RFC PATCH 6/8] memory: introduce AddressSpaceOps

2017-05-25 Thread Peter Xu
On Mon, May 15, 2017 at 03:32:11PM +1000, David Gibson wrote: > On Thu, May 11, 2017 at 01:04:26PM +0800, Peter Xu wrote: > > On Wed, May 10, 2017 at 05:04:06PM +1000, David Gibson wrote: > > > On Mon, May 08, 2017 at 03:32:17PM +0800, Peter Xu wrote: > > > > On Mon, May 08, 2017 at 04:07:44PM +100

Re: [Qemu-devel] [PATCH V6 07/10] migration: add bitmap for copied page

2017-05-25 Thread Peter Xu
On Thu, May 25, 2017 at 09:28:57AM +0300, Alexey Perevalov wrote: > On 05/25/2017 02:30 AM, Peter Xu wrote: > >On Wed, May 24, 2017 at 03:16:23PM +0300, Alexey Perevalov wrote: > >>On 05/24/2017 03:01 PM, Peter Xu wrote: > >>>On Wed, May 24, 2017 at 10:56:37AM +0300, Alexey wrote: > On Wed, May

Re: [Qemu-devel] [PATCH 17/18] block: introduce block_account_one_io

2017-05-25 Thread Fam Zheng
On Thu, 05/11 16:42, Paolo Bonzini wrote: > -void block_acct_done(BlockAcctStats *stats, BlockAcctCookie *cookie) > +static void block_account_one_io(BlockAcctStats *stats, BlockAcctCookie > *cookie, bool failed) This line is too long. Can be fixed when applying, though. Fam

Re: [Qemu-devel] [PATCH v2 00/18] Block layer thread safety, part 1

2017-05-25 Thread Fam Zheng
On Wed, 05/24 10:32, Paolo Bonzini wrote: > > Ping? > Looks good to me except for the mingw 32bit build failure reported by patchew: http://patchew.org/QEMU/20170511144208.24075-1-pbonz...@redhat.com/ Do you want to fix it? Fam

Re: [Qemu-devel] sparc64 linux-user status

2017-05-25 Thread Mark Cave-Ayland
On 22/05/17 14:45, Alex Bennée wrote: > Hi, > > While looking at some of the docker cross-build patches I thought I'd > checkout if I could still bootstrap some Debian linux-user images. I > made some tweaks to allow debootstrap to bootstrap from Debian's ports > to see if I could get the SPARC64

Re: [Qemu-devel] [PATCH v2 0/9] QOM'ify work for sparc

2017-05-25 Thread Zhaoxiangqiang
Mark Cave-Ayland 于 2017 年 5 月 25 日 星期四 写道: > On 20/05/17 01:28, 赵小强 wrote: > > > 在 2017年5月20日,08:09,Philippe Mathieu-Daudé 写道: > > > >>> > >>> changes since v1: > >>> * rebased on the latest master > >>> > >>> xiaoqiang zhao (9): > >>> hw/misc: QOM'ify eccmemctl.c > >>> hw/dma: QOM'ify sparc3

Re: [Qemu-devel] [virtio-dev] Re: [PATCH RFC] virtio-net: enable configurable tx queue size

2017-05-25 Thread Jason Wang
On 2017年05月24日 16:18, Wei Wang wrote: On 05/24/2017 11:19 AM, Jason Wang wrote: On 2017年05月23日 18:36, Wei Wang wrote: On 05/23/2017 02:24 PM, Jason Wang wrote: On 2017年05月23日 13:15, Wei Wang wrote: On 05/23/2017 10:04 AM, Jason Wang wrote: On 2017年05月22日 19:52, Wei Wang wrote: On 05

Re: [Qemu-devel] sparc64 linux-user status

2017-05-25 Thread Laurent Vivier
Le 22/05/2017 à 15:45, Alex Bennée a écrit : > Hi, > > While looking at some of the docker cross-build patches I thought I'd > checkout if I could still bootstrap some Debian linux-user images. I > made some tweaks to allow debootstrap to bootstrap from Debian's ports > to see if I could get the S

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [PATCH v2 00/16] Vhost-pci for inter-VM communication

2017-05-25 Thread Jason Wang
On 2017年05月24日 16:31, Wei Wang wrote: On 05/24/2017 11:24 AM, Jason Wang wrote: On 2017年05月23日 18:48, Wei Wang wrote: On 05/23/2017 02:32 PM, Jason Wang wrote: On 2017年05月23日 13:47, Wei Wang wrote: On 05/23/2017 10:08 AM, Jason Wang wrote: On 2017年05月22日 19:46, Wang, Wei W wrote: On

Re: [Qemu-devel] [PATCH v2] pc: ACPI BIOS: use highest NUMA node for hotplug mem hole SRAT entry

2017-05-25 Thread Igor Mammedov
On Thu, 25 May 2017 09:07:47 +0200 Ladi Prosek wrote: > For reasons unknown, Windows won't online all memory, both at command > line and hot-plugged later, unless the hotplug mem hole SRAT entry > specifies a node greater than or equal to the ones where memory is > added. > > Using the highest n

Re: [Qemu-devel] [PATCH v4 00/10] VT-d: PT (passthrough) mode support and misc fixes

2017-05-25 Thread Jason Wang
On 2017年05月19日 11:19, Peter Xu wrote: Online repo: https://github.com/xzpeter/qemu/tree/vtd-passthrough-misc-1 v4 - remove patch "pc: add 2.10 machine type" since it's merged already - remove patch "memory: fix address_space_get_iotlb_entry()" since the problem is fixed by an much bette

Re: [Qemu-devel] [Qemu-block] [PATCH v2 00/18] Block layer thread safety, part 1

2017-05-25 Thread Paolo Bonzini
On 25/05/2017 09:40, Fam Zheng wrote: > On Wed, 05/24 10:32, Paolo Bonzini wrote: >> >> Ping? >> > > Looks good to me except for the mingw 32bit build failure reported by patchew: > > http://patchew.org/QEMU/20170511144208.24075-1-pbonz...@redhat.com/ > > Do you want to fix it? Sorry I missed t

[Qemu-devel] [PATCH v2] target/s390x/cpu_models: Allow some additional feature bits for the "qemu" CPU

2017-05-25 Thread Thomas Huth
Currently we only present the plain z900 feature bits to the guest, but QEMU already emulates some additional features (but not all of the next CPU generation, so we can not use the next CPU level as default yet). Since newer Linux kernels are checking the feature bits and refuse to work if a requi

Re: [Qemu-devel] [PATCH 09/25] block/dirty-bitmap: add readonly field to BdrvDirtyBitmap

2017-05-25 Thread Vladimir Sementsov-Ogievskiy
20.05.2017 02:02, John Snow wrote: On 05/03/2017 08:25 AM, Vladimir Sementsov-Ogievskiy wrote: It will be needed in following commits for persistent bitmaps. If bitmap is loaded from read-only storage (and we can't mark it "in use" in this storage) corresponding BdrvDirtyBitmap should be read-o

Re: [Qemu-devel] [svt-core] [PATCH] kvmclock: update system_time_msr address forcibly

2017-05-25 Thread Roman Kagan
On Wed, May 24, 2017 at 02:20:05PM -0300, Marcelo Tosatti wrote: > On Wed, May 24, 2017 at 06:54:09PM +0300, Roman Kagan wrote: > > On Wed, May 24, 2017 at 05:07:24PM +0300, Denis Plotnikov wrote: > > > Do an update of system_time_msr address every time before reading > > > the value of tsc_timesta

[Qemu-devel] [PATCH v3] sockets: improve error reporting if UNIX socket path is too long

2017-05-25 Thread Daniel P. Berrange
The 'struct sockaddr_un' only allows 108 bytes for the socket path. If the user supplies a path, QEMU uses snprintf() to silently truncate it when too long. This is undesirable because the user will then be unable to connect to the path they asked for. If the user doesn't supply a path, QEMU buil

Re: [Qemu-devel] [PATCH v6 11/18] qcow2: convert QCow2 to use QCryptoBlock for encryption

2017-05-25 Thread Alberto Garcia
On Wed 24 May 2017 06:46:31 PM CEST, Daniel P. Berrange wrote: >> > +case QCOW_CRYPT_AES: >> > +if (encryptfmt && !g_str_equal(encryptfmt, "aes")) { >> > +error_setg(errp, >> > + "Header reported 'aes' encryption format but " >> > +

Re: [Qemu-devel] [PATCH] migration: keep bytes_xfer_prev init'd to zero

2017-05-25 Thread Felipe Franciosi
> On 25 May 2017, at 01:36, Peter Xu wrote: > > On Wed, May 24, 2017 at 01:02:25PM +, Felipe Franciosi wrote: >> >>> On 23 May 2017, at 05:27, Peter Xu wrote: >>> >>> On Fri, May 19, 2017 at 10:59:02PM +0100, Felipe Franciosi wrote: The first time migration_bitmap_sync() is called, b

Re: [Qemu-devel] [PATCH 2/4] migration: set dirty_pages_rate before autoconverge logic

2017-05-25 Thread Felipe Franciosi
> On 25 May 2017, at 01:40, Peter Xu wrote: > > On Wed, May 24, 2017 at 05:10:01PM +0100, Felipe Franciosi wrote: >> Currently, a "period" in the RAM migration logic is at least a second >> long and accounts for what happened since the last period (or the >> beginning of the migration). The dirt

Re: [Qemu-devel] [PATCH v4 08/10] intel_iommu: support passthrough (PT)

2017-05-25 Thread Liu, Yi L
On Fri, May 19, 2017 at 11:19:47AM +0800, Peter Xu wrote: Reviewed-by: Liu, Yi L Regards, Yi L > Hardware support for VT-d device passthrough. Although current Linux can > live with iommu=pt even without this, but this is faster than when using > software passthrough. > > Signed-off-by: Peter

Re: [Qemu-devel] [PATCH v2 1/1] qga-win: fix installation on localized windows

2017-05-25 Thread Sameeh Jubran
Ping On Sun, May 14, 2017 at 3:53 PM, Sameeh Jubran wrote: > Reviewed-by: Sameeh Jubran > > On Thu, Apr 27, 2017 at 4:21 PM, Daniel Rempel wrote: > >> Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1357789 >> Replace hardcoded user and group names ("Administrators", "SYSTEM") with >> the one

Re: [Qemu-devel] [PATCH 2/4] migration: set dirty_pages_rate before autoconverge logic

2017-05-25 Thread Peter Xu
On Thu, May 25, 2017 at 10:52:32AM +, Felipe Franciosi wrote: > > > On 25 May 2017, at 01:40, Peter Xu wrote: > > > > On Wed, May 24, 2017 at 05:10:01PM +0100, Felipe Franciosi wrote: > >> Currently, a "period" in the RAM migration logic is at least a second > >> long and accounts for what h

Re: [Qemu-devel] [PATCH 4/4] migration: use dirty_rate_high_cnt more aggressively

2017-05-25 Thread Felipe Franciosi
+ Matthew Rosato, original reviewer of 070afca25 > On 25 May 2017, at 02:03, Peter Xu wrote: > > On Wed, May 24, 2017 at 05:10:03PM +0100, Felipe Franciosi wrote: >> The commit message from 070afca25 suggests that dirty_rate_high_cnt >> should be used more aggressively to start throttling after

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-25 Thread Alberto Garcia
On Wed 24 May 2017 06:26:23 PM CEST, Anton Nefedov wrote: >>> I agree; as mentioned we have similar patches and they don't >>> conflict much. We noticed a performance regression on HDD though, >>> for the presumably optimized case (random 4k write over a large >>> backed image); so the patches wer

Re: [Qemu-devel] [virtio-dev] Re: [PATCH RFC] virtio-net: enable configurable tx queue size

2017-05-25 Thread Wei Wang
On 05/25/2017 03:49 PM, Jason Wang wrote: On 2017年05月24日 16:18, Wei Wang wrote: On 05/24/2017 11:19 AM, Jason Wang wrote: On 2017年05月23日 18:36, Wei Wang wrote: On 05/23/2017 02:24 PM, Jason Wang wrote: On 2017年05月23日 13:15, Wei Wang wrote: On 05/23/2017 10:04 AM, Jason Wang wrote: O

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [PATCH v2 00/16] Vhost-pci for inter-VM communication

2017-05-25 Thread Wei Wang
On 05/25/2017 03:59 PM, Jason Wang wrote: On 2017年05月24日 16:31, Wei Wang wrote: On 05/24/2017 11:24 AM, Jason Wang wrote: On 2017年05月23日 18:48, Wei Wang wrote: On 05/23/2017 02:32 PM, Jason Wang wrote: On 2017年05月23日 13:47, Wei Wang wrote: On 05/23/2017 10:08 AM, Jason Wang wrote: O

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [PATCH RFC] virtio-net: enable configurable tx queue size

2017-05-25 Thread Jason Wang
On 2017年05月25日 19:50, Wei Wang wrote: On 05/25/2017 03:49 PM, Jason Wang wrote: On 2017年05月24日 16:18, Wei Wang wrote: On 05/24/2017 11:19 AM, Jason Wang wrote: On 2017年05月23日 18:36, Wei Wang wrote: On 05/23/2017 02:24 PM, Jason Wang wrote: On 2017年05月23日 13:15, Wei Wang wrote: On 05

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [PATCH v2 00/16] Vhost-pci for inter-VM communication

2017-05-25 Thread Jason Wang
On 2017年05月25日 20:01, Wei Wang wrote: On 05/25/2017 03:59 PM, Jason Wang wrote: On 2017年05月24日 16:31, Wei Wang wrote: On 05/24/2017 11:24 AM, Jason Wang wrote: On 2017年05月23日 18:48, Wei Wang wrote: On 05/23/2017 02:32 PM, Jason Wang wrote: On 2017年05月23日 13:47, Wei Wang wrote: On 05

[Qemu-devel] Memory dirty event

2017-05-25 Thread ali saeedi
Hello How can i receive an event when a page or block is dirtied in qemu code? thanks a lot

Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function

2017-05-25 Thread Jean-Philippe Brucker
On 23/05/17 08:50, Liu, Yi L wrote: > On Fri, Apr 28, 2017 at 01:51:42PM +0100, Jean-Philippe Brucker wrote: [...] For the next version of my SVM series, I was thinking of passing group instead of device to iommu_bind. Since all devices in a group are expected to share the same

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [virtio-dev] Re: [PATCH v2 00/16] Vhost-pci for inter-VM communication

2017-05-25 Thread Jason Wang
On 2017年05月25日 20:22, Jason Wang wrote: Even with vhost-pci to virito-net configuration, I think rx zerocopy could be achieved but not implemented in your driver (probably more easier in pmd). Yes, it would be easier with dpdk pmd. But I think it would not be important in the NFV use case

Re: [Qemu-devel] [PATCH] spice: Use proper enum type for kbd led state

2017-05-25 Thread Marc-André Lureau
On Thu, May 11, 2017 at 6:16 AM Jonathon Jongsma wrote: > Although the Qemu and spice flags currently have the same value, it > seems more correct to pass the spice flag values to > spice_server_kbd_leds(), especially considering that this function > already makes an effort to convert between the

Re: [Qemu-devel] [PATCH V5 2/9] net/filter-mirror.c: Make filter mirror support vnet support.

2017-05-25 Thread Zhang Chen
On 05/25/2017 02:04 PM, Jason Wang wrote: On 2017年05月23日 22:20, Zhang Chen wrote: We add the vnet_hdr option for filter-mirror, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirr

Re: [Qemu-devel] [PATCH V5 3/9] net/filter-mirror.c: Add new option to enable vnet support for filter-redirector

2017-05-25 Thread Zhang Chen
On 05/25/2017 02:10 PM, Jason Wang wrote: On 2017年05月23日 22:20, Zhang Chen wrote: We add the vnet_hdr option for filter-redirector, default is disable. If you use virtio-net-pci net driver, please enable it. Because colo-compare or other modules needs the vnet_hdr_len to parse packet, so we

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

2017-05-25 Thread Zhang Chen
On 05/25/2017 02:22 PM, Jason Wang wrote: On 2017年05月23日 22:20, Zhang Chen wrote: We add the vnet_hdr option for colo-compare, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object colo-compare,id=comp0,primary_in=compare0-0,secondar

Re: [Qemu-devel] Memory dirty event

2017-05-25 Thread Xiao Guangrong
No API directly supports your case, but you can do it in KVM by using page-track mechanism. On 05/25/2017 08:26 PM, ali saeedi wrote: Hello How can i receive an event when a page or block is dirtied in qemu code? thanks a lot

[Qemu-devel] [PATCH v3 2/8] hw/dma: QOM'ify sparc32_dma.c

2017-05-25 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init and an realize function Signed-off-by: xiaoqiang zhao Reviewed-by: Philippe Mathieu-Daudé --- hw/dma/sparc32_dma.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/dma/sparc32_dma.c b/hw/dm

[Qemu-devel] [PATCH v3 5/8] hw/timer: QOM'ify m48txx_sysbus

2017-05-25 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init * assign DeviceClass::vmsd instead of using vmstate_register function Signed-off-by: xiaoqiang zhao Reviewed-by: Philippe Mathieu-Daudé --- hw

[Qemu-devel] [PATCH v3 6/8] hw/timer: QOM'ify slavio_timer

2017-05-25 Thread xiaoqiang zhao
rename slavio_timer_init1 to slavio_timer_init and assign it to slavio_timer_info.instance_init, then we drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao Reviewed-by: Philippe Mathieu-Daudé --- hw/timer/slavio_timer.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions

[Qemu-devel] [PATCH v3 4/8] hw/misc: QOM'ify slavio_misc.c

2017-05-25 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao Reviewed-by: Philippe Mathieu-Daudé --- hw/misc/slavio_misc.c | 43 +-- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/hw/misc/slavio_misc.c b/hw/misc/s

[Qemu-devel] [PATCH v3 1/8] hw/misc: QOM'ify eccmemctl.c

2017-05-25 Thread xiaoqiang zhao
* Split the old SysBus init into an instance_init and a DeviceClass::realize function * Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao Reviewed-by: Philippe Mathieu-Daudé --- hw/misc/eccmemctl.c | 25 - 1 file changed, 16 insertio

[Qemu-devel] [PATCH v3 3/8] hw/dma: QOM'ify sun4m_iommu.c

2017-05-25 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao Reviewed-by: Philippe Mathieu-Daudé --- hw/dma/sun4m_iommu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/dma/sun4m_iommu.c b/hw/dma/sun4m_iommu.c index b3cbc54c23..335ef

[Qemu-devel] [PATCH v3 0/8] QOM'ify work for sparc

2017-05-25 Thread xiaoqiang zhao
This patch set aims for QOM'ifying code relate with sparc. It is part of my QOM'ify work of qemu code base. Changes: v2 -> v3: * rebased on the latest master * squash two patches about m48txx_sysbus into one v1 -> v2: * rebased on the latest master xiaoqiang zhao (8): hw/misc: QOM'ify eccme

[Qemu-devel] [PATCH v3 8/8] hw/sparc64: QOM'ify sun4u.c

2017-05-25 Thread xiaoqiang zhao
Drop the old SysBusDeviceClass::init and use instance_init or DeviceClass::realize instead Signed-off-by: xiaoqiang zhao Reviewed-by: Philippe Mathieu-Daudé --- hw/sparc64/sun4u.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/s

[Qemu-devel] [PATCH v3 7/8] hw/sparc: QOM'ify sun4m.c

2017-05-25 Thread xiaoqiang zhao
Drop the old SysBusDeviceClass::init and use instance_init or DeviceClass::realize instead Signed-off-by: xiaoqiang zhao Reviewed-by: Philippe Mathieu-Daudé --- hw/sparc/sun4m.c | 54 +++--- 1 file changed, 19 insertions(+), 35 deletions(-) diff

Re: [Qemu-devel] [PATCH v2 3/5] block: Allow NULL file for bdrv_get_block_status()

2017-05-25 Thread Eric Blake
On 05/25/2017 01:34 AM, Fam Zheng wrote: > On Wed, 05/24 15:28, Eric Blake wrote: >> Not all callers care about which BDS owns the mapping for a given >> range of the file. This patch merely simplifies the callers by >> consolidating the logic in the common call point, while guaranteeing >> a non-

Re: [Qemu-devel] [PATCH] Fix nmi injection failure when vcpu got blocked

2017-05-25 Thread Paolo Bonzini
On 24/05/2017 16:34, Radim Krčmář wrote: >> -if (atomic_read(&vcpu->arch.nmi_queued)) >> +if (vcpu->arch.nmi_pending || >> +atomic_read(&vcpu->arch.nmi_queued)) >> return true; > Hm, I think we've been missing '&& kvm_x86_ops->nmi_allowed(vcpu)'. > > The undesired re

Re: [Qemu-devel] [PATCH v2] KVM: x86: Fix nmi injection failure when vcpu got blocked

2017-05-25 Thread Paolo Bonzini
On 25/05/2017 08:56, Zhuangyanying wrote: > From: ZhuangYanying > > When spin_lock_irqsave() deadlock occurs inside the guest, vcpu threads, > other than the lock-holding one, would enter into S state because of > pvspinlock. Then inject NMI via libvirt API "inject-nmi", the NMI could > not be

Re: [Qemu-devel] [PATCH v3] sockets: improve error reporting if UNIX socket path is too long

2017-05-25 Thread Eric Blake
On 05/25/2017 05:19 AM, Daniel P. Berrange wrote: > The 'struct sockaddr_un' only allows 108 bytes for the socket > path. > > If the user supplies a path, QEMU uses snprintf() to silently > truncate it when too long. This is undesirable because the user > will then be unable to connect to the path

Re: [Qemu-devel] [PATCH v2 3/9] char: chardevice hotswap

2017-05-25 Thread Marc-André Lureau
Hi On Fri, May 19, 2017 at 4:51 PM Anton Nefedov wrote: > This patch adds a possibility to change a char device without a frontend > removal. > > 1. Ideally, it would have to happen transparently to a frontend, i.e. > frontend would continue its regular operation. > However, backends are not sta

Re: [Qemu-devel] [PATCH v2 1/9] char: move QemuOpts->ChardevBackend translation to a separate func

2017-05-25 Thread Marc-André Lureau
Hi On Fri, May 19, 2017 at 4:51 PM Anton Nefedov wrote: > Signed-off-by: Anton Nefedov > Reviewed-by: Vladimir Sementsov-Ogievskiy > --- > chardev/char.c | 72 > +- > 1 file changed, 46 insertions(+), 26 deletions(-) > Motivation is the

Re: [Qemu-devel] [PATCH v2 5/9] char: forbid direct chardevice access for hotswap devices

2017-05-25 Thread Marc-André Lureau
On Fri, May 19, 2017 at 4:49 PM Anton Nefedov wrote: > qemu_chr_fe_get_driver() is unsafe, frontends with hotswap support > should not access CharDriver ptr directly as CharDriver might change. > Signed-off-by: Anton Nefedov > Reviewed-by: Vladimir Sementsov-Ogievskiy > I would move this patc

Re: [Qemu-devel] [PATCH v2 2/9] char: add backend hotswap handler

2017-05-25 Thread Marc-André Lureau
On Fri, May 19, 2017 at 4:51 PM Anton Nefedov wrote: > Frontends should have an interface to setup the handler of a backend > change. > The interface will be used in the next commits > > Signed-off-by: Anton Nefedov > Reviewed-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Marc-André Lureau

Re: [Qemu-devel] [PATCH v2 9/9] char: avoid chardevice direct access

2017-05-25 Thread Marc-André Lureau
On Fri, May 19, 2017 at 4:53 PM Anton Nefedov wrote: > frontends should avoid accessing CharDriver struct where possible > > Signed-off-by: Anton Nefedov > Reviewed-by: Vladimir Sementsov-Ogievskiy > I would move this patch up in the series, otherwise looks good > --- > chardev/char.c

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [PATCH v2 00/16] Vhost-pci for inter-VM communication

2017-05-25 Thread Eric Blake
[meta-comment] On 05/25/2017 07:22 AM, Jason Wang wrote: > [snip] On 2017年05月16日 15:12, Wei Wang wrote: >> Hi: 17 levels of '>' when I add my reply. Wow. >> I think that's another direction or future extension. >> We already have the vhost-pci to virtio-net m

Re: [Qemu-devel] [PATCH v2 7/9] serial: move TIOCM update to a separate function

2017-05-25 Thread Marc-André Lureau
On Fri, May 19, 2017 at 4:55 PM Anton Nefedov wrote: > will be used by the following patch > > Signed-off-by: Anton Nefedov > Reviewed-by: Vladimir Sementsov-Ogievskiy > CC: Michael S. Tsirkin > CC: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- > hw/char/serial.c | 31

Re: [Qemu-devel] [PATCH v2 0/5] more blkdebug tweaks

2017-05-25 Thread Fam Zheng
On Wed, 05/24 15:28, Eric Blake wrote: > I found a crasher and some odd behavior while rebasing my > bdrv_get_block_status series, so I figured I'd get these things > fixed first. This is based on top of Max's block branch. For patches 1,2,4,5: Acked-by: Fam Zheng

Re: [Qemu-devel] [Qemu-block] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-25 Thread Alberto Garcia
On Thu 25 May 2017 01:48:39 PM CEST, Alberto Garcia wrote: I agree; as mentioned we have similar patches and they don't conflict much. We noticed a performance regression on HDD though, for the presumably optimized case (random 4k write over a large backed image); so the patche

Re: [Qemu-devel] [PATCH v3] sockets: improve error reporting if UNIX socket path is too long

2017-05-25 Thread Daniel P. Berrange
On Thu, May 25, 2017 at 09:28:31AM -0500, Eric Blake wrote: > On 05/25/2017 05:19 AM, Daniel P. Berrange wrote: > > The 'struct sockaddr_un' only allows 108 bytes for the socket > > path. > > > > If the user supplies a path, QEMU uses snprintf() to silently > > truncate it when too long. This is u

Re: [Qemu-devel] [PATCH v3] sockets: improve error reporting if UNIX socket path is too long

2017-05-25 Thread Eric Blake
On 05/25/2017 09:40 AM, Daniel P. Berrange wrote: > On Thu, May 25, 2017 at 09:28:31AM -0500, Eric Blake wrote: >> On 05/25/2017 05:19 AM, Daniel P. Berrange wrote: >>> The 'struct sockaddr_un' only allows 108 bytes for the socket >>> path. >>> >>> If the user supplies a path, QEMU uses snprintf()

[Qemu-devel] [PATCH 1/7] block: fix comment for bdrv_get_allocated_file_size()

2017-05-25 Thread Vladimir Sementsov-Ogievskiy
Current comment is not clear enough: which sparseness is meant, coming from sparse image format or from sparse file system? For example, if we have qcow2 above raw file on non-sparse file system, this function will say nothing about unallocated (by qcow2 layer) clusters. Signed-off-by: Vladimir S

[Qemu-devel] [PATCH 2/7] block: add bdrv_get_format_allocated_size format interface

2017-05-25 Thread Vladimir Sementsov-Ogievskiy
The function should return actually used by top-level format driver space (in it's .file). It differs from bdrv_get_allocated_file_size, which returns allocated on fs file size. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 15 +++ include/block/block.h

[Qemu-devel] [PATCH 7/7] block: rename _get_allocated_file_size() to _get_fs_allocated_size()

2017-05-25 Thread Vladimir Sementsov-Ogievskiy
To be in contrast with _get_format_allocated_size() Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 8 block/file-posix.c| 14 +- block/file-win32.c| 8 +++- block/gluster.c | 8 block/nfs.c

[Qemu-devel] [PATCH 4/7] common: make get_human_readable_size public

2017-05-25 Thread Vladimir Sementsov-Ogievskiy
To be reused from qemu-img check. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qapi.c | 2 +- include/qemu-common.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/block/qapi.c b/block/qapi.c index a40922ea26..d249d97142 100644 --- a/block/qapi.c +++ b/blo

[Qemu-devel] [PATCH 5/7] qemu-img check: add format unallocated size

2017-05-25 Thread Vladimir Sementsov-Ogievskiy
Shows format 'sparseness' of the image top level. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 3 ++- qemu-img.c | 19 +++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index ea0b3e8

[Qemu-devel] [PATCH 0/7] qemu-img check: unallocated size

2017-05-25 Thread Vladimir Sementsov-Ogievskiy
Hi all! These small series is about "Format unallocated size" section for qemu-img check. It is needed to know, how many holes we have in qcow2, when underlying raw file is on non-sparse file-system. In this case actual-size from qemu-img info will not take holes into account. Also, qemu-img check

[Qemu-devel] [PATCH 6/7] qemu-img check: add file-size

2017-05-25 Thread Vladimir Sementsov-Ogievskiy
Add bdrv_getlength() of underlying bs->file->bs, to improve 'Format unallocated size' section of qemu-img check output. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 2 +- qemu-img.c | 11 --- 2 files changed, 9 insertions(+), 4 deletions(-) diff --gi

[Qemu-devel] [PATCH 3/7] qcow2: add .bdrv_get_format_allocated_size

2017-05-25 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_get_format_allocated_size interface. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-refcount.c | 61 ++ block/qcow2.c | 2 ++ block/qcow2.h | 2 ++ 3 files changed, 65 insertions(+) diff --git a/block

Re: [Qemu-devel] [PATCH] vhost-user: fix watcher need be removed when vhost-user hotplug

2017-05-25 Thread Marc-André Lureau
On Wed, May 10, 2017 at 5:55 AM wangyunjian wrote: > On Tue, May 9, 2017 at 5:04 PM Yunjian Wang > wrote: > > > > From: w00273186 > > > > > > "nc" is freed after hotplug vhost-user, but the watcher don't be > removed. > > > > > > > > > > The QEMU crash when the watcher access the "nc" on socket

Re: [Qemu-devel] [PATCH 7/7] block: rename _get_allocated_file_size() to _get_fs_allocated_size()

2017-05-25 Thread Vladimir Sementsov-Ogievskiy
25.05.2017 18:26, Vladimir Sementsov-Ogievskiy wrote: To be in contrast with _get_format_allocated_size() Sorry for broken indents in this patch, I'll fix them in the next version. Waiting for other comments. -- Best regards, Vladimir

Re: [Qemu-devel] [svt-core] [PATCH] kvmclock: update system_time_msr address forcibly

2017-05-25 Thread Paolo Bonzini
On 25/05/2017 11:40, Roman Kagan wrote: +kvmclock_struct_pa = env->system_time_msr & ~1ULL; + if (!(env->system_time_msr & 1ULL)) { /* KVM clock not active */ return 0; >>> Roman. >> Can't you avoid that call to each CPU? (ie fix the synchroniza

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

2017-05-25 Thread Paolo Bonzini
On 19/05/2017 23:29, 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 delay, it so happens that under > heavy throttling (ie. close o

[Qemu-devel] [PATCH v4] sockets: improve error reporting if UNIX socket path is too long

2017-05-25 Thread Daniel P. Berrange
The 'struct sockaddr_un' only allows 108 bytes for the socket path. If the user supplies a path, QEMU uses snprintf() to silently truncate it when too long. This is undesirable because the user will then be unable to connect to the path they asked for. If the user doesn't supply a path, QEMU buil

[Qemu-devel] Bug report: qmp_stop() freezes QEMU

2017-05-25 Thread Programmingkid
From the cocoa interface when I select pause QEMU doesn't pause. Instead QEMU freezes. I have traced the problem to the qmp_stop() function. Here is the stack trace: + 2433 -[QemuCocoaAppController

Re: [Qemu-devel] [PATCH v2] vhost-user: pass message as a pointer to process_message_reply()

2017-05-25 Thread Maxime Coquelin
On 05/24/2017 11:58 PM, Michael S. Tsirkin wrote: On Wed, May 24, 2017 at 11:05:20AM +0200, Maxime Coquelin wrote: process_message_reply() was recently updated to get full message content instead of only its request field. There is no need to copy all the struct content into the stack, so jus

Re: [Qemu-devel] [PATCH] qtest: add rtc periodic timer test

2017-05-25 Thread Paolo Bonzini
On 25/05/2017 05:19, guangrong.x...@gmail.com wrote: > > Note: as qemu needs a precise timer to drive its rtc timer callbacks, > that means clock=vm is not suitable for us as it's driven by icount > for qtest, so that we use clock=host instead, it is why we put the > periodic timer test separate

Re: [Qemu-devel] [PATCH v2] pc: ACPI BIOS: use highest NUMA node for hotplug mem hole SRAT entry

2017-05-25 Thread Laszlo Ersek
On 05/25/17 09:07, Ladi Prosek wrote: > For reasons unknown, Windows won't online all memory, both at command > line and hot-plugged later, unless the hotplug mem hole SRAT entry > specifies a node greater than or equal to the ones where memory is > added. > > Using the highest node on the machine

Re: [Qemu-devel] [PATCH v2 00/18] Block layer thread safety, part 1

2017-05-25 Thread Paolo Bonzini
On 25/05/2017 09:40, Fam Zheng wrote: > On Wed, 05/24 10:32, Paolo Bonzini wrote: >> >> Ping? >> > > Looks good to me except for the mingw 32bit build failure reported by patchew: > > http://patchew.org/QEMU/20170511144208.24075-1-pbonz...@redhat.com/ > > Do you want to fix it? Yes, I misread

Re: [Qemu-devel] [PATCH v4] sockets: improve error reporting if UNIX socket path is too long

2017-05-25 Thread Eric Blake
On 05/25/2017 10:53 AM, Daniel P. Berrange wrote: > The 'struct sockaddr_un' only allows 108 bytes for the socket > path. > > If the user supplies a path, QEMU uses snprintf() to silently > truncate it when too long. This is undesirable because the user > will then be unable to connect to the path

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

2017-05-25 Thread Felipe Franciosi
> On 25 May 2017, at 16:52, Paolo Bonzini wrote: > > > > On 19/05/2017 23:29, 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

Re: [Qemu-devel] [PATCH 1/7] block: fix comment for bdrv_get_allocated_file_size()

2017-05-25 Thread Eric Blake
On 05/25/2017 10:26 AM, Vladimir Sementsov-Ogievskiy wrote: > Current comment is not clear enough: which sparseness is meant, coming > from sparse image format or from sparse file system? > > For example, if we have qcow2 above raw file on non-sparse file system, > this function will say nothing a

[Qemu-devel] [PATCH 01/18] block: access copy_on_read with atomic ops

2017-05-25 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block.c | 6 -- block/io.c| 8 blockdev.c| 2 +- include/block/block_int.h | 11 ++- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/block.c b/

[Qemu-devel] [PATCH v3 00/18] Block layer thread safety, part 1

2017-05-25 Thread Paolo Bonzini
Minimal changes to: - fix compilation (patch 10) - appease checkpatch (patch 17) - rename mutex field from "spin" to "lock" (patch 18) Paolo Paolo Bonzini (18): block: access copy_on_read with atomic ops block: access quiesce_counter with atomic ops block: access io_limits_disabled with ato

[Qemu-devel] [PATCH 02/18] block: access quiesce_counter with atomic ops

2017-05-25 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia Signed-off-by: Paolo Bonzini --- block/io.c| 4 ++-- include/block/block_int.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/io.c index 80a3a8c..7d31946 100644 --- a/block/io.c ++

[Qemu-devel] [PATCH 05/18] block: access wakeup with atomic ops

2017-05-25 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/io.c| 3 ++- block/nfs.c | 4 +++- block/sheepdog.c | 3 ++- include/block/block.h | 5 +++-- include/block/block_int.h | 7 +-- 5 files changed, 15 insertions(+), 7 deletions(-) d

[Qemu-devel] [PATCH 07/18] throttle-groups: only start one coroutine from drained_begin

2017-05-25 Thread Paolo Bonzini
Starting all waiting coroutines from bdrv_drain_all is unnecessary; throttle_group_co_io_limits_intercept calls schedule_next_request as soon as the coroutine restarts, which in turn will restart the next request if possible. If we only start the first request and let the coroutines dance from the

[Qemu-devel] [PATCH 03/18] block: access io_limits_disabled with atomic ops

2017-05-25 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia Signed-off-by: Paolo Bonzini --- block/block-backend.c | 4 ++-- block/throttle-groups.c| 2 +- include/sysemu/block-backend.h | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/block/block-backend.c

[Qemu-devel] [PATCH 04/18] block: access serialising_in_flight with atomic ops

2017-05-25 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/io.c| 6 +++--- include/block/block_int.h | 10 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/block/io.c b/block/io.c index 7d31946..cc5de2c 100644 --- a/block/io.c +++ b/block/io.c @

[Qemu-devel] [PATCH 06/18] block: access io_plugged with atomic ops

2017-05-25 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/io.c| 4 ++-- include/block/block_int.h | 8 +--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/block/io.c b/block/io.c index 3a98b02..f34d030 100644 --- a/block/io.c +++ b/block/io.c @@ -265

[Qemu-devel] [PATCH 13/18] block: protect tracked_requests and flush_queue with reqs_lock

2017-05-25 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block.c | 1 + block/io.c| 16 ++-- include/block/block_int.h | 14 +- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/block.c b/block.c index 45a77f5..d297188

[Qemu-devel] [PATCH 09/18] throttle-groups: protect throttled requests with a CoMutex

2017-05-25 Thread Paolo Bonzini
Another possibility is to use tg->lock, which we're holding anyway in both schedule_next_request and throttle_group_co_io_limits_intercept. This would require open-coding the CoQueue however, so I've chosen this alternative. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/bl

[Qemu-devel] [PATCH 15/18] migration/block: reset dirty bitmap before reading

2017-05-25 Thread Paolo Bonzini
Any data that is returned by read may be stale already, the bitmap has to be cleared before issuing the read. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- migration/block.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/block.c b/migration/block

[Qemu-devel] [PATCH 08/18] throttle-groups: do not use qemu_co_enter_next

2017-05-25 Thread Paolo Bonzini
Prepare for removing this function; always restart throttled requests from coroutine context. This will matter when restarting throttled requests will have to acquire a CoMutex. Reviewed-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/throttle-groups.c |

[Qemu-devel] [PATCH 16/18] block: protect modification of dirty bitmaps with a mutex

2017-05-25 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/dirty-bitmap.c | 68 ++-- block/mirror.c | 11 +-- include/block/block_int.h| 4 +-- include/block/dirty-bitmap.h | 25 +++- migration/block.c

[Qemu-devel] [PATCH 10/18] util: add stats64 module

2017-05-25 Thread Paolo Bonzini
This module provides fast paths for 64-bit atomic operations on machines that only have 32-bit atomic access. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- include/qemu/stats64.h | 193 + util/Makefile.objs | 1 + util/stats6

[Qemu-devel] [PATCH 18/18] block: make accounting thread-safe

2017-05-25 Thread Paolo Bonzini
I'm not trying too hard yet. Later, with multiqueue support, this may cause mutex contention or cacheline bouncing. Reviewed-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/accounting.c | 16 include/block/accounting.h | 8 +

  1   2   3   >