Re: [Qemu-devel] [PATCH 5/7] sockets: Rename SocketAddressFlat to SocketAddress

2017-04-26 Thread Prasanna Kalever
On Wed, Apr 26, 2017 at 1:06 PM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > block/gluster.c| 48 > block/nbd.c| 26 +- > block/sheepdog.c

[Qemu-devel] [PULL v2 6/8] qga: improve fsfreeze documentations

2017-04-26 Thread Michael Roth
From: Marc-André Lureau Some users find the fsfreeze behaviour confusing. Add some notes about invalid mount points and Windows usage. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1436976 Signed-off-by: Marc-André Lureau

[Qemu-devel] [PULL v2 1/8] qemu-ga: Make QGA VSS provider service run only when needed

2017-04-26 Thread Michael Roth
From: Sameeh Jubran Currently the service runs in background on boot even though it is not needed and once it is running it never stops. The service needs to be running only during freeze operation and it should be stopped after executing thaw. Signed-off-by: Sameeh Jubran

[Qemu-devel] [PULL v2 5/8] qga: Add 'guest-get-host-name' command

2017-04-26 Thread Michael Roth
From: Vinzenz Feenstra Retrieving the guest host name is a very useful feature for virtual management systems. This information can help to have more user friendly VM access details, instead of an IP there would be the host name. Also the host name reported can be used to

[Qemu-devel] [PULL v2 4/8] qga-win: Fix Event Viewer errors caused by qemu-ga

2017-04-26 Thread Michael Roth
From: Sameeh Jubran When the command "guest-fsfreeze-freeze" is executed it causes the VSS service to log the error below in the Event Viewer. This error is caused by an issue in the function "CommitSnapshots" in provider.cpp: * When VSS_TIMEOUT_MSEC expires the funtion

[Qemu-devel] [PULL v2 8/8] qga: Add `guest-get-timezone` command

2017-04-26 Thread Michael Roth
From: Vinzenz Feenstra Adds a new command `guest-get-timezone` reporting the currently configured timezone on the system. The information on what timezone is currently is configured is useful in case of Windows VMs where the offset of the hardware clock is required to have

[Qemu-devel] [PULL v2 3/8] qga-win: Fix a bug where qemu-ga service is stuck during stop operation

2017-04-26 Thread Michael Roth
From: Sameeh Jubran After triggering a freeze command without any following thaw command, qemu-ga will not respond to stop operation. This behaviour is wanted on Linux as there is no time limit for a freeze command and we want to prevent quitting in the middle of freeze, on

[Qemu-devel] [PULL v2 2/8] qga-win: Enable 'can-offline' field in 'guest-get-vcpus' reply

2017-04-26 Thread Michael Roth
From: Sameeh Jubran The QGA schema states: @can-offline: Whether offlining the VCPU is possible. This member is always filled in by the guest agent when the structure is returned, and always ignored on input (hence it can be

[Qemu-devel] [PULL v2 7/8] qga: Add 'guest-get-users' command

2017-04-26 Thread Michael Roth
From: Vinzenz Feenstra A command that will list all currently logged in users, and the time since when they are logged in. Examples: virsh # qemu-agent-command F25 '{ "execute": "guest-get-users" }' {"return":[{"login-time":1490622289.903835,"user":"root"}]} virsh #

[Qemu-devel] [PULL v2 0/8] qemu-ga patch queue

2017-04-26 Thread Michael Roth
The following changes since commit 81b2d5ceb0cfb4cdc2163492e3169ed714b0cda9: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170426' into staging (2017-04-26 20:50:49 +0100) are available in the git repository at: git://github.com/mdroth/qemu.git tags/qga-pull-2017-04-25-v2-tag

Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP)

2017-04-26 Thread FONNEMANN Mark
-Original Message- From: Stefan Weil [mailto:s...@weilnetz.de] Sent: Friday, April 21, 2017 15:58 To: FONNEMANN Mark ; qemu-devel@nongnu.org; Samuel Thibault Subject: Re: [Qemu-devel] dns server not working in QEMU using usermode

[Qemu-devel] [PATCH v3 6/6] target/ppc: do not reset reserve_addr in exec_enter

2017-04-26 Thread Nikunj A Dadhania
In case when atomic operation is not supported, exit_atomic is called and we stop the world and execute the atomic operation. This results in a following call chain: tcg_gen_atomic_cmpxchg_tl() -> gen_helper_exit_atomic() -> HELPER(exit_atomic) -> cpu_loop_exit_atomic() ->

[Qemu-devel] [PATCH v3 3/6] target/ppc: Generate fence operations

2017-04-26 Thread Nikunj A Dadhania
Signed-off-by: Nikunj A Dadhania Reviewed-by: Richard Henderson --- target/ppc/translate.c | 8 1 file changed, 8 insertions(+) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 50b6d4d..4a1f24a 100644 ---

[Qemu-devel] [PATCH v3] Issue a deprecation warning if the user specifies the "-hdachs" option.

2017-04-26 Thread Thomas Huth
If the user needs to specify the disk geometry, the corresponding parameters of the "-device ide-hd" option should be used instead. "-hdachs" is considered as deprecated and might be removed soon. Signed-off-by: Thomas Huth --- v3: - Recommend to use the parameters of -device

