Re: [Qemu-devel] [RESEND PATCH v16 6/6] hw/vfio/platform: add irqfd support

2015-06-26 Thread Peter Maydell
On 15 June 2015 at 17:33, Eric Auger wrote: > This patch aims at optimizing IRQ handling using irqfd framework. > > Instead of handling the eventfds on user-side they are handled on > kernel side using > - the KVM irqfd framework, > - the VFIO driver virqfd framework. > > the virtual IRQ completio

Re: [Qemu-devel] [RESEND PATCH v16 4/6] intc: arm_gic_kvm: set the qemu_irq/gsi mapping

2015-06-26 Thread Eric Auger
On 06/26/2015 01:43 PM, Peter Maydell wrote: > On 15 June 2015 at 17:33, Eric Auger wrote: >> The arm_gic_kvm now calls kvm_irqchip_set_qemuirq_gsi to build >> the hash table storing qemu_irq/gsi mappings. From that point on >> irqfd can be setup directly from the qemu_irq using >> kvm_irqchip_add

Re: [Qemu-devel] [PATCH v3 2/5] pc, pc-dimm: Factor out reusable parts in pc_dimm_plug to a separate routine

2015-06-26 Thread Igor Mammedov
On Fri, 26 Jun 2015 17:15:45 +0530 Bharata B Rao wrote: > On Fri, Jun 26, 2015 at 10:21:54AM +0200, Igor Mammedov wrote: > > On Fri, 26 Jun 2015 09:36:01 +0530 > > Bharata B Rao wrote: > > > > > pc_dimm_plug() has code that will be needed for memory plug > > > handlers in other archs too. Extra

Re: [Qemu-devel] [PATCH 0/4] hw/net: fix m68/ColdFire ethernet fec support

2015-06-26 Thread Greg Ungerer
Hi Stefan, On 26/06/15 20:12, Stefan Hajnoczi wrote: On Fri, Jun 26, 2015 at 03:27:12PM +1000, g...@uclinux.org wrote: The following set of patches fixes the emulated ColdFire ethernet fec driver. There is primarily two problems that need to be fixed. 1. The emulated driver needs to support pr

Re: [Qemu-devel] [PATCH] dataplane: drop copy_in_vring_desc()

2015-06-26 Thread Greg Kurz
On Fri, 26 Jun 2015 11:00:45 +0100 Stefan Hajnoczi wrote: > On Thu, Jun 25, 2015 at 05:26:09PM +0200, Greg Kurz wrote: > > During early virtio 1.0 devel, there were several proposals about how to > > deal endianness of the vring descriptor fields: > > - convert the decriptor to host endianness in

Re: [Qemu-devel] [PULL 00/20] target-mips queue

2015-06-26 Thread Peter Maydell
ad669cf65ac49: > > Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into > staging (2015-06-25 14:03:55 +0100) > > are available in the git repository at: > > git://github.com/lalrae/qemu.git tags/mips-20150626 > > for you to fetch changes

Re: [Qemu-devel] [PATCH 1/2] dataplane: drop copy_in_vring_desc()

2015-06-26 Thread Greg Kurz
On Fri, 26 Jun 2015 12:28:45 +0200 Cornelia Huck wrote: > On Fri, 26 Jun 2015 09:32:21 +0200 > Greg Kurz wrote: > > > During early virtio 1.0 devel, there were several proposals about how to > > deal with the endianness of the vring descriptor fields: > > - convert the decriptor to host endiann

Re: [Qemu-devel] [RESEND PATCH v16 6/6] hw/vfio/platform: add irqfd support

2015-06-26 Thread Eric Auger
On 06/26/2015 01:57 PM, Peter Maydell wrote: > On 15 June 2015 at 17:33, Eric Auger wrote: >> This patch aims at optimizing IRQ handling using irqfd framework. >> >> Instead of handling the eventfds on user-side they are handled on >> kernel side using >> - the KVM irqfd framework, >> - the VFIO d

Re: [Qemu-devel] [PATCH v2 2/3] hw/i386/pc: reflect any FDC @ ioport 0x3f0 in the CMOS

2015-06-26 Thread Laszlo Ersek
On 06/26/15 11:31, Markus Armbruster wrote: > Laszlo Ersek writes: > >> With the pc-q35-2.4 machine type, if the user creates an ISA FDC manually: >> >> -device isa-fdc,driveA=drive-fdc0-0-0 \ >> -drive file=...,if=none,id=drive-fdc0-0-0,format=raw >> >> then the board-default FDC will be ski

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.4] block: keep bitmap if incremental backup job is cancelled

2015-06-26 Thread Max Reitz
On 26.06.2015 11:57, Stefan Hajnoczi wrote: On Thu, Jun 25, 2015 at 12:33:25PM -0400, Jeff Cody wrote: On Thu, Jun 25, 2015 at 12:30:56PM -0400, John Snow wrote: On 06/25/2015 08:53 AM, Stefan Hajnoczi wrote: Reclaim the dirty bitmap if an incremental backup block job is cancelled. The ret v

