[Qemu-devel] [PATCH] configure: improve multiarch support for pkgconfig

2015-04-09 Thread John Snow
This will improve the multi-arch compilation for hosts using gcc. configurations using clang won't see an improvement, but also won't see a regression. Signed-off-by: John Snow --- configure | 14 ++ 1 file changed, 14 insertions(+) diff --git a/configure b/configure index 826d6fd..

Re: [Qemu-devel] [PATCH 02/12 v9] linux-user: tilegx: Add target features support within qemu

2015-04-09 Thread Peter Maydell
On 27 March 2015 at 10:49, Chen Gang wrote: > They are for target features within qemu which independent from outside. > > Signed-off-by: Chen Gang > --- > linux-user/tilegx/target_cpu.h | 35 +++ > linux-user/tilegx/target_signal.h | 28 ++ > lin

Re: [Qemu-devel] seccomp breakage on arm

2015-04-09 Thread Paul Moore
On Thursday, April 09, 2015 02:28:24 PM Andreas Färber wrote: > Am 09.04.2015 um 11:10 schrieb Paul Moore: > > On Thursday, April 09, 2015 10:21:52 AM Eduardo Otubo wrote: > >> On Thu, Apr 09, 2015 at 05=01=31AM +0200, Andreas Färber wrote: > >>> Hello, > >>> > >>> I am seeing the following build

Re: [Qemu-devel] [PATCH 01/12 v9] linux-user: tilegx: Firstly add architecture related features

2015-04-09 Thread Peter Maydell
On 27 March 2015 at 10:48, Chen Gang wrote: > They are based on Linux kernel tilegx architecture for 64 bit binary, > also based on tilegx ABI reference document. > > Signed-off-by: Chen Gang > --- > linux-user/tilegx/syscall.h| 80 > linux-user/tilegx/syscall_nr.h | 278 ++

Re: [Qemu-devel] 64-bit build of qemu-system-arm with mingw-w64 not functional

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 21:43, Stefan Weil wrote: > My fork also contains additional code which would need much work > to integrate it in the official QEMU (MIPS AR7 with WLAN router emulation, > Raspberry Pi emulation and other parts which are not always working). As an aside, if you're interested in

Re: [Qemu-devel] 64-bit build of qemu-system-arm with mingw-w64 not functional

2015-04-09 Thread Liviu Ionescu
> On 09 Apr 2015, at 20:58, Peter Maydell wrote: > > On 9 April 2015 at 18:41, Stefan Weil wrote: >> I think -mthreads is essential (needed for thread local storage), >> and -D_POSIX=1 is also needed for 64 bit builds. > > My 64-bit builds worked without either of these things... I tried with

Re: [Qemu-devel] 64-bit build of qemu-system-arm with mingw-w64 not functional

