Re: [Qemu-devel] [PATCH 10/16] qapi: Better separate the different kinds of helpers

2015-06-12 Thread Eric Blake
On 06/12/2015 08:51 AM, Markus Armbruster wrote: > Insert comments to separate sections dealing with parsing, semantic > analysis, code generation, and so forth. > > Move helpers to their proper section. > > Signed-off-by: Markus Armbruster > --- > scripts/qapi.py | 128 > +

Re: [Qemu-devel] [PATCH 09/16] qapi: Move exprs checking from parse_schema() to check_exprs()

2015-06-12 Thread Eric Blake
On 06/12/2015 08:51 AM, Markus Armbruster wrote: > To have expression semantic analysis in one place rather than two. > > Signed-off-by: Markus Armbruster > --- > scripts/qapi.py | 142 > ++-- > 1 file changed, 66 insertions(+), 76 deletions(-

Re: [Qemu-devel] [PATCH 08/16] qapi: Fix to reject stray 't', 'f' and 'n'

2015-06-12 Thread Eric Blake
On 06/12/2015 08:51 AM, Markus Armbruster wrote: > Screwed up in commit e53188a. > And partly my fault for taking a patch written in python by someone else, without being a python guru myself. :) > Signed-off-by: Markus Armbruster > --- > scripts/qapi.py | 26 -- > 1 f

Re: [Qemu-devel] [PATCH 07/16] qapi: Simplify inclusion cycle detection

2015-06-12 Thread Eric Blake
On 06/12/2015 08:51 AM, Markus Armbruster wrote: > We maintain a stack of filenames in include_hist for convenient cycle > detection. > > As error_path() demonstrates, the same information is readily > available in the expr_info, so just use that, and drop include_hist. > > Signed-off-by: Markus

Re: [Qemu-devel] [PATCH 06/16] qapi: Fix file name in error messages for included files

2015-06-12 Thread Eric Blake
On 06/12/2015 08:51 AM, Markus Armbruster wrote: > We print the name as it appears in the include expression. Tools > processing error messages want it relative to the working directory. > Make it so. > > Signed-off-by: Markus Armbruster > --- > scripts/qapi.py | 7 +++-

Re: [Qemu-devel] [PATCH 05/16] qapi: Improve a couple of confusing variable names

2015-06-12 Thread Eric Blake
On 06/12/2015 08:51 AM, Markus Armbruster wrote: > old name new name > > input_filefname > input_relname fname > input_fname abs_fname > include_path incl_abs_fname > parent_info incl_info Very useful map. > > Signed-off-by: Markus Armbruster > --- >

Re: [Qemu-devel] [PATCH 04/16] qapi: Eliminate superfluous QAPISchema attribute include_hist

2015-06-12 Thread Eric Blake
On 06/12/2015 08:51 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > scripts/qapi.py | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > Ah, I see - you're changing it from an object member to a local variable (because it didn't need to persist beyond the one

Re: [Qemu-devel] [PATCH 07/12] qapi: qapi for audio backends

2015-06-12 Thread Kővágó Zoltán
2015-06-13 00:11 keltezéssel, Eric Blake írta: +## +# @AudiodevAlsaOptions +# +# Options of the alsa audio backend. +# +# @in: #optional options of the capture stream +# +# @out: #optional options of the playback stream Marked optional here... +# +# @threshold: #optional set the threshold (in

Re: [Qemu-devel] [PATCH 03/16] qapi: Eliminate superfluous QAPISchema attribute input_dir

2015-06-12 Thread Eric Blake
On 06/12/2015 08:51 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > scripts/qapi.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt

[Qemu-devel] [PATCH 08/15] target-s390x: basic PER event handling

2015-06-12 Thread Aurelien Jarno
This patch add basic support to generate PER exceptions. It adds two fields to the cpu structure to record for the PER address and PER code & ATMID values. When an exception is triggered and a PER event is pending, the two PER values are copied to the lowcore area. At the end of an instruction, an

[Qemu-devel] [PATCH 15/15] target-s390x: PER: add Breaking-Event-Address register

2015-06-12 Thread Aurelien Jarno
This patch adds support for PER Breaking-Event-Address register. Like real hardware, it save the current PSW address when the PSW address is changed by an instruction. We have to take care of optimizations QEMU does, a branch to the next instruction is still a branch. This register is copied to lo

[Qemu-devel] [PATCH 10/15] target-s390x: PER instruction-fetch event support

2015-06-12 Thread Aurelien Jarno
For the PER instruction-fetch, we can't use the QEMU breakpoint infrastructure as it triggers for a single address and not a full address range, and as it actually stop before the instruction and not before. We therefore call an helper with the just fetched instruction address, which check if the

Re: [Qemu-devel] [PATCH 02/16] qapi: Drop bogus command from docs

2015-06-12 Thread Eric Blake
On 06/12/2015 08:51 AM, Markus Armbruster wrote: > Commit 87a560c4 added it in the wrong place. Commit 59a2c4ce added it > in the right place, but didn't remove it from the wrong place. Do > that now. > > Signed-off-by: Markus Armbruster > --- > docs/qapi-code-gen.txt | 2 -- > 1 file changed,

