Re: [Qemu-devel] [PATCH] machine: set default kernel_cmdline in machine_initfn()

2014-05-30 Thread Markus Armbruster
Igor Mammedov writes: > On Thu, 29 May 2014 14:25:31 +0200 > Andreas Färber wrote: > >> Am 29.05.2014 14:21, schrieb Marcel Apfelbaum: >> > On Thu, 2014-05-29 at 12:47 +0200, Andreas Färber wrote: >> >> Am 29.05.2014 11:47, schrieb Igor Mammedov: >> >>> ... fixes freeing constant from vl.c by ma

[Qemu-devel] [PATCH v1 00/16] target-arm: Parts of the AArch64 EL2/3 exception model

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Hi, This is a second round of AArch64 EL2/3 patches working on the exception model. Among other things adding HVC/SMC, interrupt routing to EL2/3 and Virtual IRQs/FIQs. The VIRQ/VFIQ support only adds the external signal delivery method. Patch 3 is a bug fix. Patch 14

[Qemu-devel] [PATCH v1 01/16] target-arm: A64: Break out aarch64_save/restore_sp

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Break out code to save/restore AArch64 SP into functions. Signed-off-by: Edgar E. Iglesias --- target-arm/internals.h | 29 - target-arm/kvm64.c | 13 +++-- target-arm/op_helper.c | 6 +- 3 files changed, 24 insertions(+),

[Qemu-devel] [PATCH v1 02/16] target-arm: A64: Respect SPSEL in ERET SP restore

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 2e2429a..581dc09 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -4

[Qemu-devel] [PATCH v1 03/16] target-arm: A64: Respect SPSEL when taking exceptions

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/helper-a64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c index cccda74..bc153cb 100644 --- a/target-arm/helper-a64.c +++ b/target-arm/helper-a6

[Qemu-devel] [PATCH v1 05/16] target-arm: Add ESR_EL2 and 3

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h| 2 +- target-arm/helper.c | 8 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 172a631..f8ca1da 100644 --- a/target-arm/cpu.h +++ b/target-arm/cp

[Qemu-devel] [PATCH v1 04/16] target-arm: Make far_el1 an array

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" No functional change. Prepares for future additions of the EL2 and 3 versions of this reg. Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.c| 2 +- target-arm/cpu.h| 2 +- target-arm/helper-a64.c | 4 ++-- target-arm/helper.c | 12 ++

[Qemu-devel] [PATCH v1 07/16] target-arm: Add HCR_EL2

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h| 35 +++ target-arm/helper.c | 27 +++ 2 files changed, 62 insertions(+) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index ef6a95d..b446478 100644 --

[Qemu-devel] [PATCH v1 06/16] target-arm: Add FAR_EL2 and 3

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h| 2 +- target-arm/helper.c | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index f8ca1da..ef6a95d 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.

[Qemu-devel] [PATCH v1 08/16] target-arm: Add SCR_EL3

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h| 15 +++ target-arm/helper.c | 20 2 files changed, 35 insertions(+) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index b446478..28521d4 100644 --- a/target-arm/cpu.h +++ b/

[Qemu-devel] [PATCH v1 09/16] target-arm: A64: Refactor aarch64_cpu_do_interrupt

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Introduce new_el and new_mode in preparation for future patches that add support for taking exceptions to and from EL2 and 3. No functional change. Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h| 11 +++ target-arm/helper-a64.c | 24

[Qemu-devel] [PATCH v1 10/16] target-arm: Break out exception masking to a separate func

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- cpu-exec.c | 5 ++--- target-arm/cpu.h | 16 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 38e5f02..a579ffc 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -478,7 +

[Qemu-devel] [PATCH v1 11/16] target-arm: Don't take interrupts targeting lower ELs

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 9eddcc1..66c58bd 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -1133,6 +1133,13 @@ bool write_cpustate_t

[Qemu-devel] [PATCH v1 12/16] target-arm: A64: Correct updates to FAR and ESR on exceptions

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Not all exception types update both FAR and ESR. Signed-off-by: Edgar E. Iglesias --- target-arm/helper-a64.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c index 7d94a74..c91005f 100644 ---

[Qemu-devel] [PATCH v1 13/16] target-arm: A64: Emulate the HVC insn

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h | 7 ++- target-arm/helper-a64.c| 1 + target-arm/helper.c| 39 +++ target-arm/helper.h| 1 + target-arm/internals.h | 6 ++ target-a

[Qemu-devel] [PATCH v1 14/16] target-arm: A64: Emulate the SMC insn

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h | 1 + target-arm/helper-a64.c| 1 + target-arm/helper.c| 6 ++ target-arm/helper.h| 1 + target-arm/internals.h | 6 ++ target-arm/op_helper.c | 11 +++ ta

[Qemu-devel] [PATCH v1 15/16] target-arm: Add IRQ and FIQ routing to EL2 and 3

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h| 10 ++ target-arm/helper.c | 16 2 files changed, 26 insertions(+) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index b3631f2..d15e8d2 100644 --- a/target-arm/cpu.h +++ b/target-ar

[Qemu-devel] [PATCH v1 16/16] target-arm: Add support for VIRQ and VFIQ

2014-05-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- cpu-exec.c | 12 target-arm/cpu.c| 20 ++-- target-arm/cpu.h| 24 ++-- target-arm/helper-a64.c | 2 ++ target-arm/helper.c | 3 +++ target-arm/inter

