[Qemu-devel] [PATCH] virtio-net: enable ioeventfd even if vhost=off

2017-01-11 Thread Paolo Bonzini
virtio-net-pci does not enable ioeventfd for historical reasons (and nobody ever checked whether it should be revisited). Note that other backends do enable ioeventfd for virtio-net. However, it has a major effect on performance. On Windows, throughput is _multiplied_ by 2 or 3 on TCP_STREAM (on

[Qemu-devel] [PATCH] libqtest: handle zero length memwrite/memread

2017-01-11 Thread Greg Kurz
Some recently added tests pass a zero length to qtest_memwrite(). Unfortunately, the qtest protocol doesn't implement an on-the-wire syntax for zero-length writes and the current code happily sends garbage to QEMU. This causes intermittent failures. It isn't worth the pain to enhance the protocol,

[Qemu-devel] [PATCH v4 qemu 1/6] virtio-balloon: update linux head file

2017-01-11 Thread Liang Li
Update the linux head file to keep consistent with kernel side. The new definition will be used in the following patches. Signed-off-by: Liang Li --- include/standard-headers/linux/virtio_balloon.h | 34 + 1 file changed, 34 insertions(+) diff --git a/include/standard-he

[Qemu-devel] [PATCH v4 qemu 2/6] virtio-balloon: speed up inflating & deflating process

2017-01-11 Thread Liang Li
The implementation of the current virtio-balloon is not very efficient, the time spends on different stages of inflating the balloon to 7GB of a 8GB idle guest: a. allocating pages (6.5%) b. sending PFNs to host (68.3%) c. address translation (6.1%) d. madvise (19%) It takes about 4126ms for the

[Qemu-devel] [PATCH v4 qemu 0/6] Fast (de)inflating & fast live migration

2017-01-11 Thread Liang Li
This patch set intends to do two optimizations, one is to speed up the (de)inflating process of virtio balloon, and another one which is to speed up the live migration process. We put them together because both of them are required to change the virtio balloon spec. The main idea of speeding up t

[Qemu-devel] [PATCH v4 qemu 3/6] balloon: get unused page info from guest

2017-01-11 Thread Liang Li
Add a new feature to get the unused page information from guest, the unused page information is saved in the {pfn|length} arrays. Please note that 'unused page' means page is not inuse sometime after host set the value of request ID and before it receive response with the same ID. Signed-off-by: L

[Qemu-devel] [PATCH v4 qemu 4/6] bitmap: Add a new bitmap_move function

2017-01-11 Thread Liang Li
Sometimes, it is need to move a portion of bitmap to another place in a large bitmap, if overlap happens, the bitmap_copy can't not work correctly, we need a new function to do this work. Signed-off-by: Liang Li Reviewed-by: Dr. David Alan Gilbert --- include/qemu/bitmap.h | 13 + 1

[Qemu-devel] [PATCH v4 qemu 5/6] kvm.c: Add two new arch specific functions

2017-01-11 Thread Liang Li
Add a new function to get the vm's max pfn and a new function to filter out the holes in the undressed free page bitmap to get a tight free page bitmap. They are implemented on X86 and should be implemented on other arches for live migration optimization. Signed-off-by: Liang Li --- include/syse

[Qemu-devel] [PATCH v4 qemu 6/6] migration: skip unused pages during live migration

2017-01-11 Thread Liang Li
After sending out the request for unused pages, live migration process will start without waiting for the unused page bitmap is ready. If the unused page bitmap is not ready when doing the 1st migration_bitmap_sync() after ram_save_setup(), the unused page bitmap will be ignored, this means the unu

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 01:29:34PM +0800, Peter Xu wrote: > We were using test.log before to keep all the test logs. This patch > creates one log file per test case under logs/ directory with name > "TESTNAME.log". Meanwhile, we will keep the last time log into > logs.old/. > > Renaming scripts/fu

Re: [Qemu-devel] [PATCH v4 qemu 0/6] Fast (de)inflating & fast live migration

2017-01-11 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Message-id: 1484124524-481-1-git-send-email-liang.z...@intel.com Subject: [Qemu-devel] [PATCH v4 qemu 0/6] Fast (de)inflating & fast live migration Type: series === TEST SCRIPT BEGIN === #!/bin/bash

Re: [Qemu-devel] [PATCH v4 qemu 0/6] Fast (de)inflating & fast live migration

2017-01-11 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 1484124524-481-1-git-send-email-liang.z...@intel.com Subject: [Qemu-devel] [PATCH v4 qemu 0/6] Fast (

[Qemu-devel] [PULL 4/5] audio: ac97: add exit function

2017-01-11 Thread Gerd Hoffmann
From: Li Qiang Currently the ac97 device emulation doesn't have a exit function, hot unplug this device will leak some memory. Add a exit function to avoid this. Signed-off-by: Li Qiang Reviewed-by: Marc-André Lureau Message-id: 58520052.4825ed0a.27a71.6...@mx.google.com Signed-off-by: Gerd Ho

[Qemu-devel] [PULL 5/5] es1370: wire up reset via DeviceClass

2017-01-11 Thread Gerd Hoffmann
Instead of using qemu_register_reset(). That way we get proper cleanup for free. Signed-off-by: Gerd Hoffmann Message-id: 1484054281-26139-1-git-send-email-kra...@redhat.com --- hw/audio/es1370.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/audio/es1370.c b/hw/aud

[Qemu-devel] [PULL 0/5] audio patch queue

2017-01-11 Thread Gerd Hoffmann
) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-audio-20170111-1 for you to fetch changes up to 11f547e58a08ea71a8a92d3ffe1e210b4b0b709c: es1370: wire up reset via DeviceClass (2017-01-11 09:19:03 +0100)

[Qemu-devel] [PULL 3/5] audio: es1370: add exit function

2017-01-11 Thread Gerd Hoffmann
From: Li Qiang Currently the es1370 device emulation doesn't have a exit function, hot unplug this device will leak some memory. Add a exit function to avoid this. Signed-off-by: Li Qiang Reviewed-by: Marc-André Lureau Message-id: 585200c9.a968ca0a.1ab80.4...@mx.google.com Signed-off-by: Gerd

[Qemu-devel] [PULL 1/5] hw/audio: QOM'ify marvell_88w8618.c

2017-01-11 Thread Gerd Hoffmann
From: xiaoqiang zhao split the old SysBus init function into an instance_init and Device realize function Signed-off-by: xiaoqiang zhao Message-id: 20161231011720.3965-2-zxq_yx_...@163.com Signed-off-by: Gerd Hoffmann --- hw/audio/marvell_88w8618.c | 18 +++--- 1 file changed, 11

[Qemu-devel] [PATCH 00/11] s390x patches for 2.9

2017-01-11 Thread Cornelia Huck
The first set of s390x patches for 2.9. The major part is an update of the zpci code, which enables proper multibus support and also makes the code nicer all around. Other than that, introduction of the 2.9 machine and some optimization. Christian Borntraeger (1): s390x: remove double compat s

[Qemu-devel] [PATCH 09/11] s390x/pci: use hashtable to look up zpci via fh

2017-01-11 Thread Cornelia Huck
From: Yi Min Zhao After PCI multibus is supported, more than 32 PCI devices could be plugged. The current implementation of s390_pci_find_dev_by_fh() appears low performance if there's a huge number of PCI devices plugged. Therefore we introduce a hashtable using idx as key to store zpci device's

[Qemu-devel] [PULL 2/5] hw/audio: QOM'ify pl041.c

2017-01-11 Thread Gerd Hoffmann
From: xiaoqiang zhao split the old SysBus init function into an instance_init and Device realize function Signed-off-by: xiaoqiang zhao Message-id: 20161231011720.3965-3-zxq_yx_...@163.com Signed-off-by: Gerd Hoffmann --- hw/audio/pl041.c | 25 ++--- 1 file changed, 14 ins

[Qemu-devel] [PATCH 02/11] s390x: add compat machine for 2.9

2017-01-11 Thread Cornelia Huck
Signed-off-by: Cornelia Huck Acked-by: Christian Borntraeger --- hw/s390x/s390-virtio-ccw.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index dbf4f01165..e9a676797a 100644 --- a/hw/s390x/s390-virtio

[Qemu-devel] [PATCH 03/11] s390x/kvm: use kvm_gsi_routing_enabled in flic

2017-01-11 Thread Cornelia Huck
From: Fei Li Let's use kvm_gsi_routing_enabled() to check if kvm supports KVM_CAP_IRQ_ROUTING in order to avoid a needless ioctl invocation. Signed-off-by: Fei Li Signed-off-by: Cornelia Huck --- hw/intc/s390_flic_kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/h

[Qemu-devel] [PATCH 10/11] s390x/pci: handle PCIBridge bus number

2017-01-11 Thread Cornelia Huck
From: Pierre Morel The PCI bus number is usually set by the host during the enumeration. In the s390 architecture we neither get a Device Tree nor have an enumeration understanding bridge devices. Let's fake the enumeration on reset and set the PCI_PRIMARY_BUS, PCI_SECONDARY_BUS and PCI_SUBORDI

[Qemu-devel] [PATCH 01/11] s390x: remove double compat statement

2017-01-11 Thread Cornelia Huck
From: Christian Borntraeger We chain our compat handler via the CCW_COMPAT macros and via the class_init function. (e.g. ccw_machine_2_7_class_options calls ccw_machine_2_8_class_options). As all class_init functions in that chain call SET_MACHINE_COMPAT for their compat settings, and SET_MACHINE

[Qemu-devel] [PATCH 07/11] s390x/pci: optimize calling s390_get_phb()

2017-01-11 Thread Cornelia Huck
From: Yi Min Zhao A function may recursively call device search functions or may call serveral different device search function. Passing the S390pciState to search functions as an argument instead of looking up it inside the search functions lowers the number of calling s390_get_phb(). Signed-of

[Qemu-devel] [PATCH 05/11] s390x/pci: dynamically allocate iommu

2017-01-11 Thread Cornelia Huck
From: Yi Min Zhao When initializing a PCI device, an address space is required during PCI core initialization and before the call to the embedding object hotplug callback. To provide this AS, we allocate a S390PCIIOMMU object containing this AS. Initialization of S390PCIIOMMU object is done befor

[Qemu-devel] [PATCH 08/11] s390x/pci: PCI multibus bridge handling

2017-01-11 Thread Cornelia Huck
From: Pierre Morel When the hotplug handler detects a PCI bridge, the secondary bus has been initialized by the core PCI code. We give the secondary bus the bridge name and associate to it the IOMMU handling and hotplug/hotunplug callbacks. Signed-off-by: Pierre Morel Signed-off-by: Cornelia Hu

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.9] block: get rid of bdrv_io_unplugged_begin/end

