Re: [Qemu-devel] qemu-system-arm system support for big endian BE8

2015-10-23 Thread Peter Crosthwaite
On Fri, Oct 23, 2015 at 8:47 PM, sridhar kulkarni wrote: > Hi Peter, > > I further debugged this issues, > > > Arround line 5000 of file helper.c, I guess updation of uncached_cpsr was > not proper. I changed following line > You can use git to generate this change information for you in a stand

Re: [Qemu-devel] [PATCH v4 17/33] dimm: abstract dimm device from pc-dimm

2015-10-23 Thread Bharata B Rao
On Mon, Oct 19, 2015 at 6:24 AM, Xiao Guangrong wrote: > A base device, dimm, is abstracted from pc-dimm, so that we can > build nvdimm device based on dimm in the later patch > > Signed-off-by: Xiao Guangrong > --- > default-configs/i386-softmmu.mak | 1 + > default-configs/x86_64-softmmu.ma

Re: [Qemu-devel] [PATCH] copy, dd: simplify and optimize NUL bytes detection

2015-10-23 Thread Pádraig Brady
On 23/10/15 12:15, Pádraig Brady wrote: > On 22/10/15 20:47, Paolo Bonzini wrote: >> >> >> On 22/10/2015 19:39, Radim Krčmář wrote: >>> 2015-10-22 18:14+0200, Paolo Bonzini: On 22/10/2015 18:02, Eric Blake wrote: > I see a bug in there: Of course. You shouldn't have told me what

Re: [Qemu-devel] [PATCH] vhost-user-test: fix up rhel6 build

2015-10-23 Thread Gonglei
On 2015/10/23 19:36, Michael S. Tsirkin wrote: > Build on RHEL6 fails: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42875 > > Apparently unnamed unions couldn't use C99 named field initializers. > Let's just name the payload union field. > > Signed-off-by: Michael S. Tsirkin > --- > tests/vh

Re: [Qemu-devel] qemu-guest-agent question

2015-10-23 Thread Vasiliy Tolstov
2015-10-21 18:28 GMT+03:00 Michael Roth : > > I assumed you were referring to 'commands' via the recent > guest-exec command that was added, but in case that's not what you were > asking about: > > The guest agent commands themselves are synchronous, and qga will > process and respond to requests a

[Qemu-devel] [PATCH v10 13/14] iotests: 124 - transactional failure test

2015-10-23 Thread John Snow
Use a transaction to request an incremental backup across two drives. Coerce one of the jobs to fail, and then re-run the transaction. Verify that no bitmap data was lost due to the partial transaction failure. To support the 'err-cancel' QMP argument name it's necessary for transaction_action()

[Qemu-devel] [PATCH v10 12/14] block: add transactional properties

2015-10-23 Thread John Snow
Add both transactional properties to the QMP transactional interface, and add the BlockJobTxn that we create as a result of the err-cancel property to the BlkActionState structure. [split up from a patch originally by Stefan and Fam. --js] Signed-off-by: Stefan Hajnoczi Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH v10 03/14] block: rename BlkTransactionState and BdrvActionOps

2015-10-23 Thread John Snow
These structures are misnomers, somewhat. (1) BlockTransactionState is not state for a transaction, but is rather state for a single transaction action. Rename it "BlkActionState" to be more accurate. (2) The BdrvActionOps describes operations for the BlkActionState, above. This name

[Qemu-devel] [PATCH v10 11/14] block: Add BlockJobTxn support to backup_run