[Qemu-devel] [PATCH v3 4/6] cpus: Fix CPU unplug for MTTCG

2017-04-26 Thread Nikunj A Dadhania
From: Bharata B Rao Ensure that the unplugged CPU thread is destroyed and the waiting thread is notified about it. This is needed for CPU unplug to work correctly in MTTCG mode. Signed-off-by: Bharata B Rao Signed-off-by: Nikunj A

[Qemu-devel] [PATCH v3 1/6] target/ppc: Emulate LL/SC using cmpxchg helpers

2017-04-26 Thread Nikunj A Dadhania
Emulating LL/SC with cmpxchg is not correct, since it can suffer from the ABA problem. However, portable parallel code is written assuming only cmpxchg which means that in practice this is a viable alternative. Signed-off-by: Nikunj A Dadhania Reviewed-by: Richard

[Qemu-devel] [PATCH v3 2/6] cputlb: handle first atomic write to the page

2017-04-26 Thread Nikunj A Dadhania
In case where the conditional write is the first write to the page, TLB_NOTDIRTY will be set and stop_the_world is triggered. Handle this as a special case and set the dirty bit. After that fall through to the actual atomic instruction below. Signed-off-by: Nikunj A Dadhania

[Qemu-devel] [PATCH v3 5/6] tcg: enable MTTCG by default for PPC64 on x86

2017-04-26 Thread Nikunj A Dadhania
This enables the multi-threaded system emulation by default for PPC64 guests using the x86_64 TCG back-end. Signed-off-by: Nikunj A Dadhania Reviewed-by: Alex Bennée --- configure| 2 ++ target/ppc/cpu.h | 2 ++ 2 files changed, 4

[Qemu-devel] [PATCH v3 0/6] The series enables Multi-Threaded TCG on PPC64

2017-04-26 Thread Nikunj A Dadhania
Patch 01: Use atomic_cmpxchg in store conditional 02: Handle first write to page during atomic operation 03: Generate memory barriers for sync/isync and load/store conditional 04: Fix CPU unplug in MTTCG 05: Enable MTTCG by default on PPC64 06: Fixes a bug in PPC

Re: [Qemu-devel] [PATCH v3 3/3] tests: Add a tester for HMP commands

2017-04-26 Thread Thomas Huth
On 25.04.2017 15:22, Eric Blake wrote: > On 04/25/2017 12:16 AM, Thomas Huth wrote: >> HMP commands do not get any automatic testing yet, so on certain >> QEMU machines, some HMP commands were causing crashes in the past. >> Thus we should test HMP commands in our test suite, too, to avoid >> that

[Qemu-devel] [Bug 1081416] Re: Qemu 1.2.0 crashes when using tcp serial console and GRUB boots

2017-04-26 Thread Thomas Huth
Can you still reproduce this issue somehow with the latest version of QEMU (currently v2.9.0)? Otherwise, I think we can close this ticket nowadays... -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] [PATCH] COLO-compare: Improve tcp compare trace event readability

2017-04-26 Thread Zhang Chen
Because of previous patch's trace arguments over the limit of UST backend, so I rewrite the patch. Signed-off-by: Zhang Chen --- net/colo-compare.c | 33 ++--- net/trace-events | 3 +-- 2 files changed, 23 insertions(+), 13

Re: [Qemu-devel] [PATCH v3] qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed

2017-04-26 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 1493261907-18734-1-git-send-email-lidongc...@tencent.com Subject: [Qemu-devel] [PATCH v3] qemu-img: use

[Qemu-devel] [PATCH v4 11/11] tb-hash: improve tb_jmp_cache hash function in user mode

2017-04-26 Thread Emilio G. Cota
Optimizations to cross-page chaining and indirect branches make performance more sensitive to the hit rate of tb_jmp_cache. The constraint of reserving some bits for the page number lowers the achievable quality of the hashing function. However, user-mode does not have this requirement. Thus,

[Qemu-devel] [PATCH v4 07/11] target/arm: optimize indirect branches

2017-04-26 Thread Emilio G. Cota
Speed up indirect branches by jumping to the target if it is valid. Softmmu measurements (see later commit for user-mode results): Note: baseline (i.e. speedup == 1x) is QEMU v2.9.0. - Impact on Boot time | setup | ARM debian jessie boot+shutdown time | stddev |

Re: [Qemu-devel] [PATCH v4 00/11] TCG optimizations for 2.10

2017-04-26 Thread Emilio G. Cota
Just to avoid confusion, On Wed, Apr 26, 2017 at 23:29:13 -0400, Emilio G. Cota wrote: > I have *not* re-run all experiments, because it takes several hours and > performance hasn't changed much from v3, as can be seen in these two charts: > * spec06int user-mode, test input, v2.9.0 baseline:

[Qemu-devel] [PATCH v4 03/11] tcg: introduce goto_ptr opcode

2017-04-26 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- tcg/aarch64/tcg-target.h | 1 + tcg/arm/tcg-target.h | 1 + tcg/i386/tcg-target.h| 1 + tcg/ia64/tcg-target.h| 1 + tcg/mips/tcg-target.h| 1 + tcg/ppc/tcg-target.h | 1 + tcg/s390/tcg-target.h| 1 + tcg/sparc/tcg-target.h