2015-04-09 Thread Stefan Weil
Am 09.04.2015 um 21:44 schrieb Liviu Ionescu: hmmm... things get complicated, even messier. :-( Windows support _is_ complicated, yes. There is MinGW32, MinGW-w64, Cygwin, Cygwin64 (list incomplete). And some versions of MinGW-w64 are incompatible because they changed their name mangling, so

[Qemu-devel] Wiki account request

2015-04-09 Thread Fan
Hi guys, This is my first post here, so nice to meet you everyone! I’m wondering if some of you can create a Wiki account for me. I want to add installation guide (e.g. dependencies list etc) for Arch Linux on http://wiki.qemu.org/Hosts/Linux . Thanks.

[Qemu-devel] [PATCH v3] target-i386: Register QOM properties for feature flags

2015-04-09 Thread Eduardo Habkost
This uses the feature name arrays to register "feat-*" QOM properties for feature flags. This simply adds the properties so they can be configured using -global, but doesn't change x86_cpu_parse_featurestr() to use them yet. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Use "cpuid-" pref

Re: [Qemu-devel] [PATCH 0/2] qom: strdup() target_name on object_property_add_alias()

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 21:57, Eduardo Habkost wrote: > This helps us avoid memory leaks when using object_property_add_alias(), as it > is not practical for callers to save target_name to free it later. > > Eduardo Habkost (2): > qom: strdup() target property name on object_property_add_alias() > qde

Re: [Qemu-devel] [PATCH v3] translate-all: use glib for all page descriptor allocations

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 22:07, Emilio G. Cota wrote: > Since commit > > b7b5233a "bsd-user/mmap.c: Don't try to override g_malloc/g_free" > > the exception we make here for usermode has been unnecessary. > Get rid of it. > > Signed-off-by: Emilio G. Cota > --- > translate-all.c | 18 ++--

[Qemu-devel] [PATCH v3] translate-all: use glib for all page descriptor allocations

2015-04-09 Thread Emilio G. Cota
Since commit b7b5233a "bsd-user/mmap.c: Don't try to override g_malloc/g_free" the exception we make here for usermode has been unnecessary. Get rid of it. Signed-off-by: Emilio G. Cota --- translate-all.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git

[Qemu-devel] [PATCH v2] translate-all: use glib for all page descriptor allocations

2015-04-09 Thread Emilio G. Cota
Since commit b7b5233a "bsd-user/mmap.c: Don't try to override g_malloc/g_free" the exception we make here for usermode has been unnecessary. Get rid of it. Signed-off-by: Emilio G. Cota --- translate-all.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git

[Qemu-devel] [PATCH 1/2] qom: strdup() target property name on object_property_add_alias()

2015-04-09 Thread Eduardo Habkost
With this, object_property_add_alias() callers can safely free the target property name, like what already happens with the 'name' argument to all object_property_add*() functions. Signed-off-by: Eduardo Habkost --- qom/object.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --

[Qemu-devel] [PATCH 2/2] qdev: Free property names after registering gpio aliases

2015-04-09 Thread Eduardo Habkost
Now that object_property_add_alias() strdup()s target_name, we can free the property names in qdev_pass_gpios(). Signed-off-by: Eduardo Habkost --- hw/core/qdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 6e6a65d..6dca6cb 100644 --- a/hw/core/qde

[Qemu-devel] [PATCH 0/2] qom: strdup() target_name on object_property_add_alias()

2015-04-09 Thread Eduardo Habkost
This helps us avoid memory leaks when using object_property_add_alias(), as it is not practical for callers to save target_name to free it later. Eduardo Habkost (2): qom: strdup() target property name on object_property_add_alias() qdev: Free property names after registering gpio aliases hw

Re: [Qemu-devel] [PATCH] Fix crash with illegal "-net nic, model=xxx" option

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 20:31, Eric Blake wrote: >> diff --git a/hw/pci/pci.c b/hw/pci/pci.c >> index 6941a82..b3d5100 100644 >> --- a/hw/pci/pci.c >> +++ b/hw/pci/pci.c >> @@ -1660,7 +1660,9 @@ PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus >> *rootbus, >> >> res = pci_nic_init(nd, rootbus, de

Re: [Qemu-devel] 64-bit build of qemu-system-arm with mingw-w64 not functional

2015-04-09 Thread Liviu Ionescu
> On 09 Apr 2015, at 20:58, Peter Maydell wrote: > > On 9 April 2015 at 18:41, Stefan Weil wrote: >> I think -mthreads is essential (needed for thread local storage), >> and -D_POSIX=1 is also needed for 64 bit builds. > > My 64-bit builds worked without either of these things... hmmm... thin

Re: [Qemu-devel] [PATCH] misc: Fix new collection of typos

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 19:32, Stefan Weil wrote: > All of them were reported by codespell. > Most typos are in comments, one is in an error message. > > Signed-off-by: Stefan Weil Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH] qemu-config: Accept empty option values

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 20:50, Eduardo Habkost wrote: > On Thu, Apr 09, 2015 at 02:11:11PM +0200, Paolo Bonzini wrote: >> On 08/04/2015 20:16, Eduardo Habkost wrote: >>> Currently it is impossible to set an option in a config file to an empty >>> string, because the parser matches only lines containing non

Re: [Qemu-devel] [PATCH] translate-all: use g_malloc0 for all page descriptor allocations

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 19:24, Emilio G. Cota wrote: > Since commit > > b7b5233a "bsd-user/mmap.c: Don't try to override g_malloc/g_free" > > the exception we make here for usermode has been unnecessary. > Get rid of it. > > Signed-off-by: Emilio G. Cota > --- > translate-all.c | 18 ++--

Re: [Qemu-devel] [PATCH] qemu-config: Accept empty option values

2015-04-09 Thread Eduardo Habkost
On Thu, Apr 09, 2015 at 02:11:11PM +0200, Paolo Bonzini wrote: > On 08/04/2015 20:16, Eduardo Habkost wrote: > > Currently it is impossible to set an option in a config file to an empty > > string, because the parser matches only lines containing non-empty > > strings between double-quotes. > > >

Re: [Qemu-devel] [PATCH v2 3/4] target-i386: Register QOM properties for feature flags

2015-04-09 Thread Eduardo Habkost
On Wed, Apr 08, 2015 at 04:02:42PM -0300, Eduardo Habkost wrote: [...] > +names = g_strsplit(fi->feat_names[bit], "|", 0); I forgot to implement the property aliases Igor asked for. I will submit v3 of this patch later. > +for (i = 0; names[i]; i++) { > +char *feat_name = names[i]

[Qemu-devel] [PATCH] misc: Fix new collection of typos

2015-04-09 Thread Stefan Weil
All of them were reported by codespell. Most typos are in comments, one is in an error message. Signed-off-by: Stefan Weil --- hw/block/virtio-blk.c |2 +- hw/misc/edu.c |2 +- hw/net/virtio-net.c |2 +- hw/ppc/spapr.c|2 +- qga/qapi-schema.json

Re: [Qemu-devel] [PATCH] Fix crash with illegal "-net nic, model=xxx" option

2015-04-09 Thread Eric Blake
On 04/09/2015 07:32 AM, Thomas Huth wrote: > Current QEMU crashes when specifying an illegal model with the > "-net nic,model=xxx" option, e.g.: > > $ qemu-system-x86_64 -net nic,model=n/a > qemu-system-x86_64: Unsupported NIC model: n/a > > The problem is that pci_nic_init_nofail() does not c

Re: [Qemu-devel] [PATCH][XSA-126] xen: limit guest control of PCI command register

2015-04-09 Thread Peter Maydell
On 31 March 2015 at 15:18, Stefano Stabellini wrote: > From: Jan Beulich > > Otherwise the guest can abuse that control to cause e.g. PCIe > Unsupported Request responses (by disabling memory and/or I/O decoding > and subsequently causing [CPU side] accesses to the respective address > ranges), w

Re: [Qemu-devel] 64-bit build of qemu-system-arm with mingw-w64 not functional

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 18:41, Stefan Weil wrote: > I think -mthreads is essential (needed for thread local storage), > and -D_POSIX=1 is also needed for 64 bit builds. My 64-bit builds worked without either of these things... -- PMM

Re: [Qemu-devel] [PATCH 3/3] arm: semihosting: Wire up A64 HLT 0xf000

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 18:23, Christopher Covington wrote: > On Fri, Mar 27, 2015 at 12:40 PM, Peter Maydell > wrote: >> You need to have the semihosting_enabled check here rather >> than in the do_interrupt code, because otherwise we won't >> behave correctly in the disabled case. > > Do you have su

Re: [Qemu-devel] 64-bit build of qemu-system-arm with mingw-w64 not functional

2015-04-09 Thread Stefan Weil
Am 09.04.2015 um 16:07 schrieb Liviu Ionescu On 09 Apr 2015, at 10:40, Liviu Ionescu wrote: I guess you either tweaked the pkg-config to find them, or you set some environment variables before configure. ... can you share these details too? I want to reproduce "exactly" your environment. Her

[Qemu-devel] [PATCH] translate-all: use g_malloc0 for all page descriptor allocations

2015-04-09 Thread Emilio G. Cota
Since commit b7b5233a "bsd-user/mmap.c: Don't try to override g_malloc/g_free" the exception we make here for usermode has been unnecessary. Get rid of it. Signed-off-by: Emilio G. Cota --- translate-all.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 3/3] arm: semihosting: Wire up A64 HLT 0xf000

2015-04-09 Thread Christopher Covington
Hi Peter, On Fri, Mar 27, 2015 at 12:40 PM, Peter Maydell wrote: >> diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c >> index 0b192a1..3b5b875 100644 >> --- a/target-arm/translate-a64.c >> +++ b/target-arm/translate-a64.c >> @@ -1544,7 +1544,11 @@ static void disas_exc(DisasC

Re: [Qemu-devel] [PATCH for-2.3] configure: disable by default and warn about libxseg GPLv3 license

2015-04-09 Thread Andreas Färber
Am 09.04.2015 um 18:57 schrieb Andreas Färber: > Am 09.04.2015 um 15:52 schrieb Stefan Hajnoczi: >> libxseg has changed license to GPLv3. QEMU includes GPL "v2 only" code >> which is not compatible with GPLv3. This means the resulting binaries >> may not be redistributable! >> >> Disable Archipel

Re: [Qemu-devel] [PATCH for-2.3] configure: disable by default and warn about libxseg GPLv3 license

2015-04-09 Thread Andreas Färber
Am 09.04.2015 um 15:52 schrieb Stefan Hajnoczi: > libxseg has changed license to GPLv3. QEMU includes GPL "v2 only" code > which is not compatible with GPLv3. This means the resulting binaries > may not be redistributable! > > Disable Archipelago (libxseg) by default to prevent accidental licens

Re: [Qemu-devel] [PATCH 1/2] kvm: introduce kvm_arch_msi_data_to_gsi

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 17:20, Eric Auger wrote: > On ARM the MSI data corresponds to the shared peripheral interrupt (SPI) > ID. This latter equals to the SPI index + 32. to retrieve the SPI index, > matching the gsi, an architecture specific function is introduced. > > Signed-off-by: Eric Auger > --- >

Re: [Qemu-devel] [RFC PATCH 0/3] pflash_cfi01: allow reading/writing it only in secure mode

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 18:10, Laszlo Ersek wrote: > In OVMF, the reset vector and the SEC phase code run from (read-only) > flash. SEC decompresses everything else to RAM. Also, SEC does not > access read-write flash (the varstore) at all. > > The above is a specialty of OVMF. In ArmVirtualizationQemu (a

Re: [Qemu-devel] [PATCH v4 10/20] hw/arm/virt-acpi-build: Generate RSDT table

2015-04-09 Thread Laszlo Ersek
On 04/09/15 18:03, Peter Maydell wrote: > On 9 April 2015 at 17:00, Laszlo Ersek wrote: >> On 04/09/15 15:59, Peter Maydell wrote: >>> On 9 April 2015 at 14:51, Igor Mammedov wrote: On Thu, 9 Apr 2015 14:27:58 +0100 Peter Maydell wrote: > On 9 April 2015 at 14:17, Igor Mammedo

[Qemu-devel] glusterfs-api.pc versioning breaks QEMU

2015-04-09 Thread Andreas Färber
Hello, Testing QEMU v2.3.0-rc2, I have run into QEMU's glusterfs support being broken on openSUSE Tumbleweed, resulting in its configure complaining: [ 76s] ERROR: User requested feature GlusterFS backend support [ 76s]configure was not able to find it. [ 76s]Install gluster

Re: [Qemu-devel] [RFC PATCH 0/3] pflash_cfi01: allow reading/writing it only in secure mode

2015-04-09 Thread Laszlo Ersek
On 04/09/15 16:43, Paolo Bonzini wrote: > > > On 09/04/2015 15:58, Edgar E. Iglesias wrote: >> Hi Paulo, >> >> How would this work with XIP off the romd region? >> Without s/ns address spaces, CPUs in NS state will be able to execute >> and access data while in ROMD state won't they? > > Good p

Re: [Qemu-devel] [PATCH v4 10/20] hw/arm/virt-acpi-build: Generate RSDT table

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 17:00, Laszlo Ersek wrote: > On 04/09/15 15:59, Peter Maydell wrote: >> On 9 April 2015 at 14:51, Igor Mammedov wrote: >>> On Thu, 9 Apr 2015 14:27:58 +0100 >>> Peter Maydell wrote: >>> On 9 April 2015 at 14:17, Igor Mammedov wrote: > On Thu, 09 Apr 2015 13:50:52 +01

Re: [Qemu-devel] [PATCH v4 10/20] hw/arm/virt-acpi-build: Generate RSDT table

2015-04-09 Thread Laszlo Ersek
On 04/09/15 15:59, Peter Maydell wrote: > On 9 April 2015 at 14:51, Igor Mammedov wrote: >> On Thu, 9 Apr 2015 14:27:58 +0100 >> Peter Maydell wrote: >> >>> On 9 April 2015 at 14:17, Igor Mammedov wrote: On Thu, 09 Apr 2015 13:50:52 +0100 Alex Bennée wrote: > > Shannon Zh

Re: [Qemu-devel] [PATCH v4 12/20] hw/arm/virt-acpi-build: Add PCIe info and generate MCFG table

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 16:54, Alex Bennée wrote: > > Shannon Zhao writes: > >> From: Shannon Zhao >> +build_mcfg(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info) >> +{ >> +AcpiTableMcfg *mcfg; >> +acpi_pcie_info *info = guest_info->pcie_info; >> +int len = sizeof(*mcfg) + 1

Re: [Qemu-devel] [PATCH v4 12/20] hw/arm/virt-acpi-build: Add PCIe info and generate MCFG table

2015-04-09 Thread Alex Bennée
Shannon Zhao writes: > From: Shannon Zhao > > Add PCIe info struct, prepare for building PCIe table. > And generate MCFG table. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao > --- > hw/arm/virt-acpi-build.c | 21 + > include/hw/arm/virt-acpi-build.

[Qemu-devel] [PATCH 0/2] ARM adaptations for vhost irqfd setup

2015-04-09 Thread Eric Auger
After the introduction of gicv2m, This series adds missing pieces to run VIRTIO-PCI with vhost back-end on ARM. It is proposed to use the kvm_gsi_direct_mapping modality that sets the irqfd gsi to the MSI data value. With that trick there is no need to create a KVM MSI routing entry featuring a di

[Qemu-devel] [PATCH 1/2] kvm: introduce kvm_arch_msi_data_to_gsi

2015-04-09 Thread Eric Auger
On ARM the MSI data corresponds to the shared peripheral interrupt (SPI) ID. This latter equals to the SPI index + 32. to retrieve the SPI index, matching the gsi, an architecture specific function is introduced. Signed-off-by: Eric Auger --- include/sysemu/kvm.h | 2 ++ kvm-all.c| 2

[Qemu-devel] [PATCH 2/2] arm_gicv2m: set kvm_gsi_direct_mapping and kvm_msi_via_irqfd_allowed

2015-04-09 Thread Eric Auger
After introduction of kvm_arch_msi_data_to_gsi, kvm_gsi_direct_mapping now can be set on ARM. Also kvm_msi_via_irqfd_allowed can be set, depending on kernel irqfd support, hence enabling VIRTIO-PCI with vhost back-end. Signed-off-by: Eric Auger --- hw/intc/arm_gicv2m.c | 2 ++ 1 file changed, 2

Re: [Qemu-devel] [Qemu-block] Migration sometimes fails with IDE and Qemu 2.2.1

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 16:54, Peter Lieven wrote: > > #define BM_MIGRATION_COMPAT_STATUS_BITS \ > (IDE_RETRY_DMA | IDE_RETRY_PIO | \ > IDE_RETRY_READ | IDE_RETRY_FLUSH) > > Why is there no IDE_RETRY_WRITE ? Because that's represented by none of read and flush being set. :) > Honestly,

Re: [Qemu-devel] [Qemu-block] Migration sometimes fails with IDE and Qemu 2.2.1

2015-04-09 Thread Peter Lieven
Am 09.04.2015 um 15:43 schrieb Dr. David Alan Gilbert: * Peter Lieven (p...@kamp.de) wrote: Am 07.04.2015 um 21:01 schrieb Dr. David Alan Gilbert: * Peter Lieven (p...@kamp.de) wrote: Am 07.04.2015 um 17:29 schrieb Dr. David Alan Gilbert: * Peter Lieven (p...@kamp.de) wrote: Hi David, Am 07

Re: [Qemu-devel] [PATCH] Fix crash with illegal "-net nic, model=xxx" option

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 14:37, Michael S. Tsirkin wrote: > On Thu, Apr 09, 2015 at 03:32:45PM +0200, Thomas Huth wrote: >> Current QEMU crashes when specifying an illegal model with the >> "-net nic,model=xxx" option, e.g.: >> >> $ qemu-system-x86_64 -net nic,model=n/a >> qemu-system-x86_64: Unsuppor

Re: [Qemu-devel] [PATCH v4 11/20] hw/arm/virt-acpi-build: Generate RSDP table

2015-04-09 Thread Alex Bennée
Shannon Zhao writes: > From: Shannon Zhao > > RSDP points to RSDT which in turn points to other tables. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao Reviewed-by: Alex Bennée > --- > hw/arm/virt-acpi-build.c | 35 ++- > 1 file changed, 34 in

Re: [Qemu-devel] [PATCH v4 10/20] hw/arm/virt-acpi-build: Generate RSDT table

2015-04-09 Thread Igor Mammedov
On Thu, 9 Apr 2015 14:59:09 +0100 Peter Maydell wrote: > On 9 April 2015 at 14:51, Igor Mammedov wrote: > > On Thu, 9 Apr 2015 14:27:58 +0100 > > Peter Maydell wrote: > > > >> On 9 April 2015 at 14:17, Igor Mammedov wrote: > >> > On Thu, 09 Apr 2015 13:50:52 +0100 > >> > Alex Bennée wrote: >

Re: [Qemu-devel] [RFC PATCH 0/3] pflash_cfi01: allow reading/writing it only in secure mode

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 15:58, Edgar E. Iglesias wrote: > Hi Paulo, > > How would this work with XIP off the romd region? > Without s/ns address spaces, CPUs in NS state will be able to execute > and access data while in ROMD state won't they? Good point! In fact, even with S/NS address spaces, the ROM

[Qemu-devel] [PATCH] fw_cfg: add documentation file (docs/specs/fw_cfg.txt)

2015-04-09 Thread Gabriel L. Somlo
This document covers the guest-side hardware interface, as well as the host-side programming API of QEMU's firmware configuration (fw_cfg) device. Signed-off-by: Jordan Justen Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek --- This was the beginning of a series we've been postponing fo

Re: [Qemu-devel] [PATCH v5 15/21] block: Resize bitmaps on bdrv_truncate

2015-04-09 Thread Stefan Hajnoczi
On Wed, Apr 08, 2015 at 06:19:58PM -0400, John Snow wrote: > Signed-off-by: John Snow > --- > block.c| 18 ++ > include/qemu/hbitmap.h | 10 ++ > util/hbitmap.c | 48 > 3 files changed, 76 insertions(

[Qemu-devel] [PATCH RFC] mirror: allow mirroring an intermediate image

2015-04-09 Thread Alberto Garcia
This extends the drive-mirror command by allowing it to operate on intermediate images. The device parameter can now take the node name of the image to be mirrored. After the operation its overlay image will point to the new one. Signed-off-by: Alberto Garcia --- block.c | 2 ++ bl

[Qemu-devel] [PATCH] Fix crash with illegal "-net nic, model=xxx" option

2015-04-09 Thread Thomas Huth
Current QEMU crashes when specifying an illegal model with the "-net nic,model=xxx" option, e.g.: $ qemu-system-x86_64 -net nic,model=n/a qemu-system-x86_64: Unsupported NIC model: n/a Program received signal SIGSEGV, Segmentation fault. The gdb backtrace looks like this: 0x55965fe0

Re: [Qemu-devel] [PATCH 10/14] target-arm: Honour NS bits in page tables

2015-04-09 Thread Edgar E. Iglesias
On Thu, Apr 09, 2015 at 03:14:58PM +0100, Peter Maydell wrote: > On 9 April 2015 at 12:23, Edgar E. Iglesias wrote: > > On Tue, Apr 07, 2015 at 09:09:56PM +0100, Peter Maydell wrote: > >> > >> +if (regime_is_secure(env, mmu_idx)) { > >> +/* The page table entries may downgrade this to

Re: [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support

2015-04-09 Thread Stefan Hajnoczi
On Mon, Mar 30, 2015 at 07:19:42PM +0300, Alberto Garcia wrote: > @@ -1941,9 +1951,11 @@ void qmp_block_set_io_throttle(const char *device, > int64_t bps, int64_t bps_rd, > aio_context_acquire(aio_context); > > if (!bs->io_limits_enabled && throttle_enabled(&cfg)) { > -bdrv_io_

Re: [Qemu-devel] [PATCH 10/14] target-arm: Honour NS bits in page tables

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 12:23, Edgar E. Iglesias wrote: > On Tue, Apr 07, 2015 at 09:09:56PM +0100, Peter Maydell wrote: >> >> +if (regime_is_secure(env, mmu_idx)) { >> +/* The page table entries may downgrade this to non-secure, but >> + * cannot upgrade an non-secure translation r

Re: [Qemu-devel] [PATCH 1/2] CVE-2015-1779: incrementally decode websocket frames

2015-04-09 Thread Daniel P. Berrange
On Wed, Apr 01, 2015 at 02:41:57PM +0100, Peter Maydell wrote: > On 1 April 2015 at 14:36, Gerd Hoffmann wrote: > > Confirmed. Fixes the issues I've seen in testing and looks sensible to > > me. Comment from Daniel would be nice, especially as I know next to > > nothing about websockets, but he

Re: [Qemu-devel] [PULL 22/62] block: Support Archipelago as a QEMU block backend

2015-04-09 Thread Chrysostomos Nanakos
On 2015-04-09 17:05, Stefan Hajnoczi wrote: On Thu, Apr 9, 2015 at 1:48 PM, Chrysostomos Nanakos wrote: On 2015-04-09 06:48, Andreas Färber wrote: Am 08.08.2014 um 19:39 schrieb Kevin Wolf: From: Chrysostomos Nanakos VM Image on Archipelago volume is specified like this: file.driver=a

Re: [Qemu-devel] 64-bit build of qemu-system-arm with mingw-w64 not functional

2015-04-09 Thread Liviu Ionescu
> On 09 Apr 2015, at 10:40, Liviu Ionescu wrote: > I guess you either tweaked the pkg-config to find them, or you set some > environment variables before configure. > ... > can you share these details too? I want to reproduce "exactly" your > environment. the reason I ask for these details is

Re: [Qemu-devel] [PULL 22/62] block: Support Archipelago as a QEMU block backend

2015-04-09 Thread Stefan Hajnoczi
On Thu, Apr 9, 2015 at 1:48 PM, Chrysostomos Nanakos wrote: > On 2015-04-09 06:48, Andreas Färber wrote: >> >> Am 08.08.2014 um 19:39 schrieb Kevin Wolf: >>> >>> From: Chrysostomos Nanakos >>> >>> VM Image on Archipelago volume is specified like this: >>> >>> >>> >>> file.driver=archipelago,file.

Re: [Qemu-devel] [PATCH v4 10/20] hw/arm/virt-acpi-build: Generate RSDT table

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 14:51, Igor Mammedov wrote: > On Thu, 9 Apr 2015 14:27:58 +0100 > Peter Maydell wrote: > >> On 9 April 2015 at 14:17, Igor Mammedov wrote: >> > On Thu, 09 Apr 2015 13:50:52 +0100 >> > Alex Bennée wrote: >> > >> >> >> >> Shannon Zhao writes: >> >> > +for (i = 0; i < table

Re: [Qemu-devel] [RFC PATCH 0/3] pflash_cfi01: allow reading/writing it only in secure mode

2015-04-09 Thread Edgar E. Iglesias
On Thu, Apr 09, 2015 at 03:06:39PM +0200, Paolo Bonzini wrote: > > > On 09/04/2015 14:47, Peter Maydell wrote: > > On 9 April 2015 at 13:20, Paolo Bonzini wrote: > >> This is an example of usage of attributes in a device model. It lets > >> you block flash writes unless the CPU is in secure mod

[Qemu-devel] [PATCH for-2.3] configure: disable by default and warn about libxseg GPLv3 license

2015-04-09 Thread Stefan Hajnoczi
libxseg has changed license to GPLv3. QEMU includes GPL "v2 only" code which is not compatible with GPLv3. This means the resulting binaries may not be redistributable! Disable Archipelago (libxseg) by default to prevent accidental license violations. Also warn if linking against libxseg is ena

Re: [Qemu-devel] [PATCH v4 10/20] hw/arm/virt-acpi-build: Generate RSDT table

2015-04-09 Thread Igor Mammedov
On Thu, 9 Apr 2015 14:27:58 +0100 Peter Maydell wrote: > On 9 April 2015 at 14:17, Igor Mammedov wrote: > > On Thu, 09 Apr 2015 13:50:52 +0100 > > Alex Bennée wrote: > > > >> > >> Shannon Zhao writes: > >> > +for (i = 0; i < table_offsets->len; ++i) { > >> > +/* rsdt->table_offset_

Re: [Qemu-devel] [Qemu-block] Migration sometimes fails with IDE and Qemu 2.2.1

2015-04-09 Thread Dr. David Alan Gilbert
* Peter Lieven (p...@kamp.de) wrote: > Am 07.04.2015 um 21:01 schrieb Dr. David Alan Gilbert: > >* Peter Lieven (p...@kamp.de) wrote: > >>Am 07.04.2015 um 17:29 schrieb Dr. David Alan Gilbert: > >>>* Peter Lieven (p...@kamp.de) wrote: > Hi David, > > Am 07.04.2015 um 10:43 schrieb Dr.

Re: [Qemu-devel] [PATCH] Fix crash with illegal "-net nic, model=xxx" option

2015-04-09 Thread Michael S. Tsirkin
On Thu, Apr 09, 2015 at 03:32:45PM +0200, Thomas Huth wrote: > Current QEMU crashes when specifying an illegal model with the > "-net nic,model=xxx" option, e.g.: > > $ qemu-system-x86_64 -net nic,model=n/a > qemu-system-x86_64: Unsupported NIC model: n/a > > Program received signal SIGSEGV, S

Re: [Qemu-devel] [PATCH v4 14/20] hw/acpi/aml-build: Add aml_or() term

2015-04-09 Thread Igor Mammedov
On Fri, 3 Apr 2015 18:03:46 +0800 Shannon Zhao wrote: > From: Shannon Zhao > > Add aml_or() term and make aml_and can take three args. > Expose build_append_int_noprefix as it wiil be used by > creating a buffer. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao > --- > hw/acpi/

Re: [Qemu-devel] [Qemu-block] Migration sometimes fails with IDE and Qemu 2.2.1

2015-04-09 Thread Peter Lieven
Am 09.04.2015 um 14:49 schrieb Peter Lieven: Am 07.04.2015 um 21:01 schrieb Dr. David Alan Gilbert: * Peter Lieven (p...@kamp.de) wrote: Am 07.04.2015 um 17:29 schrieb Dr. David Alan Gilbert: * Peter Lieven (p...@kamp.de) wrote: Hi David, Am 07.04.2015 um 10:43 schrieb Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH v4 10/20] hw/arm/virt-acpi-build: Generate RSDT table

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 14:17, Igor Mammedov wrote: > On Thu, 09 Apr 2015 13:50:52 +0100 > Alex Bennée wrote: > >> >> Shannon Zhao writes: >> > +for (i = 0; i < table_offsets->len; ++i) { >> > +/* rsdt->table_offset_entry to be filled by Guest linker */ >> > +bios_linker_loader_ad

Re: [Qemu-devel] [PATCH v4 13/20] hw/acpi/aml-build: Add ToUUID macro

2015-04-09 Thread Igor Mammedov
On Fri, 3 Apr 2015 18:03:45 +0800 Shannon Zhao wrote: > From: Shannon Zhao > > Add ToUUID macro, this is useful for generating PCIe ACPI table. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao > --- > hw/acpi/aml-build.c | 23 +++ > include/hw/acpi/a

Re: [Qemu-devel] [PATCH v4 10/20] hw/arm/virt-acpi-build: Generate RSDT table

2015-04-09 Thread Igor Mammedov
On Thu, 09 Apr 2015 13:50:52 +0100 Alex Bennée wrote: > > Shannon Zhao writes: > > > From: Shannon Zhao > > > > RSDT points to other tables FADT, MADT, GTDT. > > > > Signed-off-by: Shannon Zhao > > Signed-off-by: Shannon Zhao > > --- > > hw/arm/virt-acpi-build.c | 27 ++

Re: [Qemu-devel] [RFC PATCH 0/3] pflash_cfi01: allow reading/writing it only in secure mode

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 14:06, Paolo Bonzini wrote: > On 09/04/2015 14:47, Peter Maydell wrote: >> Are real flash devices ever wired up like this? > > On x86 machines it is almost exactly like this. I'm implementing x86 > system management mode, and I'm reusing MEMTXATTRS_SECURE for it. Cool -- usefu

Re: [Qemu-devel] [RFC PATCH 0/3] pflash_cfi01: allow reading/writing it only in secure mode

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 14:47, Peter Maydell wrote: > On 9 April 2015 at 13:20, Paolo Bonzini wrote: >> This is an example of usage of attributes in a device model. It lets >> you block flash writes unless the CPU is in secure mode. Enabling it >> currently requires a -readconfig file: >> >> [gl

Re: [Qemu-devel] [PATCH v4 06/20] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices

2015-04-09 Thread Igor Mammedov
On Thu, 09 Apr 2015 10:51:33 +0100 Alex Bennée wrote: > > Shannon Zhao writes: > > > From: Shannon Zhao > > > > DSDT consists of the usual common table header plus a definition > > block in AML encoding which describes all devices in the platform. > > > > After initializing DSDT with header i

Re: [Qemu-devel] [Qemu-block] Migration sometimes fails with IDE and Qemu 2.2.1

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 14:46, Peter Lieven wrote: >>> >>> >> >> BMDMA is the PCI HBA for IDE, I think it's the default for most >> machines that aren't using the AHCI HBA. >> >> To get ISA, try launching with the machine "isapc" which will force >> it, or add the device manually, it's named "isa-ide". >>

Re: [Qemu-devel] [PATCH v4 10/20] hw/arm/virt-acpi-build: Generate RSDT table

2015-04-09 Thread Alex Bennée
Shannon Zhao writes: > From: Shannon Zhao > > RSDT points to other tables FADT, MADT, GTDT. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao > --- > hw/arm/virt-acpi-build.c | 27 +++ > 1 file changed, 27 insertions(+) > > diff --git a/hw/arm/virt-acpi-bu

Re: [Qemu-devel] [Qemu-block] Migration sometimes fails with IDE and Qemu 2.2.1

2015-04-09 Thread Peter Lieven
Am 07.04.2015 um 21:01 schrieb Dr. David Alan Gilbert: * Peter Lieven (p...@kamp.de) wrote: Am 07.04.2015 um 17:29 schrieb Dr. David Alan Gilbert: * Peter Lieven (p...@kamp.de) wrote: Hi David, Am 07.04.2015 um 10:43 schrieb Dr. David Alan Gilbert: Any particular workload or reproducer? Wor

Re: [Qemu-devel] [PULL 22/62] block: Support Archipelago as a QEMU block backend

2015-04-09 Thread Chrysostomos Nanakos
On 2015-04-09 06:48, Andreas Färber wrote: Am 08.08.2014 um 19:39 schrieb Kevin Wolf: From: Chrysostomos Nanakos VM Image on Archipelago volume is specified like this: file.driver=archipelago,file.volume=[,file.mport=[, file.vport=][,file.segment=]] 'archipelago' is the protocol. 'mport' i

Re: [Qemu-devel] [RFC PATCH 0/3] pflash_cfi01: allow reading/writing it only in secure mode

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 13:20, Paolo Bonzini wrote: > This is an example of usage of attributes in a device model. It lets > you block flash writes unless the CPU is in secure mode. Enabling it > currently requires a -readconfig file: > > [global] > driver = "cfi.pflash01" > p

Re: [Qemu-devel] [Qemu-block] Migration sometimes fails with IDE and Qemu 2.2.1

2015-04-09 Thread Peter Lieven
Am 07.04.2015 um 21:13 schrieb John Snow: On 04/07/2015 03:02 PM, Peter Lieven wrote: Am 07.04.2015 um 20:56 schrieb John Snow: On 04/07/2015 02:44 PM, Peter Lieven wrote: Am 07.04.2015 um 17:29 schrieb Dr. David Alan Gilbert: * Peter Lieven (p...@kamp.de) wrote: Hi David, Am 07.04.2015

Re: [Qemu-devel] [PATCH 07/14] exec.c: Add new address_space_ld*/st* functions

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 14:38, Peter Maydell wrote: > They need to be in memory.h because cpu-all.h doesn't have > all the typedefs. Also, memory.h seems to me clearly the > best place, since it's where we declare the MemoryRegion > and AddressSpace related functions. > > It's certainly true that using ta

Re: [Qemu-devel] [PATCH v4 04/20] hw/acpi/aml-build: Add aml_memory32_fixed() term

2015-04-09 Thread Igor Mammedov
On Fri, 3 Apr 2015 18:03:36 +0800 Shannon Zhao wrote: > From: Shannon Zhao > > Add aml_memory32_fixed() for describing device mmio region in resource > template. > These can be used to generating DSDT table for ACPI on ARM. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao > ---

Re: [Qemu-devel] [PATCH v4 09/20] hw/arm/virt-acpi-build: Generate GTDT table

2015-04-09 Thread Alex Bennée
Shannon Zhao writes: > From: Shannon Zhao > > ACPI v5.1 defines GTDT for ARM devices as a place to describe timer > related information in the system. The Arch Timer interrupts must > be provided for GTDT. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao > --- > hw/arm/virt-acpi

Re: [Qemu-devel] [Qemu-block] [RFC] Intermediate block mirroring

2015-04-09 Thread Alberto Garcia
On Thu, Apr 09, 2015 at 11:39:28AM +0100, Stefan Hajnoczi wrote: > > The goal would be to convert this: > > > >[A] -> [B] -> [C] -> [D] > > > > into this: > > > >[A] -> [B] -> [X] -> [D] > > > > where [D] is the active image and [X] would be a copy of [C]. The > > latter would be unlin

Re: [Qemu-devel] [PATCH 07/14] exec.c: Add new address_space_ld*/st* functions

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 13:00, Paolo Bonzini wrote: > > > On 09/04/2015 13:49, Peter Maydell wrote: >>> > I think we do not want to expose these at all (or at least, all users >>> > should really be CPUs and hence use *_phys functions). >>> > >>> > S390 is always big-endian, and watch_mem_read/write ca

Re: [Qemu-devel] [PATCH v4 08/20] hw/arm/virt-acpi-build: Generate MADT table

2015-04-09 Thread Alex Bennée
Shannon Zhao writes: > From: Shannon Zhao > > MADT describes GIC enabled ARM platforms. The GICC and GICD > subtables are used to define the GIC regions. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao Reviewed-by: Alex Bennée > --- > hw/arm/virt-acpi-build.c | 61 >

Re: [Qemu-devel] [PATCH 3/7] throttle: Add throttle group infrastructure tests

2015-04-09 Thread Stefan Hajnoczi
On Mon, Mar 30, 2015 at 07:19:41PM +0300, Alberto Garcia wrote: > Signed-off-by: Alberto Garcia > --- > tests/test-throttle.c | 79 > --- > 1 file changed, 69 insertions(+), 10 deletions(-) Reviewed-by: Stefan Hajnoczi pgp_pHMQmN0QF.pgp Descrip

Re: [Qemu-devel] [PATCH 2/7] throttle: Add throttle group infrastructure

2015-04-09 Thread Stefan Hajnoczi
On Mon, Mar 30, 2015 at 07:19:40PM +0300, Alberto Garcia wrote: > Signed-off-by: Alberto Garcia > --- > block/Makefile.objs | 1 + > block/throttle-groups.c | 261 > > include/block/block_int.h | 1 + > include/block/throttle

Re: [Qemu-devel] seccomp breakage on arm

2015-04-09 Thread Andreas Färber
Am 09.04.2015 um 11:10 schrieb Paul Moore: > On Thursday, April 09, 2015 10:21:52 AM Eduardo Otubo wrote: >> On Thu, Apr 09, 2015 at 05=01=31AM +0200, Andreas Färber wrote: >>> Hello, >>> >>> I am seeing the following build failure on openSUSE Tumbleweed armv7l >>> with --enable-seccomp in v2.3.0-r

[Qemu-devel] [PATCH 2/3] pflash_cfi01: change to new-style MMIO accessors

2015-04-09 Thread Paolo Bonzini
This is a required step to implement read_with_attrs and write_with_attrs. Signed-off-by: Paolo Bonzini --- hw/block/pflash_cfi01.c | 96 ++--- 1 file changed, 10 insertions(+), 86 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cf

[Qemu-devel] [PATCH 3/3] pflash_cfi01: add secure property

2015-04-09 Thread Paolo Bonzini
When this property is set, MMIO accesses are only allowed with the MEMTXATTRS_SECURE attribute. This is used for secure access to UEFI variables stored in flash. Signed-off-by: Paolo Bonzini --- hw/block/pflash_cfi01.c | 26 -- 1 file changed, 20 insertions(+), 6 deletio

[Qemu-devel] [PATCH 1/3] pflash_cfi01: change big-endian property to BIT type

2015-04-09 Thread Paolo Bonzini
Make this consistent with the secure property, added in the next patches. Signed-off-by: Paolo Bonzini --- hw/block/pflash_cfi01.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index d282695..7507a15 100644 --- a

[Qemu-devel] [RFC PATCH 0/3] pflash_cfi01: allow reading/writing it only in secure mode

2015-04-09 Thread Paolo Bonzini
This is an example of usage of attributes in a device model. It lets you block flash writes unless the CPU is in secure mode. Enabling it currently requires a -readconfig file: [global] driver = "cfi.pflash01" property = "secure" value = "on" because the driver i

Re: [Qemu-devel] [PATCH] qemu-config: Accept empty option values

2015-04-09 Thread Paolo Bonzini
On 08/04/2015 20:16, Eduardo Habkost wrote: > Currently it is impossible to set an option in a config file to an empty > string, because the parser matches only lines containing non-empty > strings between double-quotes. > > As sscanf() "[" conversion specifier only matches non-empty strings, ad

Re: [Qemu-devel] [PULL 0/4] Block patches

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 10:55, Stefan Hajnoczi wrote: > The following changes since commit 5a24f20a7208a58fb80d78ca0521bba6f4d7b145: > > Merge remote-tracking branch > 'remotes/mjt/tags/pull-trivial-patches-2015-04-04' into staging (2015-04-07 > 14:33:46 +0100) > > are available in the git reposito

Re: [Qemu-devel] [PATCH 07/14] exec.c: Add new address_space_ld*/st* functions

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 13:49, Peter Maydell wrote: >> > I think we do not want to expose these at all (or at least, all users >> > should really be CPUs and hence use *_phys functions). >> > >> > S390 is always big-endian, and watch_mem_read/write can use the same >> > buffer trick as subpages (and in fac

Re: [Qemu-devel] [PATCH 07/14] exec.c: Add new address_space_ld*/st* functions

2015-04-09 Thread Peter Maydell
On 8 April 2015 at 12:03, Paolo Bonzini wrote: > > > On 07/04/2015 22:09, Peter Maydell wrote: >> +#ifdef NEED_CPU_H >> +uint32_t address_space_lduw(AddressSpace *as, hwaddr addr, >> +MemTxAttrs attrs, MemTxResult *result); >> +uint32_t address_space_ldl(AddressSpace *a

Re: [Qemu-devel] [PATCH 06/14] exec.c: Make address_space_rw take transaction attributes

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 12:40, Paolo Bonzini wrote: > > > On 09/04/2015 12:43, Peter Maydell wrote: >> > At this point, some memory barriers, basically. >> >> So what distinguishes a device that needs the memory barriers >> and does its accesses via dma_* from a device that doesn't and >> uses address_

  1   2   >