2017-01-11 Thread Stefan Hajnoczi
On Tue, Nov 29, 2016 at 12:33:34PM +0100, Paolo Bonzini wrote: > bdrv_io_plug and bdrv_io_unplug are only called (via their > BlockBackend equivalents) after starting asynchronous I/O. > bdrv_drain is not going to be called while they are running, > because---even if a coroutine runs for some reaso

[Qemu-devel] [PATCH] nvdimm acpi: fix g_array_free() with NULL pointer

2017-01-11 Thread Stefan Hajnoczi
Unlike g_free(), g_array_free() does not accept a NULL pointer argument. The following error is logged when an nvdimm device is realized: GLib-CRITICAL **: g_array_free: assertion 'array' failed Cc: Xiao Guangrong Signed-off-by: Stefan Hajnoczi --- hw/acpi/nvdimm.c | 4 +++- 1 file changed,

[Qemu-devel] [PATCH 06/11] s390x/pci: change the device array to a list

2017-01-11 Thread Cornelia Huck
From: Pierre Morel In order to support a greater number of devices we use a QTAILQ list of devices instead of a limited array. This leads us to change: - every lookup function s390_pci_find_xxx() for QTAILQ - the FH_MASK_INDEX to index up to 65536 devices Signed-off-by: Pierre Morel Signed-off