Re: [Qemu-devel] [PATCH] build-sys: keep current config.log on --help

2015-06-26 Thread Paolo Bonzini
On 26/06/2015 00:38, Marc-André Lureau wrote: > It's nice to keep the config.log used to configure the build. > > Signed-off-by: Marc-André Lureau > --- > configure | 35 +++ > 1 file changed, 19 insertions(+), 16 deletions(-) > > diff --git a/configure b/confi

Re: [Qemu-devel] [PATCH v7 0/8] block: Mirror discarded sectors

2015-06-26 Thread Stefan Hajnoczi
On Mon, Jun 08, 2015 at 01:56:06PM +0800, Fam Zheng wrote: > v7: Fix the lost assignment of s->unmap. > > v6: Fix pnum in bdrv_get_block_status_above. [Paolo] > > v5: Rewrite patch 1. > Address Eric's comments on patch 3. > Add Eric's rev-by to patches 2 & 4. > Check BDRV_BLOCK_DATA i

Re: [Qemu-devel] [PATCH] build-sys: keep current config.log on --help

2015-06-26 Thread Peter Maydell
On 25 June 2015 at 23:38, Marc-André Lureau wrote: > It's nice to keep the config.log used to configure the build. > > Signed-off-by: Marc-André Lureau > --- > configure | 35 +++ > 1 file changed, 19 insertions(+), 16 deletions(-) > > diff --git a/configure b/con

[Qemu-devel] [PULL 5/7] qdev-properties-system: Change set_pointer's parse callback to use Error

2015-06-26 Thread Peter Maydell
Instead of having set_pointer() call a parse callback which returns an error number that we then convert to an Error string with error_set_from_qdev_prop_error(), make the parse callback take an Error** and set the error itself. This will allow parse routines to provide more helpful error messages

[Qemu-devel] [PULL 6/7] qdev-properties-system: Improve error message for drive assignment conflict

2015-06-26 Thread Peter Maydell
If the user forgot if=none on their drive specification they're likely to get an error message because the drive is assigned once automatically by QEMU and once by the manual id=/drive= user command line specification. Improve the error message produced in this case to explicitly guide the user tow

[Qemu-devel] [PULL 4/7] target-arm: A64: Print ELR when taking exceptions

2015-06-26 Thread Peter Maydell
From: Soren Brinkmann When taking an exception print the content of the exception link register. This is useful especially for synchronous exceptions because in that case this registers holds the address of the instruction that generated the exception. Signed-off-by: Soren Brinkmann Message-id:

[Qemu-devel] [PULL 7/7] hw/arm/virt: Make block devices default to virtio

2015-06-26 Thread Peter Maydell
Now we have virtio-pci, we can make the virt board's default block device type be IF_VIRTIO. This allows users to use simplified command lines that don't have to explicitly create virtio-pci-blk devices; the -hda &c very short options now also work. This means we also need to set no_cdrom to avoid

[Qemu-devel] [PULL 1/7] hw/arm/virt-acpi-build: Fix table revision and some comments

2015-06-26 Thread Peter Maydell
From: Shannon Zhao The table revision is not the ACPI spec version. Fix the wrong revision and also some comments. Signed-off-by: Shannon Zhao Reviewed-by: Michael S. Tsirkin Message-id: 1433820378-8336-1-git-send-email-zhaoshengl...@huawei.com Signed-off-by: Peter Maydell --- hw/arm/virt-ac

[Qemu-devel] [PULL 3/7] target-arm: default empty semihosting cmdline

2015-06-26 Thread Peter Maydell
From: Liviu Ionescu If neither explicit semihosting args nor -kernel are used, make SYS_GET_CMDLINE return an empty string. Signed-off-by: Liviu Ionescu Message-id: ac7b5afc-06ae-4fad-9852-b65708e80...@livius.net Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target-arm/arm-semi

[Qemu-devel] [PULL 0/7] target-arm queue

2015-06-26 Thread Peter Maydell
target-arm queue: a few new features, but all minor stuff. thanks -- PMM The following changes since commit ccb0c7e122db72d3a5da798c6414d4912bba828f: Merge remote-tracking branch 'remotes/lalrae/tags/mips-20150626' into staging (2015-06-26 11:32:58 +0100) are available

[Qemu-devel] [PULL 2/7] hw/arm/virt-acpi-build: Add GICv2m description in ACPI MADT table

2015-06-26 Thread Peter Maydell
From: Shannon Zhao Add GICv2m description in ACPI MADT table, so guest can use MSI when booting with ACPI. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Andrew Jones Tested-by: Andrew Jones Message-id: 1434676210-2276-1-git-send-email-shannon.z...@linaro.org Signed-off

Re: [Qemu-devel] [Qemu-stable] [PATCH v7 0/8] block: Mirror discarded sectors