Re: [Qemu-devel] [PATCH v2 RESEND] vl.c: Unify MAX_CPUMASK_BITS and machine->max_cpus checks

2014-05-30 Thread Igor Mammedov
On Wed, 14 May 2014 16:18:42 -0300 Eduardo Habkost wrote: > If a given machine have max_cpus set, not just smp_cpus needs to be > limited, but the total number of CPUs (considering CPU hotplug) for the > machine. > > We also had yet another max_cpus limit check at smp_parse(), ensuring > that ma

Re: [Qemu-devel] [PATCH v2 8/8] spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB

2014-05-30 Thread Alexander Graf
On 30.05.14 07:58, Alexey Kardashevskiy wrote: On 05/28/2014 09:35 PM, Alexander Graf wrote: On 28.05.14 03:18, Alexey Kardashevskiy wrote: On 05/28/2014 10:41 AM, Alexander Graf wrote: On 28.05.14 02:34, Alexey Kardashevskiy wrote: On 05/28/2014 09:55 AM, Alexander Graf wrote: ... How do

Re: [Qemu-devel] [v4 PATCH] target-mips: implement UserLocal Register

2014-05-30 Thread Aurelien Jarno
On Thu, May 29, 2014 at 07:36:53PM +0200, Petar Jovanovic wrote: > From: Petar Jovanovic > > From MIPS documentation (Volume III): > > UserLocal Register (CP0 Register 4, Select 2) > Compliance Level: Recommended. > > The UserLocal register is a read-write register that is not interpreted by >

Re: [Qemu-devel] [PATCH v3 11/34] memory: add memory_region_is_mapped() API

