[Qemu-devel] [RFC PATCH 1/4] hw/intc/arm_gicv3_common: Add state information

2015-09-30 Thread Pavel Fedin
Add state information to GICv3 object structure and implement arm_gicv3_common_reset(). Also, add some functions for registers which are not stored directly but simulated. State information includes not only pure GICv3 data, but also some legacy registers. This will be useful for implementing soft

Re: [Qemu-devel] [PATCH 1/7] string-input-visitor: Fix uint64 parsing

2015-09-30 Thread Eric Blake
On 09/30/2015 07:23 AM, Andreas Färber wrote: > Am 30.09.2015 um 15:19 schrieb Markus Armbruster: >> Andreas Färber writes: >>> As a bug fix, ignore warnings about preference of qemu_strto[u]ll(). >> >> I'm not sure I get this sentence. > > This patch causes checkpatch warnings. I intentionally d

[Qemu-devel] [PATCH v5 1/2] PCI: add missing classes in pci_ids.h to build device tree

2015-09-30 Thread Laurent Vivier
To allow QEMU to add PCI entries in device tree, we must have a more exhaustive list of PCI class IDs. This patch synchronizes as much as possible with pci_ids.h and add some missing IDs from SLOF. Signed-off-by: Laurent Vivier Reviewed-by: Michael S. Tsirkin Reviewed-by: Thomas Huth --- incl

[Qemu-devel] [RFC PATCH 2/4] kernel: Add definitions for GICv3 attributes

2015-09-30 Thread Pavel Fedin
This temporary patch adds kernel API definitions. Use proper header update procedure after these features are released. Signed-off-by: Pavel Fedin --- linux-headers/asm-arm64/kvm.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/linux-headers/asm-arm64/kvm.h b/linux

Re: [Qemu-devel] [PATCH 1/7] string-input-visitor: Fix uint64 parsing

2015-09-30 Thread Eric Blake
On 09/30/2015 07:19 AM, Markus Armbruster wrote: > > The (essentially undocumented) Visitor abstraction has the following > methods for integers: I proposed documentation at: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg05434.html > > * Mandatory: type_int() > > Interface uses i

