Re: [Qemu-devel] [PATCH v6 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-11-10 Thread Alex Williamson
On Thu, 10 Nov 2016 17:54:35 +0200 "Michael S. Tsirkin" wrote: > On Thu, Nov 10, 2016 at 08:30:21AM -0700, Alex Williamson wrote: > > On Thu, 10 Nov 2016 17:14:24 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Tue, Nov 08, 2016 at 01:04:21PM +0200, Aviv B.D wrote: > > > > From: "Aviv Be

[Qemu-devel] [kvm-unit-tests PATCH v4 02/11] arm64: fix get_"sysreg32" and make MPIDR 64bit

2016-11-10 Thread Andrew Jones
mrs is always 64bit, so we should always use a 64bit register. Sometimes we'll only want to return the lower 32, but not for MPIDR, as that does define fields in the upper 32. Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm64/asm/processor.h | 15 ++

[Qemu-devel] [kvm-unit-tests PATCH v4 01/11] lib: xstr: allow multiple args

2016-11-10 Thread Andrew Jones
Make implementation equivalent to Linux's include/linux/stringify.h Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/libcflat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index 72b1bf9668ef..82005f5d014f 100644 --- a/lib/li

[Qemu-devel] [kvm-unit-tests PATCH v4 04/11] arm/arm64: add some delay routines

2016-11-10 Thread Andrew Jones
Allow a thread to wait some specified amount of time. Can specify in cycles, usecs, and msecs. Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 19 +++ lib/arm/processor.c | 15 +++ lib/arm64/asm/proc

[Qemu-devel] [kvm-unit-tests PATCH v4 03/11] arm/arm64: smp: support more than 8 cpus

2016-11-10 Thread Andrew Jones
By adding support for launching with gicv3 we can break the 8 vcpu limit. This patch adds support to smp code and also selects the vgic model corresponding to the host. The vgic model may also be manually selected by adding e.g. -machine gic-version=3 to extra_params. Reviewed-by: Alex Bennée Sig

[Qemu-devel] [PULL 00/47] virtio, vhost, pc, pci: tests, documentation, fixes and cleanups

2016-11-10 Thread Michael S. Tsirkin
The following changes since commit 6bbcb76301a72dc80c8d29af13d40bb9a759c9c6: MAINTAINERS: Remove obsolete stable branches (2016-11-10 15:29:59 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to 8

[Qemu-devel] [PULL 11/47] virtio-crypto: tag as not hotpluggable and migration

2016-11-10 Thread Michael S. Tsirkin
From: Gonglei Currently the virtio-crypto device hasn't supported hotpluggable and live migration well. Let's tag it as not hotpluggable and migration actively and reopen them once we support them well. Suggested-by: Michael S. Tsirkin Signed-off-by: Gonglei Reviewed-by: Michael S. Tsirkin Si

[Qemu-devel] [PULL 12/47] intel_iommu: fix several incorrect endianess and bit fields

2016-11-10 Thread Michael S. Tsirkin
From: Peter Xu Signed-off-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/intel_iommu.h | 9 - hw/i386/intel_iommu.c | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/hw/i386/intel_iommu.h b/includ

[Qemu-devel] [PULL 13/47] intel_iommu: fix incorrect assert

2016-11-10 Thread Michael S. Tsirkin
From: Peter Xu Reported-by: Michael S. Tsirkin Signed-off-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/intel_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 20c4d2c..

[Qemu-devel] [PULL 02/47] tests/vhost-user-bridge: remove unnecessary dispatcher_remove

2016-11-10 Thread Michael S. Tsirkin
From: Marc-André Lureau The call fd is not watched Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-bridge.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c index

[Qemu-devel] [kvm-unit-tests PATCH v4 11/11] arm/arm64: gic: don't just use zero

2016-11-10 Thread Andrew Jones
Allow user to select who sends ipis and with which irq, rather than just always sending irq=0 from cpu0. Signed-off-by: Andrew Jones --- v4: improve structure and make sure spurious checking is done even when the sender isn't cpu0 v2: actually check that the irq received was the irq sent,

[Qemu-devel] [PULL 15/47] virtio: allow per-device-class legacy features

2016-11-10 Thread Michael S. Tsirkin
Legacy features are those that transitional devices only expose on the legacy interface. Allow different ones per device class. Cc: qemu-sta...@nongnu.org # dependency for the next patch Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- include/hw/virtio/virtio.h | 5 + hw/s3

[Qemu-devel] [kvm-unit-tests PATCH v4 00/11] arm/arm64: add gic framework

2016-11-10 Thread Andrew Jones
v4: - Eric's r-b's - Andre's suggestion to only take defines we need - several other changes listed in individual patches v3: - Rebased on latest master - Added Alex's r-b's v2: Rebased on latest master + my "populate argv[0]" series (will send a REPOST for that shortly. Additionally a few

[Qemu-devel] [PULL 19/47] vhost: migration blocker only if shared log is used

2016-11-10 Thread Michael S. Tsirkin
From: Rafael David Tinoco Commit 31190ed7 added a migration blocker in vhost_dev_init() to check if memfd would succeed. It is better if this blocker first checks if vhost backend requires shared log. This will avoid a situation where a blocker is added inappropriately (e.g. shared log allocation

[Qemu-devel] [kvm-unit-tests PATCH v4 05/11] arm/arm64: irq enable/disable

2016-11-10 Thread Andrew Jones
Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 10 ++ lib/arm64/asm/processor.h | 10 ++ 2 files changed, 20 insertions(+) diff --git a/lib/arm/asm/processor.h b/lib/arm/asm/processor.h index afc903ca7d4a..75a8d08b89

[Qemu-devel] [PULL 16/47] virtio-net: mark VIRTIO_NET_F_GSO as legacy

2016-11-10 Thread Michael S. Tsirkin
virtio 1.0 spec says this is a legacy feature bit, hide it from guests in modern mode. Note: for cross-version migration compatibility, we keep the bit set in host_features. The result will be that a guest migrating cross-version will see host features change under it. As guests only seem to read

[Qemu-devel] [kvm-unit-tests PATCH v4 10/11] arm/arm64: gicv3: add an IPI test

2016-11-10 Thread Andrew Jones
Signed-off-by: Andrew Jones --- v4: - heavily comment gicv3_ipi_send_tlist() [Eric] - changes needed for gicv2 iar/irqstat fix to other patch v2: - use IRM for gicv3 broadcast --- arm/gic.c | 195 ++--- arm/unittests.cfg | 6

[Qemu-devel] [PULL 04/47] tests/vhost-user-bridge: do not accept more than one connection

2016-11-10 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-bridge.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c index 97e45d8..5b618f6 100644 ---

[Qemu-devel] [kvm-unit-tests PATCH v4 06/11] arm/arm64: add initial gicv2 support

2016-11-10 Thread Andrew Jones
Add some gicv2 support. This just adds init and enable functions, allowing unit tests to start messing with it. Signed-off-by: Andrew Jones --- v4: - only take defines from kernel we need now [Andre] - moved defines to asm/gic.h so they'll be shared with v3 [drew] - simplify enable by not car

[Qemu-devel] [PULL 18/47] vhost: Use vbus var instead of VIRTIO_BUS() macro

2016-11-10 Thread Michael S. Tsirkin
From: Felipe Franciosi Recent changes on vhost_dev_enable/disable_notifiers() produced a VirtioBusState vbus variable which can be used instead of the VIRTIO_BUS() macro. This commit just makes the code a little bit cleaner and more consistent. Signed-off-by: Felipe Franciosi Reviewed-by: Micha

[Qemu-devel] [PULL 21/47] nvdimm acpi: drop the lock of fit buffer

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong as there is a global lock to protect vm-exit handlers and QMP/monitor, this lock can be dropped Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mam

[Qemu-devel] [PULL 17/47] vhost: Update 'ioeventfd_started' with host notifiers

2016-11-10 Thread Michael S. Tsirkin
From: Felipe Franciosi Following the recent refactoring of virtio notifiers [1], more specifically the patch ed08a2a0b ("virtio: use virtio_bus_set_host_notifier to start/stop ioeventfd") that uses virtio_bus_set_host_notifier [2] by default, core virtio code requires 'ioeventfd_started' to be se

[Qemu-devel] [PULL 05/47] contrib: add libvhost-user

2016-11-10 Thread Michael S. Tsirkin
From: Marc-André Lureau Add a library to help implementing vhost-user backend (or slave). Dealing with vhost-user as an application developer isn't so easy: you have all the trouble with any protocol: validation, unix ancillary data, shared memory, eventfd, logging, and on top of that you need t

[Qemu-devel] [PULL 06/47] tests/vhost-user-bridge: use contrib/libvhost-user

2016-11-10 Thread Michael S. Tsirkin
From: Marc-André Lureau Use the libvhost-user library. This ended up being a rather large patch that cannot be easily splitted, due to massive code move and API changes. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-b

[Qemu-devel] [PULL 07/47] intel_iommu: fixing source id during IOTLB hash key calculation

2016-11-10 Thread Michael S. Tsirkin
From: Jason Wang Using uint8_t for source id will lose bus num and get the wrong/invalid IOTLB entry. Fixing by using uint16_t instead and enlarge level shift. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Michael S. Tsirkin Signed-off-by: Jason Wang Reviewed-by: Michael S

[Qemu-devel] [PULL 10/47] pcie_aer: Convert pcie_aer_init to Error

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin When user specify invalid property aer_log_max, device should fail to create, and report appropriate message. Signed-off-by: Cao jin Reviewed-by: Marcel Apfelbaum Acked-by: Dmitry Fleytman Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pc

[Qemu-devel] [PULL 23/47] pc: memhp: stop handling nvdimm hotplug in pc_dimm_unplug

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong as it is never called when nvdimm hotplug happens Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- hw/i386/pc.c | 6 -- 1 file ch

[Qemu-devel] [PULL 24/47] nvdimm acpi: clean up nvdimm_build_acpi

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong To make the code more clearer, we 1) check ram_slots first, and build ssdt & nfit only when it is available 2) use nvdimm_get_plugged_device_list() to check if there is nvdimm device plugged Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael

[Qemu-devel] [PULL 01/47] tests/vhost-user-bridge: remove false comment

2016-11-10 Thread Michael S. Tsirkin
From: Marc-André Lureau dispatcher_remove() is in use. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-bridge.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c i

[Qemu-devel] [PULL 20/47] qdev: hotplug: drop HotplugHandler.post_plug callback

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong as nvdimm acpi is okay to build fit when the nvdimm device has not been 'realized' Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- i

[Qemu-devel] [kvm-unit-tests PATCH v4 07/11] arm/arm64: gicv2: add an IPI test

2016-11-10 Thread Andrew Jones
Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v4: properly mask irqnr in ipi_handler v2: add more details in the output if a test fails, report spurious interrupts if we get them --- arm/Makefile.common | 6 +- arm/gic.c | 195 +++

[Qemu-devel] [PULL 08/47] virtio: rename virtqueue_discard to virtqueue_unpop

2016-11-10 Thread Michael S. Tsirkin
From: Ladi Prosek The function undoes the effect of virtqueue_pop and doesn't do anything destructive or irreversible so virtqueue_unpop is a more fitting name. Signed-off-by: Ladi Prosek Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- incl

[Qemu-devel] [kvm-unit-tests PATCH v4 09/11] arm/arm64: add initial gicv3 support

2016-11-10 Thread Andrew Jones
Signed-off-by: Andrew Jones --- v4: - only take defines from kernel we need now [Andre] - simplify enable by not caring if we reinit the distributor [drew] v2: - configure irqs as NS GRP1 --- lib/arm/asm/arch_gicv3.h | 42 + lib/arm/asm/gic-v3.h | 92 ++

[Qemu-devel] [PULL 26/47] nvdimm acpi: rename nvdimm_plugged_device_list

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong Its behavior has been changed as the nvdimm device which is being realized also will be handled in this function, so rename it to reflect the fact Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[Qemu-devel] [PULL 25/47] docs: improve the doc of Read FIT method

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong Improve the description and clearly document the length field Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- docs/specs/acpi_nvdimm

[Qemu-devel] [PULL 33/47] nvdimm acpi: introduce NVDIMM_DSM_MEMORY_SIZE

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong and use it to replace the raw number Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- hw/acpi/nvdimm.c | 30 +

[Qemu-devel] [PULL 14/47] acpi: fix DMAR device scope for IOAPIC

2016-11-10 Thread Michael S. Tsirkin
From: Peter Xu We should not use cpu_to_le16() here, instead each of device/function value is stored in a 8 byte field. Signed-off-by: Peter Xu Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/acpi-defs.h | 5 - hw/i386/acp

[Qemu-devel] [PULL 09/47] virtio: make virtqueue_alloc_element static

2016-11-10 Thread Michael S. Tsirkin
From: Ladi Prosek The function does not fully initialize the returned VirtQueueElement and should be used only internally from the virtio module. Signed-off-by: Ladi Prosek Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/v

[Qemu-devel] [PULL 29/47] nvdimm acpi: define DSM return codes

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong and use these codes to refine the code Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- hw/acpi/nvdimm.c | 46 +++

[Qemu-devel] [PULL 27/47] nvdimm acpi: cleanup nvdimm_build_fit

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong inline buf_size to refine the code a bit Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- hw/acpi/nvdimm.c | 4 +--- 1 file changed,

[Qemu-devel] [PULL 41/47] vmxnet3: fix reference leak issue

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin On migration target, msix_vector_use() will be called in vmxnet3_post_load() in second time, without a matching second call to msi_vector_unuse(), which results in vector reference leak. CC: Dmitry Fleytman CC: Jason Wang CC: Markus Armbruster CC: Michael S. Tsirkin Reviewed-b

[Qemu-devel] [PULL 22/47] pc: memhp: move nvdimm hotplug out of memory hotplug

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong as they use completely different way to handle hotplug event Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- include/hw/mem/nvdimm.h

[Qemu-devel] [PULL 30/47] nvdimm acpi: fix two comments

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong fixed the English issue and code-style issue Suggested-by: Stefan Hajnoczi Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- hw/acpi/nvdimm.c | 4 ++-- 1 file cha

[Qemu-devel] [PULL 36/47] pci: Convert msix_init() to Error and fix callers to check it

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin 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. For some devices(like e1000e, vmxnet3) who won't fail because of msix_init's failure, suppress the error report by passing NULL er

[Qemu-devel] [PULL 44/47] vhost: adapt vhost_verify_ring_mappings() to virtio 1 ring layout

2016-11-10 Thread Michael S. Tsirkin
From: Greg Kurz With virtio 1, the vring layout is split in 3 separate regions of contiguous memory for the descriptor table, the available ring and the used ring, as opposed with legacy virtio which uses a single region. In case of memory re-mapping, the code ensures it doesn't affect the vring

[Qemu-devel] [PULL 28/47] nvdimm acpi: rename nvdimm_acpi_hotplug

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong Rename it to nvdimm_plug() Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- include/hw/mem/nvdimm.h | 2 +- hw/acpi/nvdimm.c|

[Qemu-devel] [PULL 31/47] nvdimm acpi: rename nvdimm_dsm_reserved_root

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong Rename it to nvdimm_dsm_handle_reserved_root_method Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- hw/acpi/nvdimm.c | 7 --- 1

[Qemu-devel] [kvm-unit-tests PATCH v4 08/11] libcflat: add IS_ALIGNED() macro, and page sizes

2016-11-10 Thread Andrew Jones
From: Peter Xu These macros will be useful to do page alignment checks. Signed-off-by: Peter Xu [drew: also added SZ_64K] Signed-off-by: Andrew Jones --- lib/libcflat.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/libcflat.h b/lib/libcflat.h index 82005f5d014f..143fc53061fe 1

[Qemu-devel] [PULL 42/47] vmxnet3: remove unnecessary internal msix flag

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin Internal flag msix_used is unnecessary, it has the same effect as msix_enabled(). The corresponding msi flag is already dropped in commit 1070048e. CC: Dmitry Fleytman CC: Jason Wang CC: Markus Armbruster CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Reviewed-by: Dmi

[Qemu-devel] [PULL 45/47] vhost: drop legacy vring layout bits

2016-11-10 Thread Michael S. Tsirkin
From: Greg Kurz The legacy vring layout is not used anymore as we use the separate mappings even for legacy devices. This patch simply removes it. This also fixes a bug with virtio 1 devices when the vring descriptor table is mapped at a higher address than the used vring because the following f

[Qemu-devel] [PULL 32/47] nvdimm acpi: use aml_name_decl to define named object

2016-11-10 Thread Michael S. Tsirkin
From: Xiao Guangrong to make the code more clearer Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- hw/acpi/nvdimm.c | 6 ++ 1 file changed, 2 inserti

[Qemu-devel] [PULL 34/47] msix: Follow CODING_STYLE

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Signed-off-by: Cao jin Acked-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/msix.c | 8 ++-- 1 file changed, 6 insertions

[Qemu-devel] [PULL 46/47] virtio: drop virtio_queue_get_ring_{size, addr}()

2016-11-10 Thread Michael S. Tsirkin
From: Greg Kurz These are not used anymore. Signed-off-by: Greg Kurz Reviewed-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio.h | 2 -- hw/virtio/virtio.c | 11 --- 2 files changed, 13 deletions(-) diff --git

[Qemu-devel] [PULL 35/47] hcd-xhci: check & correct param before using it

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin usb_xhci_realize() corrects invalid values of property "intrs" automatically, but the uncorrected value is passed to msi_init(), which chokes on invalid values. Delay that until after the correction. Resources allocated by usb_xhci_init() are leaked when msi_init() fails. Fix by

[Qemu-devel] [PULL 38/47] hcd-xhci: change behaviour of msix switch

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin Resolve the TODO, msix=auto means msix on; if user specify msix=on, then device creation fail on msix_init failure. CC: Gerd Hoffmann CC: Michael S. Tsirkin CC: Markus Armbruster CC: Marcel Apfelbaum Reviewed-by: Gerd Hoffmann Reviewed-by: Markus Armbruster Signed-off-by: Ca

[Qemu-devel] [PULL 47/47] docs: add PCIe devices placement guidelines

2016-11-10 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Proposes best practices on how to use PCI Express/PCI device in PCI Express based machines and explain the reasoning behind them. Reviewed-by: Laszlo Ersek Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- docs/pcie.

[Qemu-devel] [PULL 37/47] megasas: change behaviour of msix switch

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin Resolve the TODO, msix=auto means msix on; if user specify msix=on, then device creation fail on msix_init failure. Also undo the overwrites of user configuration of msix. CC: Michael S. Tsirkin CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum

Re: [Qemu-devel] [PULL for-2.8 0/1] ipxe: update to 20161108 snapshot.

2016-11-10 Thread Laszlo Ersek
On 11/10/16 16:45, Stefan Hajnoczi wrote: > On Thu, Nov 10, 2016 at 2:10 PM, Laszlo Ersek wrote: >> On 11/10/16 11:48, Stefan Hajnoczi wrote: >>> On Wed, Nov 09, 2016 at 10:09:24AM +0100, Gerd Hoffmann wrote: Hi, This rebases ipxe to latest master. ipxe qemu builds will not use >

Re: [Qemu-devel] [PATCH v6 13/19] cputlb: atomically update tlb fields used by tlb_reset_dirty

2016-11-10 Thread Alex Bennée
Pranith Kumar writes: > Hi Alex, > > This patch is causing some build errors on a 32-bit box: > > In file included from /home/pranith/qemu/include/exec/exec-all.h:44:0, > from /home/pranith/qemu/cputlb.c:23: > /home/pranith/qemu/cputlb.c: In function > ‘tlb_flush_page_by_mmuidx

[Qemu-devel] [PULL 40/47] megasas: undo the overwrites of msi user configuration

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin Commit afea4e14 seems forgetting to undo the overwrites, which is unsuitable. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Signed-off-by: Cao jin Acked-by: Marcel Apfelbaum Reviewed-b

[Qemu-devel] [PULL 03/47] tests/vhost-user-bridge: indicate peer disconnected

2016-11-10 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-bridge.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c index 19b0e94..97e45d8 100644 --- a

Re: [Qemu-devel] [PATCH v2 0/6] block-backend: Always notify on blk_eject

2016-11-10 Thread John Snow
Ping, Kevin: Look ok? --js On 11/07/2016 04:13 PM, John Snow wrote: Requires patches in my IDE branch, for context. This series changes blk_eject (used for a software-initiated eject request) to always trigger a QMP tray event, in contrast to the current behavior where a tray event only occur

[Qemu-devel] [PULL 39/47] megasas: remove unnecessary megasas_use_msix()

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin Also move certain hunk above, to place msix init related code together. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Signed-off-by: Cao jin Acked-by: Marcel Apfelbaum Reviewed-by: Mic

Re: [Qemu-devel] [PATCH v3 11/14] qapi: add qapi2texi script

2016-11-10 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 >

[Qemu-devel] [PULL 43/47] msi_init: convert assert to return -errno

2016-11-10 Thread Michael S. Tsirkin
From: Cao jin According to the disscussion: http://lists.nongnu.org/archive/html/qemu-devel/2016-09/msg08215.html Let leaf function returns reasonable -errno, let caller decide how to handle the return value. Suggested-by: Markus Armbruster CC: Markus Armbruster CC: Michael S. Tsirkin CC: Ma

Re: [Qemu-devel] [PATCH v6 11/19] cputlb: introduce tlb_flush_* async work.

2016-11-10 Thread Richard Henderson
On 11/09/2016 03:57 PM, Alex Bennée wrote: +void tlb_flush_page_all(target_ulong addr) It's a nit, but when I read this I think all pages, not all cpus. Can we rename this tlb_fluch_page_all_cpus? Otherwise, Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v6 10/19] cputlb: add assert_cpu_is_self checks

2016-11-10 Thread Richard Henderson
On 11/09/2016 03:57 PM, Alex Bennée wrote: For SoftMMU the TLB flushes are an example of a task that can be triggered on one vCPU by another. To deal with this properly we need to use safe work to ensure these changes are done safely. The new assert can be enabled while debugging to catch these c

Re: [Qemu-devel] [PATCH v13 1/2] virtio-crypto: Add virtio crypto device specification

2016-11-10 Thread Michael S. Tsirkin
On Thu, Nov 10, 2016 at 05:47:54PM +0100, Halil Pasic wrote: > the typos That's something that's avoidable btw, please use a spell and grammar checker. I hear http://www.languagetool.org/ is useful to some people. -- MST

[Qemu-devel] [Bug 1623276] Re: qemu 2.7 / iPXE crash

2016-11-10 Thread Laszlo Ersek (Red Hat)
Fixed in: commit 423f7cf233fe262c777db7f87db3e9fac29e02d1 Author: Gerd Hoffmann Date: Wed Nov 9 09:48:44 2016 +0100 ipxe: update to 20161108 snapshot ** Changed in: qemu Status: In Progress => Fix Committed -- You received this bug notification because you are a member of qemu-

Re: [Qemu-devel] [PULL 05/47] contrib: add libvhost-user

2016-11-10 Thread Daniel P. Berrange
On Thu, Nov 10, 2016 at 06:12:03PM +0200, Michael S. Tsirkin wrote: > From: Marc-André Lureau > > Add a library to help implementing vhost-user backend (or slave). > > Dealing with vhost-user as an application developer isn't so easy: you > have all the trouble with any protocol: validation, uni

Re: [Qemu-devel] [PATCH v6 08/19] tcg: enable thread-per-vCPU

2016-11-10 Thread Alex Bennée
Richard Henderson writes: > On 11/09/2016 03:57 PM, Alex Bennée wrote: >> +if (qemu_tcg_mttcg_enabled() || !single_tcg_cpu_thread) { >> +parallel_cpus = true; > > Why are we setting this here, > >> cpu->thread = g_malloc0(sizeof(QemuThread)); >> cpu->halt_cond = g_m

Re: [Qemu-devel] [PATCH v6 08/19] tcg: enable thread-per-vCPU

2016-11-10 Thread Richard Henderson
On 11/09/2016 03:57 PM, Alex Bennée wrote: +if (qemu_tcg_mttcg_enabled() || !single_tcg_cpu_thread) { +parallel_cpus = true; Why are we setting this here, cpu->thread = g_malloc0(sizeof(QemuThread)); cpu->halt_cond = g_malloc0(sizeof(QemuCond)); qemu_con

[Qemu-devel] [RFC PATCH 0/8] quorum: Implement .bdrv_co_preadv/pwritev()

2016-11-10 Thread Kevin Wolf
This is part of a series that I'm working on and that aims to remove the bdrv_aio_*() emulation in io.c. blkdebug and blkverify were easy, but for quorum I need a few more patches, so I'm sending this out as an RFC while I continue work on the rest (QED, and then possibly some polishing). After th

Re: [Qemu-devel] [PATCH v6 12/19] cputlb: tweak qemu_ram_addr_from_host_nofail reporting

2016-11-10 Thread Richard Henderson
On 11/09/2016 03:57 PM, Alex Bennée wrote: This moves the helper function closer to where it is called and updates the error message to report via error_report instead of the deprecated fprintf. Signed-off-by: Alex Bennée --- cputlb.c | 24 1 file changed, 12 in Revi

Re: [Qemu-devel] [PATCH v6 09/19] tcg: handle EXCP_ATOMIC exception for system emulation

2016-11-10 Thread Richard Henderson
On 11/09/2016 03:57 PM, Alex Bennée wrote: From: Pranith Kumar The patch enables handling atomic code in the guest. This should be preferably done in cpu_handle_exception(), but the current assumptions regarding when we can execute atomic sections cause a deadlock. Signed-off-by: Pranith Kumar

[Qemu-devel] [RFC PATCH 1/8] coroutine: Introduce qemu_coroutine_enter_if_inactive()

2016-11-10 Thread Kevin Wolf
In the context of asynchronous work, if we have a worker coroutine that didn't yield, the parent coroutine cannot be reentered because it hasn't yielded yet. In this case we don't even have to reenter the parent because it will see that the work is already done and won't even yield. Signed-off-by:

Re: [Qemu-devel] [PATCH 1/3] virtio: Basic implementation of virtio pstore driver

2016-11-10 Thread Michael S. Tsirkin
On Sat, Aug 20, 2016 at 05:07:42PM +0900, Namhyung Kim wrote: > The virtio pstore driver provides interface to the pstore subsystem so > that the guest kernel's log/dump message can be saved on the host > machine. Users can access the log file directly on the host, or on the > guest at the next bo

[Qemu-devel] [RFC PATCH 4/8] quorum: Do cleanup in caller coroutine

2016-11-10 Thread Kevin Wolf
Instead of calling quorum_aio_finalize() deeply nested in what used to be an AIO callback, do it in the same functions that allocated the AIOCB. Signed-off-by: Kevin Wolf --- block/quorum.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/block/quorum.c b/block

[Qemu-devel] [kvm-unit-tests PATCH v5 05/11] arm/arm64: irq enable/disable

2016-11-10 Thread Andrew Jones
Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 10 ++ lib/arm64/asm/processor.h | 10 ++ 2 files changed, 20 insertions(+) diff --git a/lib/arm/asm/processor.h b/lib/arm/asm/processor.h index bc46d1f980ee..959ecda5dc

[Qemu-devel] [RFC PATCH 8/8] quorum: Inline quorum_fifo_aio_cb()

2016-11-10 Thread Kevin Wolf
Inlining the function removes some boilerplace code and replaces recursion by a simple loop, so the code becomes somewhat easier to understand. Signed-off-by: Kevin Wolf --- block/quorum.c | 42 +- 1 file changed, 13 insertions(+), 29 deletions(-) diff --

[Qemu-devel] [RFC PATCH 7/8] quorum: Implement .bdrv_co_preadv/pwritev()

2016-11-10 Thread Kevin Wolf
This enables byte granularity requests on quorum nodes. Note that the QMP events emitted by the driver are an external API that we were careless enough to define as sector based. The offset and length of requests reported in events are rounded down therefore. Signed-off-by: Kevin Wolf --- block

Re: [Qemu-devel] [PATCH] smbios: Add 1 terminator if there is any string field defined in given table.

2016-11-10 Thread Laszlo Ersek
On 11/10/16 16:09, Michael S. Tsirkin wrote: > On Tue, Sep 06, 2016 at 04:28:33PM +0800, Lin Ma wrote: >> If user specifies binary file on command line to load smbios entries, then >> will get error messages while decoding them in guest. >> >> Reproducer: >> 1. dump a smbios table to a binary file

Re: [Qemu-devel] [PATCH v13 1/2] virtio-crypto: Add virtio crypto device specification

2016-11-10 Thread Halil Pasic
On 11/10/2016 02:15 PM, Michael S. Tsirkin wrote: > On Thu, Nov 10, 2016 at 09:37:40AM +, Gonglei (Arei) wrote: >> > Hi, >> > >> > I attach a diff for next version in order to review more convenient, with >> > >> > - Drop the all gap stuff; >> > - Drop all structures undefined in virtio_c

[Qemu-devel] [kvm-unit-tests PATCH v5 06/11] arm/arm64: add initial gicv2 support

2016-11-10 Thread Andrew Jones
Add some gicv2 support. This just adds init and enable functions, allowing unit tests to start messing with it. Signed-off-by: Andrew Jones --- v5: share/use only the modern register names [Andre] v4: - only take defines from kernel we need now [Andre] - moved defines to asm/gic.h so they'll b

Re: [Qemu-devel] [kvm-unit-tests PATCH v4 00/11] arm/arm64: add gic framework

2016-11-10 Thread Andrew Jones
On Thu, Nov 10, 2016 at 04:52:30PM +, Andre Przywara wrote: > Hi, > > so is this actually v4 just resent? > Or is this is a new version with s/5/4/? > I can't spot any of the key changes quickly ... Argh... Forgot to edit my bash history after pulling it up to send. OK, the real v5 is coming.

Re: [Qemu-devel] [kvm-unit-tests PATCH v4 00/11] arm/arm64: add gic framework

2016-11-10 Thread Andre Przywara
Hi, so is this actually v4 just resent? Or is this is a new version with s/5/4/? I can't spot any of the key changes quickly ... Cheers, Andre. On 10/11/16 16:07, Andrew Jones wrote: > v4: > - Eric's r-b's > - Andre's suggestion to only take defines we need > - several other changes listed in

Re: [Qemu-devel] [PULL 05/47] contrib: add libvhost-user

2016-11-10 Thread Michael S. Tsirkin
On Thu, Nov 10, 2016 at 05:05:03PM +, Daniel P. Berrange wrote: > On Thu, Nov 10, 2016 at 06:12:03PM +0200, Michael S. Tsirkin wrote: > > From: Marc-André Lureau > > > > Add a library to help implementing vhost-user backend (or slave). > > > > Dealing with vhost-user as an application develo

[Qemu-devel] [RFC PATCH 2/8] quorum: Remove s from quorum_aio_get() arguments

2016-11-10 Thread Kevin Wolf
There is no point in passing the value of bs->opaque in order to overwrite it with itself. Signed-off-by: Kevin Wolf --- block/quorum.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index d122299..dfa9fd3 100644 --- a/block/quorum.c

[Qemu-devel] [kvm-unit-tests PATCH v5 01/11] lib: xstr: allow multiple args

2016-11-10 Thread Andrew Jones
Make implementation equivalent to Linux's include/linux/stringify.h Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/libcflat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index 72b1bf9668ef..82005f5d014f 100644 --- a/lib/li

[Qemu-devel] [PULL 0/6] QEMU patches for 2.8.0-rc0

2016-11-10 Thread Paolo Bonzini
The following changes since commit 207faf24c58859f5240f66bf6decc33b87a1776e: Merge remote-tracking branch 'pm215/tags/pull-target-arm-20161107' into staging (2016-11-07 14:02:15 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to f

[Qemu-devel] [RFC PATCH 3/8] quorum: Implement .bdrv_co_readv/writev

2016-11-10 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/quorum.c | 194 ++--- 1 file changed, 117 insertions(+), 77 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index dfa9fd3..3cb579e 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -97,7 +97,7 @@

[Qemu-devel] [kvm-unit-tests PATCH v5 00/11] arm/arm64: add gic framework

2016-11-10 Thread Andrew Jones
v5: - fix arm32/gicv3 compile [drew] - use modern register names [Andre] - one Andre r-b v4: - Eric's r-b's - Andre's suggestion to only take defines we need - several other changes listed in individual patches v3: - Rebased on latest master - Added Alex's r-b's v2: Rebased on latest ma

[Qemu-devel] [RFC PATCH 5/8] quorum: Inline quorum_aio_cb()

2016-11-10 Thread Kevin Wolf
This is a conversion to a more natural coroutine style and improves the readability of the driver. Signed-off-by: Kevin Wolf --- block/quorum.c | 112 ++--- 1 file changed, 51 insertions(+), 61 deletions(-) diff --git a/block/quorum.c b/block/

[Qemu-devel] [RFC PATCH 6/8] quorum: Avoid bdrv_aio_writev() for rewrites

2016-11-10 Thread Kevin Wolf
Replacing it with bdrv_co_pwritev() prepares us for byte granularity requests and gets us rid of the last bdrv_aio_*() user in quorum. Signed-off-by: Kevin Wolf --- block/quorum.c | 52 +--- 1 file changed, 33 insertions(+), 19 deletions(-) diff -

[Qemu-devel] [kvm-unit-tests PATCH v5 09/11] arm/arm64: add initial gicv3 support

2016-11-10 Thread Andrew Jones
Signed-off-by: Andrew Jones --- v5: use modern register names [Andre] v4: - only take defines from kernel we need now [Andre] - simplify enable by not caring if we reinit the distributor [drew] v2: - configure irqs as NS GRP1 --- lib/arm/asm/arch_gicv3.h | 42 + lib/arm/

[Qemu-devel] [kvm-unit-tests PATCH v5 02/11] arm64: fix get_"sysreg32" and make MPIDR 64bit

2016-11-10 Thread Andrew Jones
mrs is always 64bit, so we should always use a 64bit register. Sometimes we'll only want to return the lower 32, but not for MPIDR, as that does define fields in the upper 32. Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v5: switch arm32's get_mpidr to 'unsi

[Qemu-devel] [PULL 2/6] vl.c: move pidfile creation up the line

2016-11-10 Thread Paolo Bonzini
From: Michael Tokarev With current code, pid file is open after various sockets, chardevs, fsdevs and the like. This causes interesting effects, for example when monitor is a unix-socket, and another qemu instance is already running, new qemu first "damages" the socket and next complain that it

[Qemu-devel] [kvm-unit-tests PATCH v5 03/11] arm/arm64: smp: support more than 8 cpus

2016-11-10 Thread Andrew Jones
By adding support for launching with gicv3 we can break the 8 vcpu limit. This patch adds support to smp code and also selects the vgic model corresponding to the host. The vgic model may also be manually selected by adding e.g. -machine gic-version=3 to extra_params. Reviewed-by: Alex Bennée Sig

[Qemu-devel] [kvm-unit-tests PATCH v5 11/11] arm/arm64: gic: don't just use zero

2016-11-10 Thread Andrew Jones
Allow user to select who sends ipis and with which irq, rather than just always sending irq=0 from cpu0. Signed-off-by: Andrew Jones --- v4: improve structure and make sure spurious checking is done even when the sender isn't cpu0 v2: actually check that the irq received was the irq sent,

[Qemu-devel] [Bug 616769] Re: interrupt problem x86_64

2016-11-10 Thread Thomas Huth
OK, thanks a lot for your response ... so let's close this bug now. ** Changed in: qemu Status: Incomplete => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/616769 Title: interrupt p

<    1   2   3   >