2015-06-26 Thread Alexandre DERUMIER
Hi, >>There is no problem, the observasion by Andrey was just that qmp command >>takes >>a few minutes before returning, because he didn't apply >> >>https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg02511.html Is this patch already apply on the block tree ? With nfs as source storage

[Qemu-devel] [PULL 00/17] virtio, pci fixes, enhancements

2015-06-26 Thread Michael S. Tsirkin
The following changes since commit 0c8ff723bd29e5c8b2ca989f857ae5c37ec49c4e: m68k: fix usp processing on interrupt entry and exception exit (2015-06-22 14:43:25 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fe

[Qemu-devel] [PULL 03/17] balloon: add a feature bit to let Guest OS deflate balloon on oom

2015-06-26 Thread Michael S. Tsirkin
From: "Denis V. Lunev" Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enoug

[Qemu-devel] [PULL 02/17] qdev: fix OVERFLOW_BEFORE_WIDEN

2015-06-26 Thread Michael S. Tsirkin
From: Gonglei Potentially overflowing expression "1 << prop->bitnr" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "uint64_t" (64 bits, unsigned). Cc: Gerd Hoffmann Signed-off-by: Paolo Bonzini Signed-off-by

[Qemu-devel] [PULL 06/17] pc: cleanup and convert TMP ACPI device description to AML API

2015-06-26 Thread Michael S. Tsirkin
From: Igor Mammedov remove some code duplication in acpi-build.c and drop 5 ASL and binary blobs files with TPM ACPI device description, replacing them with 1 small hunk written in AML API. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/

[Qemu-devel] [PULL 01/17] virito-pci: fix OVERRUN problem

2015-06-26 Thread Michael S. Tsirkin
From: Gonglei Overrunning array "proxy->guest_features" of 2 4-byte elements at element index 2 (byte offset 8) using index "proxy->gfselect" (which evaluates to 2). Normally, the Linux kernel driver just read/write '0' or '1' as the "proxy->gfselect" values, so using '<' instead of '=<' to make

[Qemu-devel] [PULL 05/17] MAINTAINERS: add ACPI entry

2015-06-26 Thread Michael S. Tsirkin
Igor agreed to help review ACPI patches, add an entry to MAINTAINERS with all ACPI stuff I could think of. Note: I listed ARM ACPI files here just to make sure we are Cc'd, no plan to maintain ACPI for ARM through my tree :) Signed-off-by: Michael S. Tsirkin --- MAINTAINERS | 12 1

[Qemu-devel] [PULL 07/17] add pci-bridge-seat

2015-06-26 Thread Michael S. Tsirkin
From: Gerd Hoffmann Simplifies multiseat configuration, see docs/multiseat.txt update for details. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pci.h | 1 + hw/pci-bridge/pci_bridge_dev.c | 25 +++

[Qemu-devel] [PULL 09/17] hw/pci-bridge: expose _test parameter in SHPC_VMSTATE()

2015-06-26 Thread Michael S. Tsirkin
From: Laszlo Ersek Change the signature of the function-like macro SHPC_VMSTATE(), so that we can produce and expect this field conditionally in the migration stream, starting with an upcoming patch. Cc: Michael S. Tsirkin Cc: Marcel Apfelbaum Signed-off-by: Laszlo Ersek Reviewed-by: Michael

[Qemu-devel] [PULL 08/17] migration: introduce VMSTATE_BUFFER_UNSAFE_INFO_TEST()

2015-06-26 Thread Michael S. Tsirkin
From: Laszlo Ersek There is no _TEST() variant of VMSTATE_BUFFER_UNSAFE_INFO() yet, but we'll soon need it. Introduce it and rebase the original VMSTATE_BUFFER_UNSAFE_INFO() on top. The parameter order of the new function-like macro follows that of VMSTATE_SINGLE_TEST(): "_test" is introduced be

[Qemu-devel] [PULL 12/17] hw/pci: introduce shpc_present() helper function

2015-06-26 Thread Michael S. Tsirkin
From: Laszlo Ersek It follows msi_present() in "include/hw/pci/msi.h". Cc: Michael S. Tsirkin Cc: Marcel Apfelbaum Signed-off-by: Laszlo Ersek Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/shpc.h | 6 ++ 1 file changed, 6 insertions(+) diff --git

[Qemu-devel] [PULL 13/17] hw/pci-bridge: introduce "shpc" property

2015-06-26 Thread Michael S. Tsirkin
From: Laszlo Ersek In the PCI expander bridge, we will want to disable those features of pci-bridge that relate to SHPC (standard hotplug controller): - SHPC bar and underlying MemoryRegion - interrupt (INTx or MSI) - effective hotplug callbacks - other SHPC hooks (initialization, cleanup, migra

[Qemu-devel] [PULL 15/17] hw/core: explicit OFW unit address callback for SysBusDeviceClass

2015-06-26 Thread Michael S. Tsirkin
From: Laszlo Ersek The sysbus_get_fw_dev_path() function formats OpenFirmware device path nodes ("driver-name@unit-address") for sysbus devices. The first choice for "unit-address" is the base address of the device's first MMIO region. The second choice is its first IO port. However, if two sysb

[Qemu-devel] [PULL 10/17] hw/pci-bridge: add macro for "chassis_nr" property

2015-06-26 Thread Michael S. Tsirkin
From: Laszlo Ersek This should help catch property name typos at compile time. Cc: Michael S. Tsirkin Cc: Marcel Apfelbaum Signed-off-by: Laszlo Ersek Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pci_bridge.h | 2 ++ hw/pci-bridge/pci_bridge_

[Qemu-devel] [PULL 17/17] Fix glib_subprocess test

2015-06-26 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" A typo means that the tests dependent on glib with subprocess support are never run. Fixes: 9d41401b90fa10b335d2e739149d36437cfbf622 Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- configure | 2 +- 1

Re: [Qemu-devel] [PATCH] refresh filename after the node is replaced

2015-06-26 Thread Max Reitz
On 25.06.2015 08:41, Wen Congyang wrote: We can use block job mirror to repair broken quorum files. But the command 'info block' doesn't output correct filename after block job mirror finishes. Which filename? The quorum filename is broken after this patch, too. In order to fix this, we need t

[Qemu-devel] [PULL 16/17] hw/pci-bridge: format special OFW unit address for PXB host

2015-06-26 Thread Michael S. Tsirkin
From: Laszlo Ersek We have agreed that OpenFirmware device paths in the "bootorder" fw_cfg file should follow the pattern /pci@i0cf8,%x/... for devices that live behind an extra root bus. The extra root bus in question is the %x'th among the extra root buses. (In other words, %x gives the pos

[Qemu-devel] [PULL 14/17] hw/pci-bridge: disable SHPC in PXB

2015-06-26 Thread Michael S. Tsirkin
From: Laszlo Ersek OVMF downloads the ACPI linker/loader script from QEMU when the edk2 PCI Bus driver globally signals the firmware that PCI enumeration and resource allocation have completed. At this point QEMU regenerates the ACPI payload in an fw_cfg read callback, and this is when the PXB's

[Qemu-devel] [PULL 11/17] hw/pci-bridge: add macro for "msi" property

2015-06-26 Thread Michael S. Tsirkin
From: Laszlo Ersek This should help catch property name typos at compile time. Cc: Michael S. Tsirkin Cc: Marcel Apfelbaum Signed-off-by: Laszlo Ersek Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pci_bridge.h| 1 + hw/pci-bridge/pci_bridge_dev.c

[Qemu-devel] [PULL 04/17] vhost: correctly pass error to caller in vhost_dev_enable_notifiers()

2015-06-26 Thread Michael S. Tsirkin
From: Jason Wang We override the error value r in fail_vq, this will cause the caller can't detect the failure which may cause the caller may disable the notifiers twice if vhost is failed to start. Fix this by using another variable to keep track the return value of set_host_notifier(). Fixes b

Re: [Qemu-devel] [PATCH v2 00/16] ahci: ncq cleanup, part 1

2015-06-26 Thread Stefan Hajnoczi
On Mon, Jun 22, 2015 at 07:38:12PM -0400, John Snow wrote: > requires: 1434470575-21625-1-git-send-email-js...@redhat.com > [PATCH v2 0/4] ahci: misc fixes/tests for 2.4 > > This series adds a couple of tests to exercise the NCQ pathways > and establish a baseline for us. > > Most of th

Re: [Qemu-devel] [Qemu-stable] [PATCH v7 0/8] block: Mirror discarded sectors

2015-06-26 Thread Alexandre DERUMIER
>>With nfs as source storage, it's really slow currently (lseek slow + a lot of >>nfs ops). it's blocked around 30min for 300GB, with a raw file on a netapp san array through nfs. - Mail original - De: "aderumier" À: "Fam Zheng" Cc: "Kevin Wolf" , qemu-bl...@nongnu.org, "Jeff Cody"

Re: [Qemu-devel] [PATCH v3 2/2] virtio-blk: Use blk_drain() to drain IO requests

2015-06-26 Thread Alexander Yarygin
Markus Armbruster writes: > Just spotted this in my git-pull... > > Alexander Yarygin writes: > >> Each call of the virtio_blk_reset() function calls blk_drain_all(), >> which works for all existing BlockDriverStates, while draining only >> one is needed. >> >> This patch replaces blk_drain_all(

Re: [Qemu-devel] [PATCH 0/2] Implement YIELD to yield in ARM and Thumb translators

2015-06-26 Thread Peter Maydell
Ping? thanks -- PMM On 15 June 2015 at 19:49, Peter Maydell wrote: > This patchset makes the ARM and Thumb encodings of the YIELD hint > instruction in the ARM cause the TCG CPU to yield control back > to the top level loop. This brings them into line with the A64 > encoding which already did th

[Qemu-devel] [PATCH] tests: check the error of _thread_new

2015-06-26 Thread Marc-André Lureau
Mainly for completeness. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 75fedf0..509437b 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -198,6 +198,7 @

Re: [Qemu-devel] [PATCH 0/2] Implement YIELD to yield in ARM and Thumb translators

2015-06-26 Thread Paolo Bonzini
On 26/06/2015 16:04, Peter Maydell wrote: > Ping? Oh, YIELD was what I was thinking of in the thread about IPIs, not WFE (which would require SEV on the other core)... The patches look good, but I cannot really say much about this code. Paolo > thanks > -- PMM > > On 15 June 2015 at 19:49, P

Re: [Qemu-devel] [PATCH] refresh filename after the node is replaced

2015-06-26 Thread Wen Congyang
At 2015/6/26 21:47, Max Reitz Wrote: On 25.06.2015 08:41, Wen Congyang wrote: We can use block job mirror to repair broken quorum files. But the command 'info block' doesn't output correct filename after block job mirror finishes. Which filename? The quorum filename is broken after this patch,

Re: [Qemu-devel] [PATCH 0/2] Implement YIELD to yield in ARM and Thumb translators

2015-06-26 Thread Peter Maydell
On 26 June 2015 at 15:25, Paolo Bonzini wrote: > > > On 26/06/2015 16:04, Peter Maydell wrote: >> Ping? > > Oh, YIELD was what I was thinking of in the thread about IPIs, not WFE > (which would require SEV on the other core)... Linux doesn't in practice put YIELD insns into its busy loops, so thi

Re: [Qemu-devel] [PULL 16/17] hw/pci-bridge: format special OFW unit address for PXB host

2015-06-26 Thread Laszlo Ersek
On 06/26/15 15:46, Michael S. Tsirkin wrote: > From: Laszlo Ersek > > We have agreed that OpenFirmware device paths in the "bootorder" fw_cfg > file should follow the pattern > > /pci@i0cf8,%x/... > > for devices that live behind an extra root bus. The extra root bus in > question is the %x't

Re: [Qemu-devel] [PATCH 01/16] ide: add limit to .prepare_buf()

2015-06-26 Thread Stefan Hajnoczi
On Mon, Jun 22, 2015 at 08:21:00PM -0400, John Snow wrote: > diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c > index 95d228f..f873ab1 100644 > --- a/hw/ide/ahci.c > +++ b/hw/ide/ahci.c > @@ -49,7 +49,7 @@ static int handle_cmd(AHCIState *s,int port,int slot); > static void ahci_reset_port(AHCIState *s,

Re: [Qemu-devel] [PATCH 0/2] Implement YIELD to yield in ARM and Thumb translators

2015-06-26 Thread Alex Züpke
Am 26.06.2015 um 16:04 schrieb Peter Maydell: > Ping? OK for me. Best regards Alex > > thanks > -- PMM > > On 15 June 2015 at 19:49, Peter Maydell wrote: >> This patchset makes the ARM and Thumb encodings of the YIELD hint >> instruction in the ARM cause the TCG CPU to yield control back >> t

Re: [Qemu-devel] [PATCH] build-sys: keep current config.log on --help

2015-06-26 Thread Marc-André Lureau
Hi On Fri, Jun 26, 2015 at 3:26 PM, Peter Maydell wrote: > Doesn't this mean we're now going to just drop a bunch of the > logging on the floor in the case where the user didn't say --help? > That doesn't sound great... > > It drops a few arch checks before help: cc -D_GNU_SOURCE -D_FILE_OFFSET

[Qemu-devel] [RFC PATCH V6 01/18] cpu: make cpu_thread_is_idle public.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic Signed-off-by: KONRAD Frederic --- cpus.c| 2 +- include/qom/cpu.h | 11 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cpus.c b/cpus.c index 4f0e54d..2d62a35 100644 --- a/cpus.c +++ b/cpus.c @@ -74,7 +74,7 @@ bool cpu_is_stopped(CP

[Qemu-devel] [RFC PATCH V6 04/18] add support for spin lock on POSIX systems exclusively

2015-06-26 Thread fred . konrad
From: Guillaume Delbergue WARNING: spin lock is currently not implemented on WIN32 Signed-off-by: Guillaume Delbergue --- include/qemu/thread-posix.h | 4 include/qemu/thread-win32.h | 4 include/qemu/thread.h | 7 +++ util/qemu-thread-posix.c| 45 +++

[Qemu-devel] [RFC PATCH V6 02/18] replace spinlock by QemuMutex.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic spinlock is only used in two cases: * cpu-exec.c: to protect TranslationBlock * mem_helper.c: for lock helper in target-i386 (which seems broken). It's a pthread_mutex_t in user-mode so better using QemuMutex directly in this case. It allows as well to reuse tb_lock mut

[Qemu-devel] [RFC PATCH V6 06/18] tcg: remove tcg_halt_cond global variable.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic This removes tcg_halt_cond global variable. We need one QemuCond per virtual cpu for multithread TCG. Signed-off-by: KONRAD Frederic --- cpus.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/cpus.c b/cpus.c index 2d62a35..79383df 1

[Qemu-devel] [RFC PATCH V6 08/18] cpu: remove exit_request global.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic This removes exit_request global and adds a variable in CPUState for this. Only the flag for the first cpu is used for the moment as we are still with one TCG thread. Signed-off-by: KONRAD Frederic --- cpu-exec.c | 15 --- cpus.c | 17 ++--- 2

[Qemu-devel] [RFC PATCH V6 05/18] protect TBContext with tb_lock.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic This protects TBContext with tb_lock to make tb_* thread safe. We can still have issue with tb_flush in case of multithread TCG: An other CPU can be executing code during a flush. This can be fixed later by making all other TCG thread exiting before calling tb_flush().

[Qemu-devel] [RFC PATCH V6 00/18] Multithread TCG.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic This is the 6th round of the MTTCG patch series with hopefully a lot of improvements since the last version. Basically the atomic patch has been significantly improved, some issues has been fixed and the speed has been improved. It can be cloned from: g...@git.greensocs.com

[Qemu-devel] [RFC PATCH V6 03/18] remove unused spinlock.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic This just removes spinlock as it is not used anymore. Signed-off-by: KONRAD Frederic --- include/exec/spinlock.h | 49 - scripts/checkpatch.pl | 9 ++--- 2 files changed, 2 insertions(+), 56 deletions(-) delete mode

[Qemu-devel] [RFC PATCH V6 10/18] tcg: switch on multithread.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic This switches on multithread. Signed-off-by: KONRAD Frederic Changes V5 -> V6: * make qemu_cpu_kick calling qemu_cpu_kick_thread in case of TCG. --- cpus.c | 95 -- 1 file changed, 34 insertions(+), 61 del

[Qemu-devel] [RFC PATCH V6 09/18] cpu: add a tcg_executing flag.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic We need to know whether any other VCPU is executing code or not it's possible with this flag. Signed-off-by: KONRAD Frederic --- cpu-exec.c| 1 + cpus.c| 1 + include/qom/cpu.h | 3 +++ qom/cpu.c | 1 + 4 files changed, 6 insertions(+) diff --

[Qemu-devel] [RFC PATCH V6 14/18] add a callback when tb_invalidate is called.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic Instead of doing the jump cache invalidation directly in tb_invalidate delay it after the exit so we don't have an other CPU trying to execute the code being invalidated. Signed-off-by: KONRAD Frederic --- translate-all.c | 61 +

[Qemu-devel] [RFC PATCH V6 07/18] Drop global lock during TCG code execution

2015-06-26 Thread fred . konrad
From: Jan Kiszka This finally allows TCG to benefit from the iothread introduction: Drop the global mutex while running pure TCG CPU code. Reacquire the lock when entering MMIO or PIO emulation, or when leaving the TCG loop. We have to revert a few optimization for the current TCG threading mode

[Qemu-devel] [RFC PATCH V6 11/18] cpus: make qemu_cpu_kick_thread public.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic This makes qemu_cpu_kick_thread public. Signed-off-by: KONRAD Frederic --- cpus.c| 2 +- include/sysemu/cpus.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cpus.c b/cpus.c index 08267ed..5f13d73 100644 --- a/cpus.c +++ b/cpus.c @@ -

[Qemu-devel] [PATCH 05/39] ivshmem: factor out the incoming fifo handling

2015-06-26 Thread Marc-André Lureau
Make a new function fifo_update_and_get() that can be reused by other part of the functions. --- hw/misc/ivshmem.c | 59 --- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 2162d02..dd15

[Qemu-devel] [RFC PATCH V6 15/18] cpu: introduce tlb_flush*_all.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic Some architectures allow to flush the tlb of other VCPUs. This is not a problem when we have only one thread for all VCPUs but it definitely needs to be an asynchronous work when we are in true multithreaded work. TODO: Some test case, I fear some bad results in case a VCPU

[Qemu-devel] [RFC PATCH V6 18/18] translate-all: (wip) use tb_flush_safe when we can't alloc more tb.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic This changes just the tb_flush called from tb_alloc. TODO: * changes the other tb_flush. Signed-off-by: KONRAD Frederic --- translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translate-all.c b/translate-all.c index 8bd8fe8..9adaffa 10064

[Qemu-devel] [PATCH 14/39] ivshmem: remove max_peer field

2015-06-26 Thread Marc-André Lureau
max_peer isn't really useful, it tracks the maximum received VM id, but that quickly matches nb_peers, the size of the peers array. Since VM come and go, there might be sparse peers so it doesn't help much in general to have this value around. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem

[Qemu-devel] [PATCH 01/39] char: add qemu_chr_free()

2015-06-26 Thread Marc-André Lureau
If a chardev is allowed to be created outside of QMP, then it must be also possible to free it. This is useful for ivshmem that creates chardev anonymously and must be able to free them. Signed-off-by: Marc-André Lureau --- include/sysemu/char.h | 10 +- qemu-char.c | 9 ++

[Qemu-devel] [RFC PATCH V6 12/18] Use atomic cmpxchg to atomically check the exclusive value in a STREX

2015-06-26 Thread fred . konrad
From: KONRAD Frederic This mechanism replaces the existing load/store exclusive mechanism which seems to be broken for multithread. It follows the intention of the existing mechanism and stores the target address and data values during a load operation and checks that they remain unchanged before

[Qemu-devel] [PATCH 23/39] ivshmem: shmfd can be 0

2015-06-26 Thread Marc-André Lureau
0 is a valid fd value, so change conditions and set -1 value early Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 199086d..9085f7c 100644 --- a/hw/misc/ivshmem.c +++ b/hw

[Qemu-devel] [PATCH 03/39] ivhsmem: read do not accept more than sizeof(long)

2015-06-26 Thread Marc-André Lureau
ivshmem_read() only reads sizeof(long) from the input buffer. Accepting more could lead to fifo8 abort() on x86 if it's not empty. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c ind

[Qemu-devel] [RFC PATCH V6 16/18] arm: use tlb_flush*_all

2015-06-26 Thread fred . konrad
From: KONRAD Frederic This just use the new mechanism to ensure that each VCPU thread flush its own VCPU. Signed-off-by: KONRAD Frederic --- target-arm/helper.c | 45 +++-- 1 file changed, 7 insertions(+), 38 deletions(-) diff --git a/target-arm/helper.

[Qemu-devel] [PATCH 02/39] msix: add VMSTATE_MSIX_TEST

2015-06-26 Thread Marc-André Lureau
ivshmem is going to use MSIX state conditionally. Signed-off-by: Marc-André Lureau --- include/hw/pci/msix.h | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h index 954d82b..72e5f93 100644 --- a/include/hw/pci/msix

[Qemu-devel] [PATCH 08/39] ivshmem: remove useless doorbell field

2015-06-26 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 5e4b2cc..1b8204e 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -71,7 +71,6 @@ typedef struct IVShmemState { uint32_t intrmask;

[Qemu-devel] [RFC PATCH V6 13/18] cpu: introduce async_run_safe_work_on_cpu.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic We already had async_run_on_cpu but we need all VCPUs outside their execution loop to execute some tb_flush/invalidate task: async_run_on_cpu_safe schedule a work on a VCPU but the work start when no more VCPUs are executing code. When a safe work is pending cpu_has_work re

[Qemu-devel] [PATCH 27/39] ivshmem: replace 'guest' for 'peer' appropriately

2015-06-26 Thread Marc-André Lureau
The terms 'guest' and 'peer' are used sometime interchangeably which may be confusing. Instead, use 'peer' for the remote instances of ivshmem clients, and 'guest' for the local VM. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 28 ++-- 1 file changed, 14 inser

[Qemu-devel] [PATCH 04/39] ivshmem: fix number of bytes to push to fifo

2015-06-26 Thread Marc-André Lureau
If the fifo has 0 bytes, and the read is of size 1, the call to fifo8_push_all() will copy out of bounds data. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index fb53b3f..2162d02 1

[Qemu-devel] [RFC PATCH V6 17/18] translate-all: introduces tb_flush_safe.

2015-06-26 Thread fred . konrad
From: KONRAD Frederic tb_flush is not thread safe we definitely need to exit VCPUs to do that. This introduces tb_flush_safe which just creates an async safe work which will do a tb_flush later. Signed-off-by: KONRAD Frederic --- include/exec/exec-all.h | 1 + translate-all.c | 15 +++

[Qemu-devel] [PATCH 06/39] ivshmem: remove unnecessary dup()

2015-06-26 Thread Marc-André Lureau
qemu_chr_fe_get_msgfd() transfer ownership, there is no need to dup the fd. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index dd15f0e..fbeb731 100644 --- a/

[Qemu-devel] [PATCH 32/39] ivshmem-server: use a uint16 for client ID

2015-06-26 Thread Marc-André Lureau
In practice, the number of VM is limited to MAXUINT16 in ivshmem, so use the same limit on the server. Signed-off-by: Marc-André Lureau --- contrib/ivshmem-server/ivshmem-server.c | 11 ++- contrib/ivshmem-server/ivshmem-server.h | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH 09/39] ivshmem: more qdev conversion

2015-06-26 Thread Marc-André Lureau
Use the latest qemu device modeling API, in particular, convert to realize to fix the error handling; right now a botched device_add ivhsmem command kills the VM. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 119 +++--- 1 file changed,

[Qemu-devel] [PATCH 11/39] ivshmem: increase_dynamic_storage() improvements

2015-06-26 Thread Marc-André Lureau
- rename the function resize_peers() to better reflect the content - limit the maximum number of peers to IVSHMEM_MAX_PEERS as MAXUINT16, which is more realistic and also better reflects the limit of the doorbell register. - change the argument to be the size, not the 0-index max value - immedia

[Qemu-devel] [PATCH 00/39] ivshmem server/client, cleanups & test

2015-06-26 Thread Marc-André Lureau
Hi, This series is mostly about the pending patches from David Marchand adding the client/server code, cleanups, and finally adding some tests. David Marchand (3): contrib: add ivshmem client and server docs: update ivshmem device spec ivshmem: add check on protocol version in QEMU Marc-An

[Qemu-devel] [PATCH 35/39] ivshmem: add check on protocol version in QEMU

2015-06-26 Thread Marc-André Lureau
From: David Marchand Send a protocol version as the first message from server, clients must close communication if they don't support this protocol version. Older QEMUs should be fine with this change in the protocol since they overrides their own vm_id on reception of an id associated to no eve

[Qemu-devel] [PATCH 13/39] ivshmem: initialize max_peer to -1

2015-06-26 Thread Marc-André Lureau
There is no peer when device is initialized, do not accept doorbell for peer 0. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 9776e4e..2c78dee 100644 --- a/hw/misc/ivshmem

[Qemu-devel] [PATCH 12/39] ivshmem: remove useless ivshmem_update_irq() val argument

2015-06-26 Thread Marc-André Lureau
val isn't used in ivshmem_update_irq() function. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 66f9c0b..9776e4e 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c

[Qemu-devel] [PATCH 07/39] ivshmem: remove superflous ivshmem_attr field

2015-06-26 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index fbeb731..5e4b2cc 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -85,7 +85,6 @@ typedef struct IVShmemS

[Qemu-devel] [PATCH 38/39] qtest: add qtest_add_abrt_handler()

2015-06-26 Thread Marc-André Lureau
Allow a test to add abort handlers, use GHook for all handlers. There is currently no way to remove a handler, but it could be later added if needed. Signed-off-by: Marc-André Lureau --- tests/libqtest.c | 37 - tests/libqtest.h | 2 ++ 2 files changed, 26 i

[Qemu-devel] [PATCH 29/39] ivshmem: reset mask on device reset

2015-06-26 Thread Marc-André Lureau
The interrupt mask is a state value, it should be reset, like the value. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index ade7456..47a65a2 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c

[Qemu-devel] [PATCH 15/39] ivshmem: improve debug messages

2015-06-26 Thread Marc-André Lureau
Some misc improvements to ivshmem debug. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 4958307..0cc5682 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -2

[Qemu-devel] [PATCHv2] build-sys: keep current config.log on --help

2015-06-26 Thread Marc-André Lureau
It's nice to keep the config.log used to configure the build. Signed-off-by: Marc-André Lureau --- v2 addresses Peter Maydell review, and keeps the log before help in case --help isn't given. configure | 42 +++--- 1 file changed, 27 insertions(+), 15 deletio

[Qemu-devel] [PATCH 10/39] ivshmem: remove last exit(1)

2015-06-26 Thread Marc-André Lureau
Failing to create a chardev shouldn't be fatal. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 3af73a5..7ba93c0 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -299,7

[Qemu-devel] [PATCH 31/39] ivshmem-client: check the number of vectors

2015-06-26 Thread Marc-André Lureau
Check the number of vectors received from the server, to avoid out of bound array access. Signed-off-by: Marc-André Lureau --- contrib/ivshmem-client/ivshmem-client.c | 4 1 file changed, 4 insertions(+) diff --git a/contrib/ivshmem-client/ivshmem-client.c b/contrib/ivshmem-client/ivshmem

[Qemu-devel] [PATCH 16/39] ivshmem: improve error

2015-06-26 Thread Marc-André Lureau
The test whether the chardev is an AF_UNIX socket rejects "-chardev socket,id=chr0,path=/tmp/foo,server,nowait -device ivshmem,chardev=chr0", but fails to explain why. Use an explicit error on why a chardev may be rejected. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 10 +++---

[Qemu-devel] [PATCH 17/39] ivshmem: print error on invalid peer id

2015-06-26 Thread Marc-André Lureau
The server shouldn't send invalid peer id, so print an error if it's the case. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index ab13f70..17dc122 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivsh

[Qemu-devel] [PATCH 34/39] docs: update ivshmem device spec

2015-06-26 Thread Marc-André Lureau
From: David Marchand Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it. Signed-off-by: David Marchand Reviewed

[Qemu-devel] [PATCH 19/39] ivshmem: beautify a bit the code

2015-06-26 Thread Marc-André Lureau
Use more explicit variables. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 6f3d2fe..84d8ff1 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c

<    1   2   3   4   >