Re: [Qemu-devel] [PATCH v14 00/24] MTTCG Base enabling patches with ARM enablement

2017-02-25 Thread Pranith Kumar
On Sat, Feb 25, 2017 at 8:46 PM, Programmingkid wrote: > > > With the i386 target, I did see host CPU usage go up to 120%. That was nice > to see. Windows XP and Windows 2000 would not boot to the desktop for some > reason. For windows XP, you need the patch here:

Re: [Qemu-devel] [PATCH v14 00/24] MTTCG Base enabling patches with ARM enablement

2017-02-25 Thread Programmingkid
On Feb 24, 2017, at 1:37 PM, Alex Bennée wrote: > > G 3 writes: > >> Hi I was wondering if your MTTCG patches have been tested with a >> PowerPC guest yet. > > You would have to talk to PPC guys about the current status of MTTCG for > the PowerPC architecture. You

Re: [Qemu-devel] [PATCH 06/10] sm501: Fix device endianness

2017-02-25 Thread BALATON Zoltan
On Sat, 25 Feb 2017, Peter Maydell wrote: On 24 February 2017 at 20:35, BALATON Zoltan wrote: On Fri, 24 Feb 2017, Peter Maydell wrote: On 19 February 2017 at 16:35, BALATON Zoltan wrote: Signed-off-by: BALATON Zoltan ---

[Qemu-devel] [PATCH v2 08/14] sm501: Fix hardware cursor

2017-02-25 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- hw/display/sm501.c | 169 +--- hw/display/sm501_template.h | 25 +++ 2 files changed, 107 insertions(+), 87 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index

[Qemu-devel] [PATCH v2 01/14] sm501: Fixed code style and a few typos in comments

2017-02-25 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan Reviewed-by: Peter Maydell --- hw/display/sm501.c | 1132 ++- hw/display/sm501_template.h | 52 +- 2 files changed, 594 insertions(+), 590 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 03/10] sm501: QOMify