Re: [Qemu-devel] [PATCH v2 47/47] trace: improve error reporting when parsing simpletrace header

2017-01-11 Thread Stefan Hajnoczi
On Fri, Jan 06, 2017 at 03:55:43PM +, Daniel P. Berrange wrote: > When loading a simpletrace binary file we just report > "Not a valid trace file!" which is not very helpful. Report > exactly which field we found to be invalid. > > Signed-off-by: Daniel P. Berrange > --- > scripts/simpletrac

Re: [Qemu-devel] [PATCH v7 03/10] pci: Convert msix_init() to Error and fix callers to check it

2017-01-11 Thread Markus Armbruster
Paolo Bonzini writes: > On 10/01/2017 18:54, Michael S. Tsirkin wrote: >> On Mon, Nov 14, 2016 at 03:25:33PM +0800, Cao jin wrote: >>> msix_init() reports errors with error_report(), which is wrong when >>> it's used in realize(). The same issue was fixed for msi_init() in >>> commit 1108b2f. >>

[Qemu-devel] [PATCH 04/11] s390x/pci: make S390PCIIOMMU inherit Object

2017-01-11 Thread Cornelia Huck
From: Yi Min Zhao Currently S390PCIIOMMU is a normal struct. Let's make it inherit Object in order to take advantage of QOM. In addition, we move some stuff related to IOMMU from S390PCIBusDevice to S390PCIIOMMU. Signed-off-by: Yi Min Zhao Acked-by: Pierre Morel Signed-off-by: Cornelia Huck -

[Qemu-devel] [PATCH] nvdimm acpi: fix g_array_free() with NULL pointer

2017-01-11 Thread Stefan Hajnoczi
Unlike g_free(), g_array_free() does not accept a NULL pointer argument. The following error is logged when an nvdimm device is realized: GLib-CRITICAL **: g_array_free: assertion 'array' failed Cc: Xiao Guangrong Signed-off-by: Stefan Hajnoczi --- hw/acpi/nvdimm.c | 4 +++- 1 file changed,

[Qemu-devel] [PATCH 11/11] s390x/pci: merge msix init functions

2017-01-11 Thread Cornelia Huck
From: Yi Min Zhao Currently there're two functions, s390_pci_setup_msix() and s390_pci_msix_init(), for msix initialization, and being called once for each zpci device plugging. Let's integrate them. Moreover msix is mandatory in s390 architecture. So we ensure the pci device being plugged suppo

Re: [Qemu-devel] [PATCH RFC v3 0/2] block/qapi: refactor and optimize the qmp_query_blockstats()

2017-01-11 Thread Stefan Hajnoczi
On Wed, Jan 04, 2017 at 02:58:09PM +0800, Dou Liyang wrote: > Change log v2 -> v3: > 1. Remove the unnecessary code for the bdrv_next_node(). > 2. Remove the change of the locking rules. > Even if this change can improve the performance, but it may > effect the consistency. > > For the m

Re: [Qemu-devel] [PATCH 1/7] 9pfs: restrict open to regular files and directories

2017-01-11 Thread Greg Kurz
On Tue, 10 Jan 2017 08:38:27 -0600 Eric Blake wrote: > On 01/10/2017 08:32 AM, Greg Kurz wrote: > > It really does not make sense for the 9P server to open anything else but > > a regular file or a directory. > > > > Malicious code in a guest could for example create a named pipe, associate > >

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file

