Re: [Qemu-devel] [PATCH v4] target-sparc: Add and use CPU_FEATURE_CASA

2014-02-25 Thread Sebastian Huber
Hello, exists there someone who is able to commit this? On 2014-02-14 17:22, Andreas Färber wrote: Am 14.02.2014 17:06, schrieb Sebastian Huber: The LEON3 processor has support for the CASA instruction which is normally only available for SPARC V9 processors. Binutils 2.24 and GCC 4.9 will su

Re: [Qemu-devel] [PATCH v2] hw/timer/grlib_gptimer: Avoid integer overflows

2014-02-25 Thread Sebastian Huber
Ping. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilun

Re: [Qemu-devel] [PATCH] fsdev: Fix overrun after readlink() fills buffer completely

2014-02-25 Thread Aneesh Kumar K.V
Markus Armbruster writes: > readlink() returns the number of bytes written to the buffer, and it > doesn't write a terminating null byte. do_readlink() writes it > itself. Overruns the buffer when readlink() filled it completely. > > Fix by reserving space for the null byte when calling readlin

Re: [Qemu-devel] [PATCH v3 12/31] target-arm: Implement AArch64 TTBR*

2014-02-25 Thread Hu Tao
On Sat, Feb 15, 2014 at 04:07:05PM +, Peter Maydell wrote: <...> > diff --git a/target-arm/cpu.h b/target-arm/cpu.h > index 06953ac..7cbe69b 100644 > --- a/target-arm/cpu.h > +++ b/target-arm/cpu.h > @@ -173,10 +173,8 @@ typedef struct CPUARMState { > uint32_t c1_coproc; /* Coprocess

Re: [Qemu-devel] [PATCH] modules: Fix building with --enable-modules

2014-02-25 Thread Hu Tao
On Wed, Feb 26, 2014 at 01:56:44PM +0800, Fam Zheng wrote: > Compiling util/modules.c with modules enabled fails now. > > Fix it by: > > 1) Add "#define CONFIG_MODULES" with --enable-modules > > 2) Include qemu-common.h before #ifdef testing in module.c. > > Signed-off-by: Fam Zheng > --- > s

Re: [Qemu-devel] [PATCH] gtk: Support GTK without VTE

2014-02-25 Thread Stefan Weil
Am 19.02.2014 07:04, schrieb Stefan Weil: > GTK without VTE is needed for hosts which don't support VTE (for example > all variants of MinGW), but it can also be reasonable for other hosts. > > Signed-off-by: Stefan Weil > --- > configure | 54 +-

Re: [Qemu-devel] [PATCH 9/9] w32: Replace Windows specific data types in common header files

2014-02-25 Thread Stefan Weil
Am 25.02.2014 09:37, schrieb Andreas Färber: > Am 25.02.2014 00:07, schrieb Stefan Weil: [...] >>> I had moved the field unchanged from another header, I believe. I don't >>> think this is a good change (assuming the Windows API is still using >>> this type and not void*), especially since it's #if

Re: [Qemu-devel] [PATCH v18 13/14] memory backend: fill memory backend ram fields

2014-02-25 Thread Hu Tao
On Wed, Feb 19, 2014 at 10:36:57AM +0100, Igor Mammedov wrote: > On Wed, 19 Feb 2014 10:03:13 +0100 > Paolo Bonzini wrote: > > > 19/02/2014 08:54, Hu Tao ha scritto: > > > Thus makes user control how to allocate memory for ram backend. > > > > > > Signed-off-by: Hu Tao > > > --- > > > backend

[Qemu-devel] [PATCH] modules: Fix building with --enable-modules

2014-02-25 Thread Fam Zheng
Compiling util/modules.c with modules enabled fails now. Fix it by: 1) Add "#define CONFIG_MODULES" with --enable-modules 2) Include qemu-common.h before #ifdef testing in module.c. Signed-off-by: Fam Zheng --- scripts/create_config | 3 +++ util/module.c | 2 +- 2 files changed, 4 in

[Qemu-devel] [Bug 1284874] Re: Guest hangs during option rom loading with certain cards

2014-02-25 Thread Bandan Das
The vfio code has logic that checks if a FLR is possible and attempts it before and after device assignment. Replacing the FLR with a bus reset succeeds past the stuck option rom loading phase and we are able to boot into the guest successfully which means that the first initialization (by the hard

[Qemu-devel] [Bug 1284874] Re: Guest hangs during option rom loading with certain cards

2014-02-25 Thread Bandan Das
Comments from Alex Williamson : > The sequence leading up to this is quite short. We do standard PCI BAR > sizing and setup, read the ROM, then do: > > vfio: vfio_pci_write_config(:03:00.0, @0x78, 0x1, len=0x4) > vfio: vfio_pci_write_config(:03:00.0, @0x80, 0x9430, len=0x4) > vfio: vfio_p

[Qemu-devel] ROM access from cpu context

2014-02-25 Thread Elliot Buller
Hello, I'm writing a small OS for ARM cortex processors and have found it greatly useful to test using qemu and the lm3s6965evb machine. The one peripheral it is missing is the flash controller. I was able to add the basic interface to mirror registers allowing to write flash words as well as eras

[Qemu-devel] [Bug 1284874] [NEW] Guest hangs during option rom loading with certain cards

2014-02-25 Thread Bandan Das
Public bug reported: With a Broadcom Corporation NetXtreme II BCM57810 10 Gigabit Ethernet card, device assignment does not work. The guest hangs during option rom execution. Moreover, if an attempt is made to quit qemu when the guest is in the hung state, the card gets into an inoperable state. O

[Qemu-devel] [Bug 1284874] Re: Guest hangs during option rom loading with certain cards

2014-02-25 Thread Bandan Das
Based on the trace in the attachment, the sequence of config space accesses leading up to the hang - vfio: vfio_pci_write_config(:03:00.0, @0x78, 0x1, len=0x4) vfio: vfio_pci_write_config(:03:00.0, @0x80, 0x9430, len=0x4) vfio: vfio_pci_write_config(:03:00.0, @0x78, 0xa30c, len=0x4) vf

[Qemu-devel] [Bug 1284874] Re: Guest hangs during option rom loading with certain cards

2014-02-25 Thread Bandan Das
It has been suggested to blacklist loading of rom for this card (and for any other similar card that exhibit such issues) by default, a patch has been posted upstream and is going several iterations based on reviews. The most uptodate series is [PATCH 0/2 v3] vfio: blacklist loading of unstable

Re: [Qemu-devel] [PATCH microblaze/ppc v3 0/8] Remove include/hw/xilinx.h

2014-02-25 Thread Edgar E. Iglesias
On Tue, Feb 25, 2014 at 04:37:43PM -0800, Peter Crosthwaite wrote: > Hi Edgar, > > This file is written for a very old qdev style of machine description. > Remove by inlining all usages of its functions (which is consistent with > the modern preference that qdev_initery should be inline and not in

[Qemu-devel] Function of some modules....what they do...

2014-02-25 Thread Atlas Khan
I am looking into a file which is i8259.c which is basically an interrupt controller. here in end is a function which is static int pic_initfn(ISADevice *dev) { PicState *s = DO_UPCAST(PicState, dev, dev); memory_region_init_io(&s->base_io, &pic_base_ioport_ops, s, "pic", 2); memory_r

Re: [Qemu-devel] [PATCH v18 13/14] memory backend: fill memory backend ram fields

2014-02-25 Thread Hu Tao
On Tue, Feb 25, 2014 at 03:15:53PM +0100, Paolo Bonzini wrote: > Il 25/02/2014 11:20, Hu Tao ha scritto: > >There is a problem that user_creatable_complete() is called before > >adding object to "/objects" (see object_create()), which triggers a > >assert failure when calling object_get_canonical_p

Re: [Qemu-devel] [PATCH v3 31/31] target-arm: Add v8 mmu translation support

2014-02-25 Thread Hu Tao
On Wed, Feb 26, 2014 at 10:49:59AM +0800, Hu Tao wrote: > On Sat, Feb 15, 2014 at 04:07:24PM +, Peter Maydell wrote: > > From: Rob Herring > > > > Add support for v8 page table walks. This supports stage 1 translations > > for 4KB, 16KB and 64KB page sizes starting with 0 or 1 level. > > > >

Re: [Qemu-devel] [RFC PATCH v2 06/12] mc: introduce state machine changes for MC

2014-02-25 Thread Li Guang
Li Guang wrote: Michael R. Hines wrote: On 02/19/2014 09:00 AM, Li Guang wrote: Hi, mrhi...@linux.vnet.ibm.com wrote: From: "Michael R. Hines" This patch sets up the initial changes to the migration state machine and prototypes to be used by the checkpointing code to interact with the state

Re: [Qemu-devel] [PATCH v3 31/31] target-arm: Add v8 mmu translation support

2014-02-25 Thread Hu Tao
On Sat, Feb 15, 2014 at 04:07:24PM +, Peter Maydell wrote: > From: Rob Herring > > Add support for v8 page table walks. This supports stage 1 translations > for 4KB, 16KB and 64KB page sizes starting with 0 or 1 level. > > Signed-off-by: Rob Herring > [PMM: fix style nits, fold in 16/64K pa

[Qemu-devel] [RFC 2/2] hw/misc/vfio: add vfio-platform support

2014-02-25 Thread Kim Phillips
We basically add support for the SysBusDevice type in addition to the existing PCIDevice support. This involves taking common code from the existing vfio_initfn(), and putting it under a new vfio_find_get_group(), that both vfio_initfn() and the new vfio_platform_realize() call. Since realize() re

[Qemu-devel] [RFC 0/2] platform device passthrough

2014-02-25 Thread Kim Phillips
This is an RFC for the first step of many to enable platform device passthrough, where a guest OS is able to directly access platform device MMIO, DMA regions, and receive interrupts from platform devices. The first RFC patch works around the limitation of QEMU not being able to create platform de

[Qemu-devel] [RFC 1/2] hw/arm/virt: add a Calxeda XGMAC device

2014-02-25 Thread Kim Phillips
This is a hack and only serves as an example of what needs to be done to make the next RFC - add vfio-platform support - work for development purposes on a Calxeda Midway system. We don't want mach-virt to always create this ethernet device - DO NOT APPLY, etc. Initial attempts to convince QEMU t

Re: [Qemu-devel] [PATCH 1/2][RFC] qom: introduce cpu QOM hierarchy tree /machine/node/socket/core/thread/cpu.

2014-02-25 Thread Chen Fan
On Tue, 2014-02-25 at 06:35 -0700, Eric Blake wrote: > On 02/25/2014 02:07 AM, Chen Fan wrote: > > Signed-off-by: Chen Fan > > --- > > include/qom/node.h | 66 +++ > > qom/Makefile.objs | 2 +- > > qom/node.c | 156 > > +

[Qemu-devel] [PATCH microblaze/ppc v3 8/8] xilinx: Delete hw/include/xilinx.h

2014-02-25 Thread Peter Crosthwaite
This is now obsolete - remove the header and all its inclusions. Signed-off-by: Peter Crosthwaite --- hw/microblaze/petalogix_ml605_mmu.c | 1 - hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 - hw/ppc/virtex_ml507.c| 2 +- include/hw/xilinx.h | 10

[Qemu-devel] [PATCH microblaze/ppc v3 7/8] xilinx: Inline usages of xilinx_axi*_init()

2014-02-25 Thread Peter Crosthwaite
Inline the only usage of each of xilinx_axiethernet_init and xilinx_axidma_init. Converts this init to at least a semi-recent QOM styling. Signed-off-by: Peter Crosthwaite --- hw/microblaze/petalogix_ml605_mmu.c | 24 +++- include/hw/xilinx.h | 33 ---

[Qemu-devel] [PATCH microblaze/ppc v3 6/8] xilinx: Inline usage of xilinx_ethlite_create()

2014-02-25 Thread Peter Crosthwaite
Inline the only usage. Converts this init to at least a semi-recent QOM styling. Signed-off-by: Peter Crosthwaite --- hw/microblaze/petalogix_s3adsp1800_mmu.c | 9 - include/hw/xilinx.h | 19 --- 2 files changed, 8 insertions(+), 20 deletions(-) di

[Qemu-devel] [PATCH microblaze/ppc v3 5/8] xilinx: Inline usages of xilinx_timer_create()

2014-02-25 Thread Peter Crosthwaite
Inline these usages. Converts these init to at least a semi-recent QOM styling. Signed-off-by: Peter Crosthwaite --- hw/microblaze/petalogix_ml605_mmu.c | 7 ++- hw/microblaze/petalogix_s3adsp1800_mmu.c | 9 - hw/ppc/virtex_ml507.c| 7 ++- include/hw/

[Qemu-devel] [PATCH microblaze/ppc v3 4/8] xilinx: Inline usages of xilinx_intc_create()

2014-02-25 Thread Peter Crosthwaite
Inline these usages. Converts these init to at least a semi-recent QOM styling. Signed-off-by: Peter Crosthwaite --- hw/microblaze/petalogix_ml605_mmu.c | 8 ++-- hw/microblaze/petalogix_s3adsp1800_mmu.c | 9 +++-- hw/ppc/virtex_ml507.c| 6 +- include/hw/

[Qemu-devel] [PATCH microblaze/ppc v3 3/8] microblaze/ml605: Define macros for irq/memory maps

2014-02-25 Thread Peter Crosthwaite
Define (missing) macros for the interrupt and memory maps for the sake of self documentation. Signed-off-by: Peter Crosthwaite --- I haven't converted the xilinx_foo_create usages because they will be deleted in following patches hw/microblaze/petalogix_ml605_mmu.c | 15 --- 1 file

[Qemu-devel] [PATCH microblaze/ppc v3 2/8] ppc/virtex_ml507: Define macros for irq/memory maps

2014-02-25 Thread Peter Crosthwaite
Define macros for the interrupt and memory maps for the sake of self documentation. Signed-off-by: Peter Crosthwaite --- I haven't converted the xilinx_foo_create usages because they will be deleted in following patches hw/ppc/virtex_ml507.c | 14 +++--- 1 file changed, 11 insertions(+)

[Qemu-devel] [PATCH microblaze/ppc v3 1/8] microblaze/s3adsp_1800: Define macros for irq map

2014-02-25 Thread Peter Crosthwaite
Define macros for the interrupt map for the sake of self documentation. Signed-off-by: Peter Crosthwaite --- I haven't converted the xilinx_foo_create usages because they will be deleted in following patches hw/microblaze/petalogix_s3adsp1800_mmu.c | 7 ++- 1 file changed, 6 insertions(+),

[Qemu-devel] [PATCH microblaze/ppc v3 0/8] Remove include/hw/xilinx.h

2014-02-25 Thread Peter Crosthwaite
Hi Edgar, This file is written for a very old qdev style of machine description. Remove by inlining all usages of its functions (which is consistent with the modern preference that qdev_initery should be inline and not in cross-board helper functions). To avoid movement of magic numbers, Define m

Re: [Qemu-devel] [PATCH v3 01/31] target-arm: Fix raw read and write functions on AArch64 registers

2014-02-25 Thread Peter Crosthwaite
On Sun, Feb 16, 2014 at 2:06 AM, Peter Maydell wrote: > The raw read and write functions were using the ARM_CP_64BIT flag in > ri->type to determine whether to treat the register's state field as > uint32_t or uint64_t; however AArch64 register info structs don't use > that flag. Abstract out the

[Qemu-devel] [PATCH target-arm v2 7/7] dma/pl330: implement dmaadnh instruction

2014-02-25 Thread Peter Crosthwaite
Implement the missing DMAADNH instruction. This is a minor variant of the DMAADDH instruction, so factor out to a common implementation for both (dmaadxh). Signed-off-by: Peter Crosthwaite --- changed from v1: Type casting tweaks (PMM review) hw/dma/pl330.c | 19 --- 1 file chan

[Qemu-devel] [PATCH target-arm v2 6/7] dma/pl330: Fix buffer depth

2014-02-25 Thread Peter Crosthwaite
This is the product of the data-width and the depth arguments, I.e the depth of the FIFO is in terms of data entries and not bytes (which is what the original implementation was suggesting). Fix. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell --- changed since v1: Remove double spac

[Qemu-devel] [PATCH target-arm v2 5/7] dma/pl330: Add event debugging printfs

2014-02-25 Thread Peter Crosthwaite
These are helpful to anyone trying to debug event sequencing. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell --- hw/dma/pl330.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index 8046a6f..303f8b8 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl3

[Qemu-devel] [PATCH target-arm v2 4/7] dma/pl330: Rename parent_obj

2014-02-25 Thread Peter Crosthwaite
As per current QOM conventions. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell --- hw/dma/pl330.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index a4cc6f9..8046a6f 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl330.c @@ -227,7

[Qemu-devel] [PATCH target-arm v2 3/7] dma/pl330: printf format type sweep.

2014-02-25 Thread Peter Crosthwaite
Use PRI formats as appropriate rather than raw %x and %d. This fixes debug printfery on some host platforms. Fix types of debug only variables as appropriate. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell --- hw/dma/pl330.c | 26 ++ 1 file changed, 14 inse

[Qemu-devel] [PATCH target-arm v2 2/7] dma/pl330: Fix misleading type

2014-02-25 Thread Peter Crosthwaite
This type really should just be a regular int as no usages rely on it's 32 bitness (it's only meaningful as a bit position and not a bit mask). This also fixes a printf which uses the variable with a regular %d. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell --- hw/dma/pl330.c | 2

[Qemu-devel] [PATCH target-arm v2 1/7] dma/pl330: Delete overly verbose debug printf

2014-02-25 Thread Peter Crosthwaite
When using event synchronisation, this particular debug printf floods. Just delete it. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell --- hw/dma/pl330.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index 401399d..68adf39 100644 --- a/hw/dma/pl

[Qemu-devel] [PATCH target-arm v2 0/7] PL330 Changes

2014-02-25 Thread Peter Crosthwaite
Hi Peter, Some minor fixups and tweaks to PL330. changed since v1: Addressed PMM review. Regards, Peter Peter Crosthwaite (7): dma/pl330: Delete overly verbose debug printf dma/pl330: Fix misleading type dma/pl330: printf format type sweep. dma/pl330: Rename parent_obj dma/pl330: Add

[Qemu-devel] [PATCH 1/2 v4] qdev-monitor: set DeviceState opts before calling realize

2014-02-25 Thread Bandan Das
Setting opts before the realize property is set allows the following patch to make decisions based on whether the user specified "rombar". This also avoids having to create a new tristate property especially for this purpose Reviewed-by: Andreas Färber Signed-off-by: Bandan Das --- qdev-monitor

[Qemu-devel] [PATCH 2/2 v4] vfio: blacklist loading of unstable roms

2014-02-25 Thread Bandan Das
Certain cards such as the Broadcom BCM57810 have rom quirks that exhibit unstable system behavior duing device assignment. In the particular case of 57810, rom execution hangs and if a FLR follows, the device becomes inoperable until a power cycle. This change blacklists loading of rom for such car

[Qemu-devel] [PATCH 0/2 v4] vfio: blacklist loading of unstable roms

2014-02-25 Thread Bandan Das
v4: 1. Short Description of the issue in comments, pointer to qemu bug tracker in 2/2 2. Remove unnecessary check on rom_bar in vfio_pci_size_rom 2/2 3. No changes to 1/2 - Andreas, I have retained your "Reviewed-by" since the code hasn't changed. v3: 1. Change the "force" logic to depend on wheth

Re: [Qemu-devel] [PATCH v3 18/31] target-arm: Get MMU index information correct for A64 code

2014-02-25 Thread Peter Crosthwaite
On Sun, Feb 16, 2014 at 2:07 AM, Peter Maydell wrote: > Emit the correct MMU index information for loads and stores from > A64 code, rather than hardwiring it to "always kernel mode", > by storing the exception level in the TB flags, and make > cpu_mmu_index() return the right answer when the CPU

Re: [Qemu-devel] [PATCH microblaze/ppc v2 0/8] Remove include/hw/xilinx.h

2014-02-25 Thread Edgar E. Iglesias
On Tue, Feb 25, 2014 at 06:46:32PM +1000, Peter Crosthwaite wrote: > Ping! > Hi Peter, Can you please repost path nr 3, it never reached me. I'll give it a testrun and apply. Thanks, Edgar > On Thu, Feb 13, 2014 at 9:21 AM, Peter Crosthwaite > wrote: > > Hi Edgar, > > > > This file is writte

Re: [Qemu-devel] [PATCH v3 20/31] target-arm: Store AIF bits in env->pstate for AArch32

2014-02-25 Thread Peter Crosthwaite
On Sun, Feb 16, 2014 at 2:07 AM, Peter Maydell wrote: > To avoid complication in code that otherwise would not need to > care about whether EL1 is AArch32 or AArch64, we should store > the interrupt mask bits (CPSR.AIF in AArch32 and PSTATE.DAIF > in AArch64) in one place consistently regardless o

Re: [Qemu-devel] [PATCH v3 19/31] target-arm: A64: Implement WFI

2014-02-25 Thread Peter Crosthwaite
On Sun, Feb 16, 2014 at 2:07 AM, Peter Maydell wrote: > Implement the WFI instruction for A64; this just involves wiring > up the instruction, and adding a gen_a64_set_pc_im() which was > accidentally omitted from the A64 decoder top loop. > > Signed-off-by: Peter Maydell Reviewed-by: Peter Cros

Re: [Qemu-devel] [PATCH] target-ppc: Make vgbbd Masks "static const"

2014-02-25 Thread Richard Henderson
On 02/25/2014 01:25 PM, Tom Musta wrote: > Per Richard Henderson's review, the array of masks used in the > vgbbd instruction should be declared as static const. > > Signed-off-by: Tom Musta > --- > target-ppc/int_helper.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Reviewed-b

[Qemu-devel] [PATCH] target-ppc: Make vgbbd Masks "static const"

2014-02-25 Thread Tom Musta
Per Richard Henderson's review, the array of masks used in the vgbbd instruction should be declared as static const. Signed-off-by: Tom Musta --- target-ppc/int_helper.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c in

Re: [Qemu-devel] [PATCH] s390: Storage key global access

2014-02-25 Thread Christian Borntraeger
On 25/02/14 20:34, Andreas Färber wrote: > Hi, > > Am 25.02.2014 20:15, schrieb Christian Borntraeger: >> On 25/02/14 15:34, Jason J. Herne wrote: >> >>> Christian, at one point you mentioned that it might be helpful to see this >>> patch in the context of the rest of the hotplug patches. If you

Re: [Qemu-devel] [PATCH v3 00/31] A64 system emulation prequisites

2014-02-25 Thread Peter Maydell
On 15 February 2014 16:06, Peter Maydell wrote: > Here's the latest patchset aimed towards implementing AArch64 > system emulation. > Peter Maydell (30): > target-arm: Fix raw read and write functions on AArch64 registers > target-arm: A64: Make cache ID registers visible to AArch64 > targe

Re: [Qemu-devel] [PATCH v3 2/2] target-arm: Add support for AArch32 ARMv8 CRC32 instructions

2014-02-25 Thread Peter Maydell
On 25 February 2014 09:32, Will Newton wrote: > Add support for AArch32 CRC32 and CRC32C instructions added in ARMv8. > The CRC32-C implementation used is the built-in qemu implementation > and The CRC-32 implementation is from zlib. This requires adding zlib > to LIBS to ensure it is linked for t

Re: [Qemu-devel] [PATCH] s390: Storage key global access

2014-02-25 Thread Andreas Färber
Hi, Am 25.02.2014 20:15, schrieb Christian Borntraeger: > On 25/02/14 15:34, Jason J. Herne wrote: > >> Christian, at one point you mentioned that it might be helpful to see this >> patch in the context of the rest of the hotplug patches. If you still feel >> this way let me know and I'll post

Re: [Qemu-devel] [PATCH] s390: Storage key global access

2014-02-25 Thread Christian Borntraeger
On 25/02/14 15:34, Jason J. Herne wrote: > Christian, at one point you mentioned that it might be helpful to see this > patch in the context of the rest of the hotplug patches. If you still feel > this way let me know and I'll post the 4-patch series. If not, I still > propose this one for s390

[Qemu-devel] [Bug 1243287] Re: [KVM/QEMU][ARM][SAUCY] fails to boot cloud-image due to host kvm fail

2014-02-25 Thread Peter Maydell
The most recent mailing list discussion about the problem is here: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-December/219176.html It does not look likely that there will be a fix soon: it's complicated (and the suggestion to inject a data abort has been rejected), and it only affe

Re: [Qemu-devel] [PATCH] modules: do not include gmodule-2.0 in static builds

2014-02-25 Thread Peter Maydell
On 25 February 2014 16:42, Peter Maydell wrote: > On 25 February 2014 16:36, Paolo Bonzini wrote: >> gmodule-2.0's pkg-config files include -Wl,--export-dynamic, which breaks >> static builds. It is a glib bug, but we need to support --static builds for >> the linux-user targets, and in the end

Re: [Qemu-devel] [RFC 1/4] Fix issue affecting get_int32_le() in vmstate.c

2014-02-25 Thread Peter Maydell
On 25 February 2014 18:52, Juan Quintela wrote: > BTW, did you find this bug by testing or by code inspection? Trying a KVM<->TCG migration of an ARM guest will likely hit the bug (because the number of coprocessor registers on either end differs). thanks -- PMM

Re: [Qemu-devel] [RFC 1/4] Fix issue affecting get_int32_le() in vmstate.c

2014-02-25 Thread Juan Quintela
Alvise Rigo wrote: > The method is not behaving in the way it's supposed to. It should return > the new value only if it's less than the actual one. > > Signed-off-by: Alvise Rigo See David patch of this function. There were a bug, we were doing the wrong comparison. But we expect not to chang

[Qemu-devel] [Bug 1243287] Re: [KVM/QEMU][ARM][SAUCY] fails to boot cloud-image due to host kvm fail

2014-02-25 Thread Manoj Iyer
A workaround that we used was to rename dmidecode to /bin/true and .make it persistent. dpkg-divert --local --divert /path/dmidecode --rename --add /bin/true. But that is just a workaround, any code that maps() /dev/mem can cause these crashes. Is there a fix for this in the horizon ? -- You rec

[Qemu-devel] [PATCH v2] configure: Make C++ test work with --enable-werror

2014-02-25 Thread Peter Maydell
gcc's C++ compiler complains about being passed some -W options which make sense for C but not for C++. This means we mustn't try a C++ compile with QEMU_CFLAGS, but only with a filtered version that removes the offending options. This filtering was already being done for uses of C++ in the build i

[Qemu-devel] Drop legacy device lists? (was: [PATCH] e1000: add the ability to select among several specific types of e1000 ...)

2014-02-25 Thread Stefan Weil
Am 25.02.2014 09:01, schrieb Andreas Färber: > Hi, > > Am 24.02.2014 20:08, schrieb Romain Dolbeau: [...] >> diff --git a/hw/pci/pci.c b/hw/pci/pci.c >> index 4e0701d..07c8cdd 100644 >> --- a/hw/pci/pci.c >> +++ b/hw/pci/pci.c >> @@ -1572,6 +1572,9 @@ static const char * const pci_nic_models[] = {

Re: [Qemu-devel] [RFC 4/4] Relevant changes to enable KVM to TCG migration

2014-02-25 Thread Peter Maydell
On 25 February 2014 16:52, Alvise Rigo wrote: > CPUARMState: > * added adfsr cp register. > * added aifsr cp register. > These registers have been added because they are migrated by KVM. This > prevents > the migration from failing when trying to copy their values. This should be done in a separ

Re: [Qemu-devel] [RFC 3/4] Add l2ctlr cp register to CPUARMState

2014-02-25 Thread Peter Maydell
On 25 February 2014 16:52, Alvise Rigo wrote: > Since the irq bit seems to not be updated, exclude it from the check done > while copying data during migration. > > Signed-off-by: Alvise Rigo > --- > target-arm/cpu.c | 22 ++ > 1 file changed, 18 insertions(+), 4 deletions(-)

Re: [Qemu-devel] [RFC 2/4] Added flag in ARMCPU to track last execution mode

2014-02-25 Thread Peter Maydell
On 25 February 2014 16:52, Alvise Rigo wrote: > The value of this flag indicates the execution mode of the CPU prior the > migration. It is used to handle the KVM <-> TCG migration. > > Signed-off-by: Alvise Rigo > --- > target-arm/cpu-qom.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --

Re: [Qemu-devel] [RFC 1/4] Fix issue affecting get_int32_le() in vmstate.c

2014-02-25 Thread Peter Maydell
On 25 February 2014 16:52, Alvise Rigo wrote: > The method is not behaving in the way it's supposed to. It should return > the new value only if it's less than the actual one. > > Signed-off-by: Alvise Rigo This clashes with David Gilbert's patch to this function: http://patchwork.ozlabs.org/pa

Re: [Qemu-devel] [RFC 1/4] Fix issue affecting get_int32_le() in vmstate.c

2014-02-25 Thread Eduardo Habkost
On Tue, Feb 25, 2014 at 05:52:47PM +0100, Alvise Rigo wrote: > The method is not behaving in the way it's supposed to. It should return > the new value only if it's less than the actual one. > > Signed-off-by: Alvise Rigo > --- > vmstate.c | 8 > 1 file changed, 4 insertions(+), 4 delet

[Qemu-devel] [PATCH 5/7] KVM: s390: adapter interrupt sources

2014-02-25 Thread Cornelia Huck
Add a new interface to register/deregister sources of adapter interrupts identified by an unique id via the flic. Adapters may also be maskable and carry a list of pinned pages. These adapters will be used by irq routing later. Signed-off-by: Cornelia Huck --- Documentation/virtual/kvm/devices/

[Qemu-devel] [PATCH 0/7] KVM: irqfds for s390

2014-02-25 Thread Cornelia Huck
Hi, here's my current patchset enabling irqfds for s390, based on current kvm/queue. It introduces adapter interrupts for virtio-ccw (these have been specced for virtio-1.0 in the virtio oasis standard that is currently under work). We use two-staged indicators for the queue indicator area (summa

Re: [Qemu-devel] [PATCH v2 2/2] qmp: add query-iothreads command

2014-02-25 Thread Eric Blake
On 02/25/2014 10:19 AM, Stefan Hajnoczi wrote: > The "query-iothreads" command returns a list of information about > iothreads. See the patch for API documentation. > > Signed-off-by: Stefan Hajnoczi > --- > iothread.c | 36 > qapi-schema.json | 29 +++

[Qemu-devel] [PATCH 7/7] KVM: Bump KVM_MAX_IRQ_ROUTES for s390

2014-02-25 Thread Cornelia Huck
The maximum number for irq routes is currently 1024, which is a bit on the small size for s390: We support up to 4 x 64k virtual devices with up to 64 queues, and we need one route for each of the queues if we want to operate it via irqfd. Let's bump this to 4k on s390 for now, as this at least co

Re: [Qemu-devel] [PATCH v2 1/2] iothread: stash thread ID away

2014-02-25 Thread Eric Blake
On 02/25/2014 10:19 AM, Stefan Hajnoczi wrote: > Keep the thread ID around so we can report it via QMP. > > There's only one problem: qemu_get_thread_id() (gettid() wrapper on > Linux) must be called from the thread itself. There is no way to get > the thread ID outside the thread. > > This patc

[Qemu-devel] [PATCH 5/6] s390x/virtio-ccw: reference-counted indicators

2014-02-25 Thread Cornelia Huck
Make code using the same indicators point to a single allocated structure that is freed when the last user goes away. This will be used by the irqfd code to unmap addresses after the last user is gone. Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c | 80 +

[Qemu-devel] [PATCH 6/6] s390x/virtio-ccw: Wire up irq routing and irqfds.

2014-02-25 Thread Cornelia Huck
Make use of the new s390 adapter irq routing support to enable real in-kernel irqfds for virtio-ccw with adapter interrupts. Note that s390 doesn't provide the common KVM_CAP_IRQCHIP capability, but rather needs KVM_CAP_S390_IRQCHIP to be enabled. This is to ensure backward compatibility. Reviewe

[Qemu-devel] [PATCH 3/6] kvm: add kvm_enable_cap_{vm,vcpu}

2014-02-25 Thread Cornelia Huck
Provide helper functions for enabling capabilities (on a vcpu and on a vm). Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- include/sysemu/kvm.h |4 kvm-all.c| 19 ++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/include/sysemu/

[Qemu-devel] [PATCH 4/6] s390x: Add I/O adapter registration.

2014-02-25 Thread Cornelia Huck
Register an I/O adapter interrupt source for when virtio-ccw devices start using adapter interrupts. Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- hw/intc/s390_flic.c | 66 + hw/s390x/css.c| 51 +++

[Qemu-devel] [PATCH 2/6] linux-headers: add new interfaces

2014-02-25 Thread Cornelia Huck
Per-vm capability enablement, adapter interrupt sources, irq routing on s390. Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- linux-headers/asm-s390/kvm.h | 22 ++ linux-headers/linux/kvm.h| 16 2 files changed, 38 insertions(+) diff --git

[Qemu-devel] [PATCH 0/6] qemu: irqfds for s390x

2014-02-25 Thread Cornelia Huck
Hi, here's the companion patchset to "KVM: irqfds for s390", based on Christian's s390-next branch. Patch 1 adds support for adapter interrupts to virtio-ccw. This has been posted before, modulo some fixes. Patch 2 grabs the interfaces introduced by the kernel patchset. Will be replaced by a nor

[Qemu-devel] [PATCH 3/7] KVM: eventfd: Fix lock order inversion.

2014-02-25 Thread Cornelia Huck
When registering a new irqfd, we call its ->poll method to collect any event that might have previously been pending so that we can trigger it. This is done under the kvm->irqfds.lock, which means the eventfd's ctx lock is taken under it. However, if we get a POLLHUP in irqfd_wakeup, we will be ca

[Qemu-devel] [PATCH 6/7] KVM: s390: irq routing for adapter interrupts.

2014-02-25 Thread Cornelia Huck
Introduce a new interrupt class for s390 adapter interrupts and enable irqfds for s390. This is depending on a new s390 specific vm capability, KVM_CAP_S390_IRQCHIP, that needs to be enabled by userspace. Signed-off-by: Cornelia Huck --- Documentation/virtual/kvm/api.txt | 21 ++

[Qemu-devel] [PATCH 1/7] s390/airq: add support for irq ranges

2014-02-25 Thread Cornelia Huck
From: Martin Schwidefsky Add airq_iv_alloc and airq_iv_free to allocate and free consecutive ranges of irqs from the interrupt vector. Signed-off-by: Martin Schwidefsky Signed-off-by: Cornelia Huck --- arch/s390/include/asm/airq.h | 14 +++-- drivers/s390/cio/airq.c | 66

[Qemu-devel] [PATCH 1/6] s390x/virtio-ccw: Adapter interrupt support.

2014-02-25 Thread Cornelia Huck
Handle the new CCW_CMD_SET_IND_ADAPTER command enabling adapter interrupts on guest request. When active, host->guest notifications will be handled via global_indicator -> queue indicators instead of queue indicators + subchannel I/O interrupt. Indicators for virtqueues may be present at an offset.

[Qemu-devel] [PATCH 4/7] KVM: Add per-vm capability enablement.

2014-02-25 Thread Cornelia Huck
Allow KVM_ENABLE_CAP to act on a vm as well as on a vcpu. This makes more sense when the caller wants to enable a vm-related capability. s390 will be the first user; wire it up. Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- Documentation/virtual/kvm/api.txt |6 -- arch/s390

[Qemu-devel] [PATCH 2/7] KVM: s390: virtio-ccw adapter interrupt support.

2014-02-25 Thread Cornelia Huck
Implement the new CCW_CMD_SET_IND_ADAPTER command and try to enable adapter interrupts for every device on the first startup. If the host does not support adapter interrupts, fall back to normal I/O interrupts. virtio-ccw adapter interrupts use the same isc as normal I/O subchannels and share a su

[Qemu-devel] [PATCH v2 2/2] qmp: add query-iothreads command

2014-02-25 Thread Stefan Hajnoczi
The "query-iothreads" command returns a list of information about iothreads. See the patch for API documentation. Signed-off-by: Stefan Hajnoczi --- iothread.c | 36 qapi-schema.json | 29 + qmp-commands.hx | 39 +++

[Qemu-devel] [PATCH v2 1/2] iothread: stash thread ID away

2014-02-25 Thread Stefan Hajnoczi
Keep the thread ID around so we can report it via QMP. There's only one problem: qemu_get_thread_id() (gettid() wrapper on Linux) must be called from the thread itself. There is no way to get the thread ID outside the thread. This patch uses a condvar to wait for iothread_run() to populate the t

[Qemu-devel] [PATCH v2 0/2] dataplane: add query-iothreads QMP command

2014-02-25 Thread Stefan Hajnoczi
v2: * Use "thread-id" instead of "thread_id" in QAPI [eblake] * Avoid mutex unlock/destroy race between threads [pbonzini] This series applies on top of "[PATCH v4 0/6] dataplane: switch to N:M devices-per-thread model". The new "query-iothreads" command allows QMP clients to fetch the thread I

Re: [Qemu-devel] Call for testing QEMU aarch64-linux-user emulation

2014-02-25 Thread Janne Grunau
On 2014-02-25 15:54:37 +, Alex Bennée wrote: > > >> Feedback I'm interested in > >> == > >> > >> * Any instruction failure (please include the log line with the > >> unsupported message) > > > > Neon support is not complete enough to run the hand written neon > > assem

Re: [Qemu-devel] [RFC PATCH] block: optimize zero writes with bdrv_write_zeroes

2014-02-25 Thread Peter Lieven
Am 25.02.2014 14:41, schrieb Kevin Wolf: > Am 24.02.2014 um 14:01 hat Peter Lieven geschrieben: >> On 24.02.2014 11:38, Paolo Bonzini wrote: >>> Il 24/02/2014 11:26, Peter Lieven ha scritto: I personally do not need this for QCOW2 but for iSCSI. Here the optimization is basically sa

Re: [Qemu-devel] [PATCH] configure: Make C++ test work with --enable-werror

2014-02-25 Thread Peter Maydell
On 24 February 2014 19:08, Peter Maydell wrote: > gcc's C++ compiler complains about being passed some -W options > which make sense for C but not for C++. This means we mustn't try > a C++ compile with QEMU_CFLAGS, but only with a filtered version > that removes the offending options. This filter

[Qemu-devel] [RFC 4/4] Relevant changes to enable KVM to TCG migration

2014-02-25 Thread Alvise Rigo
CPUARMState: * added adfsr cp register. * added aifsr cp register. These registers have been added because they are migrated by KVM. This prevents the migration from failing when trying to copy their values. ARMCPRegInfo: * added a pointer to the parent that generated the register (if any). * a fl

[Qemu-devel] [RFC 0/4] target-arm: KVM to TCG migration

2014-02-25 Thread Alvise Rigo
QEMU at the moment doesn't allow the migration between KVM and TCG, in both directions. This limitation is due first of all to the different set of coprocessor registers supported by KVM and TCG, but also in the way the coprocessors values are copied from the incoming data to the local QEMU structu

[Qemu-devel] [RFC 3/4] Add l2ctlr cp register to CPUARMState

2014-02-25 Thread Alvise Rigo
Since the irq bit seems to not be updated, exclude it from the check done while copying data during migration. Signed-off-by: Alvise Rigo --- target-arm/cpu.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 6e7

[Qemu-devel] [RFC 2/4] Added flag in ARMCPU to track last execution mode

2014-02-25 Thread Alvise Rigo
The value of this flag indicates the execution mode of the CPU prior the migration. It is used to handle the KVM <-> TCG migration. Signed-off-by: Alvise Rigo --- target-arm/cpu-qom.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target-arm/cpu-qom.h b/target-arm/cpu-qom.h index afbd422

[Qemu-devel] [RFC 1/4] Fix issue affecting get_int32_le() in vmstate.c

2014-02-25 Thread Alvise Rigo
The method is not behaving in the way it's supposed to. It should return the new value only if it's less than the actual one. Signed-off-by: Alvise Rigo --- vmstate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vmstate.c b/vmstate.c index 284b080..038b274 100644 -

Re: [Qemu-devel] [PATCH 2/2 v3] vfio: blacklist loading of unstable roms

2014-02-25 Thread Bandan Das
Alex Williamson writes: > On Mon, 2014-02-24 at 23:34 -0500, Bandan Das wrote: >> Certain cards such as the Broadcom BCM57810 have rom quirks >> that exhibit unstable system behavior duing device assignment. In >> the particular case of 57810, rom execution hangs and if a FLR >> follows, the devi

Re: [Qemu-devel] [PATCH] modules: do not include gmodule-2.0 in static builds

2014-02-25 Thread Peter Maydell
On 25 February 2014 16:36, Paolo Bonzini wrote: > gmodule-2.0's pkg-config files include -Wl,--export-dynamic, which breaks > static builds. It is a glib bug, but we need to support --static builds for > the linux-user targets, and in the end all that is needed to fix this is: > > * outlaw --enab

Re: [Qemu-devel] [PATCH 0/7] timer: move APIs together according to their category

2014-02-25 Thread Paolo Bonzini
Il 25/02/2014 17:25, Alex Bligh ha scritto: I'm generally in favour of this patch set or something like it. It's nicely constrained to 2 include files. It appears to touch no code. And it appears to makes things tidier. Stefan / Paolo? If you agree I will review in greater detail. Sure, any h

  1   2   3   >