[Qemu-devel] [PATCH v4 10/11] target/i386: optimize indirect branches

2017-04-26 Thread Emilio G. Cota
Speed up indirect branches by jumping to the target if it is valid. Softmmu measurements (see later commit for user-mode numbers): Note: baseline (i.e. speedup == 1x) is QEMU v2.9.0. - SPECint06 (test set), x86_64-softmmu (Ubuntu 16.04 guest). Host: Intel i7-4790K @ 4.00GHz

[Qemu-devel] [PATCH v4 08/11] target/i386: introduce gen_jr helper to generate lookup_and_goto_ptr

2017-04-26 Thread Emilio G. Cota
This helper will be used by subsequent changes. Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index 1d1372f..f0e48dc 100644

[Qemu-devel] [PATCH v4 05/11] tcg/i386: implement goto_ptr op

2017-04-26 Thread Emilio G. Cota
Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- tcg/i386/tcg-target.h | 2 +- tcg/i386/tcg-target.inc.c | 15 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v4 02/11] tcg-runtime: add lookup_tb_ptr helper

2017-04-26 Thread Emilio G. Cota
This paves the way for upcoming work. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- tcg-runtime.c | 24 tcg/tcg-runtime.h | 2 ++ tcg/tcg.h | 1 + 3

[Qemu-devel] [PATCH v4 04/11] tcg: export tcg_gen_lookup_and_goto_ptr

2017-04-26 Thread Emilio G. Cota
Instead of exporting goto_ptr directly to TCG frontends, export tcg_gen_lookup_and_goto_ptr(), which calls goto_ptr with the pointer returned by the lookup_tb_ptr() helper. This is the only use case we have for goto_ptr and lookup_tb_ptr, so having this function is very convenient. Furthermore, it

[Qemu-devel] [PATCH v4 06/11] target/arm: optimize cross-page direct jumps in softmmu

2017-04-26 Thread Emilio G. Cota
Instead of unconditionally exiting to the exec loop, use the lookup_and_goto_ptr helper to jump to the target if it is valid. Perf impact: see next commit's log. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/arm/translate.c | 6

[Qemu-devel] [PATCH v4 01/11] exec-all: export tb_htable_lookup

2017-04-26 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- cpu-exec.c | 6 ++ include/exec/exec-all.h | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 63a56d0..5b181c1 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -309,10 +309,8 @@ static

[Qemu-devel] [PATCH v4 09/11] target/i386: optimize cross-page direct jumps in softmmu

2017-04-26 Thread Emilio G. Cota
Instead of unconditionally exiting to the exec loop, use the gen_jr helper to jump to the target if it is valid. Perf impact: see next commit's log. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 4 ++-- 1 file

[Qemu-devel] [PATCH v4 00/11] TCG optimizations for 2.10

2017-04-26 Thread Emilio G. Cota
v3 for context: https://lists.gnu.org/archive/html/qemu-devel/2017-04/msg04795.html Changes from v3: - Added reviewed-by tags. - Added a couple of suggested-by tags that I forgot to add in v3 regarding lookup_and_goto_ptr and i386's implementation of goto_ptr. - lookup_tb_ptr + Dropped

[Qemu-devel] qemu integrator hardware error: icp_control_write: Bad offset 789688

2017-04-26 Thread heavybird
Hi Peter, I am using your qemu integrator to debug my application but it encouters the exception below, i have no idea to figure out the message below. could you give me some suggestion or show me some document to get out this issues?? i noticed there is trace option in the qeumu, but don't

Re: [Qemu-devel] [PATCH 1/2] Postcopy: Force allocation of all-zero precopy pages

2017-04-26 Thread Peter Xu
On Wed, Apr 26, 2017 at 09:37:43PM +0200, Andrea Arcangeli wrote: > Hello, > > On Wed, Apr 26, 2017 at 08:04:43PM +0100, Dr. David Alan Gilbert wrote: > > * Christian Borntraeger (borntrae...@de.ibm.com) wrote: > > > On 04/26/2017 08:37 PM, Dr. David Alan Gilbert (git) wrote: > > > > From: "Dr.

Re: [Qemu-devel] [PATCH v3 06/10] target/arm: optimize indirect branches