2017-01-11 Thread Stefan Hajnoczi
On Fri, Jan 06, 2017 at 03:54:58PM +, Daniel P. Berrange wrote: > diff --git a/io/Makefile.objs b/io/Makefile.objs > index 9d8337d..94cb74e 100644 > --- a/io/Makefile.objs > +++ b/io/Makefile.objs > @@ -8,3 +8,5 @@ io-obj-y += channel-watch.o > io-obj-y += channel-websock.o > io-obj-y += chan

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 10:06:07AM +0100, Andrew Jones wrote: > On Wed, Jan 11, 2017 at 01:29:34PM +0800, Peter Xu wrote: > > We were using test.log before to keep all the test logs. This patch > > creates one log file per test case under logs/ directory with name > > "TESTNAME.log". Meanwhile, we

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-11 Thread Peter Xu
On Wed, Jan 11, 2017 at 10:51:12AM +0100, Andrew Jones wrote: > On Wed, Jan 11, 2017 at 10:06:07AM +0100, Andrew Jones wrote: > > On Wed, Jan 11, 2017 at 01:29:34PM +0800, Peter Xu wrote: > > > We were using test.log before to keep all the test logs. This patch > > > creates one log file per test c

[Qemu-devel] [PULL 4/5] virtio-gpu: Fix memory leak in virtio_gpu_load()

2017-01-11 Thread Gerd Hoffmann
From: Peter Maydell Coverity points out that if we fail in the "creating resources" loop in virtio_gpu_load() we will leak various resources (CID 1356431). Failing a VM load is going to leave the simulation in a complete mess, but we can tidy up to the point that a full system reset should get us

[Qemu-devel] [PULL 3/5] virtio-gpu: Recalculate VirtIOGPU::hostmem on VM load

2017-01-11 Thread Gerd Hoffmann
From: Peter Maydell The 'hostmem' field in VirtIOGPU is used to track the total memory used in pixmaps so that we can impose a maximum limit on it. However this field is neither migrated nor recalculated on VM load, which means that after a migration it will be incorrectly too low, which can allo

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file

2017-01-11 Thread Daniel P. Berrange
On Tue, Jan 10, 2017 at 10:01:12PM +0100, Paolo Bonzini wrote: > > > On 10/01/2017 19:36, Daniel P. Berrange wrote: > > > > It seems you're saying we should also trim the top level dirs, so > > we in fact get: > > > > > > -I/home/berrange/src/virt/qemu/hw/scsi > > -Ihw/scsi > > -I/home/berrang

[Qemu-devel] [PULL 2/5] display: cirrus: ignore source pitch value as needed in blit_is_unsafe

2017-01-11 Thread Gerd Hoffmann
From: Bruce Rogers Commit 4299b90 added a check which is too broad, given that the source pitch value is not required to be initialized for solid fill operations. This patch refines the blit_is_unsafe() check to ignore source pitch in that case. After applying the above commit as a security patch

[Qemu-devel] [PULL 0/5] vga patch queue

2017-01-11 Thread Gerd Hoffmann
/tags/pull-ui-20170110-1' into staging (2017-01-10 14:52:34 +) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-vga-20170111-1 for you to fetch changes up to a2056e09b02745e5d000351a8a7938fa8a292ba7: virtio-gpu: tag as not hotpluggable (2017-01-11 09:1

[Qemu-devel] [PULL 1/5] virtio-gpu: fix information leak in capset get dispatch

2017-01-11 Thread Gerd Hoffmann
From: Li Qiang In virgl_cmd_get_capset function, it uses g_malloc to allocate a response struct to the guest. As the 'resp'struct hasn't been full initialized it will lead the 'resp->padding' field to the guest. Use g_malloc0 to avoid this. Signed-off-by: Li Qiang Reviewed-by: Marc-André Lureau

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file

2017-01-11 Thread Daniel P. Berrange
On Wed, Jan 11, 2017 at 10:28:32AM +, Daniel P. Berrange wrote: > On Tue, Jan 10, 2017 at 10:01:12PM +0100, Paolo Bonzini wrote: > > > > > > On 10/01/2017 19:36, Daniel P. Berrange wrote: > > > > > > It seems you're saying we should also trim the top level dirs, so > > > we in fact get: > >

[Qemu-devel] [PULL 5/5] virtio-gpu: tag as not hotpluggable

2017-01-11 Thread Gerd Hoffmann
qemu can't hotplug display devices. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Message-id: 1483970138-20360-1-git-send-email-kra...@redhat.com --- hw/display/virtio-gpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c inde

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 06:12:44PM +0800, Peter Xu wrote: > On Wed, Jan 11, 2017 at 10:51:12AM +0100, Andrew Jones wrote: > > On Wed, Jan 11, 2017 at 10:06:07AM +0100, Andrew Jones wrote: > > > On Wed, Jan 11, 2017 at 01:29:34PM +0800, Peter Xu wrote: > > > > We were using test.log before to keep a

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file

2017-01-11 Thread Paolo Bonzini
- Original Message - > From: "Daniel P. Berrange" > To: "Paolo Bonzini" > Cc: qemu-devel@nongnu.org, "Stefan Hajnoczi" > Sent: Wednesday, January 11, 2017 11:34:42 AM > Subject: Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to > modular trace.h file > > On Wed, Jan 11

[Qemu-devel] [PATCH] cocoa: stop using MOUSE_EVENT_*

2017-01-11 Thread Gerd Hoffmann
No need to go the indirect route with a bitfield and mapping the bits to INPUT_BUTTON_*. We can use a bool array and INPUT_BUTTON_* directly instead. Untested, not even compiled, due to lack of a osx^Wmacos machine. Test results are very welcome. Signed-off-by: Gerd Hoffmann --- ui/cocoa.m | 4

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 2/2] run_tests: allow run tests in parallel

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 01:29:35PM +0800, Peter Xu wrote: > run_task.sh is getting slow. This patch is trying to make it faster by > running the tests concurrently. > > We provide a new parameter "-j" for the run_tests.sh, which can be used > to specify how many run queues we want for the tests. D