2015-10-23 Thread John Snow
Allow a BlockJobTxn to be passed into backup_run, which will allow the job to join a transactional group if present. Propagate this new parameter outward into new QMP helper functions in blockdev.c to allow transaction commands to pass forward their BlockJobTxn object in a forthcoming patch. [spl

[Qemu-devel] [PATCH v10 07/14] blockjob: Add "completed" and "ret" in BlockJob

2015-10-23 Thread John Snow
From: Fam Zheng They are set when block_job_completed is called. Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow --- blockjob.c | 3 +++ include/block/blockjob.h | 9 + 2 files changed, 12 insertions(+) diff --git a/bloc

[Qemu-devel] [PATCH v10 14/14] tests: add BlockJobTxn unit test

2015-10-23 Thread John Snow
From: Stefan Hajnoczi The BlockJobTxn unit test verifies that both single jobs and pairs of jobs behave as a transaction group. Either all jobs complete successfully or the group is cancelled. Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz Reviewed-by: John Snow Signed-off-by: Fam Zhe

[Qemu-devel] [PATCH v10 06/14] blockjob: Add .commit and .abort block job actions

2015-10-23 Thread John Snow
From: Fam Zheng Reviewed-by: Max Reitz Reviewed-by: John Snow Signed-off-by: Fam Zheng Signed-off-by: John Snow --- include/block/blockjob.h | 20 1 file changed, 20 insertions(+) diff --git a/include/block/blockjob.h b/include/block/blockjob.h index b649a40..ed856d7 10

[Qemu-devel] [PATCH v10 09/14] block: Add block job transactions

2015-10-23 Thread John Snow
From: Fam Zheng Sometimes block jobs must execute as a transaction group. Finishing jobs wait until all other jobs are ready to complete successfully. Failure or cancellation of one job cancels the other jobs in the group. Signed-off-by: Stefan Hajnoczi [Rewrite the implementation which is now

[Qemu-devel] [PATCH v10 10/14] block/backup: Rely on commit/abort for cleanup

2015-10-23 Thread John Snow
Switch over to the new .commit/.abort handlers for cleaning up incremental bitmaps. [split up from a patch originally by Stefan and Fam. --js] Signed-off-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Signed-off-by: John Snow Signed-off-by: John Snow --- block/backup.c | 22 ++-

[Qemu-devel] [PATCH v10 01/14] qapi: Add transaction support to block-dirty-bitmap operations

2015-10-23 Thread John Snow
This adds two qmp commands to transactions. block-dirty-bitmap-add allows you to create a bitmap simultaneously alongside a new full backup to accomplish a clean synchronization point. block-dirty-bitmap-clear allows you to reset a bitmap back to as-if it were new, which can also be used alongsid

[Qemu-devel] [PATCH v10 02/14] iotests: add transactional incremental backup test

2015-10-23 Thread John Snow
Test simple usage cases for using transactions to create and synchronize incremental backups. Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Signed-off-by: Fam Zheng --- tests/qemu-iotests/124 | 54 +

[Qemu-devel] [PATCH v10 08/14] blockjob: Simplify block_job_finish_sync

2015-10-23 Thread John Snow
From: Fam Zheng With job->completed and job->ret to replace BlockFinishData. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Reviewed-by: John Snow Signed-off-by: John Snow --- blockjob.c | 27 ++- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/blockj

[Qemu-devel] [PATCH v10 05/14] blockjob: Introduce reference count and fix reference to job->bs

2015-10-23 Thread John Snow
From: Fam Zheng Add reference count to block job, meanwhile move the ownership of the reference to job->bs from the caller (which is released in two completion callbacks) to the block job itself. It is necessary for block_job_complete_sync to work, because block job shouldn't live longer than its

[Qemu-devel] [PATCH v10 00/14] block: incremental backup transactions using BlockJobTxn

2015-10-23 Thread John Snow
Welcome to V10! Where'd 8 and 9 go? Private off-list missives from Fam. Now you, I, and everyone on qemu-devel are staring at V10. What's new in V10? I replaced the per-action "transactional-cancel" parameter with a per-transaction paremeter named "err-cancel" which is implemented as an enum in

[Qemu-devel] [PATCH v10 04/14] backup: Extract dirty bitmap handling as a separate function

2015-10-23 Thread John Snow
From: Fam Zheng This will be reused by the coming new transactional completion code. Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow --- block/backup.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff -

Re: [Qemu-devel] [PATCH v7 05/14] qapi: Rework collision assertions

2015-10-23 Thread Eric Blake
On 10/16/2015 10:35 PM, Eric Blake wrote: > Now that we have separate namespaces for QMP vs. tag values, > we can simplify how the QAPISchema*.check() methods check for > collisions. Each QAPISchemaObjectTypeMember check() call is > given a single set of names it must not collide with; this set >

Re: [Qemu-devel] [PATCH v10 24/25] qapi: Remove outdated tests related to QMP/branch collisions

2015-10-23 Thread Eric Blake
On 10/22/2015 11:09 PM, Eric Blake wrote: > Now that branches are in a separate C namespace, we can remove > the restrictions in the parser that claim a branch name would > collide with QMP, and delete the negative tests that are no > longer problematic. A separate patch can then add positive > te

Re: [Qemu-devel] [PATCH qemu v4] monitor/target-ppc: Define target_get_monitor_def

2015-10-23 Thread Benjamin Herrenschmidt
On Thu, 2015-10-22 at 20:20 +1100, David Gibson wrote: > I asked a while back if your patch or BenH's patch doing a similar > thing was the one I should be looking at, and I never got a reply. You must have missed it ... go for Alexey latest Cheers, Ben.

[Qemu-devel] [PATCH v2] target-*: Advance pc after recognizing a breakpoint

2015-10-23 Thread Richard Henderson
Some targets already had this within their logic, but make sure it's present for all targets. Signed-off-by: Richard Henderson --- Version 2 updates the language as discussed in the followup in v1. Peter, in that followup you mentioned that we ought to just use +1 for all targets. I was about t

[Qemu-devel] [PATCH] seccomp: loosen library version dependency

2015-10-23 Thread dann frazier
Drop the libseccomp required version back to 2.1.0, restoring the ability to build w/ --enable-seccomp on Ubuntu 14.04. Commit 4cc47f8b3cc4f32586ba2f7fce1dc267da774a69 tightened the dependency on libseccomp from version 2.1.0 to 2.1.1. This broke building on Ubuntu 14.04, the current Ubuntu LTS re

Re: [Qemu-devel] [PATCH] target-i386: allow any alignment for SMBASE

2015-10-23 Thread Laszlo Ersek
On 10/23/15 20:19, Eduardo Habkost wrote: > On Fri, Oct 23, 2015 at 04:40:01PM +0200, Laszlo Ersek wrote: >> Eduardo, >> >> On 10/13/15 21:45, Eduardo Habkost wrote: >>> On Tue, Oct 13, 2015 at 09:42:50PM +0200, Paolo Bonzini wrote: On 13/10/2015 21:30, Eduardo Habkost wrote: > Y

Re: [Qemu-devel] [PATCH] hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT

2015-10-23 Thread Laszlo Ersek
On 10/23/15 20:20, Jordan Justen wrote: > On 2015-10-23 05:53:17, Laszlo Ersek wrote: >> On 10/23/15 09:26, Paolo Bonzini wrote: >>> >>> On 23/10/2015 06:41, Jordan Justen wrote: On 2015-10-22 12:46:56, Paolo Bonzini wrote: > > On 22/10/2015 20:04, Kevin O'Connor wrote: >> On Thu,

Re: [Qemu-devel] [PATCH v10 10/25] qapi: Unbox base members

2015-10-23 Thread Eric Blake
On 10/23/2015 01:19 PM, Eric Blake wrote: > On 10/23/2015 01:14 PM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Rather than storing a base class as a pointer to a box, just >>> store the fields of that base class in the same order, so that >>> a child struct can be directly cast to its p

Re: [Qemu-devel] [PATCH v10 09/25] qapi: Prefer typesafe upcasts to qapi base classes

2015-10-23 Thread Eric Blake
On 10/23/2015 09:30 AM, Markus Armbruster wrote: > Eric Blake writes: > >> A previous patch (commit 1e6c1616) made it possible to >> directly cast from a qapi type to its base type. A future >> patch will do likewise for structs. However, it requires >> the client code to use a C cast, which tur

[Qemu-devel] [PATCH v6 0/2] PTimer fix and ARM MPTimer conversion

2015-10-23 Thread Dmitry Osipenko
Changelog for ARM MPTimer QEMUTimer to ptimer conversion: V2: Fixed changing periodic timer counter value "on the fly". I added a test to the gist to cover that issue. V3: Fixed starting the timer with load = 0 and counter != 0, added tests to the gist for this issue. Change

[Qemu-devel] [PATCH v6 1/2] hw/ptimer: Fix issues caused by artificially limited timer timeout

2015-10-23 Thread Dmitry Osipenko
Multiple issues here related to the timer with a corrected .limit value: 1) ptimer_get_count() returns incorrect value for the disabled timer after loading the counter with a small value, because corrected limit value is used instead of the original. For instance: 1) ptimer_stop(t) 2) pti

