[Qemu-devel] [PATCH] block: avoid unnecessary bottom halves

2015-03-27 Thread Paolo Bonzini
bdrv_aio_* APIs can use coroutines to achieve asynchronicity. However, the coroutine may terminate without having yielded back to the caller (for example because of something that invokes a nested event loop, or because the coroutine is doing nothing at all). In this case, the bdrv_aio_* API must

Re: [Qemu-devel] [v6 08/14] migration: Add the core code of multi-thread compression

2015-03-27 Thread Li, Liang Z
> - > > 1 file changed, 177 insertions(+), 7 deletions(-) > > > > diff --git a/arch_init.c b/arch_init.c index 48cae22..9f63c0f 100644 > > --- a/arch_init.c > > +++ b/arch_init.c > > @@ -355,12 +355,33 @@ static DecompressParam *decomp_param; static > > QemuThread *decompress_threads; static uin

Re: [Qemu-devel] [PATCH v2] microblaze: fix memory leak

2015-03-27 Thread Max Filippov
On Thu, Mar 5, 2015 at 6:05 AM, wrote: > From: Gonglei > > When not assign a -dtb argument, the variable dtb_filename > storage returned from qemu_find_file(), which should be freed > after use. Alternatively we define a local variable filename, > with 'char *' type, free after use. > > Cc: Mich

Re: [Qemu-devel] [PATCH v2] microblaze: fix memory leak

2015-03-27 Thread Gonglei
Hi, Ping again... Can this patch be a raw stuff for rc2 ? Regards, Gonglei On 2015/3/17 15:15, Gonglei wrote: > On 2015/3/5 11:05, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> When not assign a -dtb argument, the variable dtb_filename >> storage returned from qemu_find_file(), whic

Re: [Qemu-devel] [Migration Bug? ] Occasionally, the content of VM's memory is inconsistent between Source and Destination of migration

2015-03-27 Thread zhanghailiang
On 2015/3/27 18:51, Juan Quintela wrote: zhanghailiang wrote: On 2015/3/26 11:52, Li Zhijian wrote: On 03/26/2015 11:12 AM, Wen Congyang wrote: On 03/25/2015 05:50 PM, Juan Quintela wrote: zhanghailiang wrote: Hi all, We found that, sometimes, the content of VM's memory is inconsistent be

Re: [Qemu-devel] [[PATCH] 5/7] target-arm: Add TTBR regime function and use

2015-03-27 Thread Sergey Fedorov
On 27.03.2015 12:10, Greg Bellows wrote: > Add a utility function for choosing the correct TTBR system register based on > the specified MMU index. Add use of function on physical address lookup. > > Signed-off-by: Greg Bellows > --- > target-arm/helper.c | 44

Re: [Qemu-devel] [PATCH 00/12 v9] tilegx: Firstly add tilegx feature for linux-user

2015-03-27 Thread Chen Gang
On 3/28/15 01:01, Richard Henderson wrote: > On 03/27/2015 03:47 AM, Chen Gang wrote: >> After load elf64 binary, qemu tilegx can finish executing the first >> system call (uname) successfully in _dl_discover_osversion(), and >> return to __libc_start_main(). >> >> Chen Gang (12): >> linux-user:

[Qemu-devel] [PULL for-2.3 0/2] Ide patches

2015-03-27 Thread John Snow
The following changes since commit b27e767e8c8d56cb7c9d0b78eadd89521bdf836c: Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging (2015-03-27 12:12:27 +) are available in the git repository at: https://github.com/jnsnow/qemu.git tags/ide-pull-request for y

[Qemu-devel] [PULL for-2.3 0/2] Ide patches

2015-03-27 Thread John Snow
The following changes since commit b27e767e8c8d56cb7c9d0b78eadd89521bdf836c: Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging (2015-03-27 12:12:27 +) are available in the git repository at: https://github.com/jnsnow/qemu.git tags/ide-pull-request for y

[Qemu-devel] [PULL for-2.3 1/2] AHCI: Do not (re)map FB/CLB buffers while not running

2015-03-27 Thread John Snow
The FIS Receive Buffer and Command List Buffer pointers should not be edited while the FIS receive engine or Command Receive engines are running. Currently, we attempt to re-map the buffers every time they are adjusted, but while the AHCI engines are off, these registers may contain stale values,

[Qemu-devel] [PULL for-2.3 2/2] AHCI: Protect cmd register

2015-03-27 Thread John Snow
Many bits in the CMD register are supposed to be strictly read-only. We should not be deleting them on every write. As a side-effect: pay explicit attention to when a guest marks off the FIS Receive or Start bits, and disable the status bits ourselves, instead of letting them implicitly fall off.

[Qemu-devel] [PATCH 3/3] arm: semihosting: Wire up A64 HLT 0xf000

2015-03-27 Thread Christopher Covington
In AArch64, Angel semihosting uses HLT instructions with a special immediate value, 0xf000. Use a new exception type EXCP_SEMI for this, since I'm not aware of plans for full HLT support, and EXCP_HLT is already defined as a QEMU internal exception type. Support just the exit call in A64 to start w