[Qemu-devel] [PATCH] docs: sync pci-ids.txt

2017-01-11 Thread Gerd Hoffmann
Three commits allocated pci ids in include/hw/pci/pci.h without also updating docs/specs/pci-ids.txt: bf439db pci: Allocate PCIe host bridge PCI ID 40d14be hw/pci: introduce PCI Expander Bridge (PXB) 02b0743 hw/pxb: introduce pxb-pcie expander for PCIe machines This patch updates pci-ids.tx

[Qemu-devel] [PATCHv2] hw/net: implement MIB counters in mcf_fec driver

2017-01-11 Thread Greg Ungerer
The FEC ethernet hardware module used on ColdFire SoC parts contains a block of RAM used to maintain hardware counters. This block is accessible via the usual FEC register address space. There is currently no support for this in the QEMU mcf_fec driver. Add support for storing a MIB RAM block, and

[Qemu-devel] [PATCH v2 2/9] exec: split file_ram_alloc()

2017-01-11 Thread Marc-André Lureau
Move file opening part in a seperate function file_ram_open(). This allows for reuse of file_ram_alloc() with only a fd. Signed-off-by: Marc-André Lureau --- exec.c | 83 +- 1 file changed, 46 insertions(+), 37 deletions(-) diff --

[Qemu-devel] [PATCH v2 1/9] exec: check kvm mmu notifiers earlier

2017-01-11 Thread Marc-André Lureau
Move kvm mmu notifiers check before calling file_ram_alloc(), with the other xen precondition. (the function will be reused in other cases than -mem-path). Signed-off-by: Marc-André Lureau --- exec.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exec.c b/exec.c

[Qemu-devel] [PATCH v2 0/9] Add memfd memory backend

2017-01-11 Thread Marc-André Lureau
Add a new Linux-specific memory backend, similar to hostmem-file, except that it doesn't need file path. It also try to enforce memory sealing if available. It is thus slightly easier and secure, and is compatible with transparent huge-pages since Linux 4.8. v1->v2: - make it linux-specific - mino

[Qemu-devel] [PATCH v2 3/9] exec: split qemu_ram_alloc_from_file()

2017-01-11 Thread Marc-André Lureau
Add qemu_ram_alloc_from_fd(), which can be use to allocate ramblock from fd only. Signed-off-by: Marc-André Lureau --- include/exec/ram_addr.h | 3 +++ exec.c | 45 ++--- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/in

[Qemu-devel] [PATCH v2 6/9] memory: remove memory_region_set_fd

2017-01-11 Thread Marc-André Lureau
Now unnecessary since ivshmem uses memory_region_init_ram_from_fd. Signed-off-by: Marc-André Lureau --- include/exec/memory.h | 11 --- memory.c | 10 -- 2 files changed, 21 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 6f98e4df6a..5d

[Qemu-devel] [PATCH v2 7/9] memfd: split qemu_memfd_alloc()

2017-01-11 Thread Marc-André Lureau
Add a function to only create a memfd, without mmap. The function is used in the following memory backend. Signed-off-by: Marc-André Lureau --- include/qemu/memfd.h | 2 ++ util/memfd.c | 42 +- 2 files changed, 27 insertions(+), 17 deletions(-)

[Qemu-devel] [PATCH v2 4/9] Add memory_region_init_ram_from_fd()

2017-01-11 Thread Marc-André Lureau
Add a new function to initialize a RAM memory region with a file descriptor to be mmap-ed. Signed-off-by: Marc-André Lureau --- include/exec/memory.h | 20 memory.c | 16 2 files changed, 36 insertions(+) diff --git a/include/exec/memory.h b/in

[Qemu-devel] [PATCH v2 5/9] ivshmem: use ram_from_fd()

2017-01-11 Thread Marc-André Lureau
Instead of having its own mmap handling code, reuse the code from exec.c. Note: memory_region_init_ram_from_fd() adds some restrictions (check for xen, kvm sync-mmu, etc) and changes (such as size alignment). This may actually be more correct. Signed-off-by: Marc-André Lureau --- hw/misc/ivshme

[Qemu-devel] [PATCH v2 9/9] tests: use memfd in vhost-user-test

2017-01-11 Thread Marc-André Lureau
This will exercise the memfd memory backend and should generally be better for testing than memory-backend-file (thanks to anonymous files and sealing). The test is already Linux-specific, but will now require Linux with memfd (since 3.17). Signed-off-by: Marc-André Lureau --- tests/vhost-user-

[Qemu-devel] [PATCH v2 8/9] Add memfd based hostmem

2017-01-11 Thread Marc-André Lureau
Add a new memory backend, similar to hostmem-file, except that it doesn't need to create files. It also enforces memory sealing. This backend is mainly useful for sharing the memory with other processes. Note that Linux supports transparent huge-pages of shmem/memfd memory since 4.8. It is relati

[Qemu-devel] [PATCH V2] hw/pci: disable pci-bridge's shpc by default