[Qemu-devel] [PATCH v6 2/2] arm_mptimer: Convert to use ptimer

2015-10-23 Thread Dmitry Osipenko
Current ARM MPTimer implementation uses QEMUTimer for the actual timer, this implementation isn't complete and mostly tries to duplicate of what generic ptimer is already doing fine. Conversion to ptimer brings the following benefits and fixes: - Simple timer pausing implementation

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-23 Thread Richard Henderson
On 10/23/2015 09:24 AM, Eduardo Habkost wrote: On Fri, Oct 23, 2015 at 08:35:15AM +0200, Markus Armbruster wrote: Eduardo Habkost writes: On Wed, Oct 21, 2015 at 12:54:23PM +0200, Markus Armbruster wrote: Valerio Aimale writes: [...] There's also a similar patch, floating around the inter

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-23 Thread Alexander Duyck
On 10/23/2015 12:05 PM, Alex Williamson wrote: On Fri, 2015-10-23 at 11:36 -0700, Alexander Duyck wrote: On 10/21/2015 09:37 AM, Lan Tianyu wrote: This patchset is to propose a new solution to add live migration support for 82599 SRIOV network card. Im our solution, we prefer to put all devic

Re: [Qemu-devel] [PATCH v10 07/25] qapi-visit: Split off visit_type_FOO_fields forward decl

2015-10-23 Thread Eric Blake
On 10/23/2015 12:05 PM, Markus Armbruster wrote: def gen_visit_struct_fields(name, base, members): -struct_fields_seen.add(name) - ret = '' if base: ret += gen_visit_implicit_struct(base) +struct_fields_seen.add(name)

Re: [Qemu-devel] [PATCH v10 11/25] qapi-visit: Remove redundant functions for flat union base