[Qemu-devel] [PATCH 14/15] target-s390x: PER instruction-fetch nullification event support

2015-06-12 Thread Aurelien Jarno
For the instruction-fetch nullification event, we just reuse the existing instruction-fetch code and trigger the exception immediately in that case. There is no need to save the CPU state in the TCG code as it has been saved by the previous instruction before calling the per_check_exception helper

Re: [Qemu-devel] [PATCH 01/16] MAINTAINERS: Fix up QAPI and QAPI schema file patterns

2015-06-12 Thread Eric Blake
On 06/12/2015 08:50 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > MAINTAINERS | 4 > 1 file changed, 4 insertions(+) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc D

[Qemu-devel] [PATCH 04/15] target-s390x: mvc_fast_memmove: access memory through softmmu

2015-06-12 Thread Aurelien Jarno
mvc_fast_memmove is bypassing the softmmu functions, getting the physical source and destination addresses using the mmu_translate function and accessing the corresponding physical memory. This prevents watchpoints to work correctly. Instead use the tlb_vaddr_to_host function to get the host addre

[Qemu-devel] [PATCH 13/15] target-s390x: PER store-using-real-address event support

2015-06-12 Thread Aurelien Jarno
This PER event happens each time the STURA or STURG instructions are used. As they use helpers, we can just save the event in the PER code there, if enabled. Cc: Richard Henderson Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- target-s390x/mem_helper.c | 16 1 file chang

[Qemu-devel] [PATCH 11/15] translate-all: fix watchpoints if retranslation not possible

2015-06-12 Thread Aurelien Jarno
The tb_check_watchpoint function currently assumes that all memory access is done either directly through the TCG code or through an helper which knows its return address. This is obviously wrong as the helpers use cpu_ldxx/stxx_data functions to access the memory. Instead of aborting in that case

[Qemu-devel] [PATCH 09/15] target-s390x: PER successful-branching event support

2015-06-12 Thread Aurelien Jarno
For the PER successful-branching event support, we can't rely on any QEMU infrastucture. We therefore call an helper in all places where a branch can be taken. We have to pay attention to the branch to next case, as it's still a taken branch. We don't need to care about the cases using goto_tb, as

[Qemu-devel] [PATCH 07/15] target-s390x: add get_per_in_range function

2015-06-12 Thread Aurelien Jarno
This function checks if an address is in between the PER starting address and the PER ending address, taking care of a possible address range loop. Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- target-s390x/cpu.h | 11 +++ 1 file changed, 11 insertions(+)

[Qemu-devel] [PATCH 00/15] target-s390x: add Program-Event Recording feature

