Re: [Qemu-devel] [Qemu-block] [PATCH v3 03/13] l2tpv3: Drop l2tpv3_can_send

2015-05-25 Thread Fam Zheng
On Tue, 05/19 15:48, Stefan Hajnoczi wrote: > On Tue, May 19, 2015 at 10:51:00AM +, Fam Zheng wrote: > > This callback is called by main loop before polling s->fd, if it returns > > false, the fd will not be polled in this iteration. > > > > This is redundant with checks inside read callback.

[Qemu-devel] [PATCH] memory_mapping: Use qemu_common.h include

2015-05-25 Thread Peter Crosthwaite
Rather than an explicit inclusion of cpu.h. This maked it more consistent with other core code files, which either just rely on qemu-common.h inclusion or preceed cpu.h with qemu-common.h anyway. Signed-off-by: Peter Crosthwaite --- Picked up by my multi arch WIP where target-multi/cpu.h cant han

Re: [Qemu-devel] [PATCH v3 4/4] target-arm: Add the GICv2m to the virt board

2015-05-25 Thread Pavel Fedin
Hi! > > Why? The v2m device isn't really related to the GICv3... > In the future this handle could point to GICv2m or GICv3 ITS or GICv3 > (if I understand it correctly, when it supports message base interrupts > and no ITS). They all would play the same role of msi-controller. Yes, exactly. In

Re: [Qemu-devel] [PATCH v2 4/5] gtk: add opengl support, using egl

2015-05-25 Thread Gerd Hoffmann
Hi, > only). That, or pass -Wno-deprecated-declarations for compiling > ui/gtk.c, but that seems very ugly to me. We can also try some #pragma warn dance, to limit the -Wno-deprecated-declarations to a small code block. We have something simliar already for a bug in the gtk2 headers. cheers,

Re: [Qemu-devel] [PATCH V7 06/24] acpi: add aml_shiftright() term

2015-05-25 Thread Shannon Zhao
On 2015/5/25 23:33, Marcel Apfelbaum wrote: > Add encoding for ACPI DefShiftRight Opcode. > > Reviewed-by: Igor Mammedov > Signed-off-by: Marcel Apfelbaum Reviewed-by: Shannon Zhao > --- > hw/acpi/aml-build.c | 10 ++ > include/hw/acpi/aml-build.h | 1 + > 2 files changed,

Re: [Qemu-devel] [PATCH V7 05/24] acpi: add aml_shiftleft() term

2015-05-25 Thread Shannon Zhao
On 2015/5/25 23:33, Marcel Apfelbaum wrote: > Add encoding for ACPI DefShiftLeft Opcode. > > Reviewed-by: Igor Mammedov > Signed-off-by: Marcel Apfelbaum Reviewed-by: Shannon Zhao > --- > hw/acpi/aml-build.c | 10 ++ > include/hw/acpi/aml-build.h | 1 + > 2 files changed, 1

Re: [Qemu-devel] [PATCH V7 04/24] acpi: add aml_index() term

2015-05-25 Thread Shannon Zhao
On 2015/5/25 23:33, Marcel Apfelbaum wrote: > Add encoding for ACPI DefIndex Opcode. > > Signed-off-by: Marcel Apfelbaum Reviewed-by: Shannon Zhao > --- > hw/acpi/aml-build.c | 10 ++ > include/hw/acpi/aml-build.h | 1 + > 2 files changed, 11 insertions(+) > > diff --git a/

Re: [Qemu-devel] [PATCH 0/4] More core code ENV_GET_CPU removals

2015-05-25 Thread Andreas Färber
Am 25.05.2015 um 15:08 schrieb Paolo Bonzini: > On 25/05/2015 08:22, Peter Crosthwaite wrote: >> Hi Andreas, Richard and all, >> >> I'm moving towards the goal of having no core code usages of ENV_GET_CPU. >> This has two advantages: >> >> 1: It means we are closer to common-obj'ing core code like

Re: [Qemu-devel] [PATCH V7 02/24] acpi: add aml_add() term

2015-05-25 Thread Shannon Zhao
On 2015/5/25 23:33, Marcel Apfelbaum wrote: > Add encoding for ACPI DefAdd Opcode. > > Reviewed-by: Igor Mammedov > Signed-off-by: Marcel Apfelbaum Reviewed-by: Shannon Zhao > --- > hw/acpi/aml-build.c | 10 ++ > include/hw/acpi/aml-build.h | 1 + > 2 files changed, 11 inse

Re: [Qemu-devel] [Qemu-stable] [PATCH v5 3/8] mirror: Do zero write on target if sectors not allocated

2015-05-25 Thread Fam Zheng
On Tue, 05/26 07:53, Peter Lieven wrote: > Am 26.05.2015 um 05:36 schrieb Fam Zheng: > >If guest discards a source cluster, mirroring with bdrv_aio_readv is > >overkill. > >Some protocols do zero upon discard, where it's best to use > >bdrv_aio_write_zeroes, otherwise, bdrv_aio_discard will be eno

Re: [Qemu-devel] [PATCH 08/10] target-s390x: implement STFLE instruction

2015-05-25 Thread Aurelien Jarno
On 2015-05-25 16:08, Richard Henderson wrote: > On 05/24/2015 04:47 PM, Aurelien Jarno wrote: > >Cc: Alexander Graf > >Cc: Richard Henderson > >Signed-off-by: Aurelien Jarno > > Sadly, implementing this breaks current kernels. > I did this about two years ago and havn't figured > out what to do

Re: [Qemu-devel] [PATCH 07/10] target-s390x: enable fully implemented facilities