2015-10-23 Thread Markus Armbruster
Eric Blake writes: > The code for visiting the base class of a child struct created > visit_type_Base_fields() which covers all fields of Base; while > the code for visiting the base class of a flat union created > visit_type_Union_fields() covering all fields of the base > except the discriminat

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-23 Thread Eduardo Habkost
On Fri, Oct 23, 2015 at 08:35:15AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Wed, Oct 21, 2015 at 12:54:23PM +0200, Markus Armbruster wrote: > >> Valerio Aimale writes: > > [...] > >> > There's also a similar patch, floating around the internet, the uses > >> > shared me

Re: [Qemu-devel] [RFC PATCH 0/2] target-ppc migration fixes

2015-10-23 Thread Mark Cave-Ayland
On 23/10/15 02:46, da...@gibson.dropbear.id.au wrote: > On Sun, Sep 20, 2015 at 10:31:01PM +0200, Alexander Graf wrote: >> >> >> On 14.09.15 21:30, Mark Cave-Ayland wrote: >>> Whilst trying to fix migration of g3beige/mac99 images I came up with the >>> following patchset. The first patch is reall

Re: [Qemu-devel] [PATCH v10 10/25] qapi: Unbox base members

2015-10-23 Thread Eric Blake
On 10/23/2015 01:14 PM, Markus Armbruster wrote: > Eric Blake writes: > >> Rather than storing a base class as a pointer to a box, just >> store the fields of that base class in the same order, so that >> a child struct can be directly cast to its parent. This gives >> less malloc overhead, less

Re: [Qemu-devel] [PATCH v10 10/25] qapi: Unbox base members

2015-10-23 Thread Markus Armbruster
Eric Blake writes: > Rather than storing a base class as a pointer to a box, just > store the fields of that base class in the same order, so that > a child struct can be directly cast to its parent. This gives > less malloc overhead, less pointer dereferencing, and even less > generated code.

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-23 Thread Valerio Aimale
On 10/23/15 12:55 PM, Eduardo Habkost wrote: On Thu, Oct 22, 2015 at 03:51:28PM -0600, Valerio Aimale wrote: On 10/22/15 3:47 PM, Eduardo Habkost wrote: On Thu, Oct 22, 2015 at 01:57:13PM -0600, Valerio Aimale wrote: On 10/22/15 1:12 PM, Eduardo Habkost wrote: On Wed, Oct 21, 2015 at 12:54:23

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-23 Thread Alex Williamson
On Fri, 2015-10-23 at 11:36 -0700, Alexander Duyck wrote: > On 10/21/2015 09:37 AM, Lan Tianyu wrote: > > This patchset is to propose a new solution to add live migration support > > for 82599 > > SRIOV network card. > > > > Im our solution, we prefer to put all device specific operation into VF a

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-23 Thread Eduardo Habkost
On Fri, Oct 23, 2015 at 09:25:03AM +0100, Daniel P. Berrange wrote: > On Thu, Oct 22, 2015 at 03:51:28PM -0600, Valerio Aimale wrote: > > On 10/22/15 3:47 PM, Eduardo Habkost wrote: > > >On Thu, Oct 22, 2015 at 01:57:13PM -0600, Valerio Aimale wrote: > > >>On 10/22/15 1:12 PM, Eduardo Habkost wrote

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-23 Thread Eduardo Habkost
On Thu, Oct 22, 2015 at 03:51:28PM -0600, Valerio Aimale wrote: > On 10/22/15 3:47 PM, Eduardo Habkost wrote: > >On Thu, Oct 22, 2015 at 01:57:13PM -0600, Valerio Aimale wrote: > >>On 10/22/15 1:12 PM, Eduardo Habkost wrote: > >>>On Wed, Oct 21, 2015 at 12:54:23PM +0200, Markus Armbruster wrote: >

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-23 Thread Alexander Duyck
On 10/21/2015 09:37 AM, Lan Tianyu wrote: This patchset is to propose a new solution to add live migration support for 82599 SRIOV network card. Im our solution, we prefer to put all device specific operation into VF and PF driver and make code in the Qemu more general. VF status migration ==

Re: [Qemu-devel] [PATCH] hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT

2015-10-23 Thread Paolo Bonzini
On 23/10/2015 20:20, Jordan Justen wrote: It's not worth the hassle to relocate the SMBASE of the APs? So, basically, write to 0x3-0x38000, then send an SMI IPI to the AP and now you have the AP running in SMI and it has extra privileges? >>> >>> Extra privileges compared to wh

Re: [Qemu-devel] [PATCH 2/2] target-i386: Don't left shift negative constant

2015-10-23 Thread Richard Henderson
On 10/23/2015 05:07 AM, Eduardo Habkost wrote: On Thu, Oct 01, 2015 at 02:06:36PM -0300, Eduardo Habkost wrote: On Thu, Oct 01, 2015 at 11:35:52AM +1000, Richard Henderson wrote: On 09/30/2015 06:34 AM, Eduardo Habkost wrote: Left shift of negative values is undefined behavior. Detected by cla