2015-06-12 Thread Aurelien Jarno
This patch set adds support for the Program-Event Recording (PER) feature. It implements all the PER functionalities except the following ones: - zero-address-detection event (part of the zero-address-detection facility) - transaction-end event (we don't implement transactional memory) There are

[Qemu-devel] [PATCH 01/15] softmmu: provide tlb_vaddr_to_host function for user mode

2015-06-12 Thread Aurelien Jarno
To avoid to many #ifdef in target code, provide a tlb_vaddr_to_host for both user and softmmu modes. In the first case the function always succeed and just call the g2h function. Signed-off-by: Aurelien Jarno --- include/exec/cpu_ldst.h | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(

[Qemu-devel] [PATCH 12/15] target-s390x: PER storage-alteration event support

2015-06-12 Thread Aurelien Jarno
For the PER storage-alteration event we can use the QEMU watchpoint infrastructure. When PER is enabled or PER control register changed we enable the corresponding watchpoints. When a watchpoint arises we can save the event. Unfortunately the current code does not provide the address space used to

[Qemu-devel] [PATCH 06/15] target-s390x: add get_per_atmid function

2015-06-12 Thread Aurelien Jarno
This function returns the ATMID field that is stored in the per_perc_atmid lowcore entry. Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- target-s390x/cpu.h | 12 1 file changed, 12 insertions(+) diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h inde

[Qemu-devel] [PATCH 03/15] target-s390x: mvc_fast_memset: access memory through softmmu

2015-06-12 Thread Aurelien Jarno
mvc_fast_memset is bypassing the softmmu functions, getting the physical address using the mmu_translate function and accessing the corresponding physical memory. This prevents watchpoints to work correctly. Instead use the tlb_vaddr_to_host function to get the host address corresponding to the gu

[Qemu-devel] [PATCH 02/15] target-s390x: function to adjust the length wrt page boundary

2015-06-12 Thread Aurelien Jarno
This patch adds a function to adjust the length of a transfer so that it doesn't cross a page boundary in softmmu mode. It does nothing in user mode. Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- target-s390x/mem_helper.c | 11 +++ 1 file changed, 11 insert

[Qemu-devel] [PATCH 05/15] target-s390x: add PER related constants

2015-06-12 Thread Aurelien Jarno
Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- target-s390x/cpu.h | 16 1 file changed, 16 insertions(+) diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h index 584e74b..4ff3f5c 100644 --- a/target-s390x/cpu.h +++ b/target-s390x/cpu.h @@ -364,6 +

Re: [Qemu-devel] [RFC 4/9] block: keep bitmap if incremental backup job is cancelled

2015-06-12 Thread John Snow
On 06/12/2015 06:09 AM, Stefan Hajnoczi wrote: > Reclaim the dirty bitmap if an incremental backup block job is > cancelled. The ret variable may be 0 when the job is cancelled so it's > not enough to check ret < 0. > > Signed-off-by: Stefan Hajnoczi > --- > block/backup.c | 2 +- > 1 file ch

Re: [Qemu-devel] [BUGFIX][PATCH v7 1/9] vmport: The io memory region needs to be at least a size of 4

2015-06-12 Thread Eric Blake
On 06/12/2015 08:05 AM, Don Slutz wrote: > Before: > > commit c3c1bb99d1c11978d9ce94d1bdcf0705378c1459 > Author: Peter Crosthwaite > Date: Mon Mar 16 22:35:54 2015 -0700 > > exec: Respect as_tranlsate_internal length clamp > > it did not matter. Only accept I/O that starts on 1st > port.

Re: [Qemu-devel] [RFC v6 0/2] monitor: add memory search commands s, sp

2015-06-12 Thread Eric Blake
On 06/12/2015 07:31 AM, Claudio Fontana wrote: > Hello Markus, > > the merge conflict resolution is the following: > > > Or do you want me to respin based on an uncommited state of master + > "remove ENV_GET_CPU" series? Probably easiest to just post a v7 with RFC dropped and all resolution pe

Re: [Qemu-devel] [PATCH v5 00/12] Dirty bitmaps migration

2015-06-12 Thread John Snow
Ping for maintainer reviews -- I've given it a first pass and it should hopefully be close. Thanks, --js On 05/13/2015 11:29 AM, Vladimir Sementsov-Ogievskiy wrote: > These patches provide dirty bitmap migration feature. Only named dirty > bitmaps are to be migrated. Migration may be enabled usin

Re: [Qemu-devel] [PATCH 0/3] target-alpha PALcode improvements

2015-06-12 Thread Aurelien Jarno
On 2015-06-09 14:13, Richard Henderson wrote: > Rather than copying around a block of 8 registers when we swap modes, > let the translator map code generated for PALmode to the shadow regs > directly. This simplifies PALmode entry and exit sufficiently to > allow these insns to be performed inline

Re: [Qemu-devel] [PATCH v5 2/4] monitor: cleanup parsing of cmd name and cmd arguments

2015-06-12 Thread Bandan Das
Markus Armbruster writes: > Bandan Das writes: > >> There's too much going on in monitor_parse_command(). >> Split up the arguments parsing bits into a separate function >> monitor_parse_arguments(). Let the original function check for >> command validity and sub-commands if any and return data

Re: [Qemu-devel] [PATCH 07/12] qapi: qapi for audio backends

2015-06-12 Thread Eric Blake
On 06/12/2015 06:33 AM, Kővágó, Zoltán wrote: > This patch adds structures into qapi to replace the existing configuration > structures used by audio backends currently. This qapi will be the base of the > -audiodev command line parameter (that replaces the old environment variables > based config)

Re: [Qemu-devel] [PATCH 2/8] qcow2: add dirty-bitmaps feature

2015-06-12 Thread John Snow
On 06/08/2015 11:21 AM, Vladimir Sementsov-Ogievskiy wrote: > From: Vladimir Sementsov-Ogievskiy > > Adds dirty-bitmaps feature to qcow2 format as specified in > docs/specs/qcow2.txt > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/

Re: [Qemu-devel] [PATCH 7/8] qemu: command line option for dirty bitmaps

2015-06-12 Thread John Snow
On 06/08/2015 11:21 AM, Vladimir Sementsov-Ogievskiy wrote: > From: Vladimir Sementsov-Ogievskiy > > The patch adds the following command line option: > > -dirty-bitmap [option1=val1][,option2=val2]... > Available options are: > name The name for the bitmap (necessary). > >

Re: [Qemu-devel] [PATCH 0/2] sh4 linux-user cpu and hwcap

2015-06-12 Thread Aurelien Jarno
On 2015-06-12 16:12, Riku Voipio wrote: > On Thursday, June 4, 2015 10:55:12 PM EEST, Aurelien Jarno wrote: > >On 2015-06-02 21:50, Richard Henderson wrote: > >>On 05/24/2015 03:51 PM, Aurelien Jarno wrote: ... > > >I have added them in my sh4-next branch [1], they will be in the next > >pull requ

Re: [Qemu-devel] [PATCH v2 2/5] hw/arm/pxa2xx: Convert pxa2xx-fir to QOM and VMState

2015-06-12 Thread Peter Crosthwaite
On Fri, Jun 12, 2015 at 7:06 AM, Peter Maydell wrote: > Convert the pxa2xx-fir device to QOM, including using a > VMState for its migration info. > > Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite > --- > hw/arm/pxa2xx.c | 140 > ++

Re: [Qemu-devel] [PATCH V2] pci: fixes to allow booting from extra root pci buses.

2015-06-12 Thread Laszlo Ersek
On 06/12/15 20:40, Kevin O'Connor wrote: > On Fri, Jun 12, 2015 at 05:45:04PM +0200, Laszlo Ersek wrote: >> On 06/12/15 15:03, Kevin O'Connor wrote >>> As for what I would suggest - well, SeaBIOS has already supported >>> multiple root buses for years and already has a mechanism for >>> determinist

Re: [Qemu-devel] [SeaBIOS] qemu freeze, seabios release

2015-06-12 Thread Kevin O'Connor
On Fri, Jun 12, 2015 at 09:00:19AM +0200, Gerd Hoffmann wrote: > Hi, > > > should be cherry-picked into stable please speak up now. So far my list > > is pretty short: > > Looked through the log. The leal instruction and ahci max-ports fixes > are worth having too I think. So I have this lis

Re: [Qemu-devel] [PATCH v2 RFC 0/8] block: persistent dirty bitmaps

2015-06-12 Thread John Snow
On 06/08/2015 11:21 AM, Vladimir Sementsov-Ogievskiy wrote: > v2: > - rebase on my 'Dirty bitmaps migration' series > - remove 'print dirty bitmap', 'query-dirty-bitmap' and use md5 for >testing like with dirty bitmaps migration > - autoclean features > > v1: > > The bitmaps are saved in

Re: [Qemu-devel] [PATCH v2 06/12] Translate offsets to destination address space

2015-06-12 Thread Michael R. Hines
On 06/12/2015 01:50 PM, Dr. David Alan Gilbert wrote: * Michael R. Hines (mrhi...@linux.vnet.ibm.com) wrote: On 06/11/2015 01:58 PM, Dr. David Alan Gilbert wrote: * Michael R. Hines (mrhi...@linux.vnet.ibm.com) wrote: On 06/11/2015 12:17 PM, Dr. David Alan Gilbert (git) wrote: From: "Dr. Davi

[Qemu-devel] [PATCH target-arm v2 08/13] arm: helper: rename get_phys_addr_mpu

2015-06-12 Thread Peter Crosthwaite
This get_phys_addr is really for pmsav5. Rename it accordingly. Reviewed-by: Peter Maydell Signed-off-by: Peter Crosthwaite --- target-arm/helper.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 4a2965f..3f712a6 100

[Qemu-devel] [PATCH target-arm v2 13/13] arm: xlnx-zynqmp: Add 2xCortexR5 CPUs

2015-06-12 Thread Peter Crosthwaite
Add the 2xCortexR5 CPUs to zynqmp board. They are powered off on reset (this is true of real hardware). Signed-off-by: Peter Crosthwaite --- changed since v1: s/rcpu/rpu-cpu/ hw/arm/xlnx-zynqmp.c | 27 +++ include/hw/arm/xlnx-zynqmp.h | 2 ++ 2 files changed, 29

[Qemu-devel] [PATCH target-arm v2 11/13] target-arm: Add support for Cortex-R5

2015-06-12 Thread Peter Crosthwaite
Introduce a CPU model for the Cortex R5 processor. ARMv7 with MPU, and both thumb and ARM div instructions. Also implement dummy ATCM and BTCM. These CPs are defined for R5 but don't have a lot of meaning in QEMU yet. Raz them so the guest can proceed if they are read. The TCM registers will retur

[Qemu-devel] [PATCH target-arm v2 09/13] target-arm: Add registers for PMSAv7

2015-06-12 Thread Peter Crosthwaite
Define the arm CP registers for PMSAv7 and their accessor functions. RGNR serves as a shared index that indexes into arrays storing the DRBAR, DRSR and DRACR registers. DRBAR and friends have to be VMSDd separately from the CP interface using a new PMSA specific VMSD subsection. Signed-off-by: Pet

[Qemu-devel] [PATCH target-arm v2 12/13] arm: xlnx-zynqmp: Preface CPU variables with "apu"

2015-06-12 Thread Peter Crosthwaite
The CPUs currently supported by zynqmp are the APU (application processing unit) CPUs. There are other CPUs in Zynqmp so unqualified "cpus" in ambiguous. Preface the variables with "APU" accordingly, to prepare support adding the RPU (realtime processing unit) processors. Signed-off-by: Peter Cros

[Qemu-devel] [PATCH target-arm v2 06/13] arm: Add has-mpu property

2015-06-12 Thread Peter Crosthwaite
For processors that support MPUs, add a property to de-feature it. This is similar to the implementation of the EL3 feature. The processor definition in init sets ARM_FEATURE_MPU if it can support an MPU. post_init exposes the property, defaulting to true. If cleared by the instantiator, ARM_FEATU

[Qemu-devel] [PATCH target-arm v2 10/13] target-arm: Implement PMSAv7 MPU

2015-06-12 Thread Peter Crosthwaite
Unified MPU only. Uses ARM architecture major revision to switch between PMSAv5 and v7 when ARM_FEATURE_MPU is set. PMSA v6 remains unsupported and is asserted against. Signed-off-by: Peter Crosthwaite --- changed since v1 (PMM review): Add comment about PMSAv6 non-support Fix case where MPU is c

[Qemu-devel] [PATCH target-arm v2 07/13] target-arm/helper.c: define MPUIR register

2015-06-12 Thread Peter Crosthwaite
Define the MPUIR register for MPU supporting systems V6 onwards. Currently only support unified MPU. The size of the unified MPU is supported via the number of "dregions". So just a single config as added to specify this size. (When split MPU is implemented iregions will accompany). Signed-off-by

[Qemu-devel] [PATCH target-arm v2 03/13] arm: helper: Factor out CP regs common to [pv]msa

2015-06-12 Thread Peter Crosthwaite
V6+ PMSA and VMSA share some common registers that are currently in the VMSA definition block. Split them out into a new def that can be shared to PMSA. Signed-off-by: Peter Crosthwaite --- Factor out FAR_EL1 as well target-arm/helper.c | 23 ++- 1 file changed, 14 insertion

[Qemu-devel] [PATCH target-arm v2 02/13] arm: Don't add v7mp registers in MPU systems

2015-06-12 Thread Peter Crosthwaite
These registers are VMSA specific so they should be conditional on VMSA (i.e. !MPU). Signed-off-by: Peter Crosthwaite --- target-arm/helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 1e5c4c1..ce320ed 100644 --- a/target

[Qemu-devel] [PATCH target-arm v2 05/13] arm: Implement uniprocessor with MP config

2015-06-12 Thread Peter Crosthwaite
Add a boolean for indicating uniprocessors with MP extensions. This drives the U bit in MPIDR. Prepares support for Cortex-R5. Signed-off-by: Peter Crosthwaite --- target-arm/cpu-qom.h | 3 +++ target-arm/helper.c | 9 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tar

[Qemu-devel] [PATCH target-arm v2 04/13] arm: Refactor get_phys_addr FSR return mechanism

2015-06-12 Thread Peter Crosthwaite
Currently, the return code for get_phys_addr is overloaded for both success/fail and FSR value return. This doesn't handle the case where there is an error with a 0 FSR. This case exists in PMSAv7. So rework get_phys_addr and friends to return a success/failure boolean return code and populate the

[Qemu-devel] [PATCH target-arm v2 01/13] arm: Do not define TLBTR in PMSA systems

2015-06-12 Thread Peter Crosthwaite
If doing a PMSA (MPU) system do not define the VMSA specific TLBTR CP. The def is done separately from VMSA registers group as it is affected by both the OMAP/STRONGARM RW errata and the MIDR backgrounding. Signed-off-by: Peter Crosthwaite --- target-arm/helper.c | 13 ++--- 1 file chang

[Qemu-devel] [PATCH target-arm v2 00/13] ARM Cortex R5 Support

2015-06-12 Thread Peter Crosthwaite
Hi Peter and all, This patch series adds ARM Cortex R5 processor support. The PMSAv7 MPU is implemented. Two R5s are added to the Xilinx ZynqMP SoC. Changed since v1: Addressed PMM and Alistair reviews (see indiv. patches) Adding prepatory refactorings to target-arm (new patches) - TLBTR VMSA c

Re: [Qemu-devel] [PATCH 2/8] qcow2: add dirty-bitmaps feature

2015-06-12 Thread John Snow
On 06/10/2015 10:30 AM, Stefan Hajnoczi wrote: > On Mon, Jun 08, 2015 at 06:21:20PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > I noticed a corner case, it's probably not a problem in practice: > > Since the dirty bitmap is stored with the help of a BlockDriverState > (and its bs->file), it'

Re: [Qemu-devel] [PATCH v2 06/12] Translate offsets to destination address space

2015-06-12 Thread Dr. David Alan Gilbert
* Michael R. Hines (mrhi...@linux.vnet.ibm.com) wrote: > On 06/11/2015 01:58 PM, Dr. David Alan Gilbert wrote: > >* Michael R. Hines (mrhi...@linux.vnet.ibm.com) wrote: > >>On 06/11/2015 12:17 PM, Dr. David Alan Gilbert (git) wrote: > >>>From: "Dr. David Alan Gilbert" > >>> > >>>The 'offset' field

Re: [Qemu-devel] [PATCH V2] pci: fixes to allow booting from extra root pci buses.

2015-06-12 Thread Kevin O'Connor
On Fri, Jun 12, 2015 at 05:45:04PM +0200, Laszlo Ersek wrote: > On 06/12/15 15:03, Kevin O'Connor wrote > > As for what I would suggest - well, SeaBIOS has already supported > > multiple root buses for years and already has a mechanism for > > deterministically specifying a device on an extra root

Re: [Qemu-devel] [PULL 20/22] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier

2015-06-12 Thread Peter Maydell
On 12 June 2015 at 19:04, Peter Crosthwaite wrote: > So Eric's cpu reset re-ordering patch does fix it. But I thought we > were trying to make reset ordering independent? I think it would be more accurate to say that we hope reset ordering is independent because we have no good way of describing

Re: [Qemu-devel] [PULL 20/22] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier

2015-06-12 Thread Peter Crosthwaite
On Fri, Jun 12, 2015 at 3:04 AM, Peter Maydell wrote: > On 12 June 2015 at 09:53, Eric Auger wrote: >> On 06/12/2015 10:25 AM, Eric Auger wrote: I think it is because this is now delaying arm_load_kernel_notify call until after rom_load_all. From vl.c: if (rom_load_all()

Re: [Qemu-devel] QEMU ARM SMP: IPI delivery delayed until next main loop event // how to improve IPI latency?

2015-06-12 Thread Peter Maydell
On 12 June 2015 at 17:38, Alex Züpke wrote: > Hi, > > I'm benchmarking some IPI (== inter-processor-interrupt) synchronization > stuff of my custom kernel on QEMU ARM (qemu-system-arm -M vexpress-a15 -smp > 2) and ran into the following problem: pending IPIs are delayed until the > QEMU main lo

Re: [Qemu-devel] [PATCH] hw/arm/boot: fix rom_reset notifier registration order

2015-06-12 Thread Peter Crosthwaite
On Fri, Jun 12, 2015 at 5:19 AM, Eric Auger wrote: > commit ac9d32e39664e060cd1b538ff190980d57ad69e4 had the consequence to > register the do_cpu_reset after the rom_reset one. Hence they get > executed in the wrong order. This commit restores the registration of > do_cpu_reset in arm_load_kernel.

Re: [Qemu-devel] [PATCH] Fix older machine type compatibility on power with section footers

2015-06-12 Thread Alexander Graf
On 12.06.15 19:37, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > I forgot to add compatibility for Power when adding section footers. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Alexander Graf Probably should go in via the migration queue. Alex > >

[Qemu-devel] [PATCH] Fix older machine type compatibility on power with section footers

2015-06-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" I forgot to add compatibility for Power when adding section footers. Signed-off-by: Dr. David Alan Gilbert Fixes: 37fb569c0198cba58e3e --- hw/ppc/spapr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f174e5a..01f8da8

[Qemu-devel] [PATCH 1/2] qemu-timer: Call clock reset notifiers on forward jumps

2015-06-12 Thread Paul Donohue
Commit 691a0c9c introduced a mechanism by which QEMU_CLOCK_HOST can notify other parts of the emulator when the host clock has jumped backward. This is used to avoid stalling timers that were scheduled based on the host clock. However, if the host clock jumps forward, then timers that were sched

[Qemu-devel] [PATCH 0/2] qemu-timer/mc146818rtc: fix timer issues related to clock changes

2015-06-12 Thread Paul Donohue
If the host clock jumps forward or backward without resetting the mc146818rtc's periodic timer, the periodic timer interrupts will either fire rapidly (consuming host CPU and blocking operation of the VM) until the timer catches up to the new host clock, or will stall until the host clock catche

[Qemu-devel] [PATCH 2/2] mc146818rtc: Reset the periodic timer on load

2015-06-12 Thread Paul Donohue
When loading a VM from a snapshot or migration, clock changes can cause the periodic timer to stall or loop rapidly. qemu-timer has a reset notifier mechanism that is used to avoid timer stalls or loops if the host clock changes while the VM is running when using QEMU_CLOCK_HOST. However, when lo

Re: [Qemu-devel] [PULL 00/16] Net patches

2015-06-12 Thread Peter Maydell
On 12 June 2015 at 13:57, Stefan Hajnoczi wrote: > The following changes since commit d8e3b729cf452d2689c8669f1ec18158db29fd5a: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2015-06-11 15:33:38 +0100) > > are available in the git repository at: > > git://git

Re: [Qemu-devel] [PATCH v4 6/6] hw/arm/virt: Connect the Hypervisor timer

2015-06-12 Thread Peter Maydell
On 5 June 2015 at 11:33, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v4 5/6] hw/arm/virt: Replace magic IRQ constants with macros