2015-05-25 Thread Aurelien Jarno
On 2015-05-25 23:47, Alexander Graf wrote: > > > On 25.05.15 23:13, Aurelien Jarno wrote: > > On 2015-05-25 23:04, Alexander Graf wrote: > >> > >> > >> On 25.05.15 23:02, Aurelien Jarno wrote: > >>> On 2015-05-25 22:39, Alexander Graf wrote: > > > On 25.05.15 01:47, Aurelien Jarno

Re: [Qemu-devel] [PATCH 0/4] More core code ENV_GET_CPU removals

2015-05-25 Thread Peter Crosthwaite
On Mon, May 25, 2015 at 6:08 AM, Paolo Bonzini wrote: > > > On 25/05/2015 08:22, Peter Crosthwaite wrote: >> Hi Andreas, Richard and all, >> >> I'm moving towards the goal of having no core code usages of ENV_GET_CPU. >> This has two advantages: >> >> 1: It means we are closer to common-obj'ing co

[Qemu-devel] [PATCH V3] vhost: logs sharing

2015-05-25 Thread Jason Wang
We allocate one vhost log per vhost device. This is sub optimal when: - Guest has several device with vhost as backend - Guest has multiqueue devices Since each vhost device will allocate and use their private log, this could cause very huge unnecessary memory allocation. We can in fact avoid ext

Re: [Qemu-devel] [Qemu-stable] [PATCH v5 3/8] mirror: Do zero write on target if sectors not allocated

2015-05-25 Thread Peter Lieven
Am 26.05.2015 um 05:36 schrieb Fam Zheng: If guest discards a source cluster, mirroring with bdrv_aio_readv is overkill. Some protocols do zero upon discard, where it's best to use bdrv_aio_write_zeroes, otherwise, bdrv_aio_discard will be enough. Signed-off-by: Fam Zheng --- block/mirror.c |

[Qemu-devel] [PATCH] configure: Unify arm and aarch64 disas configury

2015-05-25 Thread Peter Crosthwaite
From: Peter Crosthwaite The "arm" variant for this case already contains everything needed for aarch64. As aarch64 already uses arm as a base architecture, it will already have the CONFIG_ARM_DIS defined meaning no functional change. So just make the configure code simpler. Following this patch:

[Qemu-devel] [PATCH] Makefile.target: set master BUILD_DIR

2015-05-25 Thread Peter Crosthwaite
make can be invoked in the individual build dirs to build an individual target or just a single file of a target. e.g. touch translate-all.c make -C microblazeel-softmmu translate-all.o There is however a small bug when using the pixman submodule. config-host.mak will ref BUILD_DIR for the pixman

Re: [Qemu-devel] [RFC PATCH 4/4] vhost-user: Add new option to specify vhost-user backend supports

2015-05-25 Thread Tetsuya Mukawa
On 2015/05/26 11:46, Tetsuya Mukawa wrote: > Hi Eric, > > On 月, 2015-05-25 at 16:11 -0600, Eric Blake wrote: >> On 05/25/2015 01:28 AM, Tetsuya Mukawa wrote: >>> This patch adds 'backend_features' option for vhost-user backends. >>> If this option is specified, QEMU assumes vhost-user backends supp

[Qemu-devel] [PATCH v5 6/8] qemu-iotests: Make block job methods common

2015-05-25 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Paolo Bonzini --- tests/qemu-iotests/041| 66 ++- tests/qemu-iotests/iotests.py | 28 ++ 2 files changed, 43 insertions(+), 51 deletions(-) diff --git a/tests/qemu-iotes

[Qemu-devel] [PATCH v5 4/8] block: Fix dirty bitmap in bdrv_co_discard

2015-05-25 Thread Fam Zheng
Unsetting dirty globally with discard is not very correct. The discard may zero out sectors (depending on can_write_zeroes_with_unmap), we should replicate this change to destination side to make sure that the guest sees the same data. Calling bdrv_reset_dirty also troubles mirror job because the

[Qemu-devel] [PATCH v5 3/8] mirror: Do zero write on target if sectors not allocated

2015-05-25 Thread Fam Zheng
If guest discards a source cluster, mirroring with bdrv_aio_readv is overkill. Some protocols do zero upon discard, where it's best to use bdrv_aio_write_zeroes, otherwise, bdrv_aio_discard will be enough. Signed-off-by: Fam Zheng --- block/mirror.c | 20 ++-- 1 file changed, 18

[Qemu-devel] [PATCH v5 2/8] qmp: Add optional bool "unmap" to drive-mirror

2015-05-25 Thread Fam Zheng
If specified as "true", it allows discarding on target sectors where source is not allocated. Signed-off-by: Fam Zheng --- block/mirror.c| 7 +-- blockdev.c| 5 + hmp.c | 2 +- include/block/block_int.h | 2 ++ qapi/block-core.json | 8

[Qemu-devel] [PATCH v5 8/8] iotests: Use event_wait in wait_ready

2015-05-25 Thread Fam Zheng
Only poll the specific type of event we are interested in, to avoid stealing events that should be consumed by someone else. Suggested-by: John Snow Signed-off-by: Fam Zheng Reviewed-by: John Snow --- tests/qemu-iotests/iotests.py | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v5 7/8] qemu-iotests: Add test case for mirror with unmap

2015-05-25 Thread Fam Zheng
This checks that the discard on mirror source that effectively zeroes data is also reflected by the data of target. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- tests/qemu-iotests/132 | 59 ++ tests/qemu-iotests/132.out | 5 tests/qem

[Qemu-devel] [PATCH v5 5/8] block: Remove bdrv_reset_dirty

2015-05-25 Thread Fam Zheng
Using this function would always be wrong because a dirty bitmap must have a specific owner that consumes the dirty bits and calls bdrv_reset_dirty_bitmap(). Remove the unused function to avoid future misuse. Reviewed-by: Eric Blake Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block.c

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