Re: [Qemu-devel] [PATCH] hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT

2015-10-23 Thread Jordan Justen
On 2015-10-23 05:53:17, Laszlo Ersek wrote: > On 10/23/15 09:26, Paolo Bonzini wrote: > > > > On 23/10/2015 06:41, Jordan Justen wrote: > >> On 2015-10-22 12:46:56, Paolo Bonzini wrote: > >>> > >>> On 22/10/2015 20:04, Kevin O'Connor wrote: > On Thu, Oct 22, 2015 at 10:40:08AM +0200, Paolo Bo

Re: [Qemu-devel] [PATCH] target-i386: allow any alignment for SMBASE

2015-10-23 Thread Eduardo Habkost
On Fri, Oct 23, 2015 at 04:40:01PM +0200, Laszlo Ersek wrote: > Eduardo, > > On 10/13/15 21:45, Eduardo Habkost wrote: > > On Tue, Oct 13, 2015 at 09:42:50PM +0200, Paolo Bonzini wrote: > >> > >> > >> On 13/10/2015 21:30, Eduardo Habkost wrote: > >>> Yeah, the shutdown behavior was never implement

Re: [Qemu-devel] [PATCH v10 07/25] qapi-visit: Split off visit_type_FOO_fields forward decl

2015-10-23 Thread Markus Armbruster
Eric Blake writes: > On 10/23/2015 07:46 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> We generate a static visit_type_FOO_fields() for every type >>> FOO. However, sometimes we need a forward declaration. Split >>> the code to generate the forward declaration out of >>> gen_visit_

Re: [Qemu-devel] Coding style for errors

2015-10-23 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Thu, Oct 22, 2015 at 03:30:34PM +0200, Lluís Vilanova wrote: >> Markus Armbruster writes: >> >> > Lluís Vilanova writes: >> [...] >> >> So, is there any agreement on what should be used? If so, could that >> >> please be >> >> added to CODING_STYLE? >> >> > I think

Re: [Qemu-devel] [PULL 00/13] X86 queue, 2015-10-23

2015-10-23 Thread Peter Maydell
On 23 October 2015 at 16:32, Eduardo Habkost wrote: > Sorry for not submitting this a few days earlier. > > The following changes since commit 147482ae35b896808af68c0051ad86d3aae12979: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-next-20151023' into >

Re: [Qemu-devel] [PATCH v4 10/13] target-arm: Add S2 translation to 64bit S1 PTWs

2015-10-23 Thread Peter Maydell
On 14 October 2015 at 23:55, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add support for applying S2 translation to 64bit S1 > page-table walks. > > Signed-off-by: Edgar E. Iglesias > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v4 13/13] target-arm: Add support for S1 + S2 MMU translations

2015-10-23 Thread Peter Maydell
On 14 October 2015 at 23:55, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/helper.c | 44 +--- > 1 file changed, 37 insertions(+), 7 deletions(-) > > diff --git a/target-arm/helper.c b/target-

[Qemu-devel] [PULL 28/37] aio: Add "is_external" flag for event handlers

2015-10-23 Thread Kevin Wolf
From: Fam Zheng All callers pass in false, and the real external ones will switch to true in coming patches. Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- aio-posix.c | 6 - aio-win32.c | 5

Re: [Qemu-devel] [PATCH v4 11/13] target-arm: Add S2 translation to 32bit S1 PTWs

2015-10-23 Thread Peter Maydell
On 14 October 2015 at 23:55, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add support for applying S2 translation to 32bit S1 > page-table walks. > > Signed-off-by: Edgar E. Iglesias > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] Coding style for errors

2015-10-23 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@gmail.com) wrote: > On Thu, Oct 22, 2015 at 03:30:34PM +0200, Lluís Vilanova wrote: > > Markus Armbruster writes: > > > > > Lluís Vilanova writes: > > [...] > > >> So, is there any agreement on what should be used? If so, could that > > >> please be > > >> added to CO

[Qemu-devel] [PULL 36/37] block: Add "drained begin/end" for internal snapshot

2015-10-23 Thread Kevin Wolf
From: Fam Zheng This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. state->bs is assigned right after bdrv_drained_begin. Because it was used as the flag for deletion or not in abort, now we need a separate flag - InternalSnapsh

[Qemu-devel] [PULL 37/37] tests: Add test case for aio_disable_external

2015-10-23 Thread Kevin Wolf
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/test-aio.c | 24 1 file changed, 24 insertions(+) diff --git a/tests/test-aio.c b/tests/test-aio.c index 03cd45d..1623803 100644 --- a/tests/test-aio.c +++ b/tests/te

[Qemu-devel] [PULL 32/37] block: Introduce "drained begin/end" API