2017-01-11 Thread Marcel Apfelbaum
The shpc component is optional while ACPI hotplug is used for hot-plugging PCI devices into a PCI-PCI bridge. Disabling the shpc by default will make slot 0 usable at boot time and not only for hot-plug, without loosing any functionality. Older machines will have shpc enabled for compatibility rea

Re: [Qemu-devel] qemu-2.8-rc4 is broken

2017-01-11 Thread Alex Bennée
Pavel Dovgalyuk writes: >> From: Stefan Hajnoczi [mailto:stefa...@gmail.com] >> On Wed, Dec 21, 2016 at 5:57 AM, Pavel Dovgalyuk wrote: >> >> -Original Message- >> >> From: Stefan Hajnoczi [mailto:stefa...@gmail.com] >> >> On Tue, Dec 20, 2016 at 11:10 AM, Pavel Dovgalyuk >> >> wrote:

Re: [Qemu-devel] TSC frequency configuration & invtsc migration (was Re: [PATCH 4/4] kvm: Allow migration with invtsc)

2017-01-11 Thread Eduardo Habkost
On Tue, Jan 10, 2017 at 05:36:48PM +0100, Paolo Bonzini wrote: > > > On 05/01/2017 11:48, Marcelo Tosatti wrote: > >> Host A has TSC scaling, host B doesn't have TSC scaling. We want > >> to be able to start the VM on host A, and migrate to B. In this > >> case, the only possible solution is to u

[Qemu-devel] [PATCH V2 0/3] hw/pcie: Introduce Generic PCI Express Root Port

2017-01-11 Thread Marcel Apfelbaum
v1 -> v2: - Rebased on master. The Generic Root Port behaves the same as the Intel's IOH device with id 3420, without having Intel specific attributes. The device has two purposes: (1) Can be used on both X86 and ARM machines. (2) It will allow us to tweak the behaviour (e.g add vendor-spe

[Qemu-devel] [PATCH V2 3/3] hw/pcie: Introduce Generic PCI Express Root Port

2017-01-11 Thread Marcel Apfelbaum
The Generic Root Port behaves the same as the Intel's IOH device with id 3420, without having Intel specific attributes. The device has two purposes: (1) Can be used on both X86 and ARM machines. (2) It will allow us to tweak the behaviour (e.g add vendor-specific PCI capabilities) - so

[Qemu-devel] [PATCH V2 2/3] hw/ioh3420: derive from PCI Express Root Port base class

2017-01-11 Thread Marcel Apfelbaum
Preserve only Intel specific details. Signed-off-by: Marcel Apfelbaum --- hw/pci-bridge/ioh3420.c | 152 +++- 1 file changed, 7 insertions(+), 145 deletions(-) diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c index 84b7946..431266c 10064

[Qemu-devel] [PATCH V2 1/3] hw/pcie: Introduce a base class for PCI Express Root Ports

2017-01-11 Thread Marcel Apfelbaum
The 'base' PCI Express Root Port includes the common code to be re-used for all Root Ports implementations. Most of the code was taken from the current implementation of Intel's IOH 3420 Root Port. Signed-off-by: Marcel Apfelbaum --- default-configs/arm-softmmu.mak| 1 + default-configs/i3

Re: [Qemu-devel] [PATCH v6 08/17] qapi: add qapi2texi script

2017-01-11 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > - Original Message - >> Marc-André Lureau writes: >> >> > As the name suggests, the qapi2texi script converts JSON QAPI >> > description into a texi file suitable for different target >> > formats (info/man/txt/pdf/html...). >> > >> > It parses the fol

Re: [Qemu-devel] [PATCH v2 1/6] Add cfgend parameter for ARM CPU selection.

2017-01-11 Thread Julian Brown
On Thu, 5 Jan 2017 17:17:13 + Peter Maydell wrote: > > +qdev_property_add_static(DEVICE(obj), &arm_cpu_cfgend_property, > > + &error_abort); > > + > > +qdev_prop_set_globals(DEVICE(obj)); > > + > > +if (object_property_get_bool(obj, "cfgend", NULL)) { >

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 2/2] run_tests: allow run tests in parallel

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 12:00:23PM +0100, Andrew Jones wrote: > On Wed, Jan 11, 2017 at 01:29:35PM +0800, Peter Xu wrote: > > run_task.sh is getting slow. This patch is trying to make it faster by > > running the tests concurrently. > > > > We provide a new parameter "-j" for the run_tests.sh, whi

Re: [Qemu-devel] Exporting kvm_max_guest_tsc_khz to userspace (was Re: [PATCH 4/4] kvm: Allow migration with invtsc)

2017-01-11 Thread Eduardo Habkost
On Mon, Jan 09, 2017 at 03:58:11PM +0100, Paolo Bonzini wrote: > > > On 08/01/2017 21:28, Eduardo Habkost wrote: > >> Well just export KVM_GET_TSC_KHZ in a QMP command right? Its pretty > >> easy. > >> > >> Let me know if you need any help coding or testing. > > I just found out that KVM doesn't

[Qemu-devel] [PULL 4/5] target-tricore: Added new JNE instruction variant

2017-01-11 Thread Bastian Koppelmann
From: Peer Adelt If D[15] is != sign_ext(const4) then PC will be set to (PC + zero_ext(disp4 + 16)). [BK: fixed style errors] Signed-off-by: Peer Adelt Message-Id: <1465314555-11501-5-git-send-email-peer.ad...@c-lab.de> Signed-off-by: Bastian Koppelmann --- target/tricore/translate.c |