2014-05-30 Thread Igor Mammedov
On Thu, 29 May 2014 17:28:34 +0200 Paolo Bonzini wrote: > Il 29/05/2014 16:22, Peter Crosthwaite ha scritto: > >> > > >> > +bool memory_region_is_mapped(MemoryRegion *mr) > >> > +{ > > Is it not enough to just return mr->parent? Memory mapping assertion > > will happen if you try and map the same

Re: [Qemu-devel] [PATCH v3 05/34] add memdev backend infrastructure

2014-05-30 Thread Igor Mammedov
On Fri, 30 May 2014 00:05:51 +1000 Peter Crosthwaite wrote: > On Tue, May 27, 2014 at 11:01 PM, Igor Mammedov wrote: > > Provides framework for splitting host RAM allocation/ > > policies into a separate backend that could be used > > by devices. > > > > Initially only legacy RAM backend is prov

Re: [Qemu-devel] [PATCH v3 05/34] add memdev backend infrastructure

2014-05-30 Thread Igor Mammedov
On Thu, 29 May 2014 10:41:32 -0600 Eric Blake wrote: > On 05/27/2014 07:01 AM, Igor Mammedov wrote: > > Provides framework for splitting host RAM allocation/ > > policies into a separate backend that could be used > > by devices. > > > > Initially only legacy RAM backend is provided, which > > u

Re: [Qemu-devel] [PATCH v3 06/34] vl.c: extend -m option to support options for memory hotplug

2014-05-30 Thread Igor Mammedov
On Fri, 30 May 2014 00:06:23 +1000 Peter Crosthwaite wrote: > On Tue, May 27, 2014 at 11:01 PM, Igor Mammedov wrote: > > Add following parameters: > > "slots" - total number of hotplug memory slots > > "maxmem" - maximum possible memory > > > > "slots" and "maxmem" should go in pair and "max

Re: [Qemu-devel] [Qemu-ppc] [V4 PATCH (resend) 0/6] Adding New Target ppc64le-linux-user

2014-05-30 Thread Alexander Graf
On 29.05.14 16:12, Tom Musta wrote: This is a follow up to the patch series initiated by Doug Kwan http://lists.nongnu.org/archive/html/qemu-devel/2014-05/msg01936.html The resubmission of V4 cleans up some attribution issues (corrects Doug's email address in the Signed-off-by and also cites Do

Re: [Qemu-devel] [PATCH] hw/pci-host/ppce500: Fix typo in vmstate definition

2014-05-30 Thread Alexander Graf
On 29.05.14 13:05, Peter Maydell wrote: Fix a typo in the ppce500_pci vmstate definition which meant that we were migrating the struct pci_inbound using the vmstate for pci_outbound. Fortunately the two structures have exactly the same format at the moment (four uint32_ts) so this was harmless,

Re: [Qemu-devel] [PATCH v3 05/34] add memdev backend infrastructure

2014-05-30 Thread Markus Armbruster
Igor Mammedov writes: > On Thu, 29 May 2014 10:41:32 -0600 > Eric Blake wrote: > >> On 05/27/2014 07:01 AM, Igor Mammedov wrote: [...] >> > +goto out; >> > +} >> > +if (!value) { >> > +error_setg(&local_err, "Property '%s.%s' doesn't take value '%" >> > +

Re: [Qemu-devel] [PATCH 2/4] s390x: remove duplicate definitions of DIAG 501

2014-05-30 Thread Alexander Graf
On 12.05.14 14:15, Jens Freimann wrote: From: David Hildenbrand When restoring the previously saved instruction in kvm_arch_remove_sw_breakpoint(), we only restored one byte. Let's use the sizeof() operator to make sure we restore the entire instruction. While we are at it, let's remove the d

Re: [Qemu-devel] [PATCH v2 2/8] linux-user: arm: set CPSR.E correctly for BE8 mode

2014-05-30 Thread Peter Maydell
On 30 May 2014 07:46, Paolo Bonzini wrote: > Il 29/05/2014 22:38, Peter Maydell ha scritto: > >>> > +#ifdef TARGET_WORDS_BIGENDIAN >>> > +cpsr |= CPSR_E; >> >> This is wrong for BE32, where CPSR_E doesn't exist and both code >> and data accesses are big-endian. >> > > Is it okay for simplicity

Re: [Qemu-devel] [PATCH 4/4] s390x/kvm: hw debugging support via guest PER facility

2014-05-30 Thread Alexander Graf
On 12.05.14 14:15, Jens Freimann wrote: From: David Hildenbrand This patch makes use of the hw debugging support in kvm (provided by the guest's PER facility) on s390. It enables the following features, available using the gdbserver: - single-stepping - hw breakpoints - hw watchpoints Signed-

Re: [Qemu-devel] [PATCH] hw/pci-host/ppce500: Fix typo in vmstate definition

2014-05-30 Thread Peter Maydell
On 30 May 2014 09:19, Alexander Graf wrote: > Ouch. I'm fairly sure we don't have migration users on e500, > so we're safe. Thanks a lot for catching this! Thank clang 3.4, which noticed that the vmstate_pci_inbound variable was never used... -- PMM

Re: [Qemu-devel] [PATCH 2/4] s390x: remove duplicate definitions of DIAG 501

2014-05-30 Thread Christian Borntraeger
On 30/05/14 10:21, Alexander Graf wrote: > > On 12.05.14 14:15, Jens Freimann wrote: >> From: David Hildenbrand >> >> When restoring the previously saved instruction in >> kvm_arch_remove_sw_breakpoint(), we only restored one byte. Let's use >> the sizeof() operator to make sure we restore the en

Re: [Qemu-devel] [PATCH v3 05/34] add memdev backend infrastructure

2014-05-30 Thread Igor Mammedov
On Fri, 30 May 2014 10:21:04 +0200 Markus Armbruster wrote: > Igor Mammedov writes: > > > On Thu, 29 May 2014 10:41:32 -0600 > > Eric Blake wrote: > > > >> On 05/27/2014 07:01 AM, Igor Mammedov wrote: > [...] > >> > +goto out; > >> > +} > >> > +if (!value) { > >> > +err

Re: [Qemu-devel] [PATCH v2 6/7] virtio: fix virtio-blk child refcount in transports

2014-05-30 Thread Stefan Hajnoczi
On Thu, May 29, 2014 at 07:11:27PM +1000, Peter Crosthwaite wrote: > On Fri, May 23, 2014 at 1:40 AM, Stefan Hajnoczi wrote: > > object_initialize() leaves the object with a refcount of 1. > > object_property_add_child() adds its own reference which is dropped > > again when the property is delete

Re: [Qemu-devel] [PATCH 4/4] s390x/kvm: hw debugging support via guest PER facility

2014-05-30 Thread Christian Borntraeger
On 30/05/14 10:32, Alexander Graf wrote: >> +case KVM_HW_BP: >> +if (find_hw_breakpoint(arch_info->addr, -1, arch_info->type)) { >> +ret = EXCP_DEBUG; >> +} >> +break; >> +case KVM_SINGLESTEP: >> +if (cs->singlestep_enabled) { >> +ret

[Qemu-devel] [v4][PATCH 0/5] xen: add Intel IGD passthrough support

2014-05-30 Thread Tiejun Chen
v4: * Fix some typos in the patch head description. * Improve some comments. * Given that xen_pt_register_vga_regions()/xen_pt_unregister_vga_regions() are called unconditionally, so we just return 0 there. * Remove one spurious change. * Remove some unnecessary "return" in void foo(). * Given t

[Qemu-devel] [v4][PATCH 1/5] xen, gfx passthrough: basic graphics passthrough support

2014-05-30 Thread Tiejun Chen
basic gfx passthrough support: - add a vga type for gfx passthrough - retrieve VGA bios from sysfs, then load it to guest at 0xC - register/unregister legacy VGA I/O ports and MMIOs for passthrough GFX The original patch is from Weidong Han Signed-off-by: Yang Zhang Signed-off-by: Tiejun Ch

[Qemu-devel] [v4][PATCH 3/5] xen, gfx passthrough: support Intel IGD passthrough with VT-D

2014-05-30 Thread Tiejun Chen
Some registers of Intel IGD are mapped in host bridge, so it needs to passthrough these registers of physical host bridge to guest because emulated host bridge in guest doesn't have these mappings. The original patch is from Weidong Han < weidong.han @ intel.com > Signed-off-by: Yang Zhang Signe

[Qemu-devel] [v4][PATCH 2/5] xen, gfx passthrough: create intel isa bridge

2014-05-30 Thread Tiejun Chen
ISA bridge is needed since Intel gfx drive will probe it instead of Dev31:Fun0 to make graphics device passthrough work easy for VMM, that only need to expose ISA bridge to let driver know the real hardware underneath. The original patch is from Allen Kay [allen.m@intel.com] Signed-off-by: Ya

Re: [Qemu-devel] [PATCH v2 4/7] virtio-blk: use aliases instead of duplicate qdev properties

2014-05-30 Thread Stefan Hajnoczi
On Thu, May 29, 2014 at 07:03:42PM +1000, Peter Crosthwaite wrote: > On Fri, May 23, 2014 at 1:40 AM, Stefan Hajnoczi wrote: > > virtio-blk-pci, virtio-blk-s390, and virtio-blk-ccw all duplicate the > > qdev properties of their VirtIOBlock child. This approach does not work > > well with string o

[Qemu-devel] [v4][PATCH 4/5] xen, gfx passthrough: create host bridge to passthrough

2014-05-30 Thread Tiejun Chen
Implement that pci host bridge to specific to passthrough. Actually this just inherit the standard one. Signed-off-by: Tiejun Chen --- v4: * Fix one typo in the patch head description. * Use (xen_enabled() && xen_has_gfx_passthru) to make sure we only work in this scenario. v3: * Just fix th

Re: [Qemu-devel] [PATCH 4/4] s390x/kvm: hw debugging support via guest PER facility

2014-05-30 Thread Alexander Graf
On 30.05.14 10:57, Christian Borntraeger wrote: On 30/05/14 10:32, Alexander Graf wrote: +case KVM_HW_BP: +if (find_hw_breakpoint(arch_info->addr, -1, arch_info->type)) { +ret = EXCP_DEBUG; +} +break; +case KVM_SINGLESTEP: +if (cs->singlestep

Re: [Qemu-devel] [PATCH v2 8/8] spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB

2014-05-30 Thread Alexey Kardashevskiy
On 05/30/2014 06:00 PM, Alexander Graf wrote: > > On 30.05.14 07:58, Alexey Kardashevskiy wrote: >> On 05/28/2014 09:35 PM, Alexander Graf wrote: >>> On 28.05.14 03:18, Alexey Kardashevskiy wrote: On 05/28/2014 10:41 AM, Alexander Graf wrote: > On 28.05.14 02:34, Alexey Kardashevskiy wrot

Re: [Qemu-devel] [PATCH] block/iscsi: handle BUSY condition

2014-05-30 Thread Paolo Bonzini
Il 30/05/2014 11:04, Peter Lieven ha scritto: Am 30.05.2014 07:50, schrieb Paolo Bonzini: Il 29/05/2014 22:25, Peter Lieven ha scritto: Am 29.05.2014 21:17, schrieb Paolo Bonzini: Il 29/05/2014 20:41, Peter Lieven ha scritto: static inline unsigned geo_rand_range(double m, double n) { ret

Re: [Qemu-devel] [PATCH] block/iscsi: handle BUSY condition

2014-05-30 Thread Peter Lieven
Am 30.05.2014 07:50, schrieb Paolo Bonzini: > Il 29/05/2014 22:25, Peter Lieven ha scritto: >> Am 29.05.2014 21:17, schrieb Paolo Bonzini: >>> Il 29/05/2014 20:41, Peter Lieven ha scritto: static inline unsigned geo_rand_range(double m, double n) { return exp((log(m) + (double)rand()

Re: [Qemu-devel] [PATCH v3 10/34] dimm: implement dimm device abstraction

2014-05-30 Thread Igor Mammedov
On Fri, 30 May 2014 00:21:27 +1000 Peter Crosthwaite wrote: > On Tue, May 27, 2014 at 11:01 PM, Igor Mammedov wrote: > > From: Vasilis Liaskovitis > > > > Each hotplug-able memory slot is a DimmDevice. > > A hot-add operation for a DIMM: > > - creates a new DimmDevice and makes hotplug controll

Re: [Qemu-devel] [PATCH 4/4] s390x/kvm: hw debugging support via guest PER facility

2014-05-30 Thread Christian Borntraeger
On 30/05/14 11:01, Alexander Graf wrote: > > On 30.05.14 10:57, Christian Borntraeger wrote: >> On 30/05/14 10:32, Alexander Graf wrote: >> +case KVM_HW_BP: +if (find_hw_breakpoint(arch_info->addr, -1, arch_info->type)) { +ret = EXCP_DEBUG; +} >>

Re: [Qemu-devel] [PATCH 0/1] Support Archipelago as a QEMU block backend

2014-05-30 Thread Kevin Wolf
Am 29.05.2014 um 13:14 hat Chrysostomos Nanakos geschrieben: > Hello team, > > this is a patch implementing support for a new storage layer, > Archipelago [1][2]. > > We've been using Archipelago in our IaaS public cloud production > environment for over a year now, along with Google Ganeti [3] >

[Qemu-devel] [v4][PATCH 5/5] xen, gfx passthrough: add opregion mapping

2014-05-30 Thread Tiejun Chen
The OpRegion shouldn't be mapped 1:1 because the address in the host can't be used in the guest directly. This patch traps read and write access to the opregion of the Intel GPU config space (offset 0xfc). The original patch is from Jean Guyader Signed-off-by: Yang Zhang Signed-off-by: Tiejun

Re: [Qemu-devel] Question about hcd-ohci and address_space_translate

2014-05-30 Thread BALATON Zoltan
On Fri, 30 May 2014, Paolo Bonzini wrote: > Il 30/05/2014 00:33, BALATON Zoltan ha scritto: > Can you get the output of "info mtree" at the point where the unassigned > access happens? memory - (prio 0, RW): system -07ff (prio 0, RW):

Re: [Qemu-devel] [PATCH v2 15/20] rbd: Handle failure for potentially large allocations

2014-05-30 Thread Markus Armbruster
Kevin Wolf writes: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the rbd block driver. > > Signed-off-by: Kevin W

[Qemu-devel] [PATCH v3 2/9] xics: Add xics_find_source()

2014-05-30 Thread Alexey Kardashevskiy
PAPR allows having multiple interrupt sources such as PHB. This adds a source lookup function and makes use of it. Since at the moment QEMU only supports a single source, no change in behaviour is expected. Signed-off-by: Alexey Kardashevskiy --- hw/intc/xics.c | 30 +--

[Qemu-devel] [PATCH v3 8/9] vmstate: Add preallocation for migrating arrays (VMS_ALLOC flag)

2014-05-30 Thread Alexey Kardashevskiy
There are few helpers already to support array migration. However they all require the destination side to preallocate arrays before migration which is not always possible due to unknown array size as it might be some sort of dynamic state. One of the examples is an array of MSIX-enabled devices in

[Qemu-devel] [PATCH v3 6/9] spapr: Remove @next_irq

2014-05-30 Thread Alexey Kardashevskiy
This removes @next_irq from sPAPREnvironment which was used in old IRQ allocator as XICS is now responsible for IRQs and keeps track of allocated IRQs. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 3 +-- include/hw/ppc/spapr.h | 1 - 2 files changed, 1 insertion(+), 3 deletio

[Qemu-devel] [PATCH v3 7/9] xics: Implement xics_ics_free()

2014-05-30 Thread Alexey Kardashevskiy
This implements interrupt release function so IRQs can be returned back to the pool for reuse in cases such as PCI hot plug. Signed-off-by: Alexey Kardashevskiy --- Changes: v3: * xics_free() now accepts "irq" instead of server:srcno and does sanity checks --- hw/intc/xics.c| 27

[Qemu-devel] [PATCH v3 9/9] spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB

2014-05-30 Thread Alexey Kardashevskiy
Currently SPAPR PHB keeps track of all allocated MSI (here and below MSI stands for both MSI and MSIX) interrupt because XICS used to be unable to reuse interrupts. This is a problem for dynamic MSI reconfiguration which happens when guest reloads a driver or performs PCI hotplug. Another problem i

[Qemu-devel] [PATCH v3 1/9] xics: Add flags for interrupts

2014-05-30 Thread Alexey Kardashevskiy
The existing interrupt allocation scheme in SPAPR assumes that interrupts are allocated at the start time, continously and the config will not change. However, there are cases when this is not going to work such as: 1. migration - we will have to have an ability to choose interrupt numbers for dev

Re: [Qemu-devel] qemu 2.0, deadlock in block-commit

2014-05-30 Thread Marcin Gibuła
1. Debug bdrv_drain_all() and find out whether there are any I/O requests remaining. I believe that's what happens: Context 1: - commit_one_iteration makes write request (req A) - request A is handled to io thread, qemu_coroutine_yield() is called Context 2: - VM makes write request (req B

[Qemu-devel] [PATCH v3 4/9] spapr: Move interrupt allocator to xics

2014-05-30 Thread Alexey Kardashevskiy
The current allocator returns IRQ numbers from a pool and does not support IRQs reuse in any form as it did not keep track of what it previously returned, it only keeps the last returned IRQ. Some use cases such as PCI hot(un)plug may require IRQ release and reallocation. This moves an allocator f

[Qemu-devel] [PATCH v3 0/9] Move interrupts from spapr to xics

2014-05-30 Thread Alexey Kardashevskiy
This moves interrupts allocation business from SPAPR to XICS and makes use of it. Changes: v3: * replaces static array of descriptors in SPAPR PHB with GHashTable * implements migration of hash table via temporary array v2: * s/server/source/ * fixed typos, code style, added an assert * added pat

Re: [Qemu-devel] [PATCH v3 10/34] dimm: implement dimm device abstraction

2014-05-30 Thread Peter Crosthwaite
On Fri, May 30, 2014 at 7:01 PM, Igor Mammedov wrote: > On Fri, 30 May 2014 00:21:27 +1000 > Peter Crosthwaite wrote: > >> On Tue, May 27, 2014 at 11:01 PM, Igor Mammedov wrote: >> > From: Vasilis Liaskovitis >> > >> > Each hotplug-able memory slot is a DimmDevice. >> > A hot-add operation for

Re: [Qemu-devel] [PATCH v2 11/20] qcow2: Handle failure for potentially large allocations

2014-05-30 Thread Stefan Hajnoczi
On Wed, May 28, 2014 at 04:37:44PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the qcow

Re: [Qemu-devel] [PATCH v2 02/20] block: Handle failure for potentially large allocations

2014-05-30 Thread Stefan Hajnoczi
On Wed, May 28, 2014 at 04:37:35PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses bounce buffer allocations i

Re: [Qemu-devel] Question about hcd-ohci and address_space_translate

2014-05-30 Thread BALATON Zoltan
On Fri, 30 May 2014, BALATON Zoltan wrote: On Fri, 30 May 2014, Paolo Bonzini wrote: Il 30/05/2014 00:33, BALATON Zoltan ha scritto: Can you get the output of "info mtree" at the point where the unassigned access happens? More exactly at the beginning of ohci_read_hcca it is the following. (No

[Qemu-devel] [PATCH v3 5/9] xics: Remove obsolete xics_set_irq_type()

2014-05-30 Thread Alexey Kardashevskiy
This removes xics_set_irq_type() as it is not used anymore. This is done by a separate patch to make the previous patch look nicer. Signed-off-by: Alexey Kardashevskiy --- hw/intc/xics.c| 11 --- include/hw/ppc/xics.h | 1 - 2 files changed, 12 deletions(-) diff --git a/hw/int

[Qemu-devel] [PATCH v3 3/9] xics: Disable flags reset on xics reset

2014-05-30 Thread Alexey Kardashevskiy
Since islsi[] array has been merged into the ICSState struct, we must not reset flags as they tell if the interrupt is in use. Signed-off-by: Alexey Kardashevskiy --- hw/intc/xics.c | 7 +++ hw/intc/xics_kvm.c | 7 +++ 2 files changed, 14 insertions(+) diff --git a/hw/intc/xics.c b/

Re: [Qemu-devel] [PATCH v3 9/9] spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB

2014-05-30 Thread Alexander Graf
On 30.05.14 11:34, Alexey Kardashevskiy wrote: Currently SPAPR PHB keeps track of all allocated MSI (here and below MSI stands for both MSI and MSIX) interrupt because XICS used to be unable to reuse interrupts. This is a problem for dynamic MSI reconfiguration which happens when guest reloads a

Re: [Qemu-devel] Question about hcd-ohci and address_space_translate

2014-05-30 Thread Paolo Bonzini
Il 30/05/2014 00:33, BALATON Zoltan ha scritto: usb-ohci: pci-ohci: USB Operational Unassigned mem read 07c9ae00 Unassigned mem read 07c9ae04 [...] Unassigned mem read 07c9ae84 usb-ohci: HCCA read error at 7c9ae00 ohci_die: DMA error The read happens through ohci_read_hc

Re: [Qemu-devel] [PATCH v3 10/34] dimm: implement dimm device abstraction

2014-05-30 Thread Igor Mammedov
On Fri, 30 May 2014 19:48:13 +1000 Peter Crosthwaite wrote: > On Fri, May 30, 2014 at 7:01 PM, Igor Mammedov wrote: > > On Fri, 30 May 2014 00:21:27 +1000 > > Peter Crosthwaite wrote: > > > >> On Tue, May 27, 2014 at 11:01 PM, Igor Mammedov > >> wrote: > >> > From: Vasilis Liaskovitis > >> >

Re: [Qemu-devel] [PATCH v3 10/34] dimm: implement dimm device abstraction

2014-05-30 Thread Peter Crosthwaite
On Fri, May 30, 2014 at 7:48 PM, Peter Crosthwaite wrote: > On Fri, May 30, 2014 at 7:01 PM, Igor Mammedov wrote: >> On Fri, 30 May 2014 00:21:27 +1000 >> Peter Crosthwaite wrote: >> >>> On Tue, May 27, 2014 at 11:01 PM, Igor Mammedov wrote: >>> > From: Vasilis Liaskovitis >>> > >>> > Each hot

Re: [Qemu-devel] [PATCH v3 10/34] dimm: implement dimm device abstraction

2014-05-30 Thread Peter Crosthwaite
On Fri, May 30, 2014 at 8:31 PM, Igor Mammedov wrote: > On Fri, 30 May 2014 19:48:13 +1000 > Peter Crosthwaite wrote: > >> On Fri, May 30, 2014 at 7:01 PM, Igor Mammedov wrote: >> > On Fri, 30 May 2014 00:21:27 +1000 >> > Peter Crosthwaite wrote: >> > >> >> On Tue, May 27, 2014 at 11:01 PM, Igo

Re: [Qemu-devel] [PATCH] target-arm: Prepare cpreg writefns/readfns for EL3/SecExt

2014-05-30 Thread Aggeler Fabian
Ping. This patch was suggested to be sent separately but I can also include it to the TZ patchset again. http://patchwork.ozlabs.org/patch/349592/ Thanks, Fabian On 16 May 2014, at 14:43, Fabian Aggeler wrote: > This patch changes some readfns/writefns to use raw_write > and raw_read function

Re: [Qemu-devel] [PATCH v2 00/20] block: Handle failure for potentially large allocations

2014-05-30 Thread Markus Armbruster
Kevin Wolf writes: > A not too small part of the recent CVEs were DoS scenarios by letting > qemu abort with too large memory allocations. We generally "fixed" these > cases by setting some limits on values read from image files that > influence the size of allocations. Just double-checking: do

[Qemu-devel] [PATCH v3 3/8] virtio-blk: move x-data-plane qdev property to virtio-blk.h

2014-05-30 Thread Stefan Hajnoczi
Move the x-data-plane property. Originally it was outside since not every transport may wish to support dataplane. But that makes little sense when we have a dedicated CONFIG_VIRTIO_BLK_DATA_PLANE ifdef already. This move makes it easier to switch to property aliases in the next patch. Signed-o

[Qemu-devel] [PATCH v3 0/8] virtio-blk: use alias properties in transport devices

2014-05-30 Thread Stefan Hajnoczi
v3: * Split qdev_alias_all_properties() into its own patch [Peter Crosthwaite] * Do not dereference DEVICE_CLASS(class) inline [Peter Crosthwaite] v2: * Add qdev_alias_all_properties() instead of virtio-blk-specific function [Paolo] * Explain refcount handling in doc comment [Paolo] * Fix "p

[Qemu-devel] [PATCH v3 2/8] virtio-blk: avoid qdev property definition duplication

2014-05-30 Thread Stefan Hajnoczi
It becomes unwiedly to duplicate all virtio-blk qdev property definitions due to an #ifdef. The C preprocessor syntax makes it a little hard to resolve this cleanly but we can extract the #ifdef and call a macro it defines later. Avoiding duplication is important since it will only get worse when

[Qemu-devel] [PATCH v3 1/8] qom: add object_property_add_alias()

2014-05-30 Thread Stefan Hajnoczi
Sometimes an object needs to present a property which is actually on another object, or it needs to provide an alias name for an existing property. Examples: a.foo -> b.foo a.old_name -> a.new_name The new object_property_add_alias() API allows objects to alias a property on the same object o

[Qemu-devel] [PATCH v3 4/8] qdev: add qdev_alias_all_properties()

2014-05-30 Thread Stefan Hajnoczi
The qdev_alias_all_properties() function creates QOM alias properties for each qdev property on a DeviceState. This is useful for parent objects that wish to forward property accesses to their children. Signed-off-by: Stefan Hajnoczi --- v3: * Split qdev_alias_all_properties() into its own patc

[Qemu-devel] [PATCH v3 8/8] virtio-blk: move qdev properties into virtio-blk.c

2014-05-30 Thread Stefan Hajnoczi
There is no need to make DEFINE_VIRTIO_BLK_PROPERTIES() public. Inline it into virtio-blk.c so it cannot be used by mistake from other source files. Signed-off-by: Stefan Hajnoczi Reviewed-by: Peter Crosthwaite --- hw/block/virtio-blk.c | 12 +++- include/hw/virtio/virtio-blk.

[Qemu-devel] [PATCH v3 6/8] virtio-blk: drop virtio_blk_set_conf()

2014-05-30 Thread Stefan Hajnoczi
This function is no longer used since parent objects now use child aliases to set the VirtIOBlkConf directly. Signed-off-by: Stefan Hajnoczi Reviewed-by: Peter Crosthwaite --- hw/block/virtio-blk.c | 6 -- include/hw/virtio/virtio-blk.h | 2 -- 2 files changed, 8 deletions(-) diff

[Qemu-devel] [PATCH v3 7/8] virtio: fix virtio-blk child refcount in transports

2014-05-30 Thread Stefan Hajnoczi
object_initialize() leaves the object with a refcount of 1. object_property_add_child() adds its own reference which is dropped again when the property is deleted. The upshot of this is that we always have a refcount >= 1. Upon hot unplug the virtio-blk child is not finalized! Drop our reference

Re: [Qemu-devel] [PATCH v3 10/34] dimm: implement dimm device abstraction

2014-05-30 Thread Igor Mammedov
On Fri, 30 May 2014 20:55:50 +1000 Peter Crosthwaite wrote: > On Fri, May 30, 2014 at 8:31 PM, Igor Mammedov wrote: > > On Fri, 30 May 2014 19:48:13 +1000 > > Peter Crosthwaite wrote: > > > >> On Fri, May 30, 2014 at 7:01 PM, Igor Mammedov wrote: > >> > On Fri, 30 May 2014 00:21:27 +1000 > >>

[Qemu-devel] [PATCH v5 2/3] block: Add drive-mirror-replace command

2014-05-30 Thread Benoît Canet
When a quorum file is totally destroyed (broken NAS or SAN) the user can start a drive-mirror job on the quorum block backend and then replace the broken quorum file with drive-mirror-replace given it has a node-name. Signed-off-by: Benoit Canet --- block.c | 8 ++-- block/mi

[Qemu-devel] [PATCH v5 1/3] quorum: Add the rewrite-corrupted parameter to quorum.

2014-05-30 Thread Benoît Canet
On read operations when this parameter is set and some replicas are corrupted while quorum can be reached quorum will proceed to rewrite the correct version of the data to fix the corrupted replicas. This will shine with SSD where the FTL will remap the same block at another place on rewrite. Sig

[Qemu-devel] [PATCH v5 3/3] qemu-iotests: Add 096 new test for drive-mirror-replace.

2014-05-30 Thread Benoît Canet
Tests for drive-mirror-replace whose purpose is to enable quorum file mirroring and replacement after failure. Signed-off-by: Benoit Canet --- tests/qemu-iotests/041| 34 +-- tests/qemu-iotests/096| 222 ++ tests/qemu-iotests/096.out

[Qemu-devel] [PATCH v5 0/3] Quorum maintaince operations

2014-05-30 Thread Benoît Canet
These are the last bits required to make quorum usable in production. v5: rebase on latest Stefan's block branch [Kevin] v4: update patchset to stefan's block branch drop Max reviewed by because the series changes Benoît Canet (3): quorum: Add the rewrite-corrupted

Re: [Qemu-devel] [PATCH 1/1] block: Support Archipelago as a QEMU block backend

2014-05-30 Thread Kevin Wolf
Am 29.05.2014 um 13:14 hat Chrysostomos Nanakos geschrieben: > VM Image on Archipelago volume is specified like this: > > file=archipelago:[/mport=[:vport=]] > > 'archipelago' is the protocol. > > 'mport' is the port number on which mapperd is listening. This is optional > and if not specified,

Re: [Qemu-devel] [PATCH v5 1/3] quorum: Add the rewrite-corrupted parameter to quorum.

2014-05-30 Thread Benoît Canet
The Friday 30 May 2014 à 13:18:42 (+0200), Benoît Canet wrote : Oh sorry I made again commits lines ending with a dot. Will fix this in the next iteration. Best regards Benoît > On read operations when this parameter is set and some replicas are corrupted > while quorum can be reached quorum wi

Re: [Qemu-devel] [PATCH v2 00/20] block: Handle failure for potentially large allocations

2014-05-30 Thread Kevin Wolf
Am 30.05.2014 um 13:14 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > A not too small part of the recent CVEs were DoS scenarios by letting > > qemu abort with too large memory allocations. We generally "fixed" these > > cases by setting some limits on values read from image files

Re: [Qemu-devel] Question about hcd-ohci and address_space_translate

2014-05-30 Thread BALATON Zoltan
On Fri, 30 May 2014, Paolo Bonzini wrote: Il 30/05/2014 00:33, BALATON Zoltan ha scritto: usb-ohci: pci-ohci: USB Operational Unassigned mem read 07c9ae00 Unassigned mem read 07c9ae04 [...] Unassigned mem read 07c9ae84 usb-ohci: HCCA read error at 7c9ae00 ohci_die: DMA e

Re: [Qemu-devel] Question about hcd-ohci and address_space_translate

2014-05-30 Thread Paolo Bonzini
Il 30/05/2014 13:32, BALATON Zoltan ha scritto: On Fri, 30 May 2014, Paolo Bonzini wrote: Il 30/05/2014 00:33, BALATON Zoltan ha scritto: usb-ohci: pci-ohci: USB Operational Unassigned mem read 07c9ae00 Unassigned mem read 07c9ae04 [...] Unassigned mem read 07c9ae84 usb

[Qemu-devel] [PATCH v3 5/8] virtio-blk: use aliases instead of duplicate qdev properties

2014-05-30 Thread Stefan Hajnoczi
virtio-blk-pci, virtio-blk-s390, and virtio-blk-ccw all duplicate the qdev properties of their VirtIOBlock child. This approach does not work well with string or pointer properties since we must be careful about leaking or double-freeing them. Use the QOM alias property to forward property access

Re: [Qemu-devel] [PATCH 1/2] qcow2: Fix memory leak in copy_sectors()

2014-05-30 Thread Kevin Wolf
Am 29.05.2014 um 00:19 hat Max Reitz geschrieben: > If bs->drv is NULL, iov.iov_base should not be leaked. > > Signed-off-by: Max Reitz Funny how such things go unnoticed for months and then three people fix it independently in the same week. Anyway, I won: commit bd604369 ;-) Kevin

Re: [Qemu-devel] [RFC 1/5] qmp: add query-memory-devices command

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 09:30:11 (-0600), Eric Blake wrote : > On 05/28/2014 08:57 AM, Igor Mammedov wrote: > > ... allowing to get state of present memory devices. > > Currently implemented only for DimmDevice. > > > > Signed-off-by: Igor Mammedov > > --- > > hw/mem/dimm.c|

Re: [Qemu-devel] [PATCH 1/2] virtio-serial: report frontend connection state via monitor

2014-05-30 Thread Laszlo Ersek
On 05/29/14 22:57, Eric Blake wrote: > On 05/29/2014 02:36 PM, Laszlo Ersek wrote: > >> Emitting the events unconditionally shouldn't hurt anything, I think. I >> added the property for two reasons: >> >> - I was sure someone would ask for it. :) > > Someone still might :) But it may be a pre-ma

Re: [Qemu-devel] [RFC 1/5] qmp: add query-memory-devices command

2014-05-30 Thread Igor Mammedov
On Fri, 30 May 2014 13:43:52 +0200 Benoît Canet wrote: > The Wednesday 28 May 2014 à 09:30:11 (-0600), Eric Blake wrote : > > On 05/28/2014 08:57 AM, Igor Mammedov wrote: > > > ... allowing to get state of present memory devices. > > > Currently implemented only for DimmDevice. > > > > > > Signe

Re: [Qemu-devel] [PATCH v2 01/20] block: Introduce qemu_try_blockalign()

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:34 (+0200), Kevin Wolf wrote : > This function returns NULL instead of aborting when an allocation fails. > > Signed-off-by: Kevin Wolf > Reviewed-by: Stefan Hajnoczi > --- > block.c | 5 + > include/block/block.h | 1 + > include/qemu/osdep

Re: [Qemu-devel] [PATCH v2 02/20] block: Handle failure for potentially large allocations

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:35 (+0200), Kevin Wolf wrote : > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses bounce buffer allocati

Re: [Qemu-devel] [PATCH v2 03/20] bochs: Handle failure for potentially large allocations

2014-05-30 Thread Benoît Canet
The Wednesday 28 May 2014 à 16:37:36 (+0200), Kevin Wolf wrote : > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the

  1   2   3   4   >