2015-10-23 Thread Kevin Wolf
From: Fam Zheng The semantics is that after bdrv_drained_begin(bs), bs will not get new external requests until the matching bdrv_drained_end(bs). Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/io.c| 17 + include/block/block.h | 19 ++

[Qemu-devel] [PULL 33/37] block: Add "drained begin/end" for transactional external snapshot

2015-10-23 Thread Kevin Wolf
From: Fam Zheng This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- blockdev.c | 11 +-- 1 file changed, 9 insert

[Qemu-devel] [PULL 34/37] block: Add "drained begin/end" for transactional backup

2015-10-23 Thread Kevin Wolf
From: Fam Zheng This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. Move the assignment to state->bs up right after bdrv_drained_begin, so that we can use it in the clean callback. The abort callback will still check bs->job and

Re: [Qemu-devel] [PATCH v5 1/2] hw/ptimer: Set delta to the original limit on reload in ptimer_set_limit()

2015-10-23 Thread Dmitry Osipenko
19.10.2015 23:01, Dmitry Osipenko пишет: What about the following: Add additional ptimer struct member, say "limit_corrected", to check whether the limit was corrected or not. ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload) { .limit_corrected = 0; // on the limit correc

[Qemu-devel] [PULL 29/37] nbd: Mark fd handlers client type as "external"

2015-10-23 Thread Kevin Wolf
From: Fam Zheng So we could distinguish it from internal used fds, thus avoid handling unwanted events in nested aio polls. Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- nbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[Qemu-devel] [PULL 35/37] block: Add "drained begin/end" for transactional blockdev-backup

2015-10-23 Thread Kevin Wolf
From: Fam Zheng Similar to the previous patch, make sure that external events are not dispatched during transaction operations. Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- blockdev.c | 9 - 1 file changed, 8 insertions(+), 1

[Qemu-devel] [PULL 25/37] blockdev: Pull out blockdev option extraction

2015-10-23 Thread Kevin Wolf
From: Max Reitz Extract some of the blockdev option extraction code from blockdev_init() into its own function. This simplifies blockdev_init() and will allow reusing the code in a different function added in a follow-up patch. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c

[Qemu-devel] [PULL 26/37] blockdev: Allow more options for BB-less BDS tree

2015-10-23 Thread Kevin Wolf
From: Max Reitz Most of the options which blockdev_init() parses for both the BlockBackend and the root BDS are valid for just the root BDS as well (e.g. read-only). This patch allows specifying these options even if not creating a BlockBackend. Signed-off-by: Max Reitz Signed-off-by: Kevin Wol

[Qemu-devel] [PULL 27/37] throttle: Remove throttle_group_lock/unlock()

2015-10-23 Thread Kevin Wolf
From: Alberto Garcia The group throttling code was always meant to handle its locking internally. However, bdrv_swap() was touching the ThrottleGroup structure directly and therefore needed an API for that. Now that bdrv_swap() no longer exists there's no need for the throttle_group_lock() API a

[Qemu-devel] [PULL 30/37] dataplane: Mark host notifiers' client type as "external"

2015-10-23 Thread Kevin Wolf
From: Fam Zheng They will be excluded by type in the nested event loops in block layer, so that unwanted events won't be processed there. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- hw/block/dataplane/virtio-blk.c | 5 ++--- hw/scsi/virtio-scsi-dataplane.c

[Qemu-devel] [PULL 23/37] block: Prepare for NULL BDS

2015-10-23 Thread Kevin Wolf
From: Max Reitz blk_bs() will not necessarily return a non-NULL value any more (unless blk_is_available() is true or it can be assumed to otherwise, e.g. because it is called immediately after a successful blk_new_with_bs() or blk_new_open()). Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf

[Qemu-devel] [PULL 16/37] block: Move I/O status and error actions into BB

2015-10-23 Thread Kevin Wolf
From: Max Reitz These options are only relevant for the user of a whole BDS tree (like a guest device or a block job) and should thus be moved into the BlockBackend. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block.c| 125 ---

[Qemu-devel] [PULL 20/37] block: Fail requests to empty BlockBackend

2015-10-23 Thread Kevin Wolf
From: Max Reitz If there is no BlockDriverState in a BlockBackend or if the tray of the guest device is open, fail all requests (where that is possible) with -ENOMEDIUM. The reason the status of the guest device is taken into account is because once the guest device's tray is opened, any request

[Qemu-devel] [PULL 31/37] aio: introduce aio_{disable, enable}_external

2015-10-23 Thread Kevin Wolf
From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- aio-posix.c | 3 ++- aio-win32.c | 3 ++- include/block/aio.h | 38 ++ 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index f0

[Qemu-devel] [PULL 13/37] block: Move guest_block_size into BlockBackend

2015-10-23 Thread Kevin Wolf
From: Max Reitz guest_block_size is a guest device property so it should be moved into the interface between block layer and guest devices, which is the BlockBackend. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wol

[Qemu-devel] [PULL 24/37] blockdev: Do not create BDS for empty drive

2015-10-23 Thread Kevin Wolf
From: Max Reitz Do not use "rudimentary" BDSs for empty drives any longer (for freshly created drives). After a follow-up patch, empty drives will generally use a NULL BDS, not only the freshly created drives. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c | 68 +++

[Qemu-devel] [PULL 19/37] block: Make some BB functions fall back to BBRS

2015-10-23 Thread Kevin Wolf
From: Max Reitz If there is no BDS tree attached to a BlockBackend, functions that can do so should fall back to the BlockBackendRootState structure. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/block-backend.c | 28 1 file

[Qemu-devel] [PULL 17/37] block/throttle-groups: Make incref/decref public

2015-10-23 Thread Kevin Wolf
From: Max Reitz Throttle groups are not necessarily referenced by BDSs alone; a later patch will essentially allow BBs to reference them, too. Make the ref/unref functions public so that reference can be properly accounted for. Their interface is slightly adjusted in that they return and take a

[Qemu-devel] [PULL 18/37] block: Add BlockBackendRootState

2015-10-23 Thread Kevin Wolf
From: Max Reitz This structure will store some of the state of the root BDS if the BDS tree is removed, so that state can be restored once a new BDS tree is inserted. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/block-backend.c | 40 ++

[Qemu-devel] [PULL 09/37] block: Invoke change media CB before NULLing drv

2015-10-23 Thread Kevin Wolf
From: Max Reitz In order to handle host device passthrough, some guest device models may call blk_is_inserted() to check whether the medium is inserted on the host, when checking the guest tray status. This tray status is inquired by blk_dev_change_media_cb(); because bdrv_is_inserted() (invoked

[Qemu-devel] [PULL 22/37] block: Add blk_insert_bs()

2015-10-23 Thread Kevin Wolf
From: Max Reitz This function associates the given BlockDriverState with the given BlockBackend. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/block-backend.c | 11 +++ include/sysemu/block-backend.h | 1 + 2 files changed, 12 insertio

[Qemu-devel] [PULL 08/37] block/raw_bsd: Drop raw_is_inserted()

2015-10-23 Thread Kevin Wolf
From: Max Reitz With the new automatically-recursive implementation of bdrv_is_inserted() checking by default whether all the children of a BDS are inserted, we can drop raw's own implementation. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Reviewed-by: Alberto Gar

[Qemu-devel] [PULL 11/37] hw/usb-storage: Check whether BB is inserted

2015-10-23 Thread Kevin Wolf
From: Max Reitz Only call bdrv_add_key() on the BlockDriverState if it is not NULL. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- hw/usb/dev-storage.c | 30 -- 1 file changed, 1

[Qemu-devel] [PULL 15/37] block: Move BlockAcctStats into BlockBackend

2015-10-23 Thread Kevin Wolf
From: Max Reitz As the comment above bdrv_get_stats() says, BlockAcctStats is something which belongs to the device instead of each BlockDriverState. This patch therefore moves it into the BlockBackend. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Reviewed-by:

[Qemu-devel] [PULL 21/37] block: Prepare remaining BB functions for NULL BDS

2015-10-23 Thread Kevin Wolf
From: Max Reitz There are several BlockBackend functions which, in theory, cannot fail. This patch makes them cope with the BlockDriverState pointer being NULL by making them fall back to some default action like ignoring the value in setters and returning the default in getters. Signed-off-by:

[Qemu-devel] [PULL 10/37] hw/block/fdc: Implement tray status

2015-10-23 Thread Kevin Wolf
From: Max Reitz The tray of an FDD is open iff there is no medium inserted (there are only two states for an FDD: "medium inserted" or "no medium inserted"). Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- hw/block/fdc.c | 20

[Qemu-devel] [PULL 07/37] block: Make bdrv_is_inserted() recursive

2015-10-23 Thread Kevin Wolf
From: Max Reitz If bdrv_is_inserted() is called on the top level BDS, it should make sure all nodes in the BDS tree are actually inserted. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block.c | 12 +--- 1 file changed, 9 inse

[Qemu-devel] [PULL 05/37] block: Make bdrv_is_inserted() return a bool

2015-10-23 Thread Kevin Wolf
From: Max Reitz Make bdrv_is_inserted(), blk_is_inserted(), and the callback BlockDriver.bdrv_is_inserted() return a bool. Suggested-by: Eric Blake Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block.c

[Qemu-devel] [PULL 14/37] block: Remove wr_highest_sector from BlockAcctStats

2015-10-23 Thread Kevin Wolf
From: Max Reitz BlockAcctStats contains statistics about the data transferred from and to the device; wr_highest_sector does not fit in with the rest. Furthermore, those statistics are supposed to be specific for a certain device and not necessarily for a BDS (see the comment above bdrv_get_stat

[Qemu-devel] [PULL 02/37] block: Set BDRV_O_INCOMING in bdrv_fill_options()

2015-10-23 Thread Kevin Wolf
From: Max Reitz This flag should not be set for the root BDS only, but for any BDS that is being created while incoming migration is pending, so setting it is moved from blockdev_init() to bdrv_fill_options(). Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Reviewed-b

[Qemu-devel] [PULL 06/37] block: Add blk_is_available()

2015-10-23 Thread Kevin Wolf
From: Max Reitz blk_is_available() returns true iff the BDS is inserted (which means blk_bs() is not NULL and bdrv_is_inserted() returns true) and if the tray of the guest device is closed. blk_is_inserted() is changed to return true only if blk_bs() is not NULL. Signed-off-by: Max Reitz Revie

[Qemu-devel] [PULL 04/37] iotests: Only create BB if necessary

2015-10-23 Thread Kevin Wolf
From: Max Reitz Tests 071 and 081 test giving references in blockdev-add. It is not necessary to create a BlockBackend here, so omit it. While at it, fix up some blockdev-add invocations in the vicinity (s/raw/$IMGFMT/ in 081, drop the format BDS for blkverify's raw child in 071). Signed-off-by

[Qemu-devel] [PULL 03/37] blockdev: Allow creation of BDS trees without BB

2015-10-23 Thread Kevin Wolf
From: Max Reitz If the "id" field is missing from the options given to blockdev-add, just omit the BlockBackend and create the BlockDriverState tree alone. However, if "id" is missing, "node-name" must be specified; otherwise, the BDS tree would no longer be accessible. Many BDS options which a

[Qemu-devel] [PULL 12/37] block: Fix BB AIOCB AioContext without BDS

2015-10-23 Thread Kevin Wolf
From: Max Reitz Fix the BlockBackend's AIOCB AioContext for aborting AIO in case there is no BDS. If there is no implementation of AIOCBInfo::get_aio_context() the AioContext is derived from the BDS the AIOCB belongs to. If that BDS is NULL (because it has been removed from the BB) this will not

[Qemu-devel] [PULL 01/37] block: Remove host floppy support

2015-10-23 Thread Kevin Wolf
From: Max Reitz It has been deprecated as of 2.3, so we can now remove it. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/raw-posix.c| 222 ++- qapi/block-core.json | 9 +-- 2

[Qemu-devel] [PULL 00/37] Block layer patches

2015-10-23 Thread Kevin Wolf
The following changes since commit 1e700f4c6cddaf29ce1d205f0f8e8b9255481930: Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2015-10-23-tag' into staging (2015-10-23 15:55:50 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for yo

Re: [Qemu-devel] [PATCH] hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT

2015-10-23 Thread Paolo Bonzini
On 23/10/2015 18:54, Kevin O'Connor wrote: >> > >> > Extra privileges compared to what? Legacy BIOS does not really put >> > anything privileged in SMRAM, while OVMF does and _hence_ relocates the >> > SMBASE of the AP. It would have been nice to get it right from the >> > beginning, but right

Re: [Qemu-devel] [PATCH v4 12/13] target-arm: Route S2 MMU faults to EL2

2015-10-23 Thread Peter Maydell
On 14 October 2015 at 23:55, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/op_helper.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c > index d4715

Re: [Qemu-devel] [PATCH] hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT

2015-10-23 Thread Kevin O'Connor
On Fri, Oct 23, 2015 at 09:26:38AM +0200, Paolo Bonzini wrote: > On 23/10/2015 06:41, Jordan Justen wrote: > > On 2015-10-22 12:46:56, Paolo Bonzini wrote: > >> On 22/10/2015 20:04, Kevin O'Connor wrote: > >>> On Thu, Oct 22, 2015 at 10:40:08AM +0200, Paolo Bonzini wrote: > On 21/10/2015 20:36

Re: [Qemu-devel] [PATCH v4 09/13] target-arm: Add ARMMMUFaultInfo

2015-10-23 Thread Peter Maydell
On 14 October 2015 at 23:55, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Introduce ARMMMUFaultInfo to propagate MMU Fault information > across the MMU translation code path. This is in preparation for > adding Stage-2 translation. > > No functional changes. > > Signed-off-by: Edgar E

Re: [Qemu-devel] [PATCH 00/19] pc: acpi: move memory hotplug out of DSDT/SSDT into custom table

2015-10-23 Thread Laszlo Ersek
Igor, On 10/23/15 16:57, Igor Mammedov wrote: > As part of moving to dynamic DSDT and dropping > ASL templates althogether this series moves out > ASL part of memory hotplug from DSDT into a custom > ACPI table. Beside of reducing ASL codebase (DSDT) > series tries to generalize and consolidate AC

  1   2   3   4   >