2017-04-26 Thread Emilio G. Cota
On Wed, Apr 26, 2017 at 09:54:07 +0200, Richard Henderson wrote: > On 04/26/2017 08:23 AM, Emilio G. Cota wrote: > >+static bool gen_jr;... > > case DISAS_JUMP: > >+if (gen_jr) { > > Why the variable? Why not just try the goto_ptr for any DISAS_JUMP? We have code that

Re: [Qemu-devel] [PATCH] Issue a deprecation warning if the user specifies the "-hdachs" option.

2017-04-26 Thread Thomas Huth
On 26.04.2017 15:44, Paolo Bonzini wrote: > > > On 25/04/2017 10:08, Thomas Huth wrote: >> If the user needs to specify the disk geometry, the corresponding >> parameters of the "-drive" option should be used instead. "-hdachs" >> is considered as deprecated and might be removed soon. >> >>

Re: [Qemu-devel] [PATCH v2] qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed

2017-04-26 Thread 858585 jemmy
On Thu, Apr 27, 2017 at 4:25 AM, Max Reitz wrote: > On 21.04.2017 11:57, jemmy858...@gmail.com wrote: >> From: Lidong Chen >> >> when the buffer is zero, blk_co_pwrite_zeroes is more effectively than > > s/when/When/, s/effectively/effective/ > >>

[Qemu-devel] [PATCH v3] qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed

2017-04-26 Thread jemmy858585
From: Lidong Chen When the buffer is zero, blk_co_pwrite_zeroes is more effective than blk_co_pwritev with BDRV_REQ_WRITE_COMPRESSED. This patch can reduce the time for converting qcow2 images with lots of zero data. Signed-off-by: Lidong Chen

Re: [Qemu-devel] [RFC PATCH 12/20] Memory: Add func to fire pasidt_bind notifier

2017-04-26 Thread Liu, Yi L
On Wed, Apr 26, 2017 at 03:50:16PM +0200, Paolo Bonzini wrote: > > > On 26/04/2017 12:06, Liu, Yi L wrote: > > +void memory_region_notify_iommu_svm_bind(MemoryRegion *mr, > > + void *data) > > +{ > > +IOMMUNotifier *iommu_notifier; > > +

Re: [Qemu-devel] [PULL V2 8/8] COLO-compare: Optimize tcp compare trace event

2017-04-26 Thread Zhang Chen
On 04/27/2017 10:28 AM, Jason Wang wrote: On 2017年04月26日 23:55, Peter Maydell wrote: On 26 April 2017 at 16:18, Peter Maydell wrote: On 25 April 2017 at 12:26, Jason Wang wrote: From: Zhang Chen Optimize two

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-04-26 Thread Yang Hongyang
Hi Paolo, Dave, On 2017/4/26 23:46, Paolo Bonzini wrote: > > > On 24/04/2017 18:42, Dr. David Alan Gilbert wrote: >> I suppose there's a few questions; >> a) Do we actually need the BQL - and if so why Enable/disable dirty log tracking are operations on memory regions. That's why they need

[Qemu-devel] [PATCH v9] Allow setting NUMA distance for different NUMA nodes

2017-04-26 Thread He Chen
This patch is going to add SLIT table support in QEMU, and provides additional option `dist` for command `-numa` to allow user set vNUMA distance by QEMU command. With this patch, when a user wants to create a guest that contains several vNUMA nodes and also wants to set distance among those

Re: [Qemu-devel] [PATCH v15 16/21] file-posix: Add 'locking' option

2017-04-26 Thread Fam Zheng
On Wed, 04/26 14:41, Kevin Wolf wrote: > Am 26.04.2017 um 05:34 hat Fam Zheng geschrieben: > > Making this option available even before implementing it will let > > converting tests easier: in coming patches they can specify the option > > already when necessary, before we actually write code to

Re: [Qemu-devel] [PULL V2 8/8] COLO-compare: Optimize tcp compare trace event

2017-04-26 Thread Jason Wang
On 2017年04月26日 23:55, Peter Maydell wrote: On 26 April 2017 at 16:18, Peter Maydell wrote: On 25 April 2017 at 12:26, Jason Wang wrote: From: Zhang Chen Optimize two trace events as one, adjust print format

Re: [Qemu-devel] [PATCH 2/2] ramblock: add new hmp command "info ramblock"

2017-04-26 Thread Peter Xu
On Wed, Apr 26, 2017 at 02:10:16PM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > To dump information about ramblocks. It looks like: > > > > (qemu) info ramblock > > Block NamePSize Offset Used > > Total > >

Re: [Qemu-devel] [PATCH v2 0/2] ramblock: add hmp command "info ramblock"

2017-04-26 Thread Peter Xu
On Thu, Apr 27, 2017 at 09:12:43AM +0800, Fam Zheng wrote: > On Wed, 04/26 19:13, Peter Xu wrote: > > v2: > > - replace "lx" with "PRIx64" in three places > > ram_addr_t doesn't have a fixed bit width, to keep compilers happy, maybe you > can stick to PRIx64 in the format string, and cast the

Re: [Qemu-devel] [PATCH v15 02/21] block: Define BLK_PERM_MAX

2017-04-26 Thread Fam Zheng
On Wed, 04/26 11:36, Kevin Wolf wrote: > Am 26.04.2017 um 05:33 hat Fam Zheng geschrieben: > > This is the order of the largest possible permission. > > > > Signed-off-by: Fam Zheng > > --- > > include/block/block.h | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff

[Qemu-devel] [PATCH v10 11/17] qcow2: Discard/zero clusters by byte count

2017-04-26 Thread Eric Blake
Passing a byte offset, but sector count, when we ultimately want to operate on cluster granularity, is madness. Clean up the external interfaces to take both offset and count as bytes, while still keeping the assertion added previously that the caller must align the values to a cluster. Then

[Qemu-devel] [PATCH v10 09/17] qcow2: Optimize write zero of unaligned tail cluster

2017-04-26 Thread Eric Blake
We've already improved discards to operate efficiently on the tail of an unaligned qcow2 image; it's time to make a similar improvement to write zeroes. The special case is only valid at the tail cluster of a file, where we must recognize that any sectors beyond the image end would implicitly

[Qemu-devel] [PATCH v10 15/17] blkdebug: Simplify override logic

2017-04-26 Thread Eric Blake
Rather than store into a local variable, then copy to the struct if the value is valid, then reporting errors otherwise, it is simpler to just store into the struct and report errors if the value is invalid. This however requires that the struct store a 64-bit number, rather than a narrower type.

[Qemu-devel] [PATCH v10 13/17] blkdebug: Refactor error injection

2017-04-26 Thread Eric Blake
Rather than repeat the logic at each caller of checking if a Rule exists that warrants an error injection, fold that logic into inject_error(); and rename it to rule_check() for legibility. This will help the next patch, which adds two more callers that need to check rules for the potential of

[Qemu-devel] [PATCH v10 14/17] blkdebug: Add pass-through write_zero and discard support

2017-04-26 Thread Eric Blake
In order to test the effects of artificial geometry constraints on operations like write zero or discard, we first need blkdebug to manage these actions. It also allows us to inject errors on those operations, just like we can for read/write/flush. We can also test the contract promised by the

[Qemu-devel] [PATCH v10 08/17] qemu-io: Switch 'map' output to byte-based reporting

2017-04-26 Thread Eric Blake
Mixing byte offset and sector allocation counts is a bit confusing. Also, reporting n/m sectors, where m decreases according to the remaining size of the file, isn't really adding any useful information. Update the output to use byte counts, and adjust the affected tests (./check -qcow2 102,

[Qemu-devel] [PATCH v10 16/17] blkdebug: Add ability to override unmap geometries

2017-04-26 Thread Eric Blake
Make it easier to simulate various unusual hardware setups (for example, recent commits 3482b9b and b8d0a98 affect the Dell Equallogic iSCSI with its 15M preferred and maximum unmap and write zero sizing, or b2f95fe deals with the Linux loopback block device having a max_transfer of 64k), by

[Qemu-devel] [PATCH v10 05/17] iotests: Add test 179 to cover write zeroes with unmap

2017-04-26 Thread Eric Blake
No tests were covering write zeroes with unmap. Additionally, I needed to prove that my previous patches for correct status reporting and write zeroes optimizations actually had an impact. The test works for cluster_size between 8k and 2M (for smaller sizes, it fails because our allocation

[Qemu-devel] [PATCH v10 17/17] tests: Add coverage for recent block geometry fixes

2017-04-26 Thread Eric Blake
Use blkdebug's new geometry constraints to emulate setups that have caused recent regression fixes: write zeroes asserting when running through a loopback block device with max-transfer smaller than cluster size, and discard rounding away portions of requests not aligned to preferred boundaries.

[Qemu-devel] [PATCH v10 07/17] qemu-io: Switch 'alloc' command to byte-based length

2017-04-26 Thread Eric Blake
For the 'alloc' command, accepting an offset in bytes but a length in sectors, and reporting output in sectors, is confusing. Do everything in bytes, and adjust the expected output accordingly. Signed-off-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PATCH v10 04/17] qcow2: Optimize zero_single_l2() to minimize L2 churn

2017-04-26 Thread Eric Blake
Similar to discard_single_l2(), we should try to avoid dirtying the L2 cache when the cluster we are changing already has the right characteristics. Note that by the time we get to zero_single_l2(), BDRV_REQ_MAY_UNMAP is a requirement to unallocate a cluster (this is because the block layer

[Qemu-devel] [PATCH v10 06/17] qemu-io: Don't open-code QEMU_IS_ALIGNED

2017-04-26 Thread Eric Blake
Manual comparison against 0x1ff is not as clean as using our alignment macros from osdep.h. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Eric Blake --- v10: new patch --- qemu-io-cmds.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

Re: [Qemu-devel] [PATCH v15 18/21] block: Reuse bs as backing hd for drive-backup sync=none

2017-04-26 Thread Fam Zheng
On Wed, 04/26 16:34, Kevin Wolf wrote: > Am 26.04.2017 um 15:15 hat Fam Zheng geschrieben: > > On Wed, 04/26 14:52, Kevin Wolf wrote: > > > Am 26.04.2017 um 05:34 hat Fam Zheng geschrieben: > > > > Signed-off-by: Fam Zheng > > > > > > The commit message is a bit terse. :-) > > >

[Qemu-devel] [PATCH v10 12/17] blkdebug: Sanity check block layer guarantees

2017-04-26 Thread Eric Blake
Commits 04ed95f4 and 1a62d0ac updated the block layer to auto-fragment any I/O to fit within device boundaries. Additionally, when using a minimum alignment of 4k, we want to ensure the block layer does proper read-modify-write rather than requesting I/O on a slice of a sector. Let's enforce that

[Qemu-devel] [PATCH v10 00/17] add blkdebug tests

2017-04-26 Thread Eric Blake
Available as a tag at: git fetch git://repo.or.cz/qemu/ericb.git nbd-blkdebug-v10 Prerequisites: Max's block-next tree: https://lists.gnu.org/archive/html/qemu-devel/2017-04/msg01298.html Fam's fix for test 109: https://lists.gnu.org/archive/html/qemu-devel/2017-04/msg03195.html v9 was:

[Qemu-devel] [PATCH v10 10/17] qcow2: Assert that cluster operations are aligned

2017-04-26 Thread Eric Blake
We already audited (in commit 0c1bd469) that qcow2_discard_clusters() is only passed cluster-aligned start values; but we can further tighten the assertion that the only unaligned end value is at EOF. Recent commits have taken advantage of an unaligned tail cluster, for both discard and write

[Qemu-devel] [PATCH v10 03/17] qcow2: Reuse preallocated zero clusters

2017-04-26 Thread Eric Blake
From: Max Reitz Instead of just freeing preallocated zero clusters and completely allocating them from scratch, reuse them. We cannot do this in handle_copied(), however, since this is a COW operation. Therefore, we have to add the new logic to handle_alloc() and simply

[Qemu-devel] [PATCH v10 02/17] qcow2: Correctly report status of preallocated zero clusters

2017-04-26 Thread Eric Blake
We were throwing away the preallocation information associated with zero clusters. But we should be matching the well-defined semantics in bdrv_get_block_status(), where (BDRV_BLOCK_ZERO | BDRV_BLOCK_OFFSET_VALID) informs the user which offset is reserved, while still reminding the user that

[Qemu-devel] [PATCH v10 01/17] block: Update comments on BDRV_BLOCK_* meanings

2017-04-26 Thread Eric Blake
We had some conflicting documentation: a nice 8-way table that described all possible combinations of DATA, ZERO, and OFFSET_VALID, couple with text that implied that OFFSET_VALID always meant raw data could be read directly. As the 8-way table is the intended semantics, simplify the rest of the

Re: [Qemu-devel] [PATCH v15 19/21] osdep: Add qemu_lock_fd and qemu_unlock_fd

2017-04-26 Thread Fam Zheng
On Wed, 04/26 15:29, Daniel P. Berrange wrote: > On Wed, Apr 26, 2017 at 09:20:28PM +0800, Fam Zheng wrote: > > On Wed, 04/26 14:57, Kevin Wolf wrote: > > > Am 26.04.2017 um 05:34 hat Fam Zheng geschrieben: > > > > They are wrappers of POSIX fcntl "file private locking", with a > > > > convenient

Re: [Qemu-devel] [PATCH v15 21/21] qemu-iotests: Add test case 153 for image locking

2017-04-26 Thread Fam Zheng
On Wed, 04/26 16:49, Kevin Wolf wrote: > Am 26.04.2017 um 05:34 hat Fam Zheng geschrieben: > > Signed-off-by: Fam Zheng > > I'll do the actual review of the test case later, but I already have a > question... Can we find a way to accept the expected lock losses on > systems

Re: [Qemu-devel] [PATCH v2 0/2] ramblock: add hmp command "info ramblock"

2017-04-26 Thread Fam Zheng
On Wed, 04/26 19:13, Peter Xu wrote: > v2: > - replace "lx" with "PRIx64" in three places ram_addr_t doesn't have a fixed bit width, to keep compilers happy, maybe you can stick to PRIx64 in the format string, and cast the parameters. Fam

Re: [Qemu-devel] [PATCH 1/2] target/openrisc: Implement EVBAR register

2017-04-26 Thread Tim Ansell
I'm about to add support for disabling the inbuilt or1k timer peripheral (as our SoC does not have it enabled). That isn't really a CPU feature so I think it still makes sense to have some type of feature field? Maybe CPU features should just be a separate category and set directly on that

Re: [Qemu-devel] [PATCH] virtio: allow broken device to notify guest

2017-04-26 Thread Michael S. Tsirkin
On Wed, Apr 26, 2017 at 03:29:46PM +0200, Greg Kurz wrote: > On Wed, 26 Apr 2017 15:15:48 +0200 > Cornelia Huck wrote: > > > On Wed, 26 Apr 2017 14:51:17 +0200 > > Greg Kurz wrote: > > > > > According to section 2.1.2 of the virtio-1 specification: > >

Re: [Qemu-devel] [PATCH v3 01/10] tcg-runtime: add lookup_tb_ptr helper

2017-04-26 Thread Emilio G. Cota
On Wed, Apr 26, 2017 at 19:11:32 -0400, Emilio G. Cota wrote: > On Wed, Apr 26, 2017 at 18:45:31 -0400, Emilio G. Cota wrote: > > On Thu, Apr 27, 2017 at 00:29:49 +0200, Richard Henderson wrote: > > > On 04/26/2017 11:56 PM, Emilio G. Cota wrote: > > > >On Wed, Apr 26, 2017 at 10:40:45 +0200,

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS

2017-04-26 Thread Michael S. Tsirkin
On Wed, Apr 26, 2017 at 11:03:34AM +, Wang, Wei W wrote: > Hi Michael, could you please give some feedback? I'm sorry, I'm not sure feedback on what you are requesting. The interface looks reasonable now, even though there's a way to make it even simpler if we can limit chunk size to 2G (in

Re: [Qemu-devel] [PATCH v3 01/10] tcg-runtime: add lookup_tb_ptr helper

2017-04-26 Thread Emilio G. Cota
On Wed, Apr 26, 2017 at 10:40:45 +0200, Richard Henderson wrote: > On 04/26/2017 08:23 AM, Emilio G. Cota wrote: > >This paves the way for upcoming work. > > > >Reviewed-by: Richard Henderson > >Signed-off-by: Emilio G. Cota > >--- > > tcg-runtime.c | 21

Re: [Qemu-devel] [PATCH v3 01/10] tcg-runtime: add lookup_tb_ptr helper

2017-04-26 Thread Emilio G. Cota
On Wed, Apr 26, 2017 at 18:45:31 -0400, Emilio G. Cota wrote: > On Thu, Apr 27, 2017 at 00:29:49 +0200, Richard Henderson wrote: > > On 04/26/2017 11:56 PM, Emilio G. Cota wrote: > > >On Wed, Apr 26, 2017 at 10:40:45 +0200, Richard Henderson wrote: > > >>On 04/26/2017 08:23 AM, Emilio G. Cota

Re: [Qemu-devel] [PATCH v3 01/10] tcg-runtime: add lookup_tb_ptr helper

2017-04-26 Thread Emilio G. Cota
On Thu, Apr 27, 2017 at 00:29:49 +0200, Richard Henderson wrote: > On 04/26/2017 11:56 PM, Emilio G. Cota wrote: > >On Wed, Apr 26, 2017 at 10:40:45 +0200, Richard Henderson wrote: > >>On 04/26/2017 08:23 AM, Emilio G. Cota wrote: > >(snip) > >>>+cpu_get_tb_cpu_state(env, , _base, ); > >>>+

Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function

2017-04-26 Thread jacob pan
On Wed, 26 Apr 2017 17:56:45 +0100 Jean-Philippe Brucker wrote: > Hi Yi, Jacob, > > On 26/04/17 11:11, Liu, Yi L wrote: > > From: Jacob Pan > > > > Virtual IOMMU was proposed to support Shared Virtual Memory (SVM) > > use case in

Re: [Qemu-devel] [PATCH v3 01/10] tcg-runtime: add lookup_tb_ptr helper

2017-04-26 Thread Richard Henderson
On 04/26/2017 11:56 PM, Emilio G. Cota wrote: On Wed, Apr 26, 2017 at 10:40:45 +0200, Richard Henderson wrote: On 04/26/2017 08:23 AM, Emilio G. Cota wrote: (snip) +cpu_get_tb_cpu_state(env, , _base, ); +tb = atomic_rcu_read(>tb_jmp_cache[tb_jmp_cache_hash_func(addr)]); +if

[Qemu-devel] [PATCH] iotests: Fix typo in 026

2017-04-26 Thread Eric Blake
s/refcout/refcount/ CC: qemu-triv...@nongnu.org Signed-off-by: Eric Blake --- tests/qemu-iotests/026 | 2 +- tests/qemu-iotests/026.out | 2 +- tests/qemu-iotests/026.out.nocache | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 1/4] hw/ppc: setting spapr_drc_detach_cb in spapr_dr_connector_new

2017-04-26 Thread Michael Roth
Quoting Daniel Henrique Barboza (2017-04-26 16:31:21) > The idea of moving the detach callback functions to the constructor > of the dr_connector is to set them statically at init time, avoiding > any post-load hooks to restore it (after a migration, for example). > > Summary of changes: > > -

Re: [Qemu-devel] [PATCH v3 01/10] tcg-runtime: add lookup_tb_ptr helper

2017-04-26 Thread Emilio G. Cota
On Wed, Apr 26, 2017 at 10:40:45 +0200, Richard Henderson wrote: > On 04/26/2017 08:23 AM, Emilio G. Cota wrote: (snip) > >+cpu_get_tb_cpu_state(env, , _base, ); > >+tb = atomic_rcu_read(>tb_jmp_cache[tb_jmp_cache_hash_func(addr)]); > >+if (likely(tb && tb->pc == addr && tb->cs_base ==

Re: [Qemu-devel] [PATCH 02/31] block: Make bdrv_round_to_clusters() signature more useful

2017-04-26 Thread John Snow
On 04/26/2017 05:47 PM, Eric Blake wrote: > On 04/26/2017 04:41 PM, John Snow wrote: >> >> >> On 04/17/2017 09:33 PM, Eric Blake wrote: >>> In the process of converting sector-based interfaces to bytes, >>> I'm finding it easier to represent a byte count as a 64-bit >>> integer at the block

Re: [Qemu-devel] [PATCH 02/31] block: Make bdrv_round_to_clusters() signature more useful

2017-04-26 Thread Eric Blake
On 04/26/2017 04:41 PM, John Snow wrote: > > > On 04/17/2017 09:33 PM, Eric Blake wrote: >> In the process of converting sector-based interfaces to bytes, >> I'm finding it easier to represent a byte count as a 64-bit >> integer at the block layer (even if we are internally capped >> by SIZE_MAX

Re: [Qemu-devel] [PATCH 01/31] block: Drop unused bdrv_round_sectors_to_clusters()

2017-04-26 Thread John Snow
On 04/17/2017 09:33 PM, Eric Blake wrote: > Now that the last user [mirror_iteration()] has converted to using > bytes, we no longer need a function to round sectors to clusters. > > Signed-off-by: Eric Blake Reviewed-by: John Snow > --- >

Re: [Qemu-devel] [PATCH 02/31] block: Make bdrv_round_to_clusters() signature more useful

2017-04-26 Thread John Snow
On 04/17/2017 09:33 PM, Eric Blake wrote: > In the process of converting sector-based interfaces to bytes, > I'm finding it easier to represent a byte count as a 64-bit > integer at the block layer (even if we are internally capped > by SIZE_MAX or even INT_MAX for individual transactions, it's

[Qemu-devel] [PATCH 4/4] migration: spapr: migrate pending_events of spapr state

2017-04-26 Thread Daniel Henrique Barboza
From: Jianjun Duan In racing situations between hotplug events and migration operation, a rtas hotplug event could have not yet be delivered to the source guest when migration is started. In this case the pending_events of spapr state need be transmitted to the target

[Qemu-devel] [PATCH 2/4] hw/ppc: migrating the DRC state of hotplugged devices

2017-04-26 Thread Daniel Henrique Barboza
In pseries, a firmware abstraction called Dynamic Reconfiguration Connector (DRC) is used to assign a particular dynamic resource to the guest and provide an interface to manage configuration/removal of the resource associated with it. In other words, DRC is the 'plugged state' of a device.

[Qemu-devel] [PATCH 3/4] migration: spapr: migrate ccs_list in spapr state

2017-04-26 Thread Daniel Henrique Barboza
From: Jianjun Duan ccs_list in spapr state maintains the device tree related information on the rtas side for hotplugged devices. In racing situations between hotplug events and migration operation, a rtas hotplug event could be migrated from the source guest to target

[Qemu-devel] [PATCH 0/4 v7] migration/ppc: migrating DRC, ccs_list and pending_events

2017-04-26 Thread Daniel Henrique Barboza
v7: - removed the first patch. DRC registration is now done by vmstate_register in patch 2. - added a new patch that changes spapr_dr_connector_new to receive as argument the detach_cb. - removed the callback logic of patch 2 since there is no need to restore the detach_cb on post-load due to the

[Qemu-devel] [PATCH 1/4] hw/ppc: setting spapr_drc_detach_cb in spapr_dr_connector_new

2017-04-26 Thread Daniel Henrique Barboza
The idea of moving the detach callback functions to the constructor of the dr_connector is to set them statically at init time, avoiding any post-load hooks to restore it (after a migration, for example). Summary of changes: - hw/ppc/spapr_drc.c and include/hw/ppc/spapr_drc.h: *

Re: [Qemu-devel] [PATCH v1 3/8] dmg: Limit the output buffer size to a max of 2MB

2017-04-26 Thread John Snow
On 04/25/2017 03:59 PM, Ashijeet Acharya wrote: > The size of the output buffer is limited to a maximum of 2MB so that > QEMU doesn't end up allocating huge amounts of memory while > decompressing compressed input streams. > > 2MB is an appropriate size because "qemu-img convert" has the same

[Qemu-devel] [PATCH 3/4] migration: spapr: migrate ccs_list in spapr state

2017-04-26 Thread Daniel Henrique Barboza
From: Jianjun Duan ccs_list in spapr state maintains the device tree related information on the rtas side for hotplugged devices. In racing situations between hotplug events and migration operation, a rtas hotplug event could be migrated from the source guest to target

[Qemu-devel] [PATCH 2/4] hw/ppc: migrating the DRC state of hotplugged devices

2017-04-26 Thread Daniel Henrique Barboza
In pseries, a firmware abstraction called Dynamic Reconfiguration Connector (DRC) is used to assign a particular dynamic resource to the guest and provide an interface to manage configuration/removal of the resource associated with it. In other words, DRC is the 'plugged state' of a device.

[Qemu-devel] [PATCH 1/4] hw/ppc: setting spapr_drc_detach_cb in spapr_dr_connector_new

2017-04-26 Thread Daniel Henrique Barboza
The idea of moving the detach callback functions to the constructor of the dr_connector is to set them statically at init time, avoiding any post-load hooks to restore it (after a migration, for example). Summary of changes: - hw/ppc/spapr_drc.c and include/hw/ppc/spapr_drc.h: *

[Qemu-devel] [PATCH 0/4 v7] migration/ppc: migrating DRC, ccs_list and pending_events

2017-04-26 Thread Daniel Henrique Barboza
v7: - removed the first patch. DRC registration is now done by vmstate_register in patch 2. - added a new patch that changes spapr_dr_connector_new to receive as argument the detach_cb. - removed the callback logic of patch 2 since there is no need to restore the detach_cb on post-load due to the

[Qemu-devel] [PATCH 4/4] migration: spapr: migrate pending_events of spapr state

2017-04-26 Thread Daniel Henrique Barboza
From: Jianjun Duan In racing situations between hotplug events and migration operation, a rtas hotplug event could have not yet be delivered to the source guest when migration is started. In this case the pending_events of spapr state need be transmitted to the target

  1   2   3   4   5   6   >