2017-02-25 Thread BALATON Zoltan
On Sat, 25 Feb 2017, Peter Maydell wrote: On 24 February 2017 at 20:23, BALATON Zoltan wrote: The SM501/SM502 is a multimedia chip that besides a display controller also contains some other functions (see http://cateee.net/lkddb/web-lkddb/MFD_SM501.html) and this is what is

[Qemu-devel] [PATCH v2 09/14] sm501: Misc clean ups

2017-02-25 Thread BALATON Zoltan
- Rename a variable - Move variable declarations out of loop to the beginning in draw_hwc_line Signed-off-by: BALATON Zoltan --- hw/display/sm501.c | 10 +- hw/display/sm501_template.h | 10 -- 2 files changed, 9 insertions(+), 11 deletions(-) diff

[Qemu-devel] [PATCH v2 11/14] sm501: Add some more missing registers

2017-02-25 Thread BALATON Zoltan
Values are not used yet, only stored to allow clients to initialise these without failing as long as no 2D engine function is called that would use the written value. Signed-off-by: BALATON Zoltan --- v2: Fixed mask of video_control register for a read only bit Changed

[Qemu-devel] [PATCH v2 03/14] sm501: QOMify

2017-02-25 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- v2: Add memory regions to device state instead of allocating them hw/display/sm501.c | 139 +++ hw/sh4/r2d.c | 11 +++- include/hw/devices.h | 5 -- 3 files changed, 106

[Qemu-devel] [PATCH v2 05/14] sm501: Add emulation of chip connected via PCI

2017-02-25 Thread BALATON Zoltan
Only the display controller part is created automatically on PCI Signed-off-by: BALATON Zoltan --- v2: Split off removing dependency on base address to separate patch hw/display/sm501.c | 52 1 file changed, 52

[Qemu-devel] [PATCH v2 02/14] sm501: Use defines instead of constants where available

2017-02-25 Thread BALATON Zoltan
This also fixes the initial value of misc_control register to match the comment which is likely what was intended but the DAC_POWER bit was set instead. This value is unused so it does not really matter but is fixed here for consistency. Signed-off-by: BALATON Zoltan ---

[Qemu-devel] [PATCH v2 04/14] sm501: Get rid of base address in draw_hwc_line

2017-02-25 Thread BALATON Zoltan
Do not use the base address to access data in local memory. This is in preparation to allow chip connected via PCI where base address depends on where the BAR is mapped so it will be unknown. Signed-off-by: BALATON Zoltan --- hw/display/sm501.c | 6 ++

[Qemu-devel] [PATCH v2 13/14] sm501: Add reset function and vmstate descriptor

2017-02-25 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- hw/display/sm501.c | 110 ++--- 1 file changed, 105 insertions(+), 5 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 32223f6..b682a95 100644 --- a/hw/display/sm501.c +++

[Qemu-devel] [PATCH v2 14/14] ppc: Add SM501 device in config for ppc and ppcemb targets

2017-02-25 Thread BALATON Zoltan
This is not used by default on any emulated machine yet but it is still useful to have it compiled so it can be added from the command line for clients that can use it (e.g. MorphOS has no driver for any other emulated video cards but can output via SM501) Signed-off-by: BALATON Zoltan

[Qemu-devel] [PATCH v2 10/14] sm501: Add support for panel layer

2017-02-25 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- v2: Split off renaming a variable to separate clean up patch hw/display/sm501.c | 63 +++--- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/hw/display/sm501.c

[Qemu-devel] [PATCH v2 12/14] sm501: Implement reading 2D engine registers

2017-02-25 Thread BALATON Zoltan
Clients normally only write to these registers, nothing is known to ever read them but they are documented as read/write so allow clients to also read the values. Signed-off-by: BALATON Zoltan --- hw/display/sm501.c | 57 ++

[Qemu-devel] [PATCH v2 07/14] sm501: Fix device endianness

2017-02-25 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- v2: Split off small clean up to other patch hw/display/sm501.c | 6 +++--- hw/display/sm501_template.h | 23 ++- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/hw/display/sm501.c

[Qemu-devel] [PATCH v2 00/14] Improvements for SM501 display controller emulation

2017-02-25 Thread BALATON Zoltan
Second try, addressing review comments. BALATON Zoltan (14): sm501: Fixed code style and a few typos in comments sm501: Use defines instead of constants where available sm501: QOMify sm501: Get rid of base address in draw_hwc_line sm501: Add emulation of chip connected via PCI sm501:

[Qemu-devel] [PATCH v2 06/14] sm501: Add missing arbitration control register

2017-02-25 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- hw/display/sm501.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index d9219bd..b977094 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -477,6 +477,7 @@ typedef struct

[Qemu-devel] [PATCH v3] target-s390x: Implement stfl and stfle

2017-02-25 Thread Michal Marek
The implementation is partially cargo cult based, but it works for the linux kernel use case. Signed-off-by: Michal Marek --- v3: - Initialize the buffer in do_stfle() v2: - STFLE is not a privileged instruction, go through the MMU to store the result - annotate the stfl

Re: [Qemu-devel] [PATCH] target-s390x: Implement stfl and stfle

2017-02-25 Thread Michal Marek
Dne 25.2.2017 v 21:39 Michal Marek napsal(a): > Dne 25.2.2017 v 01:05 Richard Henderson napsal(a): >> On 02/25/2017 12:44 AM, Michal Marek wrote: >>> +static int do_stfle(CPUS390XState *env, uint64_t addr, int len) >>> +{ >>> +S390CPU *cpu = s390_env_get_cpu(env); >>> +uint8_t data[64]; >>

[Qemu-devel] [PATCH v2] target-s390x: Implement stfl and stfle

2017-02-25 Thread Michal Marek
The implementation is partially cargo cult based, but it works for the linux kernel use case. Signed-off-by: Michal Marek --- v2: - STFLE is not a privileged instruction, go through the MMU to store the result - annotate the stfl helper with TCG_CALL_NO_RWG - Use a large

[Qemu-devel] [PATCH v2] linux-user: Add signal handling support for x86_64

2017-02-25 Thread Pranith Kumar
Note that x86_64 has only _rt signal handlers. This implementation attempts to share code with the x86_32 implementation. CC: Laurent Vivier Signed-off-by: Allan Wirth Reviewed-by: Peter Maydell Signed-off-by: Pranith Kumar

[Qemu-devel] [PATCH] slirp: allow host port 0 for hostfwd

2017-02-25 Thread Vincent Bernat
The OS will allocate automatically a free port. This is useful if you want to be sure to not get any port conflict. You still have to figure out which port you got, for example with "lsof" (this could be exposed in the monitor if needed). Example of use: $ qemu-system-x86_64 -net

Re: [Qemu-devel] [PULL 00/17] KVM and cpu-exec patches for 2.9 soft freeze

2017-02-25 Thread Peter Maydell
On 24 February 2017 at 17:40, Paolo Bonzini wrote: > The following changes since commit a1cf5fac2b929ffa2abd1285401f2535ff8c6fea: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-block-2017-02-21' > into staging (2017-02-21 13:58:50 +) > > are available in

Re: [Qemu-devel] [PATCH 17/21] qapi: Drop unused non-strict qobject input visitor

2017-02-25 Thread Eric Blake
On 02/24/2017 09:02 AM, Markus Armbruster wrote: > Paolo Bonzini writes: > >> On 23/02/2017 22:45, Markus Armbruster wrote: >>> The split between tests/test-qobject-input-visitor.c and >>> tests/test-qobject-input-strict.c now makes less sense than ever. The >>> next commit

Re: [Qemu-devel] [PULL 00/24] MTTCG Base enabling patches with ARM enablement

2017-02-25 Thread Peter Maydell
On 24 February 2017 at 11:20, Alex Bennée wrote: > The following changes since commit 2d896b454a0e19ec4c1ddbb0e0b65b7e54fcedf3: > > Revert "hw/mips: MIPS Boston board support" (2017-02-23 18:04:45 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH] target-s390x: Implement stfl and stfle

2017-02-25 Thread Michal Marek
Dne 25.2.2017 v 01:05 Richard Henderson napsal(a): > On 02/25/2017 12:44 AM, Michal Marek wrote: >> +DEF_HELPER_1(stfl, void, env) > > DEF_HELPER_FLAGS_1(stfl, TCG_CALL_NO_RWG, void, env) > > since this touches no registers, and only writes to lomem which afaik > cannot fault in kernel mode.

[Qemu-devel] [PATCH 3/4] savevm: fix savevm after migration

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
After migration all drives are inactive and savevm will fail with qemu-kvm: block/io.c:1406: bdrv_co_do_pwritev: Assertion `!(bs->open_flags & 0x0800)' failed. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/snapshot.c | 3 ++- migration/savevm.c | 11

[Qemu-devel] [PATCH 4/4] migration: fix use-after-free of to_dst_file

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
hmp_savevm calls qemu_savevm_state(f), which sets to_dst_file=f in global migration state. Then hmp_savevm closes f (g_free called). Next access to to_dst_file in migration state (for example, qmp_migrate_set_speed) will use it after it was freed. Signed-off-by: Vladimir Sementsov-Ogievskiy

[Qemu-devel] [PATCH 1/4] iotests: add migration corner cases test

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/175 | 71 ++ tests/qemu-iotests/175.out | 5 tests/qemu-iotests/group | 1 + 3 files changed, 77 insertions(+) create mode 100644

[Qemu-devel] [PATCH 0/4] some migration bugs

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here are some migration related bugs, two about INACTIVE bdses and one use-after-free. I'm absolutely not sure, that these bugs should be fixed like I'm fixing, but problem definitely exists. Reset in stopped state is strange case, may be such usage should be restricted. About INACTIVE

[Qemu-devel] [PATCH 2/4] qmp-cont: invalidate on RUN_STATE_PRELAUNCH

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
We must invalidate on RUN_STATE_PRELAUNCH too, as it is available through qmp_system_reset from RUN_STATE_POSTMIGRATE. Otherwise, we will come to qemu-kvm: block/io.c:1406: bdrv_co_do_pwritev: Assertion `!(bs->open_flags & 0x0800)' failed. on the first write after vm start.

Re: [Qemu-devel] [PULL 00/13] s390x patches for 2.9

2017-02-25 Thread Peter Maydell
On 24 February 2017 at 09:22, Cornelia Huck wrote: > The following changes since commit 10f25e4844cb9b3f02fb032f88051dd5b65b4206: > > Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170222' into > staging (2017-02-23 09:59:40 +) > > are available in the

Re: [Qemu-devel] [PATCH 12/17] migration: add postcopy migration of dirty bitmaps

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
16.02.2017 16:04, Fam Zheng wrote: On Mon, 02/13 12:54, Vladimir Sementsov-Ogievskiy wrote: Postcopy migration of dirty bitmaps. Only named dirty bitmaps, associated with root nodes and non-root named nodes are migrated. If destination qemu is already containing a dirty bitmap with the same

Re: [Qemu-devel] [PULL 0/5] Docker testing and shippable patches

2017-02-25 Thread Peter Maydell
On 24 February 2017 at 06:32, Fam Zheng wrote: > The following changes since commit 10f25e4844cb9b3f02fb032f88051dd5b65b4206: > > Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170222' into > staging (2017-02-23 09:59:40 +) > > are available in the git

[Qemu-devel] [PATCH v16 00/22] qcow2: persistent dirty bitmaps

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Hi all! There is a new update of qcow2-bitmap series - v16. web: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=qcow2-bitmap-v16 git: https://src.openvz.org/scm/~vsementsov/qemu.git (tag qcow2-bitmap-v16) v16: mostly by Kevin's comments: 07: just moved here, as preparation for

[Qemu-devel] [PATCH v16 15/22] qcow2: add .bdrv_can_store_new_dirty_bitmap

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_can_store_new_dirty_bitmap interface. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- block/qcow2-bitmap.c | 51 +++ block/qcow2.c| 2 ++ block/qcow2.h

[Qemu-devel] [PATCH v16 09/22] qcow2: autoloading dirty bitmaps

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Auto loading bitmaps are bitmaps in Qcow2, with the AUTO flag set. They are loaded when the image is opened and become BdrvDirtyBitmaps for the corresponding drive. Extra data in bitmaps is not supported for now. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

[Qemu-devel] [PATCH v16 07/22] qcow2-refcount: rename inc_refcounts() and make it public

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
This is needed for the following patch, which will introduce refcounts checking for qcow2 bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/qcow2-refcount.c | 53

Re: [Qemu-devel] [PATCH 12/17] migration: add postcopy migration of dirty bitmaps

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
24.02.2017 16:26, Dr. David Alan Gilbert wrote: * Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: Postcopy migration of dirty bitmaps. Only named dirty bitmaps, associated with root nodes and non-root named nodes are migrated. If destination qemu is already containing a dirty

[Qemu-devel] [PATCH v16 08/22] qcow2: add bitmaps extension

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Add bitmap extension as specified in docs/specs/qcow2.txt. For now, just mirror extension header into Qcow2 state and check constraints. Also, calculate refcounts for qcow2 bitmaps, to not break qemu-img check. For now, disable image resize if it has bitmaps. It will be fixed later.

[Qemu-devel] [PATCH v16 18/22] qmp: add x-debug-block-dirty-bitmap-sha256

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/dirty-bitmap.c | 5 + blockdev.c | 29 + include/block/dirty-bitmap.h |

[Qemu-devel] [PATCH v16 01/22] specs/qcow2: fix bitmap granularity qemu-specific note

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- docs/specs/qcow2.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt index 80cdfd0e91..dda53dd2a3 100644 ---

[Qemu-devel] [PATCH v16 13/22] qcow2: add persistent dirty bitmaps support

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Store persistent dirty bitmaps in qcow2 image. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 6 +- block/qcow2-bitmap.c | 473 +++ block/qcow2.c| 9 + block/qcow2.h| 1 + 4

[Qemu-devel] [PATCH v16 21/22] qcow2: add .bdrv_remove_persistent_dirty_bitmap

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_remove_persistent_dirty_bitmap interface. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/qcow2-bitmap.c | 41 +

[Qemu-devel] [PATCH v16 06/22] block/dirty-bitmap: add deserialize_ones func

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Add bdrv_dirty_bitmap_deserialize_ones() function, which is needed for qcow2 bitmap loading, to handle unallocated bitmap parts, marked as all-ones. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf Reviewed-by: John Snow

[Qemu-devel] [PATCH v16 22/22] qmp: block-dirty-bitmap-remove: remove persistent

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Remove persistent bitmap from the storage on block-dirty-bitmap-remove. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- blockdev.c | 10 ++ 1 file changed, 10 insertions(+)

[Qemu-devel] [PATCH v16 03/22] hbitmap: improve dirty iter

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Make dirty iter resistant to resetting bits in corresponding HBitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- include/qemu/hbitmap.h | 26 --

[Qemu-devel] [PATCH v16 20/22] block/dirty-bitmap: add bdrv_remove_persistent_dirty_bitmap

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Interface for removing persistent bitmap from its storage. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/dirty-bitmap.c | 18 ++

[Qemu-devel] [PATCH v16 19/22] iotests: test qcow2 persistent dirty bitmap

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/165 | 89 ++ tests/qemu-iotests/165.out | 5 +++

[Qemu-devel] [PATCH v16 11/22] block: introduce persistent dirty bitmaps

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
New field BdrvDirtyBitmap.persistent means, that bitmap should be saved on bdrv_close, using format driver. Format driver should maintain bitmap storing. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 26 ++

[Qemu-devel] [PATCH v16 04/22] tests: add hbitmap iter test

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Test that hbitmap iter is resistant to bitmap resetting. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz Reviewed-by: John Snow --- tests/test-hbitmap.c | 19

[Qemu-devel] [PATCH v16 12/22] block/dirty-bitmap: add bdrv_dirty_bitmap_next()

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/dirty-bitmap.c | 7 +++ include/block/dirty-bitmap.h | 3 +++ 2 files changed, 10 insertions(+) diff --git

[Qemu-devel] [PATCH v16 05/22] block: fix bdrv_dirty_bitmap_granularity signature

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Make getter signature const-correct. This allows other functions with const dirty bitmap parameter use bdrv_dirty_bitmap_granularity(). Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Kevin Wolf Signed-off-by: Vladimir

[Qemu-devel] [PATCH v16 10/22] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Mirror AUTO flag from Qcow2 bitmap in BdrvDirtyBitmap. This will be needed in future, to save this flag back to Qcow2 for persistent bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow

[Qemu-devel] [PATCH v16 02/22] specs/qcow2: do not use wording 'bitmap header'

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
A bitmap directory entry is sometimes called a 'bitmap header'. This patch leaves only one name - 'bitmap directory entry'. The name 'bitmap header' creates misunderstandings with 'qcow2 header' and 'qcow2 bitmap header extension' (which is extension of qcow2 header) Signed-off-by: Vladimir

[Qemu-devel] [PATCH v16 14/22] block: add bdrv_can_store_new_dirty_bitmap

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
This will be needed to check some restrictions before making bitmap persistent in qmp-block-dirty-bitmap-add (this functionality will be added by future patch) Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow

[Qemu-devel] [PATCH v16 17/22] qmp: add autoload parameter to block-dirty-bitmap-add

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Optional. Default is false. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz Reviewed-by: John Snow --- blockdev.c | 18 --

[Qemu-devel] [PATCH v16 16/22] qmp: add persistent flag to block-dirty-bitmap-add

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
Add optional 'persistent' flag to qmp command block-dirty-bitmap-add. Default is false. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz Reviewed-by: John Snow ---

Re: [Qemu-devel] [PULL 00/24] option cutils: Fix and clean up number conversions

2017-02-25 Thread Peter Maydell
On 23 February 2017 at 19:53, Markus Armbruster wrote: > QemuOpts has its own code to convert strings to numbers, and being > QemuOpts, it gets it wrong. util/cutils is less wrong. Fix it up > some, and reuse it for QemuOpts. > > The following changes since commit

Re: [Qemu-devel] [PATCH 09/10] sm501: Add some more missing registers

2017-02-25 Thread Peter Maydell
On 24 February 2017 at 21:49, BALATON Zoltan wrote: > On Fri, 24 Feb 2017, BALATON Zoltan wrote: >> >> On Fri, 24 Feb 2017, Peter Maydell wrote: >>> >>> On 19 February 2017 at 16:35, BALATON Zoltan wrote: Write only to allow clients to initialise

Re: [Qemu-devel] [PATCH 16/21] test-qobject-input-visitor: Use strict visitor

2017-02-25 Thread Eric Blake
On 02/23/2017 03:45 PM, Markus Armbruster wrote: > The qobject input visitor comes in a strict and a non-strict variant. > This test is the non-strict variant's last user. Well, depending on Paolo's proposed addition. > Turns out it relies > on non-strict only in test_visitor_in_null(), and

Re: [Qemu-devel] [PATCH 08/10] sm501: Add support for panel layer

2017-02-25 Thread Peter Maydell
On 24 February 2017 at 20:38, BALATON Zoltan wrote: > On Fri, 24 Feb 2017, Peter Maydell wrote: >> Please don't change variable names in the middle of a patch that's >> adding new functionality, it makes the patch harder to review. > > > Where should I do it then? Again

Re: [Qemu-devel] [PATCH 15/21] qom: Make object_property_set_qobject()'s input visitor strict

2017-02-25 Thread Eric Blake
On 02/23/2017 03:45 PM, Markus Armbruster wrote: > Commit 240f64b made all qobject input visitors created outside tests > strict, except for the one in object_property_set_qobject(). That one > was left behind only because Eric couldn't spare the time to figure > out whether making it strict

Re: [Qemu-devel] [PATCH 06/10] sm501: Fix device endianness

2017-02-25 Thread Peter Maydell
On 24 February 2017 at 20:35, BALATON Zoltan wrote: > On Fri, 24 Feb 2017, Peter Maydell wrote: >> >> On 19 February 2017 at 16:35, BALATON Zoltan wrote: >>> >>> Signed-off-by: BALATON Zoltan >>> --- >>> hw/display/sm501.c |

Re: [Qemu-devel] [PATCH 04/10] sm501: Add emulation of chip connected via PCI

2017-02-25 Thread Peter Maydell
On 24 February 2017 at 20:25, BALATON Zoltan wrote: > On Fri, 24 Feb 2017, Peter Maydell wrote: >> Dropping the requirement for a base addr is not really the same >> change as adding the PCI device. > > > This is needed for PCI device because the base is not accessible before

Re: [Qemu-devel] [PATCH 03/10] sm501: QOMify

2017-02-25 Thread Peter Maydell
On 24 February 2017 at 20:23, BALATON Zoltan wrote: > On Fri, 24 Feb 2017, Peter Maydell wrote: >> >> On 19 February 2017 at 16:35, BALATON Zoltan wrote: >>> >>> Signed-off-by: BALATON Zoltan >>> --- >>> hw/display/sm501.c | 133 >>>

Re: [Qemu-devel] [PATCH 14/21] qapi: Make string input and opts visitor require non-null input

2017-02-25 Thread Eric Blake
On 02/23/2017 03:45 PM, Markus Armbruster wrote: > The string input visitor tries to cope with null input. Null input > isn't used anywhere, and isn't covered by tests. Unsurprisingly, it > doesn't fully work: start_list() crashes because it passes the input > via parse_str() to strtoll()

Re: [Qemu-devel] [PATCH 13/21] qapi: Drop string input visitor method optional()

2017-02-25 Thread Eric Blake
On 02/23/2017 03:45 PM, Markus Armbruster wrote: > visit_optional() is to be called only between visit_start_struct() and > visit_end_struct(). Visitors that don't support struct visits, > i.e. don't implement start_struct(), end_struct(), have no use for it. > Clarify documentation. > > The

Re: [Qemu-devel] [PATCH v15 21/25] qcow2-bitmap: refcounts

2017-02-25 Thread Vladimir Sementsov-Ogievskiy
16.02.2017 17:27, Kevin Wolf wrote: Am 15.02.2017 um 11:10 hat Vladimir Sementsov-Ogievskiy geschrieben: Calculate refcounts for qcow2 bitmaps. It is needed for qcow2's qemu-img check implementation. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH 12/21] qapi: Improve qobject input visitor error reporting

2017-02-25 Thread Eric Blake
On 02/23/2017 03:45 PM, Markus Armbruster wrote: > Error messages refer to nodes of the QObject being visited by name. > Trouble is the names are sometimes less than helpful: > > Improve error messages by referring to nodes by path instead, as > follows: > > * The path of the root QObject is

Re: [Qemu-devel] [PATCH 11/21] qapi: Make QObject input visitor set *list reliably

2017-02-25 Thread Eric Blake
On 02/23/2017 03:45 PM, Markus Armbruster wrote: > qobject_input_start_struct() sets *list, except when it fails because > qobject_input_get_object() fails, i.e. the input object doesn't exist. > > All the other input visitor start_struct(), start_list(), > start_alternate() always set *obj /

Re: [Qemu-devel] [PATCH 54/54] block: Add Error parameter to bdrv_append()

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > Aborting on error in bdrv_append() isn't correct. This patch fixes it > and lets the callers handle failures. > > Test case 085 needs a reference output update. This is caused by the > reversed order of bdrv_set_backing_hd() and

Re: [Qemu-devel] [PATCH 10/21] qapi: Clean up after commit 3d344c2

2017-02-25 Thread Eric Blake
On 02/23/2017 03:45 PM, Markus Armbruster wrote: > Drop unused QIV_STACK_SIZE and unused qobject_input_start_struct() > parameter errp. > > Signed-off-by: Markus Armbruster > --- > qapi/qobject-input-visitor.c | 14 +++--- > 1 file changed, 3 insertions(+), 11

Re: [Qemu-devel] [PATCH 09/21] qapi: Improve a QObject input visitor error message

2017-02-25 Thread Eric Blake
On 02/23/2017 03:45 PM, Markus Armbruster wrote: > The QObject input visitor has three error message formats: > > * Parameter '%s' is missing > * "Invalid parameter type for '%s', expected: %s" > * "QMP input object member '%s' is unexpected" > > The '%s' are member names (or "null", but I'll

Re: [Qemu-devel] [PATCH 53/54] block: Add Error parameter to bdrv_set_backing_hd()

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > Not all callers of bdrv_set_backing_hd() know for sure that attaching > the backing file will be allowed by the permission system. Return the > error from the function rather than aborting. > > Signed-off-by: Kevin Wolf > --- > block.c

Re: [Qemu-devel] [PATCH 52/54] block: Assertions for resize permission

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > This adds an assertion that ensures that the necessary resize permission > has been granted before bdrv_truncate() is called. > > Signed-off-by: Kevin Wolf > --- > block.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Max

Re: [Qemu-devel] [PATCH 51/54] block: Assertions for write permissions

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > This adds assertions that ensure that the necessary write permissions > have been granted before someone attempts to write to a node. > > Signed-off-by: Kevin Wolf > --- > block/io.c | 9 +++-- > 1 file changed, 7 insertions(+), 2

Re: [Qemu-devel] [PATCH 50/54] block: Pass BdrvChild to bdrv_aligned_preadv/pwritev

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > This is where we want to check the permissions, so we need to have the > BdrvChild around where they are stored. > > Signed-off-by: Kevin Wolf > --- > block/io.c | 31 +-- > 1 file changed, 17 insertions(+),

Re: [Qemu-devel] [PATCH 49/54] tests: Remove FIXME comments

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > Not requesting any permissions is actually correct for these test cases > because no actual I/O or other operation covered by the permission > system is performed. > > Signed-off-by: Kevin Wolf > --- > tests/test-blockjob.c | 2 +- >

Re: [Qemu-devel] [PATCH 48/54] nbd/server: Use real permissions for NBD exports

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > NBD can't cope with device size changes, so resize must be forbidden, > but otherwise we can tolerate anything. Depending on whether the export > is writable or not, we only require consistent reads and writes. > > Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PATCH 47/54] migration/block: Use real permissions

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > Request BLK_PERM_CONSISTENT_READ for the source of block migration, and > handle potential permission errors as good as we can in this place > (which is not very good, but it matches the other failure cases). > > Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PATCH 46/54] hmp: Request permissions in qemu-io

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > The HMP command 'qemu-io' is a bit tricky because it wants to work on > the original BlockBackend, but additional permissions could be required. > The details are explained in a comment in the code, but in summary, just > request whatever permissions the

Re: [Qemu-devel] [PATCH 45/54] commit: Add filter-node-name to block-commit

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > Management tools need to be able to know about every node in the graph > and need a way to address them. This new option to block-commit allows > the client to set a node-name for the automatically inserted filter > driver, and at the same time serves as a

Re: [Qemu-devel] [PATCH 44/54] mirror: Add filter-node-name to blockdev-mirror

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > Management tools need to be able to know about every node in the graph > and need a way to address them. This new option to blockdev-mirror > allows the client to set a node-name for the automatically inserted > filter driver, and at the same time serves as

Re: [Qemu-devel] [PATCH 43/54] stream: Use real permissions in streaming block job

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > The correct permissions are relatively obvious here (and explained in > code comments). For intermediate streaming, we need to reopen the top > node read-write before creating the job now because the permissions > system catches attempts to get the

Re: [Qemu-devel] [PATCH 42/54] mirror: Use real permissions in mirror/active commit block job

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > The mirror block job is mainly used for two different scenarios: > Mirroring to an otherwise unused, independent target node, or for active > commit where the target node is part of the backing chain of the source. > > Similarly to the commit block job

Re: [Qemu-devel] [PATCH 41/54] block: Allow backing file links in change_parent_backing_link()

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > Now that the backing file child role implements .attach/.detach > callbacks, nothing prevents us from modifying the graph even if that > involves changing backing file links. > > Signed-off-by: Kevin Wolf > --- > block.c | 7 +++ >

Re: [Qemu-devel] [PATCH 40/54] block: BdrvChildRole.attach/detach() callbacks

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > Backing files are somewhat special compared to other kinds of children > because they are attached and detached using bdrv_set_backing_hd() > rather than the normal set of functions, which does a few more things > like setting backing blockers, toggling the

Re: [Qemu-devel] [PATCH 39/54] block: Fix pending requests check in bdrv_append()

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > bdrv_append() cares about isolation of the node that it modifies, but > not about activity in some subtree below it. Instead of using the > recursive bdrv_requests_pending(), directly check bs->in_flight, which > considers only the node in question. > >

Re: [Qemu-devel] [PATCH 38/54] backup: Use real permissions in backup block job

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > The backup block job doesn't have very complicated requirements: It > needs to read from the source and write to the target, but it's fine > with either side being changed. The only restriction is that we can't > resize the image because the job uses a

Re: [Qemu-devel] [PATCH 37/54] commit: Use real permissions for HMP 'commit'

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > This is a little simpler than the commit block job because it's > synchronous and only commits into the immediate backing file, but > otherwise doing more or less the same. > > Signed-off-by: Kevin Wolf > --- > block/commit.c | 31

Re: [Qemu-devel] [PATCH 18/54] block: Default .bdrv_child_perm() for format drivers

2017-02-25 Thread Max Reitz
On 21.02.2017 15:58, Kevin Wolf wrote: > Almost all format drivers have the same characteristics as far as > permissions are concerned: They have one or more children for storing > their own data and, more importantly, metadata (can be written to and > grow even without external write requests,

[Qemu-devel] [Bug 1580459] Re: Windows (10?) guest freezes entire host on shutdown if using PCI passthrough

2017-02-25 Thread yanman
Hi guys, not sure if I'm on the right track here but I think I'm experiencing the same issue. My install might be a bit of a mess combining bits from the VFIO Tips site and Ubuntu guides on GPU passthrough, but I *did* have it all working for a few hours at a stretch before I got this lock up.

[Qemu-devel] [PATCH 2/2] linux-user: fix do_rt_sigreturn on m68k linux userspace emulation

2017-02-25 Thread Laurent Vivier
From: Michael Karcher do_rt_sigreturn uses an uninitialised local variable instead of fetching the old signal mask directly from the signal frame when restoring the mask, so the signal mask is undefined after do_rt_sigreturn. As the signal frame data is in

[Qemu-devel] [PATCH 1/2] linux-user: correctly manage SR in ucontext

2017-02-25 Thread Laurent Vivier
Use cpu_m68k_get_ccr()/cpu_m68k_set_ccr() to setup and restore correctly the value of SR in the ucontext structure Signed-off-by: Laurent Vivier --- linux-user/signal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linux-user/signal.c

[Qemu-devel] [PATCH 0/2] linux-user: m68k update

2017-02-25 Thread Laurent Vivier
A couple of m68k patches I have in my stack for a while and needed to have a working linux-user qemu. The first one is needed to be able to use RISU with m68k. Laurent Vivier (1): linux-user: correctly manage SR in ucontext Michael Karcher (1): linux-user: fix do_rt_sigreturn on m68k linux

Re: [Qemu-devel] [PATCH] spapr/pci: populate PCI DT in reverse order

2017-02-25 Thread Greg Kurz
On Sat, 25 Feb 2017 20:39:18 +1100 Alexey Kardashevskiy wrote: > On 22/02/17 21:56, Greg Kurz wrote: > > From: Greg Kurz > > > > Since commit 1d2d974244c6 "spapr_pci: enumerate and add PCI device tree", > > QEMU > > populates the PCI device tree in

Re: [Qemu-devel] [PATCH] spapr/pci: populate PCI DT in reverse order

2017-02-25 Thread Alexey Kardashevskiy
On 22/02/17 21:56, Greg Kurz wrote: > From: Greg Kurz > > Since commit 1d2d974244c6 "spapr_pci: enumerate and add PCI device tree", QEMU > populates the PCI device tree in the opposite order compared to SLOF. > > Before 1d2d974244c6: > > Populating

  1   2   >