[Qemu-devel] [PULL 5/5] target-tricore: Add updfl instruction

2017-01-11 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target/tricore/fpu_helper.c | 14 ++ target/tricore/helper.h | 1 + target/tricore/translate.c | 3 +++ 3 files changed, 18 insertions(+) diff --git a/target/tricore/fpu_helper.c b/target/tricore/fpu_helper.

[Qemu-devel] [PULL 1/5] target-tricore: Added FTOUZ instruction

2017-01-11 Thread Bastian Koppelmann
Converts a 32-bit floating point number to an unsigned int. The result is rounded towards zero. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target/tricore/fpu_helper.c | 27 +++ target/tricore/helper.h | 1 + target/tricore/translate.c | 3

[Qemu-devel] [PULL 3/5] target-tricore: Added new MOV instruction variant

2017-01-11 Thread Bastian Koppelmann
From: Peer Adelt Puts the content of data register D[a] into E[c][63:32] and the content of data register D[b] into E[c][31:0]. [BK: fix style error] [BK: Allocate temporaries only when needed] Signed-off-by: Peer Adelt Message-Id: <1465314555-11501-4-git-send-email-peer.ad...@c-lab.de> Signed-

[Qemu-devel] [PULL 0/5] tricore-patches

2017-01-11 Thread Bastian Koppelmann
The following changes since commit 50788a3fdbade5f8ed1c8296988578133c52c6aa:

[Qemu-devel] [PULL 2/5] target-tricore: Added MADD.F and MSUB.F instructions

2017-01-11 Thread Bastian Koppelmann
Multiplies D[a] and D[b] and adds/subtracts the result to/from D[d]. The result is put in D[c]. All operands are floating-point numbers. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target/tricore/fpu_helper.c | 93 - target/tr

[Qemu-devel] [Bug 1626972] Re: QEMU memfd_create fallback mechanism change for security drivers

2017-01-11 Thread Rafael David Tinoco
Yakkety Verification (with 3.13 kernel from Trusty since a <= 3.17 kernel is needed). This verifies that Ubuntu Cloud Archive repositories will be alright with this new packages (from Xenial / Yakkety). ## CURRENT inaddy@(ykvm01):~$ apt-cache policy qemu-kvm qemu-kvm: Installed: 1:2.6.1+dfsg-0u

Re: [Qemu-devel] Exporting kvm_max_guest_tsc_khz to userspace (was Re: [PATCH 4/4] kvm: Allow migration with invtsc)

2017-01-11 Thread Paolo Bonzini
On 11/01/2017 14:26, Eduardo Habkost wrote: > On Mon, Jan 09, 2017 at 03:58:11PM +0100, Paolo Bonzini wrote: >> >> >> On 08/01/2017 21:28, Eduardo Habkost wrote: Well just export KVM_GET_TSC_KHZ in a QMP command right? Its pretty easy. Let me know if you need any help coding o

Re: [Qemu-devel] [PATCH] libqtest: handle zero length memwrite/memread

2017-01-11 Thread Eric Blake
On 01/11/2017 02:49 AM, Greg Kurz wrote: > Some recently added tests pass a zero length to qtest_memwrite(). > Unfortunately, the qtest protocol doesn't implement an on-the-wire > syntax for zero-length writes and the current code happily sends > garbage to QEMU. This causes intermittent failures.

Re: [Qemu-devel] [PATCH v7 15/21] qapi: add qapi2texi script

2017-01-11 Thread Markus Armbruster
Marc-André Lureau writes: > As the name suggests, the qapi2texi script converts JSON QAPI > description into a texi file suitable for different target > formats (info/man/txt/pdf/html...). > > It parses the following kind of blocks: > > Free-form: > > ## > # = Section > # == Subsection >

Re: [Qemu-devel] [PATCH v7 21/21] build-sys: add qapi doc generation targets

2017-01-11 Thread Markus Armbruster
Marc-André Lureau writes: > Generate and install the man, txt and html versions of QAPI > documentation (generate and install qemu-doc.txt too). > > Add it also to optional pdf/info targets. > > Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster

[Qemu-devel] vhost-user: fix crash when chardev-remove

2017-01-11 Thread 黄淮
From: Huai Huang diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index f2d49ad..4037cf4 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -412,7 +412,6 @@ VHostNetState *get_vhost_net(NetClientState *nc) break; case NET_CLIENT_DRIVER_VHOST_USER: vhost_net = v

Re: [Qemu-devel] [PATCH v7 00/21] qapi doc generation (whole version, squashed)

2017-01-11 Thread Markus Armbruster
Marc-André Lureau writes: > Add a qapi2texi script to generate the documentation from the qapi > schemas. > > The SQUASHED patch in this series is a squashed version of the > documentation move from qmp-commands.txt to the schemas. The whole > version (not sent on the ML to avoid spamming) is in

Re: [Qemu-devel] [PATCH v7 00/21] qapi doc generation (whole version, squashed)

2017-01-11 Thread Marc-André Lureau
Hi On Wed, Jan 11, 2017 at 3:41 PM Markus Armbruster wrote: > Marc-André Lureau writes: > > > Add a qapi2texi script to generate the documentation from the qapi > > schemas. > > > > The SQUASHED patch in this series is a squashed version of the > > documentation move from qmp-commands.txt to th