[Qemu-devel] [PATCH 2/3] arm: semihosting: Create unsupported call function

2015-03-27 Thread Christopher Covington
This will allow the print-error-and-exit sequence to be called from a second location in a subsequent patch. The type of the nr variable is changed from int to uint32_t since I'm unaware of semihosting call numbers needing more than 32 bits, even on AArch64. Also generalize the wording of the unsup

[Qemu-devel] arm: semihosting: Preliminary AArch64 support

2015-03-27 Thread Christopher Covington
Hi, Here are a few patches preparing for and adding AArch64 Angel semihosting support. I've been testing them with some simple tests from the following repository. This series only adds support for exit, but support for the rest of the calls will hopefully follow shortly. http://git.linaro.org/p

[Qemu-devel] [PATCH 1/3] arm: semihosting: Improve debug prints

2015-03-27 Thread Christopher Covington
Print semihosting debugging information before the do_arm_semihosting() call so that angel_SWIreason_ReportException, which causes the function to not return, gets the same debug prints as other semihosting calls. Also print out the semihosting call number. Signed-off-by: Christopher Covington --

Re: [Qemu-devel] [PATCH] tcg: optimise memory layout of TCGTemp

2015-03-27 Thread Emilio G. Cota
On Fri, Mar 27, 2015 at 09:55:03 +, Alex Bennée wrote: > Have you been able to measure any performance improvement with these new > structures? In theory, if aligned with cache lines, performance should > improve but real numbers would be nice. I haven't benchmarked anything, which makes me ve

Re: [Qemu-devel] remaining patches for rc2?