2015-06-12 Thread Peter Maydell
On 5 June 2015 at 11:33, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Replace magic constants with macros from > hw/arm/virt.h and hw/intc/arm_gic_common.h. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v4 4/6] target-arm: Add the Hypervisor timer

2015-06-12 Thread Peter Maydell
On 5 June 2015 at 11:33, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- > static const ARMCPRegInfo generic_timer_cp_reginfo[] = { > /* Note that CNTFRQ is purely reads-as-written for the benefit > * of software; writing it doesn't ac

Re: [Qemu-devel] [PATCH v4 2/6] target-arm: Add CNTHCTL_EL2

2015-06-12 Thread Peter Maydell
On 5 June 2015 at 11:33, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Adds control for trapping selected timer and counter accesses to EL2. > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/cpu.h| 1 + > target-arm/helper.c | 30 -- > 2 files c

Re: [Qemu-devel] [PATCH v4 3/6] target-arm: Pass timeridx as argument to various timer functions

2015-06-12 Thread Peter Maydell
On 5 June 2015 at 11:33, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Prepare for adding the Hypervisor timer, no functional change. > > Signed-off-by: Edgar E. Iglesias Kind of sad to get a pile of wrapper functions, but I guess there's no choice. Reviewed-by: Peter Maydell than

Re: [Qemu-devel] [PATCH v4 1/6] target-arm: Add CNTVOFF_EL2

2015-06-12 Thread Peter Maydell
On 5 June 2015 at 11:33, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Adds support for the virtual timer offset controlled by EL2. > > Signed-off-by: Edgar E. Iglesias > --- > --- a/target-arm/helper.c > +++ b/target-arm/helper.c > @@ -1208,9 +1208,20 @@ static void gt_recalc_timer(

[Qemu-devel] QEMU ARM SMP: IPI delivery delayed until next main loop event // how to improve IPI latency?

2015-06-12 Thread Alex Züpke
Hi, I'm benchmarking some IPI (== inter-processor-interrupt) synchronization stuff of my custom kernel on QEMU ARM (qemu-system-arm -M vexpress-a15 -smp 2) and ran into the following problem: pending IPIs are delayed until the QEMU main loop receives an event (for example the timer interrupt ex

[Qemu-devel] [PULL 25/25] block: Fix reopen flag inheritance

2015-06-12 Thread Kevin Wolf
When reopening an image, the block layer already takes care to reopen bs->file as well with recalculated inherited flags. The same must happen for any other child (most notably missing before this patch: backing files). If bs->file (or any other child) didn't originally inherit from bs, e.g. becau

[Qemu-devel] RFC Multi-threaded TCG design document

2015-06-12 Thread Alex Bennée
Hi, One thing that Peter has been asking for is a design document for the way we are going to approach multi-threaded TCG emulation. I started with the information that was captured on the wiki and tried to build on that. It's almost certainly incomplete but I thought it would be worth posting for

[Qemu-devel] [PULL 17/25] vmdk: Use bdrv_open_image()

2015-06-12 Thread Kevin Wolf
Besides standardising on a single interface for opening child nodes, this patch allows the user to specify options to individual extent nodes. Overriding file names isn't possible with this yet, so it's of limited usefulness, but still a step forward. Signed-off-by: Kevin Wolf Reviewed-by: Eric B

[Qemu-devel] [PULL 21/25] block: Drain requests before swapping nodes in bdrv_swap()

2015-06-12 Thread Kevin Wolf
bdrv_swap() requires that there are no requests in flight on either of the two devices. The request coroutine would work on the wrong BlockDriverState object (with bs->opaque even being interpreted as a different type potentially) and all sorts of bad things would result from this. The currently e

[Qemu-devel] [PULL 19/25] block: Use QemuOpts in bdrv_open_common()

2015-06-12 Thread Kevin Wolf
Instead of manually parsing options and then deleting them from the options QDict, just use QemuOpts like most other places that deal with block device options. More options will be added there and then QemuOpts is a lot more manageable than open-coding everything. Signed-off-by: Kevin Wolf Revi

[Qemu-devel] [PULL 14/25] qdict: Add qdict_{set,copy}_default()

2015-06-12 Thread Kevin Wolf
In the block layer functions that determine options for a child block device, it's a common pattern to either copy options from the parent's options or to set a default string if the option isn't explicitly set yet for the child. Provide convenience functions so that it becomes a one-liner for each

[Qemu-devel] [PULL 24/25] block: Add BlockDriverState.inherits_from

2015-06-12 Thread Kevin Wolf
Currently, the block layer assumes that any block node can have only one parent, and if it has a parent, that it inherits some options/flags from this parent. This is not true any more: With references used in block device creation, a single node can be used by multiple parents, or it can be creat

[Qemu-devel] [PULL 15/25] check-qdict: Test cases for new functions

2015-06-12 Thread Kevin Wolf
This adds test cases for the following new QDict functions: * qdict_array_entries() * qdict_set_default_str() * qdict_copy_default() Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- tests/check-qdict.c | 67 + 1 f

[Qemu-devel] [PULL 20/25] block: Move flag inheritance to bdrv_open_inherit()

2015-06-12 Thread Kevin Wolf
Instead of letting every caller of bdrv_open() determine the right flags for its child node manually and pass them to the function, pass the parent node and the role of the newly opened child (like backing file, protocol layer, etc.). Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by

[Qemu-devel] [PULL 11/25] block: driver should override flags in bdrv_open()

2015-06-12 Thread Kevin Wolf
From: Max Reitz The BDRV_O_PROTOCOL flag should have an impact only if no driver is specified explicitly. Therefore, if bdrv_open() is called with an explicit block driver argument (either through the options QDict or through the drv parameter) and that block driver is a protocol block driver, BD

[Qemu-devel] [PULL 22/25] queue.h: Add QLIST_FIX_HEAD_PTR()

2015-06-12 Thread Kevin Wolf
If the head of a list has been moved to a different memory location, the le_prev link in the first list entry has to be fixed up. Provide a macro that implements this fixup. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- include/qemu/queue.h | 6 ++ 1 file cha

[Qemu-devel] [PULL 13/25] qdict: Add qdict_array_entries()

2015-06-12 Thread Kevin Wolf
This counts the entries in a flattened array in a QDict without actually splitting the QDict into a QList. bdrv_open_image() doesn't take a QList, but rather a QDict and a key prefix string, so this is more convenient for block drivers which have a dynamically sized list of child nodes (e.g. Quoru

[Qemu-devel] [PULL 10/25] block: Change bitmap truncate conditional to assertion

2015-06-12 Thread Kevin Wolf
From: John Snow This is an artifact of an older version that had both all-bitmap and single-bitmap truncate functions, and some info got lost in the shuffle. Bitmaps can only be frozen during a backup operation, and a backup operation should prevent a resize operation, so just assert that this c

[Qemu-devel] [PULL 08/25] raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size

2015-06-12 Thread Kevin Wolf
Image files with an unaligned image size have a final hole that starts at EOF, i.e. in the middle of a sector. Currently, *pnum == 0 is returned when checking the status of this sector. In qemu-img, this triggers an assertion failure. In order to fix this, one type for the sector that contains EOF

[Qemu-devel] [PULL 09/25] block: record new size in bdrv_dirty_bitmap_truncate

2015-06-12 Thread Kevin Wolf
From: John Snow ce1ffea8 neglected to update the BdrvDirtyBitmap structure itself for internal consistency. It's currently not an issue, but for migration and persistence series this will cause headaches. Signed-off-by: John Snow Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block.c

[Qemu-devel] [PULL 18/25] block: Use macro for cache option names

2015-06-12 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Jeff Cody Reviewed-by: Alberto Garcia --- blockdev.c| 24 include/block/block.h | 8 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/blockdev.c

[Qemu-devel] [PULL 16/25] quorum: Use bdrv_open_image()

2015-06-12 Thread Kevin Wolf
Besides standardising on a single interface for opening child nodes, this simplifies the .bdrv_open() implementation of the quorum block driver by using block layer functionality for handling BlockdevRefs. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Jef

[Qemu-devel] [PULL 06/25] vmdk: Fix index_in_cluster calculation in vmdk_co_get_block_status

2015-06-12 Thread Kevin Wolf
From: Fam Zheng It has the similar issue with b1649fae49a8. Since the calculation is repeated for a few times already, introduce a function so it can be reused. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/vmdk.c | 13 - 1 file changed, 12 i

[Qemu-devel] [PULL 05/25] qcow2: Add DEFAULT_L2_CACHE_CLUSTERS

2015-06-12 Thread Kevin Wolf
From: Max Reitz If a relatively large cluster size is chosen, the default of 1 MB L2 cache is not really appropriate. In this case, unless overridden by the user, the default cache size should not be determined by its size in bytes but by the number of L2 tables (clusters) it is supposed to conta

[Qemu-devel] [PULL 04/25] iotests: qcow2 COW with minimal L2 cache size

2015-06-12 Thread Kevin Wolf
From: Max Reitz This adds a test case to test 103 for performing a COW operation in a qcow2 image using an L2 cache with minimal size (which should be at least two clusters so the COW can access both source and destination simultaneously). Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia S

[Qemu-devel] [PULL 23/25] block: Add list of children to BlockDriverState

2015-06-12 Thread Kevin Wolf
This allows iterating over all children of a given BDS, not only including bs->file and bs->backing_hd, but also driver-specific ones like VMDK extents or Quorum children. For bdrv_swap(), the list of children of the swapped BDS stays at that BDS (because that's where the pointers stay as well). T

[Qemu-devel] [PULL 07/25] vmdk: Use vmdk_find_index_in_cluster everywhere

2015-06-12 Thread Kevin Wolf
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/vmdk.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 3e4d84b..56626b0 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1424,7

[Qemu-devel] [PULL 02/25] qemu-iotests: Fix 128 if sudo required

2015-06-12 Thread Kevin Wolf
From: Fam Zheng If passwordless "sudo" works, use it in the qemu-io cmd. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- tests/qemu-iotests/128 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/128 b/tests/qemu-iotes

[Qemu-devel] [PULL 03/25] qcow2: Set MIN_L2_CACHE_SIZE to 2

2015-06-12 Thread Kevin Wolf
From: Max Reitz The L2 cache must cover at least two L2 tables, because during COW two L2 tables are accessed simultaneously. Reported-by: Alexander Graf Cc: qemu-stable Signed-off-by: Max Reitz Tested-by: Alexander Graf Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- block/qcow

  1   2   3   4   >