[Qemu-devel] [Bug 1653384] Re: Assertion failed with USB pass through with XHCI controller

2017-01-11 Thread Fabian Lesniak
Hi, using qemu commit f634151b02ce5c80605383894f1f63f2c12e0033 configured with --python=/usr/bin/python2 --target-list=x86_64-softmmu --audio-drv-list="oss alsa sdl pa" --enable-debug running with -m 1024 -drive if=pflash,file=ovmf-arch.bin,format=raw -drive file=arch.raw,format=raw,if=virtio -d

Re: [Qemu-devel] [PATCH] display: cirrus: check vga bits per pixel(bpp) value

2017-01-11 Thread Alberto Garcia
On Mon, Nov 28, 2016 at 11:52:08AM +0530, P J P wrote: > | > --- a/hw/display/cirrus_vga.c > | > +++ b/hw/display/cirrus_vga.c > | > @@ -272,6 +272,9 @@ static void cirrus_update_memory_access(CirrusVGAState > | > *s); > | > static bool blit_region_is_unsafe(struct CirrusVGAState *s, > | >

Re: [Qemu-devel] vhost-user: fix crash when chardev-remove

2017-01-11 Thread Marc-André Lureau
Hi On Wed, Jan 11, 2017 at 3:32 PM 黄淮 wrote: > From: Huai Huang > > > Could you describe a bit more the crash and provide a backtrace? > diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c > index f2d49ad..4037cf4 100644 > --- a/hw/net/vhost_net.c > +++ b/hw/net/vhost_net.c > @@ -412,7 +412,6

Re: [Qemu-devel] [PATCH v7 00/10] Convert msix_init() to error

2017-01-11 Thread Cao jin
On 01/10/2017 05:45 AM, Michael S. Tsirkin wrote: > On Mon, Nov 14, 2016 at 03:25:30PM +0800, Cao jin wrote: >> v7 changelog: >> 1. fix the segfaut bug in patch 2. So drop the all the R-b of it, >>please take a look, there is detailed description in the patch. >> 2. add the R-b from Hannes Re

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-11 Thread Vladimir Sementsov-Ogievskiy
from current version: >>> If an error occurs, the server SHOULD set the appropriate error code in the error field of an error chunk. However, if the error does not involve invalid usage (such as a request beyond the bounds of the file), a server MAY reply with a single block status descriptor

Re: [Qemu-devel] [PATCH 02/10] qemu-thread: introduce QemuLockCnt

2017-01-11 Thread Fam Zheng
On Wed, 01/04 14:26, Paolo Bonzini wrote: > +For example, QEMU uses QemuLockCnt to manage an AioContext's list of > +bottom halves and file descriptor handlers. Modifications to the list > +of file descriptor handlers are rare. Creation of a new bottom half is > +frequent and can happen on a fast

Re: [Qemu-devel] [PATCH] nvdimm acpi: fix g_array_free() with NULL pointer

2017-01-11 Thread Igor Mammedov
On Wed, 11 Jan 2017 09:44:43 + Stefan Hajnoczi wrote: > Unlike g_free(), g_array_free() does not accept a NULL pointer argument. > The following error is logged when an nvdimm device is realized: > > GLib-CRITICAL **: g_array_free: assertion 'array' failed > > Cc: Xiao Guangrong > Signed

Re: [Qemu-devel] [PATCH 02/10] qemu-thread: introduce QemuLockCnt

2017-01-11 Thread Paolo Bonzini
On 11/01/2017 16:48, Fam Zheng wrote: > On Wed, 01/04 14:26, Paolo Bonzini wrote: >> +For example, QEMU uses QemuLockCnt to manage an AioContext's list of >> +bottom halves and file descriptor handlers. Modifications to the list >> +of file descriptor handlers are rare. Creation of a new bottom

Re: [Qemu-devel] [PATCH v4] [i.MX] fix CS handling during SPI access.

2017-01-11 Thread Jean-Christophe DUBOIS
Le 10/01/2017 à 00:02, Peter Maydell a écrit : On 9 January 2017 at 22:27, Jean-Christophe DUBOIS wrote: I might be wrong but I think they are coming out of reset with their CS line set to low (so they are selected by default) because this is the default level at reset. If that's true then you

Re: [Qemu-devel] [PATCH v6 3/7] trace: [tcg] Delay changes to dynamic state when translating

2017-01-11 Thread Stefan Hajnoczi
On Tue, Jan 10, 2017 at 05:31:37PM +0100, Paolo Bonzini wrote: > On 09/01/2017 18:01, Stefan Hajnoczi wrote: > > Or use a simpler scheme: > > > > struct CPUState { > > ... > > uint32_t dstate_update_count; > > }; > > > > In trace_event_set_vcpu_state_dynamic(): > > > > if (state) { >

[Qemu-devel] [Bug 1655700] [NEW] disas/libvixl/vixl/invalset.h: possible dodgy code in binary search ?

2017-01-11 Thread dcb
Public bug reported: [qemu/disas/libvixl/vixl/invalset.h:442]: (style) Array index 'low' is used before limits check. Source code is while (!IsValid(elements[low]) && (low < high)) ++low; Also: qemu/disas/libvixl/vixl/invalset.h:450]: (style) Array index 'middle' is used before limits ch

  1   2   3   4   5   >