2015-03-27 Thread Stefan Weil
Am 27.03.2015 um 18:10 schrieb Peter Maydell: On 27 March 2015 at 17:07, Bastian Koppelmann wrote: I have one more TriCore fix (https://patchwork.ozlabs.org/patch/455433/), that could go into rc2. Is there a good point in time for you, when I should send a pull request? rc2 is scheduled to be

Re: [Qemu-devel] [PATCH v5 24/28] qapi: Merge UserDefTwo and UserDefNested in tests

2015-03-27 Thread Eric Blake
On 03/27/2015 03:52 AM, Markus Armbruster wrote: > Eric Blake writes: > >> In the testsuite, UserDefTwo and UserDefNested were identical >> types other than the member names. Reduce code duplication by >> having just one type, and choose names that also favor reuse. >> This will also make it eas

Re: [Qemu-devel] [PATCH v5 22/28] qapi: Whitelist commands that don't return dictionary

2015-03-27 Thread Eric Blake
On 03/27/2015 10:19 AM, Markus Armbruster wrote: > Eric Blake writes: > >> ...or an array of dictionaries. Although we have to cater to >> existing commands, returning a non-dictionary means the command >> is not extensible (no new name/value pairs can be added if more >> information must be ret

Re: [Qemu-devel] [PATCH v5 22/28] qapi: Whitelist commands that don't return dictionary

2015-03-27 Thread Eric Blake
On 03/27/2015 03:11 AM, Markus Armbruster wrote: > Eric Blake writes: > >> ...or an array of dictionaries. Although we have to cater to >> existing commands, returning a non-dictionary means the command >> is not extensible (no new name/value pairs can be added if more >> information must be ret

Re: [Qemu-devel] [PATCH v5 21/28] qapi: Require valid names

2015-03-27 Thread Eric Blake
On 03/27/2015 11:14 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Previous commits demonstrated that the generator overlooked various >> bad naming situations: >> - types, commands, and events need a valid name >> - union and alternate branches cannot be marked optional >> >> The set of

Re: [Qemu-devel] [PATCH v5 21/28] qapi: Require valid names

2015-03-27 Thread Eric Blake
On 03/27/2015 02:48 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Previous commits demonstrated that the generator overlooked various >> bad naming situations: >> - types, commands, and events need a valid name >> - union and alternate branches cannot be marked optional >> >> The set of

Re: [Qemu-devel] [PATCH v5 20/28] qapi: More rigourous checking of types

2015-03-27 Thread Eric Blake
On 03/27/2015 02:23 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Now that we know every expression is valid with regards to >> its keys, we can add further tests that those keys refer to >> valid types. With this patch, all uses of a type (the 'data': >> of command, type, union, altern

[Qemu-devel] [PATCH v2 00/11] block: incremental backup transactions

2015-03-27 Thread John Snow
requires: 1426879023-18151-1-git-send-email-js...@redhat.com "[PATCH v4 00/20] block: transactionless incremental backup series" This series adds support for incremental backup primitives in QMP transactions. It requires my transactionless incremental backup series, currently at v4. Pat

Re: [Qemu-devel] [PATCH v5 16/28] qapi: Better error messages for duplicated expressions

2015-03-27 Thread Eric Blake
On 03/27/2015 01:52 AM, Markus Armbruster wrote: > One more... > > Eric Blake writes: > > [...] >> diff --git a/scripts/qapi.py b/scripts/qapi.py >> index 90eb3bc..5d0dc91 100644 >> --- a/scripts/qapi.py >> +++ b/scripts/qapi.py > [...] >> @@ -560,12 +585,22 @@ def type_name(name): >> r

Re: [Qemu-devel] [PATCH v5 06/28] qapi: Add some union tests

2015-03-27 Thread Eric Blake
On 03/27/2015 06:30 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 03/26/2015 07:18 AM, Markus Armbruster wrote: >>> Eric Blake writes: >>> Demonstrate that the qapi generator doesn't deal well with unions that aren't up to par. Later patches will update the expected re

Re: [Qemu-devel] [PATCH v5 13/28] qapi: Add some expr tests

2015-03-27 Thread Eric Blake
On 03/27/2015 06:38 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 03/26/2015 09:55 AM, Markus Armbruster wrote: >>> Eric Blake writes: >>> Demonstrate that the qapi generator doesn't deal well with expressions that aren't up to par. Later patches will improve the expec

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

2015-03-27 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 v2 06/11] block: add refcount to Job object

2015-03-27 Thread John Snow
If we want to get at the job after the life of the job, we'll need a refcount for this object. This may occur for example if we wish to inspect the actions taken by a particular job after a transactional group of jobs runs, and further actions are required. Signed-off-by: John Snow --- blockjob

[Qemu-devel] [PATCH v2 04/11] block: re-add BlkTransactionState

2015-03-27 Thread John Snow
Now that the structure formerly known as BlkTransactionState has been renamed to something sensible (BlkActionState), re-introduce an actual BlkTransactionState that actually manages state for the entire Transaction. In the process, convert the old QSIMPLEQ list of actions into a QTAILQ, to let us

[Qemu-devel] [PATCH v2 08/11] block: move transactions beneath qmp interfaces

2015-03-27 Thread John Snow
In general, since transactions may reference QMP function helpers, it would be nice for them to sit beneath them. This will avoid the need for forward declaring any QMP interfaces, which would be aggravating to update in so many places. Signed-off-by: John Snow --- blockdev.c | 2581 +++

[Qemu-devel] [PATCH v2 03/11] block: rename BlkTransactionState and BdrvActionOps

2015-03-27 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 v2 11/11] iotests: 124 - transactional failure test

2015-03-27 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. Signed-off-by: John Snow --- tests/qemu-iotests/124 | 119 ++

[Qemu-devel] [PATCH v2 05/11] block: add transactional callbacks feature

2015-03-27 Thread John Snow
The goal here is to add a new method to transactions that allows developers to specify a callback that will get invoked only once all jobs spawned by a transaction are completed, allowing developers the chance to perform actions conditionally pending complete success, partial failure, or complete f

[Qemu-devel] [PATCH v2 10/11] block: drive_backup transaction callback support

2015-03-27 Thread John Snow
This patch actually implements the transactional callback system for the drive_backup transaction. (1) We manually pick up a reference to the bitmap if present to allow its cleanup to be delayed until after all drive_backup jobs launched by the transaction have fully completed. (2) We

[Qemu-devel] [PATCH v2 09/11] qmp: Add an implementation wrapper for qmp_drive_backup

2015-03-27 Thread John Snow
We'd like to be able to specify the callback given to backup_start manually in the case of transactions, so split apart qmp_drive_backup into an implementation and a wrapper. Switch drive_backup_prepare to use the new wrapper, but don't overload the callback and closure yet. Signed-off-by: John S

[Qemu-devel] [PATCH v2 02/11] iotests: add transactional incremental backup test

2015-03-27 Thread John Snow
Test simple usage cases for using transactions to create and synchronize incremental backups. Signed-off-by: John Snow --- tests/qemu-iotests/124 | 51 ++ tests/qemu-iotests/124.out | 4 ++-- 2 files changed, 53 insertions(+), 2 deletions(-) diff

[Qemu-devel] [PATCH v2 07/11] block: add delayed bitmap successor cleanup

2015-03-27 Thread John Snow
Allow bitmap successors to carry reference counts. We can in a later patch use this ability to clean up the dirty bitmap according to both the individual job's success and the success of all jobs in the transaction group. The code for cleaning up a bitmap is also moved from backup_run to backup_c

[Qemu-devel] [[PATCH] 7/7] target-arm: Add WFx instruction trap support

2015-03-27 Thread Greg Bellows
Add support for trapping WFI and WFE instructions to the proper EL when SCTLR/SCR/HCR settings apply. Signed-off-by: Greg Bellows --- target-arm/op_helper.c | 75 +++--- 1 file changed, 71 insertions(+), 4 deletions(-) diff --git a/target-arm/op_helpe

[Qemu-devel] [[PATCH] 6/7] target-arm: Add WFx syndrome function

2015-03-27 Thread Greg Bellows
Adds a utility function for creating a WFx exception syndrome Signed-off-by: Greg Bellows --- target-arm/internals.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target-arm/internals.h b/target-arm/internals.h index bb171a7..8dc2e2b 100644 --- a/target-arm/internals.h +++ b/target-a

[Qemu-devel] [[PATCH] 3/7] target-arm: Update interrupt handling to use target EL

2015-03-27 Thread Greg Bellows
Updated the interrupt handling to utilize and report through the target EL exception field. This includes consolidating and cleaning up code where needed. Target EL is now calculated once in arm_cpu_exec_interrupt() and do_interrupt was updated to use the target_el exception field. The necessary

[Qemu-devel] [[PATCH] 5/7] target-arm: Add TTBR regime function and use

2015-03-27 Thread Greg Bellows
Add a utility function for choosing the correct TTBR system register based on the specified MMU index. Add use of function on physical address lookup. Signed-off-by: Greg Bellows --- target-arm/helper.c | 44 1 file changed, 32 insertions(+), 12 delet

[Qemu-devel] [[PATCH] 1/7] target-arm: Add exception target el infrastructure

2015-03-27 Thread Greg Bellows
Add a CPU state exception target EL field that will be used for communicating the EL to which an exception should be routed. Add a target EL argument to the generic exception helper for callers to specify the EL to which the exception should be routed. Extended the helper to set the newly added C

[Qemu-devel] [[PATCH] 2/7] target-arm: Extend helpers to route exceptions

2015-03-27 Thread Greg Bellows
Updated the various helper routines to set the target EL as needed. Signed-off-by: Greg Bellows --- target-arm/op_helper.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 72a973a..aa175b5 100644 --- a/target-arm/op_helper.c +++ b/tar

[Qemu-devel] [[PATCH] 4/7] target-arm: Add AArch64 CPTR registers

2015-03-27 Thread Greg Bellows
Adds CPTR_EL2/3 system registers definitions and access function. Signed-off-by: Greg Bellows --- target-arm/cpu.h| 18 +- target-arm/helper.c | 43 ++- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/target-arm/cpu.h b/

[Qemu-devel] [[PATCH] 0/7] target-arm: EL3 trap support

2015-03-27 Thread Greg Bellows
Initial patchset adding support for trapping to an EL other than EL1. Support includes changes to interfaces to allow specification of the target EL. Also includes the addition of the ARMv8 CPTR system registers used for controlling the trapping of features. Greg Bellows (7): target-arm: Add e

Re: [Qemu-devel] [PATCH v2 4/4] tests: Use qtest_add_data_func() consistently

2015-03-27 Thread John Snow
On 03/26/2015 11:41 AM, Andreas Färber wrote: Am 25.03.2015 um 23:14 schrieb John Snow: On 03/25/2015 02:20 PM, Andreas Färber wrote: Replace uses of g_test_add_data_func() for QTest test cases. It is still valid to use it for any non-QTest test cases, which are not run for multiple target b

Re: [Qemu-devel] remaining patches for rc2?

2015-03-27 Thread Paolo Bonzini
On 27/03/2015 17:42, Peter Maydell wrote: > This is the set of things I have on the list for "should ideally > get into rc2": > * AArch64 migration fixes > * VNC patches to fix CVEs > * recent exec.c changes broke ppc OSX/OpenBIOS boot > > Anything else? Nothing else from me (planning to loo

Re: [Qemu-devel] [PATCH v5 1/2] qom: Add can_be_deleted callback to UserCreatableClass

2015-03-27 Thread Lin Ma
在 2015年03月28日 01:20, Igor Mammedov 写道: On Sat, 28 Mar 2015 00:55:29 +0800 Lin Ma wrote: If backends implement the can_be_deleted and it returns false, Then the qmp_object_del won't delete the given backends. Signed-off-by: Lin Ma --- include/qom/object_interfaces.h | 14 ++ q

Re: [Qemu-devel] arm: semihosting: Preliminary AArch64 support

2015-03-27 Thread Liviu Ionescu
> On 27 Mar 2015, at 19:15, Leon Alrae wrote: > > ... introducing separate "-semihosting-arg" option to pass input arguments if we'll ever go for this solution, I would call it "-semihosting-cmdline", since it should include the entire command line, starting with argv[0]. > ... but basically

Re: [Qemu-devel] arm: semihosting: Preliminary AArch64 support

2015-03-27 Thread Peter Maydell
On 27 March 2015 at 17:15, Leon Alrae wrote: > On 27/03/2015 17:05, Peter Maydell wrote: >> We should pick those back up -- I think we sort of stalled >> because it wasn't clear that you were happy with the double-comma >> thing. It does fit in with the rest of QEMU's (ugly) command >> line syntax

Re: [Qemu-devel] block-commit & dropping privs

2015-03-27 Thread Eric Blake
On 03/27/2015 09:36 AM, Michael Tokarev wrote: >> It is already possible to open a file read-write on the command line, by >> using -add-fd twice to put both a read-only and a read-write fd handle >> to the same file in a single set N, then using -drive options to specify >> /dev/fdset/N rather tha

Re: [Qemu-devel] [PATCH v5 1/2] qom: Add can_be_deleted callback to UserCreatableClass

2015-03-27 Thread Igor Mammedov
On Sat, 28 Mar 2015 00:55:29 +0800 Lin Ma wrote: > If backends implement the can_be_deleted and it returns false, > Then the qmp_object_del won't delete the given backends. > > Signed-off-by: Lin Ma > --- > include/qom/object_interfaces.h | 14 ++ > qmp.c

Re: [Qemu-devel] arm: semihosting: Preliminary AArch64 support

2015-03-27 Thread Leon Alrae
Hi, On 27/03/2015 17:05, Peter Maydell wrote: > On 27 March 2015 at 16:57, Liviu Ionescu wrote: >> >>> On 27 Mar 2015, at 18:22, Christopher Covington >>> wrote: >>> >>> >>> Hi, >>> >>> Here are a few patches preparing for and adding AArch64 Angel >>> semihosting support. >> >> please note that

Re: [Qemu-devel] [PATCH v5 21/28] qapi: Require valid names

2015-03-27 Thread Markus Armbruster
Eric Blake writes: > Previous commits demonstrated that the generator overlooked various > bad naming situations: > - types, commands, and events need a valid name > - union and alternate branches cannot be marked optional > > The set of valid names includes [a-zA-Z0-9._-] (where '.' is > useful

Re: [Qemu-devel] remaining patches for rc2?

2015-03-27 Thread Peter Maydell
On 27 March 2015 at 17:07, Bastian Koppelmann wrote: > I have one more TriCore fix (https://patchwork.ozlabs.org/patch/455433/), > that could go into rc2. Is there a good point in time for you, when I should > send a pull request? rc2 is scheduled to be done on Tuesday. "by end of the previous da

Re: [Qemu-devel] remaining patches for rc2?

2015-03-27 Thread Bastian Koppelmann
On 03/27/2015 05:42 PM, Peter Maydell wrote: This is the set of things I have on the list for "should ideally get into rc2": * AArch64 migration fixes * VNC patches to fix CVEs * recent exec.c changes broke ppc OSX/OpenBIOS boot Anything else? Hi Peter, I have one more TriCore fix (ht

Re: [Qemu-devel] arm: semihosting: Preliminary AArch64 support

2015-03-27 Thread Peter Maydell
On 27 March 2015 at 16:57, Liviu Ionescu wrote: > >> On 27 Mar 2015, at 18:22, Christopher Covington >> wrote: >> >> >> Hi, >> >> Here are a few patches preparing for and adding AArch64 Angel >> semihosting support. > > please note that the semihosting support is still incomplete, Christopher's

Re: [Qemu-devel] [PATCH 00/12 v9] tilegx: Firstly add tilegx feature for linux-user

2015-03-27 Thread Richard Henderson
On 03/27/2015 03:47 AM, Chen Gang wrote: > After load elf64 binary, qemu tilegx can finish executing the first > system call (uname) successfully in _dl_discover_osversion(), and > return to __libc_start_main(). > > Chen Gang (12): > linux-user: tilegx: Firstly add architecture related features

Re: [Qemu-devel] arm: semihosting: Preliminary AArch64 support

2015-03-27 Thread Liviu Ionescu
> On 27 Mar 2015, at 18:22, Christopher Covington > wrote: > > > Hi, > > Here are a few patches preparing for and adding AArch64 Angel > semihosting support. please note that the semihosting support is still incomplete, the code to pass the semihosting command line is not in; we discussed a

[Qemu-devel] [PATCH v5 2/2] hostmem: Prevent removing an in-use memory backend

2015-03-27 Thread Lin Ma
showing a memory device whose memdev is removed leads an assert: (qemu) object_add memory-backend-ram,id=ram0,size=128M (qemu) device_add pc-dimm,id=d0,memdev=ram0 (qemu) object_del ram0 (qemu) info memory-devices ** ERROR:qom/object.c:1274:object_get_canonical_path_component:\

[Qemu-devel] [PATCH v5 1/2] qom: Add can_be_deleted callback to UserCreatableClass

2015-03-27 Thread Lin Ma
If backends implement the can_be_deleted and it returns false, Then the qmp_object_del won't delete the given backends. Signed-off-by: Lin Ma --- include/qom/object_interfaces.h | 14 ++ qmp.c | 5 + qom/object_interfaces.c | 14 ++

[Qemu-devel] [PATCH v5 0/2] Add generic can_be_deleted to UserCreatableClass.

2015-03-27 Thread Lin Ma
The patchset adds a generic can_be_deleted callback to UserCreatableClass. It prevents removing a usercreatable object if the callback returns false. Backends could implement the callback if it shoudn't be removed while it's in use. Thank Peter Crosthwaite, Paolo Bonzini, Andreas Färber and Igor

[Qemu-devel] remaining patches for rc2?

2015-03-27 Thread Peter Maydell
This is the set of things I have on the list for "should ideally get into rc2": * AArch64 migration fixes * VNC patches to fix CVEs * recent exec.c changes broke ppc OSX/OpenBIOS boot Anything else? thanks -- PMM

Re: [Qemu-devel] [PATCH 2/3] arm: semihosting: Create unsupported call function

2015-03-27 Thread Peter Maydell
On 27 March 2015 at 16:22, Christopher Covington wrote: > This will allow the print-error-and-exit sequence to be called from a > second location in a subsequent patch. The type of the nr variable is > changed from int to uint32_t since I'm unaware of semihosting call > numbers needing more than 3

Re: [Qemu-devel] [PATCH 3/3] arm: semihosting: Wire up A64 HLT 0xf000

2015-03-27 Thread Peter Maydell
On 27 March 2015 at 16:22, Christopher Covington wrote: > In AArch64, Angel semihosting uses HLT instructions with a special > immediate value, 0xf000. Use a new exception type EXCP_SEMI for this, > since I'm not aware of plans for full HLT support, and EXCP_HLT is > already defined as a QEMU inte

Re: [Qemu-devel] [PATCH 1/3] arm: semihosting: Improve debug prints

2015-03-27 Thread Peter Maydell
On 27 March 2015 at 16:22, Christopher Covington wrote: > Print semihosting debugging information before the > do_arm_semihosting() call so that angel_SWIreason_ReportException, > which causes the function to not return, gets the same debug prints as > other semihosting calls. Also print out the s

[Qemu-devel] MemoryRegionOps' {min,max}_access_size fields

2015-03-27 Thread Jan Beulich
Hello, I'm trying to understand what the idea behind these is. For one, without .valid.accepts set I can't see the two respective .valid fields take effect at all. Yet all examples I looked at don't set .valid.accepts. What's the deal here? And then the way access_with_adjusted_size() works, it l

Re: [Qemu-devel] [RFC v3] monitor: add memory search commands s, sp

2015-03-27 Thread Claudio Fontana
Just a respectful ping on this one.. Luiz do you think you can integrate this into the monitor? I have given it quite some testing for the LE host case, I don't have a BE host to test with at the moment, maybe someone can advise about how to test that scenario? I was trying to do some qemu under

Re: [Qemu-devel] [PATCH v5 22/28] qapi: Whitelist commands that don't return dictionary

2015-03-27 Thread Markus Armbruster
Eric Blake writes: > ...or an array of dictionaries. Although we have to cater to > existing commands, returning a non-dictionary means the command > is not extensible (no new name/value pairs can be added if more > information must be returned in parallel). By making the > whitelist explicit,

Re: [Qemu-devel] [PATCH v4 1/2] qom: Add can_be_deleted callback to UserCreatableClass

2015-03-27 Thread Lin Ma
在 2015年03月27日 22:35, Igor Mammedov 写道: On Fri, 27 Mar 2015 13:36:11 +0800 Lin Ma wrote: If backends implement the can_be_deleted and it returns false, Then the qmp_object_del won't delete the given backends. Signed-off-by: Lin Ma --- include/qom/object_interfaces.h | 14 ++ q

[Qemu-devel] [Bug 1245703] Re: LD_PREFIX option reads directories recursively in an endless loop

2015-03-27 Thread Ross Burton
We need to be able to run qemu as not root. Has anyone tried using qemu with fakechroot? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1245703 Title: LD_PREFIX option reads directories recursively

Re: [Qemu-devel] block-commit & dropping privs

2015-03-27 Thread Michael Tokarev
27.03.2015 17:49, Eric Blake wrote: > On 03/27/2015 03:07 AM, Michael Tokarev wrote: >> Hello. >> >> I tried to experiment with block-commit command, which propagates >> changes accumulated in an overlay (qcow2) block image file back to >> the base image file. >> >> And immediately faced a problem.

[Qemu-devel] [PATCH] target-tricore: fix CACHEA/I_POSTINC/PREINC using data register..

2015-03-27 Thread Bastian Koppelmann
..for address calculation instead address registers. Signed-off-by: Bastian Koppelmann --- target-tricore/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index bbcfee9..54a48cd 100644 --- a/target-tri

Re: [Qemu-devel] [PATCH] tcg: optimise memory layout of TCGTemp

2015-03-27 Thread Richard Henderson
On 03/25/2015 12:50 PM, Emilio G. Cota wrote: > This brings down the size of the struct from 56 to 32 bytes on 64-bit, > and to 16 bytes on 32-bit. > > The appended adds macros to prevent us from mistakenly overflowing > the bitfields when more elements are added to the corresponding > enums/macro

[Qemu-devel] [Bug 1437367] [NEW] Qemu guest fails to write files with raw disk (like \\.\PhysicalDrive1) on Windows host.

2015-03-27 Thread hiroaki
Public bug reported: Qemu guest fails to write files with specifing raw disk like \\.\PhysicalDrive1 full command line is below. qemu-sysytem-i386.exe -kernel bzImage -drive file=rootfs.ext2,index=0,if=scsi -append root=/dev/sda -drive file=\\.\PhysicalDrive1,index=1,if=scsi I found the reason i

Re: [Qemu-devel] [PATCH v5 7/7] qmp-event: add event notification for memory hot unplug error

2015-03-27 Thread Eric Blake
On 03/27/2015 03:20 AM, Zhu Guihua wrote: > When memory hot unplug fails, this patch adds support to send > QMP event to notify mgmt about this failure. > > Signed-off-by: Zhu Guihua > --- > docs/qmp/qmp-events.txt | 17 + > hw/acpi/memory_hotplug.c | 8 +++- > monitor.c

Re: [Qemu-devel] block-commit & dropping privs

2015-03-27 Thread Eric Blake
On 03/27/2015 03:07 AM, Michael Tokarev wrote: > Hello. > > I tried to experiment with block-commit command, which propagates > changes accumulated in an overlay (qcow2) block image file back to > the base image file. > > And immediately faced a problem. All my VMs are run chrooted into > an emp

Re: [Qemu-devel] [PATCH v4 0/2] Add generic can_be_deleted to UserCreatableClass.

2015-03-27 Thread Igor Mammedov
On Fri, 27 Mar 2015 13:36:10 +0800 Lin Ma wrote: > The patchset adds a generic can_be_deleted callback to UserCreatableClass. > It prevents removing a usercreatable object if the callback returns false. > > Backends could implement the callback if it shoudn't be removed while it's > in use. > >

Re: [Qemu-devel] [PATCH v4 2/2] hostmem: Prevent removing an in-use memory backend object

2015-03-27 Thread Igor Mammedov
On Fri, 27 Mar 2015 13:36:12 +0800 Lin Ma wrote: > showing a memory device whose memdev is removed leads an assert: > > (qemu) object_add memory-backend-ram,id=ram0,size=128M > (qemu) device_add pc-dimm,id=d0,memdev=ram0 > (qemu) object_del ram0 > (qemu) info memory-devices > ** > ERROR:qom/obje

Re: [Qemu-devel] [PATCH v4 1/2] qom: Add can_be_deleted callback to UserCreatableClass

2015-03-27 Thread Igor Mammedov
On Fri, 27 Mar 2015 13:36:11 +0800 Lin Ma wrote: > If backends implement the can_be_deleted and it returns false, > Then the qmp_object_del won't delete the given backends. > > Signed-off-by: Lin Ma > --- > include/qom/object_interfaces.h | 14 ++ > qmp.c

Re: [Qemu-devel] [PATCH] fix assertion in "info memory-devices" if memdev isn't accessible

2015-03-27 Thread Igor Mammedov
On Thu, 26 Mar 2015 21:33:19 +0100 Paolo Bonzini wrote: > > > On 26/03/2015 17:42, Igor Mammedov wrote: > > +mdevid = object_property_get_str(OBJECT(dimm->hostmem), "id", > > + &error_abort); > > +mdevpath = g_strdup_printf("/o

Re: [Qemu-devel] unhandled signal 11

2015-03-27 Thread Peter Maydell
On 27 March 2015 at 14:09, Catalin Vasile wrote: > How can I debug errors like this: > qemu-system-ppc[2273]: unhandled signal 11 at 0008 nip 1007ed08 lr > 103404e0 code 30001 > ? > I know it is a ppc binary, but I am asking a general question. > From a first impression it looks a little like

Re: [Qemu-devel] [PATCH] fix assertion in "info memory-devices" if memdev isn't accessible

2015-03-27 Thread Igor Mammedov
On Thu, 26 Mar 2015 16:26:17 -0400 Luiz Capitulino wrote: > On Thu, 26 Mar 2015 15:59:25 -0400 > Luiz Capitulino wrote: > > > On Thu, 26 Mar 2015 16:42:54 + > > Igor Mammedov wrote: > > > > > showing a memory device whose memdev is removed leads to an assert: > > > > > > (qemu) object_ad

Re: [Qemu-devel] [PATCH] fix assertion in "info memory-devices" if memdev isn't accessible

2015-03-27 Thread Igor Mammedov
On Thu, 26 Mar 2015 21:33:19 +0100 Paolo Bonzini wrote: > > > On 26/03/2015 17:42, Igor Mammedov wrote: > > +mdevid = object_property_get_str(OBJECT(dimm->hostmem), "id", > > + &error_abort); > > +mdevpath = g_strdup_printf("/o

[Qemu-devel] unhandled signal 11

2015-03-27 Thread Catalin Vasile
How can I debug errors like this: qemu-system-ppc[2273]: unhandled signal 11 at 0008 nip 1007ed08 lr 103404e0 code 30001 ? I know it is a ppc binary, but I am asking a general question. >From a first impression it looks a little like Linux Kernel Oops messages. How can I actually find out the l

Re: [Qemu-devel] [PATCH for-2.3 3/4] s390x: do not include ram_addr.h

2015-03-27 Thread Thomas Huth
Am Thu, 26 Mar 2015 16:36:01 +0100 schrieb Cornelia Huck : > From: Paolo Bonzini > > ram_addr.h is an internal interface and it is not needed anyway by > hw/s390x/ipl.c. > > Cc: Christian Borntraeger > Signed-off-by: Paolo Bonzini > Message-Id: <1427295389-5054-1-git-send-email-pbonz...@redha

Re: [Qemu-devel] [RFC 1/5] memory: Define API for MemoryRegionOps to take attrs and return status

2015-03-27 Thread Edgar E. Iglesias
On Fri, Mar 27, 2015 at 02:16:53PM +0100, Paolo Bonzini wrote: > > > On 27/03/2015 13:32, Edgar E. Iglesias wrote: > >>> Is this related to masters relying on the memory frameworks magic > >>> handling of unaliged accesses? > >> > >> Not necessarily, you can get the same just by doing a large wri

[Qemu-devel] [Bug 1392504] Re: libvirt not relabeling devices on USB Passthrough

2015-03-27 Thread Kelvin Middleton
I'm running an ACS patched linux mainline 3.18 as well as Ubuntu 14.10 stock. Haven't tested the Ubuntu 15.04 stock but will grab the debs and confirm. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1

[Qemu-devel] [Bug 1392504] Re: libvirt not relabeling devices on USB Passthrough

2015-03-27 Thread Kelvin Middleton
...actually are you talking kernel or the full 15.04 pre-release? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1392504 Title: libvirt not relabeling devices on USB Passthrough Status in QEMU: N

Re: [Qemu-devel] [RESEND PULL for-2.3 0/1] Net patches

2015-03-27 Thread Peter Maydell
On 27 March 2015 at 11:59, Stefan Hajnoczi wrote: > The following changes since commit 4ad9e2b36e1e00fe5b96c3448ecd673e11c4d6d8: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20150326-1' into > staging (2015-03-26 18:35:09 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [RFC 1/5] memory: Define API for MemoryRegionOps to take attrs and return status

2015-03-27 Thread Paolo Bonzini
On 27/03/2015 13:32, Edgar E. Iglesias wrote: >>> Is this related to masters relying on the memory frameworks magic >>> handling of unaliged accesses? >> >> Not necessarily, you can get the same just by doing a large write that >> spans multiple MemoryRegions. See the loop in address_space_rw. >

Re: [Qemu-devel] [PATCH v5 00/28] drop qapi nested structs

2015-03-27 Thread Markus Armbruster
Eric Blake writes: > After several months of sitting on this, I finally made progress > on it. Let's get it in 2.4, and I promise to kick out a v6 > (if needed) with much less delay. > > We want to eventually allow qapi defaults, by making: > 'data':{'*flag':'bool'} > shorthand for: > 'data':{

Re: [Qemu-devel] [PATCH v5 18/28] qapi: Unify type bypass and add tests

2015-03-27 Thread Markus Armbruster
Eric Blake writes: > On 03/26/2015 11:38 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> For a few QMP commands, we are forced to pass an arbitrary type >>> without tracking it properly in QAPI. Among the existing clients, >>> this unnamed type was spelled 'dict', 'visitor', and '**'

Re: [Qemu-devel] [PATCH v5 13/28] qapi: Add some expr tests

2015-03-27 Thread Markus Armbruster
Eric Blake writes: > On 03/26/2015 09:55 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Demonstrate that the qapi generator doesn't deal well with >>> expressions that aren't up to par. Later patches will improve >>> the expected results as the generator is made stricter. Only >>> o

Re: [Qemu-devel] [PATCH v5 10/28] qapi: Segregate anonymous unions into alternates in generator

2015-03-27 Thread Markus Armbruster
Eric Blake writes: > On 03/26/2015 08:47 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Special-casing 'discriminator == {}' for handling anonymous unions >>> is getting awkward; since this particular type is not always a >>> dictionary on the wire, it is easier to treat it as a comp

Re: [Qemu-devel] [RFC 1/5] memory: Define API for MemoryRegionOps to take attrs and return status

2015-03-27 Thread Edgar E. Iglesias
On Fri, Mar 27, 2015 at 01:10:07PM +0100, Paolo Bonzini wrote: > > > On 27/03/2015 13:02, Edgar E. Iglesias wrote: > > On Fri, Mar 27, 2015 at 10:58:01AM +, Peter Maydell wrote: > >> On 16 March 2015 at 17:20, Peter Maydell wrote: > >>> Define an API so that devices can register MemoryRegion

Re: [Qemu-devel] [PATCH v5 06/28] qapi: Add some union tests

2015-03-27 Thread Markus Armbruster
Eric Blake writes: > On 03/26/2015 07:18 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Demonstrate that the qapi generator doesn't deal well with unions >>> that aren't up to par. Later patches will update the expected >>> reseults as the generator is made stricter. >>> >>> Of parti

Re: [Qemu-devel] [PULL for-2.3 0/4] Block patches

2015-03-27 Thread Peter Maydell
On 27 March 2015 at 10:20, Stefan Hajnoczi wrote: > The following changes since commit 4ad9e2b36e1e00fe5b96c3448ecd673e11c4d6d8: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20150326-1' into > staging (2015-03-26 18:35:09 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [RFC 1/5] memory: Define API for MemoryRegionOps to take attrs and return status

2015-03-27 Thread Peter Maydell
On 27 March 2015 at 12:02, Edgar E. Iglesias wrote: > On Fri, Mar 27, 2015 at 10:58:01AM +, Peter Maydell wrote: >> So I was looking at how this would actually get plumbed through >> the memory subsystem code, and there are some awkwardnesses >> with this simple enum approach. In particular, f

  1   2   >