2015-05-25 Thread Fam Zheng
v5: Rewrite patch 1. Address Eric's comments on patch 3. Add Eric's rev-by to patches 2 & 4. Check BDRV_BLOCK_DATA in patch 3. [Paolo] This fixes the mirror assert failure reported by wangxiaolong: https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg04458.html The direct cause i

[Qemu-devel] [PATCH v5 1/8] block: Add bdrv_get_block_status_above

2015-05-25 Thread Fam Zheng
Like bdrv_is_allocated_above, this function follows the backing chain until seeing BDRV_BLOCK_ALLOCATED. Base is not included. Reimplement bdrv_is_allocated on top. Signed-off-by: Fam Zheng --- block/io.c| 53 --- include/block/block

Re: [Qemu-devel] [PATCH v4 1/8] block: Add "base" option to bdrv_get_block_status

2015-05-25 Thread Fam Zheng
On Mon, 05/25 16:43, Paolo Bonzini wrote: > > > On 22/05/2015 05:40, Fam Zheng wrote: > > +{ > > +BlockDriverState *p; > > +int64_t ret; > > + > > +assert(bs != base); > > +for (p = bs; p != base; p = p->backing_hd) { > > +ret = bdrv_co_get_block_status(p, sector_num, nb_s

Re: [Qemu-devel] [PATCH] configure: Check for libfdt version 1.4.0

2015-05-25 Thread David Gibson
On Mon, May 25, 2015 at 01:30:11PM +0100, Peter Maydell wrote: > On 25 May 2015 at 02:35, David Gibson wrote: > > On Mon, May 18, 2015 at 09:43:21AM +0200, Thomas Huth wrote: > >> Some recent patches require functions from libfdt version 1.4.0, > >> so we should check for this version during the c

Re: [Qemu-devel] [RFC PATCH 4/4] vhost-user: Add new option to specify vhost-user backend supports

2015-05-25 Thread Tetsuya Mukawa
Hi Eric, On 月, 2015-05-25 at 16:11 -0600, Eric Blake wrote: > On 05/25/2015 01:28 AM, Tetsuya Mukawa wrote: > > This patch adds 'backend_features' option for vhost-user backends. > > If this option is specified, QEMU assumes vhost-user backends support > > the features specified by user, and QEMU

Re: [Qemu-devel] [PATCH qemu v7 06/14] spapr_iommu: Introduce "enabled" state for TCE table

2015-05-25 Thread David Gibson
On Tue, May 26, 2015 at 01:05:56AM +1000, Alexey Kardashevskiy wrote: > Hi Paolo, > > I have had a conversation with Mike and it turns out I am not allowed to > create/remove memory regions dynamically (docs/memory.txt:101); otherwise > "destroying regions during reset causes assertion in RCU thre

[Qemu-devel] [PATCHv2 4/4] spapr: Add sPAPRMachineClass

2015-05-25 Thread David Gibson
Currently although we have an sPAPRMachineState descended from MachineState we don't have an sPAPRMAchineClass descended from MachineClass. So far it hasn't been needed, but several upcoming features are going to want it, so this patch creates a stub implementation. Signed-off-by: Michael Roth S

[Qemu-devel] [PATCHv2 1/4] spapr: Merge sPAPREnvironment into sPAPRMachineState

2015-05-25 Thread David Gibson
The code for -machine pseries maintains a global sPAPREnvironment structure which keeps track of general state information about the guest platform. This predates the existence of the MachineState structure, but performs basically the same function. Now that we have the generic MachineState, fold

[Qemu-devel] [PATCHv2 0/4] sPAPRMachineState cleanups

2015-05-25 Thread David Gibson
This series makes some cleanups to the structures tracking overall machine state for spapr (-machine pseries). First the old sPAPREnvironment structure (which predates the generic MachineState structure) is merged into a spapr specific subclass of MachineState. Then some obsolete fields are cleane

[Qemu-devel] [PATCHv2 3/4] spapr: Remove obsolete entry_point field from sPAPRMachineState

2015-05-25 Thread David Gibson
The sPAPRMachineState structure includes an entry_point field containing the initial PC value for starting the machine, even though this always has the value 0x100. I think this is a hangover from very early versions which bypassed the firmware when using -kernel. In any case it has no function n

[Qemu-devel] [PATCHv2 2/4] spapr: Remove obsolete ram_limit field from sPAPRMachineState

2015-05-25 Thread David Gibson
The ram_limit field was imported from sPAPREnvironment where it predates the machine's ram size being available generically from machine->ram_size. Worse, the existing code was inconsistent about where it got the ram size from. Sometimes it used spapr->ram_limit, sometimes the global 'ram_size' a

Re: [Qemu-devel] [PATCH 3/4] spapr: Remove obsolete entry_point field from sPAPRMachineState

2015-05-25 Thread David Gibson
On Thu, May 07, 2015 at 10:20:03AM +0530, Bharata B Rao wrote: > On Thu, May 07, 2015 at 01:57:03PM +1000, David Gibson wrote: > > The sPAPRMachineState structure includes an entry_point field containing > > the initial PC value for starting the machine, even though this always has > > the value 0x

Re: [Qemu-devel] [PATCH RESEND v1 3/5] target-microblaze: Allow the stack protection to be disabled

2015-05-25 Thread Peter Crosthwaite
On Mon, May 25, 2015 at 6:55 PM, Alistair Francis wrote: > On Mon, May 25, 2015 at 2:07 PM, Peter Crosthwaite > wrote: >> On Mon, May 18, 2015 at 4:13 PM, Alistair Francis >> wrote: >>> Microblaze stack protection is configurable and isn't always enabled. >>> This patch allows the stack protecti

Re: [Qemu-devel] [PATCH RESEND v1 3/5] target-microblaze: Allow the stack protection to be disabled

2015-05-25 Thread Alistair Francis
On Mon, May 25, 2015 at 2:07 PM, Peter Crosthwaite wrote: > On Mon, May 18, 2015 at 4:13 PM, Alistair Francis > wrote: >> Microblaze stack protection is configurable and isn't always enabled. >> This patch allows the stack protection to be disabled from the CPU >> properties. >> >> Signed-off-by:

[Qemu-devel] [PATCH v2 3/3] hw/i386/acpi-build: decref after use

2015-05-25 Thread Shannon Zhao
From: Shannon Zhao valgrind complains about: ==16447== 48 bytes in 2 blocks are definitely lost in loss record 2,033 of 3,310 ==16447==at 0x4C2845D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==16447==by 0x2E4FD7: malloc_and_trace (vl.c:2546) ==16447==by 0x64C7

[Qemu-devel] [PATCH v2 1/3] hw/i386/pc_piix: Fix memory leak

2015-05-25 Thread Shannon Zhao
From: Shannon Zhao valgrind complains about: ==16447== 8 bytes in 1 blocks are definitely lost in loss record 552 of 3,310 ==16447==at 0x4C2845D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==16447==by 0x2E4FD7: malloc_and_trace (vl.c:2546) ==16447==by 0x64C770E

[Qemu-devel] [PATCH v2 0/3] Fix memory leak spotted by valgrind

2015-05-25 Thread Shannon Zhao
From: Shannon Zhao These patches fix memmory leak spotted by valgrind. changes since v1: * use qemu_allocate_irq instead of qemu_allocate_irqs for allocating one irq (Paolo) * Add review-by from Igor for PATCH 3/3 Shannon Zhao (3): hw/i386/pc_piix: Fix memory leak hw/ide/pci: Fix me

[Qemu-devel] [PATCH v2 2/3] hw/ide/pci: Fix memory leak

2015-05-25 Thread Shannon Zhao
From: Shannon Zhao valgrind complains about: ==16447== 16 bytes in 2 blocks are definitely lost in loss record 1,304 of 3,310 ==16447==at 0x4C2845D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==16447==by 0x2E4FD7: malloc_and_trace (vl.c:2546) ==16447==by 0x64C7

Re: [Qemu-devel] [PATCH 1/4] spapr: Merge sPAPREnvironment into sPAPRMachineState

2015-05-25 Thread David Gibson
On Thu, May 07, 2015 at 10:13:43AM +0200, Thomas Huth wrote: > On Thu, 7 May 2015 13:57:01 +1000 > David Gibson wrote: > > > The code for -machine pseries maintains a global sPAPREnvironment structure > > which keeps track of general state information about the guest platform. > > This predates

Re: [Qemu-devel] [PATCH 2/4] spapr: Remove obsolete ram_limit field from sPAPRMachineState

2015-05-25 Thread David Gibson
On Thu, May 07, 2015 at 02:12:58PM +1000, Alexey Kardashevskiy wrote: > On 05/07/2015 01:57 PM, David Gibson wrote: > >The ram_limit field was imported from sPAPREnvironment where it predates > >the machine's ram size being available generically from machine->ram_size. > > > >Signed-off-by: David G

Re: [Qemu-devel] [PATCH 2/3] hw/ide/pci: Fix memory leak

2015-05-25 Thread Shannon Zhao
On 2015/5/25 21:12, Paolo Bonzini wrote: > > > On 25/05/2015 10:37, Shannon Zhao wrote: >> From: Shannon Zhao >> >> valgrind complains about: >> ==16447== 16 bytes in 2 blocks are definitely lost in loss record 1,304 of >> 3,310 >> ==16447==at 0x4C2845D: malloc (in >> /usr/lib64/valgrind/

Re: [Qemu-devel] [PATCH v5 3/4] spapr_pci: enumerate and add PCI device tree

2015-05-25 Thread David Gibson
On Mon, May 25, 2015 at 03:53:52PM +0530, Nikunj A Dadhania wrote: > Alexey Kardashevskiy writes: > > On 05/25/2015 02:45 PM, Nikunj A Dadhania wrote: > >> Alexey Kardashevskiy writes: [snip] > >>> Can we also add a hack here to scan for the "qemu,phb-enumerated" string > >>> in > >>> the SLOF b

Re: [Qemu-devel] [PATCH] target-cris: update CPU state save/load to use VMStateDescription

2015-05-25 Thread Edgar E. Iglesias
On Mon, May 25, 2015 at 04:53:19PM +0100, Peter Maydell wrote: > From: Juan Quintela > > Update the CRIS CPU state save/load to use a VMStateDescription struct > rather than cpu_save/cpu_load functions. > > Have to define TLBSet struct. > Multidimensional arrays in C are a mess, just unroll them

Re: [Qemu-devel] [PATCH 08/10] target-s390x: implement STFLE instruction

2015-05-25 Thread Alexander Graf
On 26.05.15 01:08, Richard Henderson wrote: > On 05/24/2015 04:47 PM, Aurelien Jarno wrote: >> Cc: Alexander Graf >> Cc: Richard Henderson >> Signed-off-by: Aurelien Jarno > > Sadly, implementing this breaks current kernels. > I did this about two years ago and havn't figured > out what to do

Re: [Qemu-devel] [PATCH 08/10] target-s390x: implement STFLE instruction

2015-05-25 Thread Richard Henderson
On 05/24/2015 04:47 PM, Aurelien Jarno wrote: Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Aurelien Jarno Sadly, implementing this breaks current kernels. I did this about two years ago and havn't figured out what to do about it. The silly code in head.S doesn't check for just th

Re: [Qemu-devel] [PATCH v2] device-tree: Make a common-obj

2015-05-25 Thread Alexander Graf
On 26.05.15 01:01, Paolo Bonzini wrote: > > > On 25/05/2015 22:46, Alexander Graf wrote: >> >> On 24.05.15 22:20, Peter Crosthwaite wrote: There is no reason for device tree API to be built per-target. common-obj it. There is an extraneous inclusion of config.h that needs to be r

Re: [Qemu-devel] [PATCH v2] device-tree: Make a common-obj

2015-05-25 Thread Paolo Bonzini
On 25/05/2015 22:46, Alexander Graf wrote: > > On 24.05.15 22:20, Peter Crosthwaite wrote: >> > There is no reason for device tree API to be built per-target. >> > common-obj it. There is an extraneous inclusion of config.h that >> > needs to be removed. >> > >> > Cc: Alexander Graf >> > Revie

Re: [Qemu-devel] [RFC PATCH 4/4] vhost-user: Add new option to specify vhost-user backend supports

2015-05-25 Thread Eric Blake
On 05/25/2015 01:28 AM, Tetsuya Mukawa wrote: > This patch adds 'backend_features' option for vhost-user backends. > If this option is specified, QEMU assumes vhost-user backends support > the features specified by user, and QEMU can start without vhost-user > backend. > > Here are examples. > * Q

Re: [Qemu-devel] [PATCH 0/5] Clean and improve time related helpers

2015-05-25 Thread Alexander Graf
On 18.05.15 23:42, Aurelien Jarno wrote: > This patch series cleans and improves the time-of-day clock and CPU > timer. Most notably it implements the STPT instruction, which allow > the Linux kernel to do time accouting (so top reports correct values). Thanks, applied all to s390-next. Alex

Re: [Qemu-devel] [PATCH] target-s390x: fix LOAD MULTIPLE instruction on page boundary

2015-05-25 Thread Alexander Graf
On 25.05.15 23:05, Aurelien Jarno wrote: > On 2015-05-23 12:33, Richard Henderson wrote: >> On 05/23/2015 12:59 AM, Aurelien Jarno wrote: >>> On 2015-05-21 14:42, Richard Henderson wrote: Hmm. Seems to be un/under-specified in the PoO. That said, >>> >>> There is a small sentence in the Po

Re: [Qemu-devel] [PATCH v2 00/29] Dirty bitmap atomic access and optimizations

2015-05-25 Thread Paolo Bonzini
On 27/04/2015 18:28, Paolo Bonzini wrote: > QEMU is currently accessing the dirty bitmaps very liberally, > which is understandable since the accesses are cheap. This is > however not good for squeezing maximum performance out of dataplane, > and is also not good if the accesses become more expe

Re: [Qemu-devel] [PATCH 07/10] target-s390x: enable fully implemented facilities

2015-05-25 Thread Alexander Graf
On 25.05.15 23:13, Aurelien Jarno wrote: > On 2015-05-25 23:04, Alexander Graf wrote: >> >> >> On 25.05.15 23:02, Aurelien Jarno wrote: >>> On 2015-05-25 22:39, Alexander Graf wrote: On 25.05.15 01:47, Aurelien Jarno wrote: > Cc: Alexander Graf > Cc: Richard Henderson >>>

Re: [Qemu-devel] [PATCH 07/10] target-s390x: enable fully implemented facilities

2015-05-25 Thread Aurelien Jarno
On 2015-05-25 23:04, Alexander Graf wrote: > > > On 25.05.15 23:02, Aurelien Jarno wrote: > > On 2015-05-25 22:39, Alexander Graf wrote: > >> > >> > >> On 25.05.15 01:47, Aurelien Jarno wrote: > >>> Cc: Alexander Graf > >>> Cc: Richard Henderson > >>> Signed-off-by: Aurelien Jarno > >> > >> Sh

Re: [Qemu-devel] [PATCH] target-s390x: fix LOAD MULTIPLE instruction on page boundary

2015-05-25 Thread Aurelien Jarno
On 2015-05-23 12:33, Richard Henderson wrote: > On 05/23/2015 12:59 AM, Aurelien Jarno wrote: > >On 2015-05-21 14:42, Richard Henderson wrote: > >>Hmm. Seems to be un/under-specified in the PoO. That said, > > > >There is a small sentence in the PoO, in chapter "Program Execution", > >section "Se

Re: [Qemu-devel] [PATCH 07/10] target-s390x: enable fully implemented facilities

2015-05-25 Thread Alexander Graf
On 25.05.15 23:02, Aurelien Jarno wrote: > On 2015-05-25 22:39, Alexander Graf wrote: >> >> >> On 25.05.15 01:47, Aurelien Jarno wrote: >>> Cc: Alexander Graf >>> Cc: Richard Henderson >>> Signed-off-by: Aurelien Jarno >> >> Shouldn't this get populated based on the selected -cpu type? > > In

Re: [Qemu-devel] [PATCH] target-s390x: fix LOAD MULTIPLE instruction on page boundary

2015-05-25 Thread Aurelien Jarno
On 2015-05-25 22:47, Alexander Graf wrote: > > > On 23.05.15 21:33, Richard Henderson wrote: > > On 05/23/2015 12:59 AM, Aurelien Jarno wrote: > >> On 2015-05-21 14:42, Richard Henderson wrote: > >>> Hmm. Seems to be un/under-specified in the PoO. That said, > >> > >> There is a small sentence

Re: [Qemu-devel] [PATCH 07/10] target-s390x: enable fully implemented facilities

2015-05-25 Thread Aurelien Jarno
On 2015-05-25 22:39, Alexander Graf wrote: > > > On 25.05.15 01:47, Aurelien Jarno wrote: > > Cc: Alexander Graf > > Cc: Richard Henderson > > Signed-off-by: Aurelien Jarno > > Shouldn't this get populated based on the selected -cpu type? In the long term yes, but given we only implement one

Re: [Qemu-devel] [PATCH v3 4/4] target-arm: Add the GICv2m to the virt board

2015-05-25 Thread Christoffer Dall
Hi Pavel, On Mon, May 25, 2015 at 04:09:58PM +0300, Pavel Fedin wrote: > Hello! > > > typedef struct MemMapEntry { > > @@ -88,6 +90,7 @@ typedef struct VirtBoardInfo { > > int fdt_size; > > uint32_t clock_phandle; > > uint32_t gic_phandle; > > +uint32_t v2m_phandle; > > } Vi

Re: [Qemu-devel] [PATCH 4/4] cpus: Change exec_init arg to cpu, not env

2015-05-25 Thread Eduardo Habkost
On Sun, May 24, 2015 at 11:22:25PM -0700, Peter Crosthwaite wrote: > The callers (most of them in target-foo/cpu.c) to this function all > have the cpu pointer handy. Just pass it to avoid an ENV_GET_CPU from > core code (in exec.c). > > Cc: Paolo Bonzini > Cc: Richard Henderson > Cc: Peter Mayd

Re: [Qemu-devel] [PATCH] target-s390x: fix LOAD MULTIPLE instruction on page boundary

2015-05-25 Thread Alexander Graf
On 23.05.15 21:33, Richard Henderson wrote: > On 05/23/2015 12:59 AM, Aurelien Jarno wrote: >> On 2015-05-21 14:42, Richard Henderson wrote: >>> Hmm. Seems to be un/under-specified in the PoO. That said, >> >> There is a small sentence in the PoO, in chapter "Program Execution", >> section "Seq

Re: [Qemu-devel] [PATCH v2] device-tree: Make a common-obj

2015-05-25 Thread Alexander Graf
On 24.05.15 22:20, Peter Crosthwaite wrote: > There is no reason for device tree API to be built per-target. > common-obj it. There is an extraneous inclusion of config.h that > needs to be removed. > > Cc: Alexander Graf > Reviewed-by: Andreas Färber > Signed-off-by: Peter Crosthwaite Doesn

Re: [Qemu-devel] [PATCH 07/10] target-s390x: enable fully implemented facilities

2015-05-25 Thread Alexander Graf
On 25.05.15 01:47, Aurelien Jarno wrote: > Cc: Alexander Graf > Cc: Richard Henderson > Signed-off-by: Aurelien Jarno Shouldn't this get populated based on the selected -cpu type? Alex > --- > target-s390x/cpu.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH 1/4] translate-all: Change tb_flush env argument to cpu

2015-05-25 Thread Eduardo Habkost
On Sun, May 24, 2015 at 11:22:22PM -0700, Peter Crosthwaite wrote: > All of the core-code usages of this API have the cpu pointer handy so > pass it in. There are only 3 architecture specific usages (2 of which > are commented out) which can just use ENV_GET_CPU locally to get the > cpu pointer. Th

Re: [Qemu-devel] [PATCH] target-cris: update CPU state save/load to use VMStateDescription

2015-05-25 Thread Peter Maydell
On 25 May 2015 at 19:46, Peter Crosthwaite wrote: > On Mon, May 25, 2015 at 11:30 AM, Peter Maydell > wrote: >> In looking at this I found that we currently have: >> CPUs that set cc->vmsd: arm, i386, lm32, mips, moxie, ppc, s390x >> CPUs that set dc->vmsd: alpha, m68k, microblaze, openrisc, sh4,

Re: [Qemu-devel] [PATCH] target-cris: update CPU state save/load to use VMStateDescription

2015-05-25 Thread Peter Crosthwaite
On Mon, May 25, 2015 at 11:30 AM, Peter Maydell wrote: > On 25 May 2015 at 17:35, Peter Maydell wrote: >> On 25 May 2015 at 16:53, Peter Maydell wrote: >>> From: Juan Quintela >>> >>> Update the CRIS CPU state save/load to use a VMStateDescription struct >>> rather than cpu_save/cpu_load functi

Re: [Qemu-devel] [PATCH] target-cris: update CPU state save/load to use VMStateDescription

2015-05-25 Thread Peter Maydell
On 25 May 2015 at 17:35, Peter Maydell wrote: > On 25 May 2015 at 16:53, Peter Maydell wrote: >> From: Juan Quintela >> >> Update the CRIS CPU state save/load to use a VMStateDescription struct >> rather than cpu_save/cpu_load functions. > Oops, this has a couple of issues I only noticed when I

Re: [Qemu-devel] [PATCH v2] i386: Introduce ARAT CPU feature

2015-05-25 Thread Eduardo Habkost
On Mon, May 25, 2015 at 04:16:14PM +0200, Paolo Bonzini wrote: > On 25/05/2015 16:06, Jan Kiszka wrote: > > static void pc_compat_2_3(MachineState *machine) > > { > > +x86_cpu_compat_set_features("Westmere", FEAT_6_EAX, 0, > > CPUID_6_EAX_ARAT); > > +x86_cpu_compat_set_features("SandyBri

Re: [Qemu-devel] [RFC PATCH v0] numa: API to lookup NUMA node by address

2015-05-25 Thread Eduardo Habkost
On Mon, May 25, 2015 at 01:17:57PM +0530, Bharata B Rao wrote: > On Thu, May 14, 2015 at 11:39:06AM +0200, Paolo Bonzini wrote: > > On 13/05/2015 20:06, Eduardo Habkost wrote: > > > Also, this introduces a circular dependency between pc-dimm.c and > > > numa.c. Instead of that, pc-dimm could simply

Re: [Qemu-devel] [RFC/RFT PATCH v2 1/3] arm/arm64: pageattr: add set_memory_nc

2015-05-25 Thread Andrew Jones
On Fri, May 22, 2015 at 06:08:30PM -0700, Mario Smarduch wrote: > On 05/18/2015 08:53 AM, Catalin Marinas wrote: > > On Thu, May 14, 2015 at 02:46:44PM +0100, Andrew Jones wrote: > >> On Thu, May 14, 2015 at 01:05:09PM +0200, Christoffer Dall wrote: > >>> On Wed, May 13, 2015 at 01:31:52PM +0200, A

Re: [Qemu-devel] [PATCH] target-cris: update CPU state save/load to use VMStateDescription

2015-05-25 Thread Peter Maydell
On 25 May 2015 at 16:53, Peter Maydell wrote: > From: Juan Quintela > > Update the CRIS CPU state save/load to use a VMStateDescription struct > rather than cpu_save/cpu_load functions. > > Have to define TLBSet struct. > Multidimensional arrays in C are a mess, just unroll them. > > Signed-off-b

Re: [Qemu-devel] [PATCH v3 4/4] target-arm: Add the GICv2m to the virt board

2015-05-25 Thread Eric Auger
On 05/25/2015 05:01 PM, Peter Maydell wrote: > On 25 May 2015 at 14:09, Pavel Fedin wrote: >> Hello! >> >>> typedef struct MemMapEntry { >>> @@ -88,6 +90,7 @@ typedef struct VirtBoardInfo { >>> int fdt_size; >>> uint32_t clock_phandle; >>> uint32_t gic_phandle; >>> +uint32_t v

[Qemu-devel] [PATCH] target-cris: update CPU state save/load to use VMStateDescription

2015-05-25 Thread Peter Maydell
From: Juan Quintela Update the CRIS CPU state save/load to use a VMStateDescription struct rather than cpu_save/cpu_load functions. Have to define TLBSet struct. Multidimensional arrays in C are a mess, just unroll them. Signed-off-by: Juan Quintela [PMM: * expand commit message a little sinc

[Qemu-devel] [PATCH V7 24/24] docs: Add PXB documentation

2015-05-25 Thread Marcel Apfelbaum
Signed-off-by: Marcel Apfelbaum --- docs/pci_expander_bridge.txt | 58 1 file changed, 58 insertions(+) create mode 100644 docs/pci_expander_bridge.txt diff --git a/docs/pci_expander_bridge.txt b/docs/pci_expander_bridge.txt new file mode 100644 inde

[Qemu-devel] [PATCH V7 23/24] apci: fix PXB behaviour if used with unsupported BIOS

2015-05-25 Thread Marcel Apfelbaum
PXB does not work with unsupported bioses, but should not interfere with normal OS operation. We don't ship them anymore, but it's reasonable to keep the work-around until we update the bios in qemu. Fix this by not adding PXB mem/IO chunks to _CRS if they weren't configured by BIOS. Signed-off-b

[Qemu-devel] [PATCH V7 20/24] hw/pxb: add map_irq func

2015-05-25 Thread Marcel Apfelbaum
The bios does not index the pxb slot number when it computes the IRQ because it resides on bus 0 and not on the current bus. However Qemu routes the irq through bus 0 and adds the pxb slot to the IRQ computation of the PXB device. Synchronize between bios and Qemu by canceling pxb's effect. Signe

[Qemu-devel] [PATCH V7 17/24] hw/pci: removed 'rootbus nr is 0' assumption from qmp_pci_query

2015-05-25 Thread Marcel Apfelbaum
From: Marcel Apfelbaum Use the newer pci_bus_num to correctly get the root bus number. Signed-off-by: Marcel Apfelbaum --- hw/pci/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 3361d85..a956640 100644 --- a/hw/pci/pci.c +++ b/hw/pc

[Qemu-devel] [PATCH V7 19/24] hw/pci: inform bios if the system has extra pci root buses

2015-05-25 Thread Marcel Apfelbaum
From: Marcel Apfelbaum The bios looks for 'etc/extra-pci-roots' to decide if is going to scan further buses after bus 0 tree. Signed-off-by: Marcel Apfelbaum --- hw/i386/pc.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 769eb25..48

[Qemu-devel] [PATCH V7 21/24] hw/pci: add support for NUMA nodes

2015-05-25 Thread Marcel Apfelbaum
PCI root buses can be attached to a specific NUMA node. PCI buses are not attached by default to a NUMA node. Signed-off-by: Marcel Apfelbaum --- hw/pci/pci.c | 11 +++ include/hw/pci/pci.h | 1 + include/hw/pci/pci_bus.h | 1 + include/sysemu/sysemu.h | 1 + 4 files

[Qemu-devel] [PATCH V7 18/24] hw/pci: introduce PCI Expander Bridge (PXB)

2015-05-25 Thread Marcel Apfelbaum
From: Marcel Apfelbaum PXB is a "light-weight" host bridge whose purpose is to enable the main host bridge to support multiple PCI root buses for pc machines. As oposed to PCI-2-PCI bridge's secondary bus, PXB's bus is a primary bus and can be associated with a NUMA node (different from the main

[Qemu-devel] [PATCH V7 16/24] hw/acpi: remove from root bus 0 the crs resources used by other buses.

2015-05-25 Thread Marcel Apfelbaum
If multiple root buses are used, root bus 0 cannot use all the pci holes ranges. Remove the IO/mem ranges used by the other primary buses. Signed-off-by: Marcel Apfelbaum --- hw/i386/acpi-build.c | 90 1 file changed, 77 insertions(+), 13 dele

[Qemu-devel] [PATCH V7 13/24] hw/acpi: add support for i440fx 'snooping' root busses

2015-05-25 Thread Marcel Apfelbaum
If the machine has extra root busses that are snooping to the i440fx host bridge, we need to add them to acpi in order to be properly detected by guests. Signed-off-by: Marcel Apfelbaum --- hw/i386/acpi-build.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/i386/

[Qemu-devel] [PATCH V7 14/24] hw/apci: add _PRT method for extra PCI root busses

2015-05-25 Thread Marcel Apfelbaum
Signed-off-by: Marcel Apfelbaum --- hw/i386/acpi-build.c | 81 1 file changed, 81 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 4bbac77..497504b 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -61

[Qemu-devel] [PATCH V7 15/24] hw/acpi: add _CRS method for extra root busses

2015-05-25 Thread Marcel Apfelbaum
Save the IO/mem/bus numbers ranges assigned to the extra root busses to be removed from the root bus 0 range. Signed-off-by: Marcel Apfelbaum --- hw/i386/acpi-build.c | 139 +++ 1 file changed, 139 insertions(+) diff --git a/hw/i386/acpi-build.c b

[Qemu-devel] [PATCH V7 09/24] hw/pci: made pci_bus_is_root a PCIBusClass method

2015-05-25 Thread Marcel Apfelbaum
From: Marcel Apfelbaum Refactoring it as a method of PCIBusClass will allow different implementations for subclasses. Removed the assumption that the root bus does not have a parent device because is specific only to the default class implementation. Signed-off-by: Marcel Apfelbaum --- hw/pci

[Qemu-devel] [PATCH V7 11/24] hw/i386: query only for q35/pc when looking for pci host bridge

2015-05-25 Thread Marcel Apfelbaum
Because of the PXB hosts we cannot simply query TYPE_PCI_HOST_BRIDGE anymore. On i386 arch we only have two pci hosts, so we can look only for them. Signed-off-by: Marcel Apfelbaum --- hw/i386/acpi-build.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-)

[Qemu-devel] [PATCH V7 12/24] hw/pci: extend PCI config access to support devices behind PXB

2015-05-25 Thread Marcel Apfelbaum
PXB buses are assumed to be children of bus 0. Look for them while scanning the buses. Signed-off-by: Marcel Apfelbaum --- hw/pci/pci.c | 34 +- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 2f24f74..3361d85 10064

[Qemu-devel] [PATCH V7 22/24] hw/pxb: add numa_node parameter

2015-05-25 Thread Marcel Apfelbaum
The pxb can be attach to and existing numa node by specifying numa_node option that equals the desired numa nodeid. Signed-off-by: Marcel Apfelbaum --- hw/i386/acpi-build.c| 6 ++ hw/pci-bridge/pci_expander_bridge.c | 17 + 2 files changed, 23 insertions(+)

[Qemu-devel] [PATCH V7 05/24] acpi: add aml_shiftleft() term

2015-05-25 Thread Marcel Apfelbaum
Add encoding for ACPI DefShiftLeft Opcode. Reviewed-by: Igor Mammedov Signed-off-by: Marcel Apfelbaum --- hw/acpi/aml-build.c | 10 ++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 82a3fc9..4d4

[Qemu-devel] [PATCH V7 08/24] acpi: add aml_while() term

2015-05-25 Thread Marcel Apfelbaum
Add encoding for ACPI DefWhile Opcode. Reviewed-by: Shannon Zhao Reviewed-by: Igor Mammedov Signed-off-by: Marcel Apfelbaum --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c

[Qemu-devel] [PATCH V7 10/24] hw/pci: made pci_bus_num a PCIBusClass method

2015-05-25 Thread Marcel Apfelbaum
From: Marcel Apfelbaum Refactoring it as a method of PCIBusClass will allow different implementations for subclasses. Signed-off-by: Marcel Apfelbaum --- hw/pci/pci.c | 13 ++--- include/hw/pci/pci_bus.h | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH V7 07/24] acpi: add aml_increment() term

2015-05-25 Thread Marcel Apfelbaum
Add encoding for ACPI DefIncrement Opcode. Reviewed-by: Shannon Zhao Reviewed-by: Igor Mammedov Signed-off-by: Marcel Apfelbaum --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-buil

[Qemu-devel] [PATCH V7 04/24] acpi: add aml_index() term

2015-05-25 Thread Marcel Apfelbaum
Add encoding for ACPI DefIndex Opcode. Signed-off-by: Marcel Apfelbaum --- hw/acpi/aml-build.c | 10 ++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 05bba80..82a3fc9 100644 --- a/hw/acpi/aml-bu

[Qemu-devel] [PATCH V7 06/24] acpi: add aml_shiftright() term

2015-05-25 Thread Marcel Apfelbaum
Add encoding for ACPI DefShiftRight Opcode. Reviewed-by: Igor Mammedov Signed-off-by: Marcel Apfelbaum --- hw/acpi/aml-build.c | 10 ++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 4d45610..f3

[Qemu-devel] [PATCH V7 03/24] acpi: add aml_lless() term

2015-05-25 Thread Marcel Apfelbaum
Add encoding for ACPI DefLLess Opcode. Reviewed-by: Shannon Zhao Reviewed-by: Igor Mammedov Signed-off-by: Marcel Apfelbaum --- hw/acpi/aml-build.c | 9 + include/hw/acpi/aml-build.h | 1 + 2 files changed, 10 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.

[Qemu-devel] [PATCH V7 01/24] acpi: add aml_or() term

2015-05-25 Thread Marcel Apfelbaum
Add encoding for ACPI DefOr Opcode. Reviewed-by: Shannon Zhao Reviewed-by: Igor Mammedov Signed-off-by: Marcel Apfelbaum --- hw/acpi/aml-build.c | 10 ++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.

  1   2   >