Re: [Qemu-devel] [Qemu-block] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-30 Thread Jeff Cody
On Mon, Sep 28, 2015 at 04:23:16PM +0100, Stefan Hajnoczi wrote: > On Sun, Sep 27, 2015 at 11:29:18PM -0400, Jeff Cody wrote: > > +if (s->zero_cycle) { > > +ret = bdrv_get_block_status(s->target, sector_num, nb_sectors, > > &pnum); > > +if (!(ret & BDRV_BLOCK_ZERO)) { > > +

Re: [Qemu-devel] [PATCH 1/2] target-i386: Use 1UL for bit shift

2015-09-30 Thread Paolo Bonzini
On 29/09/2015 22:34, Eduardo Habkost wrote: > Fix undefined behavior detected by clang runtime check: > > qemu/target-i386/cpu.c:1494:15: runtime error: > left shift of 1 by 31 places cannot be represented in type 'int' > > While doing that, add extra parenthesis for clarity. > > Reporte

Re: [Qemu-devel] Loading image/elf to cpu that has different not system memory address space

2015-09-30 Thread Peter Maydell
On 30 September 2015 at 13:15, Marcin Krzemiński wrote: > > > 2015-09-30 12:44 GMT+02:00 Peter Maydell : >> >> On 30 September 2015 at 06:18, Marcin Krzemiński >> wrote: >> > I have at 0xfff0 real memory now (with aliasing to lower memory >> > address). >> > Does it mean that qemu might try t

Re: [Qemu-devel] [PATCH 2/3] hw: do not pass NULL to memory_region_init from instance_init

2015-09-30 Thread Paolo Bonzini
On 30/09/2015 10:57, Markus Armbruster wrote: > Paolo Bonzini writes: > >> > This causes the region to outlive the object, because it attaches the >> > region to /machine. This is not nice for the "realize" method, but >> > much worse for "instance_init" because it can cause dangling pointers

Re: [Qemu-devel] [PATCH 1/7] string-input-visitor: Fix uint64 parsing

2015-09-30 Thread Andreas Färber
Am 30.09.2015 um 15:19 schrieb Markus Armbruster: > Andreas Färber writes: >> As a bug fix, ignore warnings about preference of qemu_strto[u]ll(). > > I'm not sure I get this sentence. This patch causes checkpatch warnings. I intentionally do not address them in this bug-fix patch, but instead i

Re: [Qemu-devel] [PATCH 2/3] hw: do not pass NULL to memory_region_init from instance_init

2015-09-30 Thread Paolo Bonzini
On 30/09/2015 10:30, Thomas Huth wrote: >> > @@ -944,7 +944,7 @@ static void tcx_initfn(Object *obj) >> > SysBusDevice *sbd = SYS_BUS_DEVICE(obj); >> > TCXState *s = TCX(obj); >> > >> > -memory_region_init_ram(&s->rom, NULL, "tcx.prom", FCODE_MAX_ROM_SIZE, >> > +memory_region_

Re: [Qemu-devel] [PATCH] spapr: add a default rng device

2015-09-30 Thread Greg Kurz
On Wed, 30 Sep 2015 11:10:52 +0200 Thomas Huth wrote: > On 30/09/15 10:33, Greg Kurz wrote: > > On Tue, 29 Sep 2015 15:01:09 +1000 > > David Gibson wrote: > > > >> On Mon, Sep 28, 2015 at 12:13:47PM +0200, Greg Kurz wrote: > >>> A recent patch by Thomas Huth brought a new spapr-rng pseudo-devic

[Qemu-devel] [RFC PATCH 3/4] hw/intc/arm_gicv3_kvm: Implement get/put functions

2015-09-30 Thread Pavel Fedin
This actually implements pre_save and post_load methods for in-kernel vGICv3. Signed-off-by: Pavel Fedin --- hw/intc/arm_gicv3_kvm.c | 391 +++- 1 file changed, 387 insertions(+), 4 deletions(-) diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3

Re: [Qemu-devel] [PATCH v4 3/5] acpi: pc: add fw_cfg device node to ssdt

2015-09-30 Thread Paolo Bonzini
On 30/09/2015 02:18, Gabriel L. Somlo wrote: > Yes, we're OK. Throughout it all I *meant* to write 0x0B (bee), but my > brain sometimes mistakenly makes me write 0x08 (eight) instead. Sorry for > the confusion... :) IIRC from the pvpanic trainwreck, Windows XP and 2003 always complain even for 0

Re: [Qemu-devel] [PATCH 1/4] spapr_pci: Allow PCI host bridge DMA window to be configured

2015-09-30 Thread Laurent Vivier
On 30/09/2015 05:48, David Gibson wrote: > At present the PCI host bridge (PHB) for the pseries machine type has a > fixed DMA window from 0..1GB (in PCI address space) which is mapped to real > memory via the PAPR paravirtualized IOMMU. > > For better support of VFIO devices, we're going to wan

Re: [Qemu-devel] [RFC v5 0/6] Slow-path for atomic instruction translation

2015-09-30 Thread Paolo Bonzini
On 30/09/2015 10:14, alvise rigo wrote: >> From 1ft, both approaches rely on checking a flag during stores. >> This is split between the TLB and the CPUState for Alvise's patches (in >> order to exploit the existing fast-path checks), and entirely in the >> radix tree for Emilio's. However,

Re: [Qemu-devel] [RFC v5 2/6] softmmu: Add new TLB_EXCL flag

2015-09-30 Thread alvise rigo
On Wed, Sep 30, 2015 at 1:09 PM, Peter Maydell wrote: > On 30 September 2015 at 10:24, alvise rigo > wrote: >> On Wed, Sep 30, 2015 at 5:34 AM, Richard Henderson wrote: >>> (1) I don't see why EXCL support should differ whether MMIO is set or not. >>> Either we support exclusive accesses on memo

Re: [Qemu-devel] [PATCH] block/raw-posix: Open file descriptor O_RDWR to work around glibc posix_fallocate emulation issue.

2015-09-30 Thread Kevin Wolf
Am 29.09.2015 um 17:54 hat Richard W.M. Jones geschrieben: > https://bugzilla.redhat.com/show_bug.cgi?id=1265196 > > The following command fails on an NFS mountpoint: > > $ qemu-img create -f qcow2 -o preallocation=falloc disk.img 262144 > Formatting 'disk.img', fmt=qcow2 size=262144 encryp

Re: [Qemu-devel] [RFC v5 2/6] softmmu: Add new TLB_EXCL flag

2015-09-30 Thread Peter Maydell
On 30 September 2015 at 10:24, alvise rigo wrote: > On Wed, Sep 30, 2015 at 5:34 AM, Richard Henderson wrote: >> (1) I don't see why EXCL support should differ whether MMIO is set or not. >> Either we support exclusive accesses on memory-mapped io like we do on ram >> (in which case this is wrong

Re: [Qemu-devel] [PATCH 1/7] string-input-visitor: Fix uint64 parsing

2015-09-30 Thread Markus Armbruster
Andreas Färber writes: > All integers would get parsed by strtoll(), not handling the case of > UINT64 properties with the most significient bit set. This mess is part of a bigger mess, I'm afraid. The major ways integers get parsed are: * QMP: parse_literal() in qmp/qobject/json-parser.c T

Re: [Qemu-devel] [PATCH v4 46/47] ivshmem: use kvm irqfd for msi notifications

2015-09-30 Thread Claudio Fontana
On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Use irqfd for improving context switch when notifying the guest. > If the host doesn't support kvm irqfd, regular msi notifications are > still supported. > > Note: the ivshmem implementation doesn't allow swit

Re: [Qemu-devel] Loading image/elf to cpu that has different not system memory address space

2015-09-30 Thread Marcin Krzemiński
2015-09-30 12:44 GMT+02:00 Peter Maydell : > On 30 September 2015 at 06:18, Marcin Krzemiński > wrote: > > I have at 0xfff0 real memory now (with aliasing to lower memory > > address). > > Does it mean that qemu might try to execute some instructions from there? > > As I say, we need there to

Re: [Qemu-devel] [PATCH v4 4/5] acpi: arm: add fw_cfg device node to dsdt

2015-09-30 Thread Laszlo Ersek
On 09/30/15 13:13, Peter Maydell wrote: > On 30 September 2015 at 11:21, Laszlo Ersek wrote: >> However: if Gabriel has no access to actual aarch64 hardware (ie. cannot >> run KVM guests), then I don't think he should bother. Booting just the >> UEFI firmware on qemu-system-aarch64 with TCG accele

Re: [Qemu-devel] [PATCH repost 4/4] exec: factor out duplicate mmap code

2015-09-30 Thread Marc-André Lureau
Hi On Sun, Sep 27, 2015 at 12:14 PM, Michael S. Tsirkin wrote: > Anonymous and file-backed RAM allocation are now almost exactly the same. > > Reduce code duplication by moving RAM mmap code out of oslib-posix.c and > exec.c. > > Signed-off-by: Michael S. Tsirkin This patch is failing vhost-use

Re: [Qemu-devel] [RFC/PATCH] monitor/ppc: Access all SPRs from the monitor

2015-09-30 Thread Peter Maydell
On 27 September 2015 at 07:31, Benjamin Herrenschmidt wrote: > We already have a table with all supported SPRs along with their names, > so let's use that rather than a duplicate table that is perpetually > out of sync in the monitor code. > > This adds a new monitor hook target_extra_monitor_def(

Re: [Qemu-devel] [PATCH v4 40/47] tests: add ivshmem qtest

2015-09-30 Thread Claudio Fontana
On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Adds 4 ivshmemtests: > - single qemu instance and basic IO > - pair of instances, check memory sharing > - pair of instances with server, and MSIX > - hot plug/unplug > > A temporary shm is created as well as a

Re: [Qemu-devel] [PATCH v8 23/54] Add migration-capability boolean for postcopy-ram.

2015-09-30 Thread Eric Blake
On 09/30/2015 01:00 AM, Amit Shah wrote: >> Reviewed-by: Eric Blake >> >> I'm guessing the plan is to keep this experimental until a bit more >> experience is gained, to make sure we aren't missing anything essential >> in the use of postcopy. > >>From the cover letter: > > I'm keeping the

Re: [Qemu-devel] [PATCH v5 24/38] blockdev: Pull out blockdev option extraction

2015-09-30 Thread Alberto Garcia
On Fri 18 Sep 2015 05:22:59 PM CEST, Max Reitz wrote: > Extract some of the blockdev option extraction code from blockdev_init() > into its own function. This simplifies blockdev_init() and will allow > reusing the code in a different function added in a follow-up patch. > > Signed-off-by: Max Rei

Re: [Qemu-devel] [PATCH v4 4/5] acpi: arm: add fw_cfg device node to dsdt

2015-09-30 Thread Peter Maydell
On 30 September 2015 at 11:21, Laszlo Ersek wrote: > However: if Gabriel has no access to actual aarch64 hardware (ie. cannot > run KVM guests), then I don't think he should bother. Booting just the > UEFI firmware on qemu-system-aarch64 with TCG acceleration is fine, but > for checking "/proc/iom

Re: [Qemu-devel] feature idea: allow user to run custom scripts

2015-09-30 Thread Peter Maydell
On 30 September 2015 at 09:14, Dr. David Alan Gilbert wrote: > * Markus Armbruster (arm...@redhat.com) wrote: >> In my opinion, QEMU should leave them to separate GUI shells, because >> doing everything in QEMU distracts from our core mission and we don't >> have GUI expertise[*]. One more point:

Re: [Qemu-devel] [PATCH v8 00/54] Postcopy implementation

2015-09-30 Thread Bharata B Rao
On Mon, Sep 28, 2015 at 05:51:39PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > This is the 8th cut of my version of postcopy. > > The userfaultfd linux kernel code is now in the upstream kernel > tree, and so 4.3-rc3 can be used without modification. > > Th

Re: [Qemu-devel] [PATCH v4 4/5] acpi: arm: add fw_cfg device node to dsdt

2015-09-30 Thread Laszlo Ersek
test results from an aarch64 Linux guest (using KVM and UEFI): On 09/29/15 12:40, Laszlo Ersek wrote: > On 09/27/15 23:29, Gabriel L. Somlo wrote: >> Add a fw_cfg device node to the ACPI DSDT. This is mostly >> informational, as the authoritative fw_cfg MMIO region(s) >> are listed in the Device T

Re: [Qemu-devel] [PATCH v8 00/54] Postcopy implementation

2015-09-30 Thread Dr. David Alan Gilbert
* Bharata B Rao (bhar...@linux.vnet.ibm.com) wrote: > On Mon, Sep 28, 2015 at 05:51:39PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > This is the 8th cut of my version of postcopy. > > > > The userfaultfd linux kernel code is now in the upstream kernel

Re: [Qemu-devel] [PATCH v4 4/5] acpi: arm: add fw_cfg device node to dsdt

2015-09-30 Thread Laszlo Ersek
On 09/30/15 11:59, Ard Biesheuvel wrote: > On 29 September 2015 at 20:26, Gabriel L. Somlo wrote: >> On Tue, Sep 29, 2015 at 12:40:16PM +0200, Laszlo Ersek wrote: >>> On 09/27/15 23:29, Gabriel L. Somlo wrote: Add a fw_cfg device node to the ACPI DSDT. This is mostly informational, as th

Re: [Qemu-devel] Loading image/elf to cpu that has different not system memory address space

2015-09-30 Thread Peter Maydell
On 30 September 2015 at 06:18, Marcin Krzemiński wrote: > I have at 0xfff0 real memory now (with aliasing to lower memory > address). > Does it mean that qemu might try to execute some instructions from there? As I say, we need there to be fake RAM at that address. We never try to read its co

Re: [Qemu-devel] [RFC v5 4/6] target-arm: Create new runtime helpers for excl accesses

2015-09-30 Thread alvise rigo
On Wed, Sep 30, 2015 at 6:03 AM, Richard Henderson wrote: > On 09/24/2015 06:32 PM, Alvise Rigo wrote: >> >> Introduce a set of new runtime helpers do handle exclusive instructions. >> This helpers are used as hooks to call the respective LL/SC helpers in >> softmmu_llsc_template.h from TCG code.

Re: [Qemu-devel] [PATCH 4/4] spapr_pci: Allow VFIO devices to work on the normal PCI host bridge

2015-09-30 Thread Thomas Huth
On 30/09/15 05:48, David Gibson wrote: > The core VFIO infrastructure more or less allows VFIO devices to work > on any normal guest PCI host bridge (PHB) without extra logic. > However, the "spapr-pci-host-bridge" device (as opposed to the special > "spapr-pci-vfio-host-bridge" device) breaks this

Re: [Qemu-devel] [PATCH 3/4] spapr_iommu: Provide a function to switch a TCE table to allowing VFIO

2015-09-30 Thread Thomas Huth
On 30/09/15 05:48, David Gibson wrote: > Because of the way non-VFIO guest IOMMU operations are KVM accelerated, not > all TCE tables (guest IOMMU contexts) can support VFIO devices. Currently, > this is decided at creation time. > > To support hotplug of VFIO devices, we need to allow a TCE tabl

Re: [Qemu-devel] [PATCH] migration: disallow migrate_add_blocker during migration

2015-09-30 Thread Kevin Wolf
Am 29.09.2015 um 22:20 hat John Snow geschrieben: > If a migration is already in progress and somebody attempts > to add a migration blocker, this should rightly fail. > > Add an errp parameter and a retcode return value to migrate_add_blocker. > > This is part one of two for a solution to prohib

Re: [Qemu-devel] [PATCH v4 4/5] acpi: arm: add fw_cfg device node to dsdt

2015-09-30 Thread Ard Biesheuvel
On 29 September 2015 at 20:26, Gabriel L. Somlo wrote: > On Tue, Sep 29, 2015 at 12:40:16PM +0200, Laszlo Ersek wrote: >> On 09/27/15 23:29, Gabriel L. Somlo wrote: >> > Add a fw_cfg device node to the ACPI DSDT. This is mostly >> > informational, as the authoritative fw_cfg MMIO region(s) >> > ar

Re: [Qemu-devel] [RFC v5 5/6] configure: Use slow-path for atomic only when the softmmu is enabled

2015-09-30 Thread alvise rigo
On Wed, Sep 30, 2015 at 6:05 AM, Richard Henderson wrote: > On 09/24/2015 06:32 PM, Alvise Rigo wrote: >> >> Use the new slow path for atomic instruction translation when the >> softmmu is enabled. > > > Um... why? TCG_USE_LDST_EXCL would appear to be 100% redundant with > SOFTMMU. Oops, modifyi

Re: [Qemu-devel] [RFC v5 3/6] softmmu: Add helpers for a new slowpath

2015-09-30 Thread alvise rigo
On Wed, Sep 30, 2015 at 5:58 AM, Richard Henderson wrote: > On 09/24/2015 06:32 PM, Alvise Rigo wrote: >> >> The new helpers rely on the legacy ones to perform the actual read/write. >> >> The LoadLink helper (helper_ldlink_name) prepares the way for the >> following SC operation. It sets the link

Re: [Qemu-devel] [PATCH v3] Add argument filters to the seccomp sandbox

2015-09-30 Thread Daniel P. Berrange
On Wed, Sep 30, 2015 at 04:40:42AM -0400, Namsun Ch'o wrote: > > This looks good now. > > Thanks for your contribution. > > > Acked-by: Eduardo Otubo > > > ps.: I'll create a pull request with all changes made so far on Friday. > > I was told on IRC to submit patches in smaller chunks, with a f

Re: [Qemu-devel] [PATCH 4/4] spapr_pci: Allow VFIO devices to work on the normal PCI host bridge

2015-09-30 Thread Laurent Vivier
On 30/09/2015 05:48, David Gibson wrote: > The core VFIO infrastructure more or less allows VFIO devices to work > on any normal guest PCI host bridge (PHB) without extra logic. > However, the "spapr-pci-host-bridge" device (as opposed to the special > "spapr-pci-vfio-host-bridge" device) breaks

Re: [Qemu-devel] [PATCH 2/3] hw: do not pass NULL to memory_region_init from instance_init

2015-09-30 Thread Markus Armbruster
Paolo Bonzini writes: > This causes the region to outlive the object, because it attaches the > region to /machine. This is not nice for the "realize" method, but > much worse for "instance_init" because it can cause dangling pointers > after a simple object_new/object_unref pair. > > Reported-b

Re: [Qemu-devel] [RFC v5 2/6] softmmu: Add new TLB_EXCL flag

2015-09-30 Thread alvise rigo
On Wed, Sep 30, 2015 at 5:34 AM, Richard Henderson wrote: > On 09/24/2015 06:32 PM, Alvise Rigo wrote: >> >> +if (unlikely(!(te->addr_write & TLB_MMIO) && (te->addr_write & >> TLB_EXCL))) { >> +/* We are removing an exclusive entry, set the page to dirty. >> This >> + * is not

Re: [Qemu-devel] [PATCH 2/4] spapr_iommu: Rename vfio_accel parameter

2015-09-30 Thread Laurent Vivier
On 30/09/2015 05:48, David Gibson wrote: > The vfio_accel parameter used when creating a new TCE table (guest IOMMU > context) has a confusing name. What it really means is whether we need the > TCE table created to be able to support VFIO devices. > > VFIO is relevant, because when available w

Re: [Qemu-devel] [PATCH] spapr: add a default rng device

2015-09-30 Thread Thomas Huth
On 30/09/15 10:33, Greg Kurz wrote: > On Tue, 29 Sep 2015 15:01:09 +1000 > David Gibson wrote: > >> On Mon, Sep 28, 2015 at 12:13:47PM +0200, Greg Kurz wrote: >>> A recent patch by Thomas Huth brought a new spapr-rng pseudo-device to >>> provide high-quality random numbers to guests. The device m

Re: [Qemu-devel] [PATCHv3 6/7] vfio: Allow hotplug of containers onto existing guest IOMMU mappings

2015-09-30 Thread Laurent Vivier
On 30/09/2015 04:13, David Gibson wrote: > At present the memory listener used by vfio to keep host IOMMU mappings > in sync with the guest memory image assumes that if a guest IOMMU > appears, then it has no existing mappings. > > This may not be true if a VFIO device is hotplugged onto a guest

Re: [Qemu-devel] [PATCH v6 06/24] memfd: add fallback for memfd

2015-09-30 Thread Michael S. Tsirkin
On Tue, Sep 29, 2015 at 06:34:36PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Add an open/unlink/mmap fallback for system that do not support memfd. > This patch may require additional SELinux policies to work for enforced > systems, but should gracefully fail nonethe

[Qemu-devel] [PULL 6/6] migration: Disambiguate MAX_THROTTLE

2015-09-30 Thread Juan Quintela
From: "Jason J. Herne" Migration has a define for MAX_THROTTLE. Update comment to clarify that this is used for throttling transfer speed. Hopefully this will prevent it from being confused with a guest cpu throttling entity. Signed-off-by: Jason J. Herne Reviewed-by: Dr. David Alan Gilbert Re

[Qemu-devel] [PULL 5/6] qmp/hmp: Add throttle ratio to query-migrate and info migrate

2015-09-30 Thread Juan Quintela
From: "Jason J. Herne" Report throttle percentage in info migrate and query-migrate responses when cpu throttling is active. Signed-off-by: Jason J. Herne Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Juan Quintela Reviewed-by: Juan Quintela --- hmp.c | 5 + migrati

Re: [Qemu-devel] [PATCH] spapr: add a default rng device

2015-09-30 Thread Greg Kurz
On Tue, 29 Sep 2015 15:01:09 +1000 David Gibson wrote: > On Mon, Sep 28, 2015 at 12:13:47PM +0200, Greg Kurz wrote: > > A recent patch by Thomas Huth brought a new spapr-rng pseudo-device to > > provide high-quality random numbers to guests. The device may either be > > backed by a "RngBackend" o

[Qemu-devel] [PULL 4/6] migration: Dynamic cpu throttling for auto-converge

2015-09-30 Thread Juan Quintela
From: "Jason J. Herne" Remove traditional auto-converge static 30ms throttling code and replace it with a dynamic throttling algorithm. Additionally, be more aggressive when deciding when to start throttling. Previously we waited until four unproductive memory passes. Now we begin throttling aft

Re: [Qemu-devel] [PATCH v6 06/24] memfd: add fallback for memfd

2015-09-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 05:06:55AM -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > On Tue, Sep 29, 2015 at 06:34:36PM +0200, marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > > > Add an open/unlink/mmap fallback for system that do not support memf

Re: [Qemu-devel] [PATCH 3/3] macio: move DBDMA_init from instance_init to realize

2015-09-30 Thread Thomas Huth
On 29/09/15 14:37, Paolo Bonzini wrote: > DBDMA_init is not idempotent, and calling it from instance_init > breaks a simple object_new/object_unref pair. Work around this, > pending qdev-ification of DBDMA, by moving the call to realize. > > Reported-by: Markus Armbruster > Signed-off-by: Paolo

Re: [Qemu-devel] [PATCH v6 05/24] util: add memfd helpers

2015-09-30 Thread Michael S. Tsirkin
On Tue, Sep 29, 2015 at 06:34:35PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Add qemu_memfd_alloc/free() helpers. > > The function helps to allocate and seal a memfd. > > Signed-off-by: Marc-André Lureau > --- > include/qemu/memfd.h | 4 > util/memfd.c

Re: [Qemu-devel] [PATCH v6 04/24] util: add linux-only memfd fallback

2015-09-30 Thread Michael S. Tsirkin
On Tue, Sep 29, 2015 at 06:34:34PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Implement memfd_create() fallback if not available in system libc. > memfd_create() is still not included in glibc today, atlhough it's been > available since Linux 3.17 in Oct 2014. > > me

Re: [Qemu-devel] [PATCH 3/4] spapr_iommu: Provide a function to switch a TCE table to allowing VFIO

2015-09-30 Thread Laurent Vivier
On 30/09/2015 05:48, David Gibson wrote: > Because of the way non-VFIO guest IOMMU operations are KVM accelerated, not > all TCE tables (guest IOMMU contexts) can support VFIO devices. Currently, > this is decided at creation time. > > To support hotplug of VFIO devices, we need to allow a TCE

Re: [Qemu-devel] [PATCH v2] vhost-user-test: do not reinvent glib-compat.h

2015-09-30 Thread Marc-André Lureau
Reviewed-by: Marc-André Lureau Tested-by: Marc-André Lureau (It conflicts with my vhost-user series, but fixing it is quite trivial, I pushed a rebased version on my devel tree https://github.com/elmarco/qemu/tree/vhost-user) On Tue, Sep 29, 2015 at 2:12 PM, Paolo Bonzini wrote: > glib-compat

[Qemu-devel] [PULL 2/6] cpu: Provide vcpu throttling interface

2015-09-30 Thread Juan Quintela
From: "Jason J. Herne" Provide a method to throttle guest cpu execution. CPUState is augmented with timeout controls and throttle start/stop functions. To throttle the guest cpu the caller simply has to call the throttle set function and provide a percentage of throttle time. Signed-off-by: Jaso

Re: [Qemu-devel] [PATCHv3 3/7] vfio: Check guest IOVA ranges against host IOMMU capabilities

2015-09-30 Thread Laurent Vivier
On 30/09/2015 04:13, David Gibson wrote: > The current vfio core code assumes that the host IOMMU is capable of > mapping any IOVA the guest wants to use to where we need. However, real > IOMMUs generally only support translating a certain range of IOVAs (the > "DMA window") not a full 64-bit ad

Re: [Qemu-devel] [PATCHv3 7/7] vfio: Expose a VFIO PCI device's group for EEH

2015-09-30 Thread Laurent Vivier
On 30/09/2015 04:13, David Gibson wrote: > The Enhanced Error Handling (EEH) interface in PAPR operates on units of a > Partitionable Endpoint (PE). For VFIO devices, the PE boundaries the guest > sees must match the PE (i.e. IOMMU group) boundaries on the host. To > implement this it will need

[Qemu-devel] [PULL 0/6] Migration pull request

2015-09-30 Thread Juan Quintela
in the git repository at: git://github.com/juanquintela/qemu.git tags/migration/20150930 for you to fetch changes up to dc3256272cf70b2152279b013a8abb16e0f6fe96: migration: Disambiguate MAX_THROTTLE (2015-09-30 09:42:04 +0200) migr

Re: [Qemu-devel] [PATCHv3 2/7] vfio: Generalize vfio_listener_region_add failure path

2015-09-30 Thread Laurent Vivier
On 30/09/2015 04:13, David Gibson wrote: > If a DMA mapping operation fails in vfio_listener_region_add() it > checks to see if we've already completed initial setup of the > container. If so it reports an error so the setup code can fail > gracefully, otherwise throws a hw_error(). > > There a

Re: [Qemu-devel] [PATCH 1/3] target-i386: add a subsection of vcpu's TSC rate in vmstate_x86_cpu

2015-09-30 Thread Dr. David Alan Gilbert
* Haozhong Zhang (haozhong.zh...@intel.com) wrote: > On Tue, Sep 29, 2015 at 08:00:13PM +0100, Dr. David Alan Gilbert wrote: > > * Haozhong Zhang (haozhong.zh...@intel.com) wrote: > > > The newly added subsection 'vmstate_tsc_khz' in this patch results in > > > vcpu's TSC rate being saved on the so

Re: [Qemu-devel] [PATCH v6 06/24] memfd: add fallback for memfd

2015-09-30 Thread Marc-André Lureau
Hi - Original Message - > On Tue, Sep 29, 2015 at 06:34:36PM +0200, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Add an open/unlink/mmap fallback for system that do not support memfd. > > This patch may require additional SELinux policies to work for enforced >

Re: [Qemu-devel] feature idea: allow user to run custom scripts

2015-09-30 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > >> On 29 September 2015 at 14:11, Dr. David Alan Gilbert > >> wrote: > >> > * Peter Maydell (peter.mayd...@linaro.org) wrote: > >> >> On 28 September 2015 a

Re: [Qemu-devel] [PATCHv3 5/7] memory: Allow replay of IOMMU mapping notifications

2015-09-30 Thread Laurent Vivier
On 30/09/2015 04:13, David Gibson wrote: > When we have guest visible IOMMUs, we allow notifiers to be registered > which will be informed of all changes to IOMMU mappings. This is used by > vfio to keep the host IOMMU mappings in sync with guest IOMMU mappings. > > However, unlike with a memor

Re: [Qemu-devel] [RFC v5 0/6] Slow-path for atomic instruction translation

2015-09-30 Thread alvise rigo
Hi Paolo, On Wed, Sep 30, 2015 at 6:44 AM, Paolo Bonzini wrote: > > > On 24/09/2015 10:32, Alvise Rigo wrote: >> The implementation heavily uses the software TLB together with a new >> bitmap that has been added to the ram_list structure which flags, on a >> per-CPU basis, all the memory pages th

Re: [Qemu-devel] [PATCH v3] Add argument filters to the seccomp sandbox

2015-09-30 Thread Namsun Ch'o
> This looks good now. > Thanks for your contribution. > Acked-by: Eduardo Otubo > ps.: I'll create a pull request with all changes made so far on Friday. I was told on IRC to submit patches in smaller chunks, with a few new filters at a time. Should I wait until it is merged, or should I go ah

[Qemu-devel] [PULL 3/6] migration: Parameters for auto-converge cpu throttling

2015-09-30 Thread Juan Quintela
From: "Jason J. Herne" Add migration parameters to allow the user to adjust the parameters that control cpu throttling when auto-converge is in effect. The added parameters are as follows: x-cpu-throttle-initial : Initial percantage of time guest cpus are throttled when migration auto-converge i

Re: [Qemu-devel] [PATCH v4 42/47] ivshmem: use strtosz()

2015-09-30 Thread Claudio Fontana
On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Use the common qemu utility function to parse the memory size. > > Signed-off-by: Marc-André Lureau > --- > hw/misc/ivshmem.c | 36 +--- > 1 file changed, 5 insertions(+), 31 d

Re: [Qemu-devel] [PATCH v8 23/54] Add migration-capability boolean for postcopy-ram.

2015-09-30 Thread Amit Shah
On (Tue) 29 Sep 2015 [14:22:17], Eric Blake wrote: > On 09/29/2015 02:37 AM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > The 'postcopy ram' capability allows postcopy migration of RAM; > > note that the migration starts off in precopy mode until > > postcopy mod

[Qemu-devel] [PULL 1/6] migration: yet more possible state transitions

2015-09-30 Thread Juan Quintela
On destination, we move from INMIGRATE to FINISH_MIGRATE. Add that to the list of allowed states. Signed-off-by: Juan Quintela Reviewed-by: Juan Quintela --- vl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vl.c b/vl.c index e211f6a..8d1846c 100644 --- a/vl.c +++ b/vl.c @@ -580,6 +580,

Re: [Qemu-devel] qemu-system-alpha -nographic does not work

2015-09-30 Thread Richard Henderson
On 09/30/2015 02:36 PM, Dennis Luehring wrote: ~/qemu/alpha-softmmu/qemu-system-alpha -m 1GB -monitor telnet::4440,server,nowait\ -kernel vmlinux.img-2.6.26-2-alpha-generic -initrd initrd.img-2.6.26-2-alpha-generic\ -net nic -net user -hda alpha.qcow2\ -drive file=debian-5010-alpha-netinst

Re: [Qemu-devel] [PATCH 2/3] hw: do not pass NULL to memory_region_init from instance_init

2015-09-30 Thread Thomas Huth
On 29/09/15 14:37, Paolo Bonzini wrote: > This causes the region to outlive the object, because it attaches the > region to /machine. This is not nice for the "realize" method, but > much worse for "instance_init" because it can cause dangling pointers > after a simple object_new/object_unref pair

Re: [Qemu-devel] feature idea: allow user to run custom scripts

2015-09-30 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Peter Maydell (peter.mayd...@linaro.org) wrote: >> On 29 September 2015 at 14:11, Dr. David Alan Gilbert >> wrote: >> > * Peter Maydell (peter.mayd...@linaro.org) wrote: >> >> On 28 September 2015 at 20:43, Programmingkid >> >> wrote: >> >> > >> >> > On Sep

Re: [Qemu-devel] [PATCH v4 31/47] contrib: add ivshmem client and server

2015-09-30 Thread Claudio Fontana
On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > From: David Marchand > > When using ivshmem devices, notifications between guests can be sent as > interrupts using a ivshmem-server (typical use described in documentation). > The client is provided as a debug tool. > > Signed-off-by: Ol

Re: [Qemu-devel] [PATCHv3 4/7] vfio: Record host IOMMU's available IO page sizes

2015-09-30 Thread Laurent Vivier
On 30/09/2015 04:13, David Gibson wrote: > Depending on the host IOMMU type we determine and record the available page > sizes for IOMMU translation. We'll need this for other validation in > future patches. > > Signed-off-by: David Gibson > Reviewed-by: Thomas Huth > Reviewed-by: Laurent Viv

Re: [Qemu-devel] [PATCH v12 0/5] remove icc bus/bridge

2015-09-30 Thread Zhu Guihua
Hi Eduardo, Can you help merge this patch series to your x86 tree? Thanks, Zhu On 09/16/2015 05:19 PM, Zhu Guihua wrote: ICC Bus was used for providing a hotpluggable bus for APIC and CPU, but now we use HotplugHandler to make hotplug. So ICC Bus is unnecessary. This code has passed the new p

Re: [Qemu-devel] [PATCHv3 1/7] vfio: Remove unneeded union from VFIOContainer

2015-09-30 Thread Laurent Vivier
On 30/09/2015 04:13, David Gibson wrote: > Currently the VFIOContainer iommu_data field contains a union with > different information for different host iommu types. However: >* It only actually contains information for the x86-like "Type1" iommu >* Because we have a common listener the

Re: [Qemu-devel] [PATCHv3 5/7] memory: Allow replay of IOMMU mapping notifications

2015-09-30 Thread Laurent Vivier
On 30/09/2015 04:13, David Gibson wrote: > When we have guest visible IOMMUs, we allow notifiers to be registered > which will be informed of all changes to IOMMU mappings. This is used by > vfio to keep the host IOMMU mappings in sync with guest IOMMU mappings. > > However, unlike with a memor

Re: [Qemu-devel] [Qemu-ppc] [RFC/PATCH] monitor/ppc: Access all SPRs from the monitor

2015-09-30 Thread Benjamin Herrenschmidt
On Wed, 2015-09-30 at 16:03 +1000, David Gibson wrote: > On Sun, Sep 27, 2015 at 04:31:16PM +1000, Benjamin Herrenschmidt wrote: > > We already have a table with all supported SPRs along with their names, > > so let's use that rather than a duplicate table that is perpetually > > out of sync in the

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc/spapr: Allow VIRTIO_VGA

2015-09-30 Thread Gerd Hoffmann
On Mi, 2015-09-30 at 15:42 +1000, David Gibson wrote: > On Wed, Sep 16, 2015 at 08:52:23AM +0200, Gerd Hoffmann wrote: > > On Mi, 2015-09-16 at 07:08 +1000, Benjamin Herrenschmidt wrote: > > > On Tue, 2015-09-15 at 11:19 +0200, Gerd Hoffmann wrote: > > > > On Di, 2015-09-15 at 15:51 +1000, Benjamin

[Qemu-devel] [PATCH v4 01/26] tcg: Rename debug_insn_start to insn_start

2015-09-30 Thread Richard Henderson
With an eye toward making it mandatory. Reviewed-by: Aurelien Jarno Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-alpha/translate.c | 2 +- target-arm/translate-a64.c| 2 +- target-arm/translate.c| 2 +- target-cris/translate.c | 4 ++-- target-c

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/10][TRIVIAL] Define categories for some PPC devices

2015-09-30 Thread David Gibson
On Sat, Sep 26, 2015 at 06:22:02PM +0200, Laurent Vivier wrote: > Some PPC devices appear uncategorized in the output of > "-device ?". This series tries to categorize some of > them. These all look good to me. I've merged them to a new 'ppc-next' staging branch at git://github.com/dgibson/qemu.g

[Qemu-devel] [PATCH v4 26/26] tcg: Adjust CODE_GEN_AVG_BLOCK_SIZE

2015-09-30 Thread Richard Henderson
At present, the "average" guestimate of TB size is way too small, leading to many unused entries in the pre-allocated TB array. For a guest with 1GB ram, we're currently allocating 256MB for the array. Survey arm, alpha, aarch64, ppc, sparc, i686, x86_64 guests running on x86_64 and ppc64 hosts a

[Qemu-devel] [PATCH v4 24/26] tcg: Allocate a guard page after code_gen_buffer

2015-09-30 Thread Richard Henderson
This will catch any overflow of the buffer. Add a native win32 alternative for alloc_code_gen_buffer; remove the malloc alternative. Signed-off-by: Richard Henderson --- translate-all.c | 210 1 file changed, 119 insertions(+), 91 deletio

[Qemu-devel] [PATCH] vmsvga: more cursor checks

2015-09-30 Thread Gerd Hoffmann
Check the cursor size more carefully. Also switch to unsigned while being at it, so they can't be negative. Signed-off-by: Gerd Hoffmann --- hw/display/vmware_vga.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c

[Qemu-devel] [PATCH v4 25/26] tcg: Check for overflow via highwater mark

2015-09-30 Thread Richard Henderson
We currently pre-compute an worst case code size for any TB, which works out to be 122kB. Since the average TB size is near 1kB, this wastes quite a lot of storage. Instead, check for overflow in between generating code for each opcode. The overhead of the check isn't measurable and wastage is mi

Re: [Qemu-devel] [PATCH v2] Add argument filters to the seccomp sandbox

2015-09-30 Thread Namsun Ch'o
> (I'm not sure what happens to your emails that all of them does not > relate to the same thread/Message-ID, making a pain to follow through > out the volume of email on the list, please pay attention to that) I just click Reply All, I'm not sure how else I would do it. Are they somehow being pos

[Qemu-devel] [PATCH v4 23/26] tcg: Emit prologue to the beginning of code_gen_buffer

2015-09-30 Thread Richard Henderson
By putting the prologue at the end, we risk overwriting the prologue should our estimate of maximum TB size. Given the two different placements of the call to tcg_prologue_init, move the high water mark computation into tcg_prologue_init. Reviewed-by: Peter Maydell Signed-off-by: Richard Henders

[Qemu-devel] [PATCH v4 21/26] tcg: Remove gen_intermediate_code_pc

2015-09-30 Thread Richard Henderson
It is no longer used, so tidy up everything reached by it. This includes the gen_opc_* arrays, the search_pc parameter and the inline gen_intermediate_code_internal functions. Reviewed-by: Aurelien Jarno Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/exec-all.h

Re: [Qemu-devel] qemu-system-alpha -nographic does not work

2015-09-30 Thread Dennis Luehring
Am 30.09.2015 um 08:48 schrieb Richard Henderson: On 09/30/2015 02:36 PM, Dennis Luehring wrote: > ~/qemu/alpha-softmmu/qemu-system-alpha -m 1GB -monitor telnet::4440,server,nowait\ > -kernel vmlinux.img-2.6.26-2-alpha-generic -initrd > initrd.img-2.6.26-2-alpha-generic\ > -net nic -net user

Re: [Qemu-devel] [Qemu-ppc] [RFC/PATCH] monitor/ppc: Access all SPRs from the monitor

2015-09-30 Thread David Gibson
On Sun, Sep 27, 2015 at 04:31:16PM +1000, Benjamin Herrenschmidt wrote: > We already have a table with all supported SPRs along with their names, > so let's use that rather than a duplicate table that is perpetually > out of sync in the monitor code. > > This adds a new monitor hook target_extra_m

[Qemu-devel] [PATCH v4 19/26] tcg: Pass data argument to restore_state_to_opc

2015-09-30 Thread Richard Henderson
The gen_opc_* arrays are already redundant with the data stored in the insn_start arguments. Transition restore_state_to_opc to use data from the latter. Reviewed-by: Aurelien Jarno Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 2 +- target-a

[Qemu-devel] [PATCH v4 22/26] tcg: Remove tcg_gen_code_search_pc

2015-09-30 Thread Richard Henderson
It's no longer used, so tidy up everything reached by it. Reviewed-by: Aurelien Jarno Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/tcg.c | 59 +++ tcg/tcg.h | 2 -- 2 files changed, 19 insertions(+), 42 deletions(-

[Qemu-devel] [PATCH v4 18/26] tcg: Add TCG_MAX_INSNS

2015-09-30 Thread Richard Henderson
Adjust all translators to respect it. Reviewed-by: Aurelien Jarno Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-alpha/translate.c | 3 +++ target-arm/translate-a64.c| 3 +++ target-arm/translate.c| 6 +- target-cris/translate.c | 3 +++ t

Re: [Qemu-devel] Loading image/elf to cpu that has different not system memory address space

2015-09-30 Thread Marcin Krzemiński
2015-09-30 0:59 GMT+02:00 Peter Maydell : > On 29 September 2015 at 23:40, Alistair Francis > wrote: > > On Thu, Sep 24, 2015 at 11:58 AM, mar.krzeminski > > wrote: > >> > >> > >> W dniu 24.09.2015 o 20:38, Peter Crosthwaite pisze: > >> > >>> On Thu, Sep 24, 2015 at 10:14 AM, mar.krzeminski > >>

  1   2   3   >