Re: [Qemu-devel] [PATCH] sheepdog: add missing .bdrv_has_zero_init

2013-08-05 Thread Liu Yuan
On Tue, Aug 06, 2013 at 02:44:37PM +0800, Liu Yuan wrote: > Cc: Kevin Wolf > Cc: Stefan Hajnoczi > Signed-off-by: Liu Yuan > --- > block/sheepdog.c |2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/block/sheepdog.c b/block/sheepdog.c > index 46821df..eeb5617 100644 > --- a/block/sh

[Qemu-devel] [PATCH] sheepdog: add missing .bdrv_has_zero_init

2013-08-05 Thread Liu Yuan
Cc: Kevin Wolf Cc: Stefan Hajnoczi Signed-off-by: Liu Yuan --- block/sheepdog.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/block/sheepdog.c b/block/sheepdog.c index 46821df..eeb5617 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2421,6 +2421,7 @@ static BlockDriver bdrv_

Re: [Qemu-devel] [PATCH 0/4]: timers thread-safe stuff

2013-08-05 Thread Alex Bligh
Pingfan, --On 6 August 2013 13:37:02 +0800 liu ping fan wrote: I think you may need to protect a little more. Yes. There is still race issue left. If Stefanha and you will not do it, I am pleased to do that. I think you've probably got a better view of what to put in than I have. I'd just

Re: [Qemu-devel] [PATCH 2/4] timer: protect timers_state's clock with seqlock

2013-08-05 Thread liu ping fan
On Mon, Aug 5, 2013 at 9:29 PM, Paolo Bonzini wrote: > >> In kvm mode, vm_clock may be read outside BQL. > > Not just in KVM mode (we will be able to use dataplane with TCG sooner > or later), actually. > Oh. But this patch does not fix cpu_get_icount()'s thread-safe issue. So currently, could I j

Re: [Qemu-devel] [PATCH for-next v2 01/22] object: Add OBJECT_GET_PARENT_CLASS() macro

2013-08-05 Thread Alexey Kardashevskiy
On 08/01/2013 12:17 PM, Andreas Färber wrote: > The object argument is currently unused and may be used to optimize the > class lookup when needed. > > Inspired-by: Peter Crosthwaite > Signed-off-by: Andreas Färber > --- > include/qom/object.h | 10 ++ > 1 file changed, 10 insertions(+)

Re: [Qemu-devel] [PATCH 0/4]: timers thread-safe stuff

2013-08-05 Thread liu ping fan
On Mon, Aug 5, 2013 at 6:00 PM, Alex Bligh wrote: > Pingfan, > > > --On 5 August 2013 15:33:22 +0800 Liu Ping Fan > wrote: > >> The patches has been rebased onto Alex's [RFC] [PATCHv5 00/16] aio / >> timers: Add AioContext timers and use ppoll >> permalink.gmane.org/gmane.comp.emulators.qemu/2263

[Qemu-devel] [Bug 739785] Re: qemu-i386 user mode can't fork (bash: fork: Invalid argument)

2013-08-05 Thread moonman
Sorry to change the status. I'm not that familiar with Launchpad and was looking for a commit that fixes this bug. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/739785 Title: qemu-i386 user mode ca

Re: [Qemu-devel] [PATCH v3 10/10] vmdk: rename num_gtes_per_gte to num_gtes_per_gt

2013-08-05 Thread Jeff Cody
On Tue, Aug 06, 2013 at 09:40:43AM +0800, Fam Zheng wrote: > num_gtes_per_gte is a historical typo, rename it to a more sensible > name. It means "number of GrainTableEntries per GrainTable". Could you put this as a comment as well above/next to the declaration of num_gtes_per_gt? It is hard not

Re: [Qemu-devel] [PATCH v3 09/10] vmdk: use heap allocation for whole_grain

2013-08-05 Thread Jeff Cody
On Tue, Aug 06, 2013 at 09:40:42AM +0800, Fam Zheng wrote: > We should never grow the stack beyond 1 MB, otherwise we'll fall off the > end. Thread stacks and coroutine stacks (1 MB) do not grow. > get_cluster_offset() allocates a big stack offset, it will fail for big > cluster images, change to

Re: [Qemu-devel] [PATCH v3 03/10] vmdk: use unsigned values for on disk header fields

2013-08-05 Thread Fam Zheng
On Mon, 08/05 23:30, Jeff Cody wrote: > On Tue, Aug 06, 2013 at 09:40:36AM +0800, Fam Zheng wrote: > > The size and offset fields are all non-negative values, use uint64_t for > > them to avoid getting negative in memory value by int overflow. > > > > Signed-off-by: Fam Zheng > > --- > > block/v

Re: [Qemu-devel] [PATCH v3 03/10] vmdk: use unsigned values for on disk header fields

2013-08-05 Thread Jeff Cody
On Tue, Aug 06, 2013 at 09:40:36AM +0800, Fam Zheng wrote: > The size and offset fields are all non-negative values, use uint64_t for > them to avoid getting negative in memory value by int overflow. > > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 16 > 1 file changed, 8 ins

Re: [Qemu-devel] [PATCH v3 02/10] vmdk: Make VmdkGrainMarker QEMU_PACKED

2013-08-05 Thread Jeff Cody
On Tue, Aug 06, 2013 at 09:40:35AM +0800, Fam Zheng wrote: > For consistency, make this on disk structure QEMU_PACKED. > > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > I don't think this makes it necessary for a respin, but if you do o

Re: [Qemu-devel] [PATCH v2] block: Produce zeros when protocols reading beyond end of file

2013-08-05 Thread Asias He
On Tue, Aug 06, 2013 at 10:02:22AM +0800, Fam Zheng wrote: > On Tue, 08/06 09:53, Asias He wrote: > > From: MORITA Kazutaka > > > > While Asias is debugging an issue creating qcow2 images on top of > > non-file protocols. It boils down to this example using NBD: > > > > $ qemu-io -c 'open -g nb

Re: [Qemu-devel] [PATCH v2] block: Produce zeros when protocols reading beyond end of file

2013-08-05 Thread Fam Zheng
On Tue, 08/06 09:53, Asias He wrote: > From: MORITA Kazutaka > > While Asias is debugging an issue creating qcow2 images on top of > non-file protocols. It boils down to this example using NBD: > > $ qemu-io -c 'open -g nbd+unix:///?socket=/tmp/nbd.sock' -c 'read -v 0 512' > > Notice the open

[Qemu-devel] [PATCH v2] block: Produce zeros when protocols reading beyond end of file

2013-08-05 Thread Asias He
From: MORITA Kazutaka While Asias is debugging an issue creating qcow2 images on top of non-file protocols. It boils down to this example using NBD: $ qemu-io -c 'open -g nbd+unix:///?socket=/tmp/nbd.sock' -c 'read -v 0 512' Notice the open -g option to set bs->growable. This means you can re

[Qemu-devel] [PATCH v3 09/10] vmdk: use heap allocation for whole_grain

2013-08-05 Thread Fam Zheng
We should never grow the stack beyond 1 MB, otherwise we'll fall off the end. Thread stacks and coroutine stacks (1 MB) do not grow. get_cluster_offset() allocates a big stack offset, it will fail for big cluster images, change to heap allocated buffer. Signed-off-by: Fam Zheng --- block/vmdk.c

[Qemu-devel] [PATCH v3 08/10] vmdk: check l1 size before opening image

2013-08-05 Thread Fam Zheng
L1 table size is calculated from capacity, granularity and l2 table size. If capacity is too big or later two are too small, the L1 table will be too big to allocate in memory. Limit it to a reasonable range. Signed-off-by: Fam Zheng --- block/vmdk.c | 8 tests/qemu-iotest

[Qemu-devel] [PATCH v3 07/10] vmdk: check l2 table size when opening

2013-08-05 Thread Fam Zheng
header.num_gtes_per_gte determines size for L2 table. Check for too big value before using it. Limit to 512M entries (2GB per one L2 table). Signed-off-by: Fam Zheng --- block/vmdk.c | 5 + tests/qemu-iotests/059 | 7 +++ tests/qemu-iotests/059.out | 6 ++ 3 files c

[Qemu-devel] [PATCH v3 05/10] qemu-iotests: add empty test case for vmdk

2013-08-05 Thread Fam Zheng
Will add vmdk specific tests later here. Signed-off-by: Fam Zheng --- tests/qemu-iotests/059 | 51 ++ tests/qemu-iotests/059.out | 2 ++ tests/qemu-iotests/group | 1 + 3 files changed, 54 insertions(+) create mode 100755 tests/qemu-iotests/05

[Qemu-devel] [PATCH v3 02/10] vmdk: Make VmdkGrainMarker QEMU_PACKED

2013-08-05 Thread Fam Zheng
For consistency, make this on disk structure QEMU_PACKED. Signed-off-by: Fam Zheng --- block/vmdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vmdk.c b/block/vmdk.c index 8ff43b9..7ebe36b 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -131,7 +131,7 @@ typedef stru

[Qemu-devel] [PATCH v3 06/10] vmdk: check granularity field in opening

2013-08-05 Thread Fam Zheng
Granularity is used to calculate the cluster size and allocate r/w buffer. Check the value from image before using it, so we don't abort() for unbounded memory allocation. Signed-off-by: Fam Zheng --- block/vmdk.c | 40 +++- tests/qemu-iotests/05

[Qemu-devel] [PATCH v3 10/10] vmdk: rename num_gtes_per_gte to num_gtes_per_gt

2013-08-05 Thread Fam Zheng
num_gtes_per_gte is a historical typo, rename it to a more sensible name. It means "number of GrainTableEntries per GrainTable". Signed-off-by: Fam Zheng --- block/vmdk.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 21610e

[Qemu-devel] [PATCH v3 01/10] vmdk: Make VMDK3Header QEMU_PACKED

2013-08-05 Thread Fam Zheng
Although the fields are all uint32_t, it's best to make it consistent that all on disk structures are QEMU_PACKED. Signed-off-by: Fam Zheng --- block/vmdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vmdk.c b/block/vmdk.c index 3756333..8ff43b9 100644 --- a/block/v

[Qemu-devel] [PATCH v3 04/10] qemu-iotests: add poke_file utility function

2013-08-05 Thread Fam Zheng
From: Stefan Hajnoczi The new poke_file function sets bytes at an offset in a file given a printf-style format string. It can be used to corrupt an image file for test coverage of error paths. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- tests/qemu-iotests/common.rc | 6 +

[Qemu-devel] [PATCH v3 03/10] vmdk: use unsigned values for on disk header fields

2013-08-05 Thread Fam Zheng
The size and offset fields are all non-negative values, use uint64_t for them to avoid getting negative in memory value by int overflow. Signed-off-by: Fam Zheng --- block/vmdk.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c inde

[Qemu-devel] [PATCH v3 00/10] vmdk: Input validation fixes

2013-08-05 Thread Fam Zheng
Fixes for VMDK sparse file opening. Header fields are checked before used for memory allocation. v3: 00: Rebase to master. 04: Drop unused line in test script. 05: change vmdk_add_extent signature (uint64_t cluster_sectors). 06: Fix num_gtes_per_gte. 08: Use qemu_blockalign for

Re: [Qemu-devel] [PATCH] hw/openrisc/openrisc_sim: Avoid using uninitialised variable 'entry'

2013-08-05 Thread Jia Liu
Hi Peter, On Tue, Aug 6, 2013 at 2:24 AM, Peter Maydell wrote: > clang warns that cpu_openrisc_load_kernel() can use 'entry' uninitialized: > > hw/openrisc/openrisc_sim.c:69:9: error: variable 'entry' is used > uninitialized whenever '&&' condition is false > [-Werror,-Wsometimes-uninitial

Re: [Qemu-devel] [Patch] ARM: Add an L2 cache controller to KZM

2013-08-05 Thread Peter Chubb
> "Andreas" == Andreas Färber writes: Andreas> Peter Ch., if you know the exact differences, why don't you Andreas> just derive an imx-l2cc type (or so) derived from ARM's type, Andreas> overriding the values mentioned above? Sounds trivial to me. For what it's worth, here's a diff between

Re: [Qemu-devel] [Patch] ARM: Add an L2 cache controller to KZM

2013-08-05 Thread peter
> "Andreas" == Andreas Färber writes: Andreas> Am 05.08.2013 11:18, schrieb Peter Maydell: >> On 5 August 2013 02:21, Peter Chubb >> wrote: >>> Reads to unassigned memory now return non-zero (since patch >>> 9b8c69243585). This breaks guests runnong on i.MX31 that use the >>> cache controlle

Re: [Qemu-devel] [Patch] ARM: Add an L2 cache controller to KZM

2013-08-05 Thread Peter Chubb
> "Peter" == Peter Maydell writes: Peter> On 5 August 2013 02:21, Peter Chubb Peter> wrote: >> Reads to unassigned memory now return non-zero (since patch >> 9b8c69243585). This breaks guests runnong on i.MX31 that use the >> cache controller --- they poll forever waiting for the L2CC cache

[Qemu-devel] [Bug 1087114] Re: assertion "QLIST_EMPTY(&bs->tracked_requests)" failed

2013-08-05 Thread Brad Smith
Austin, Aaron and Reiner... Would you guys be able to test master on OS X and report back if this issue has been fully resolved or not? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1087114 Title:

[Qemu-devel] [PATCH for-1.6] target-ppc: Fix POWER7+ model

2013-08-05 Thread Andreas Färber
Commit 03a15a5436ed7723f406f15cc3798aa9991e75b5 claimed to add a POWER7+ model but instead added a "POWER7P" model, with an unhelpful "POWER7P" description on top. Fix this to "POWER7+" as we already have "POWER3+", "POWER4+" and "POWER5+" and there being no reason to deviate with the user-visible

[Qemu-devel] Ping for-1.6: [PATCH for-next 0/4] target-ppc: Complete POWER5+ CPU model support

2013-08-05 Thread Andreas Färber
Am 01.08.2013 03:41, schrieb Andreas Färber: > Hello, > > This mini-series cleans up, enables and complements POWER5+ support, so that > KVM with default -cpu host works on POWER5+ (gs) v2.1. Ping! According to Anthony fixing -cpu host on new models is a bug fix, so please apply this for POWER5+

Re: [Qemu-devel] [ceph-users] qemu-1.4.0 and onwards, linux kernel 3.2.x, ceph-RBD, heavy I/O leads to kernel_hung_tasks_timout_secs message and unresponsive qemu-process, [Bug 1207686]

2013-08-05 Thread Mike Dawson
Josh, Logs are uploaded to cephdrop with the file name mikedawson-rbd-qemu-deadlock. - At about 2013-08-05 19:46 or 47, we hit the issue, traffic went to 0 - At about 2013-08-05 19:53:51, ran a 'virsh screenshot' Environment is: - Ceph 0.61.7 (client is co-mingled with three OSDs) - rbd cac

Re: [Qemu-devel] vm performance degradation after kvm live migration or save-restore with EPT enabled

2013-08-05 Thread Xiao Guangrong
On Aug 5, 2013, at 4:35 PM, "Zhanghaoyu (A)" wrote: >>> hi all, >>> >>> I met similar problem to these, while performing live migration or >>> save-restore test on the kvm platform (qemu:1.4.0, host:suse11sp2, >>> guest:suse11sp2), running tele-communication software suite

Re: [Qemu-devel] [PATCH 1/2] memory: Provide separate handling of unassigned io ports accesses

2013-08-05 Thread Richard Henderson
On 08/04/2013 11:59 PM, Peter Maydell wrote: > (Do we have any existing examples of container regions with their > own default IO operations? The memory.c code clearly expects them > to be OK, though - eg render_memory_region() specifically does > "render subregions; then render the region itself i

Re: [Qemu-devel] [PATCH 5/5] Convert block layer callers' annotations

2013-08-05 Thread Gabriel Kerneis
On Mon, Aug 05, 2013 at 08:44:07PM +0200, Charlie Shepherd wrote: > This patch updates the callers of block layer functions converted to explicit > coroutine_fn annotation in the previous patch. It looks like this patch is made of three parts: - updating the annotations, following the rule "caller

Re: [Qemu-devel] [PULL 0/6] target-xtensa queue

2013-08-05 Thread Anthony Liguori
Max Filippov writes: > On Mon, Jul 29, 2013 at 7:16 PM, Max Filippov wrote: >> Hello Blue/Antony, >> >> Please pull my current target-xtensa patch queue. There's a number of >> assorted fixes, new testcase and performance optimization patch. >> Changes since 2013-07-21: trivial rebase. > > Ping?

Re: [Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-05 Thread Gabriel Kerneis
On Mon, Aug 05, 2013 at 08:33:10PM +0100, Charlie Shepherd wrote: > Yes that does merit some explanation. Thanks for the details. > qemu_co_queue_run_restart is a bit different. It is only called from > coroutine_swap in qemu-coroutine.c, and it enters coroutines that > were waiting but have now

[Qemu-devel] [Bug 1077116] Re: automoc4 segfaults when building in an armhf pbuilder on an amd64 host

2013-08-05 Thread Alexander
Same for me make[2]: Entering directory `/builddir/build/BUILD/kdelibs-4.10.5/build' cd /builddir/build/BUILD/kdelibs-4.10.5/build/kdeui && /usr/bin/automoc4 /builddir/build/BUILD/kdelibs-4.10.5/build/kdeui/kdeui_automoc.cpp /builddir/build/BUILD/kdelibs-4.10.5/kdeui /builddir/build/BUILD/kdelibs

Re: [Qemu-devel] [PATCH 4/5] Convert block functions to coroutine versions

2013-08-05 Thread Gabriel Kerneis
On Mon, Aug 05, 2013 at 08:44:06PM +0200, Charlie Shepherd wrote: > This patch follows on from the previous one and converts some block layer > functions to be > explicitly annotated with coroutine_fn instead of yielding depending upon > calling context. And just like the previous one, it also r

[Qemu-devel] [PATCH for 1.6] po: Update all *.po files

2013-08-05 Thread Stefan Weil
Running "make install" modified the *.po files because they were no longer up to date. Synchronize them with latest ui/gtk.c and modified build rules which use paths relative to the project root. Signed-off-by: Stefan Weil --- po/de_DE.po| 36 ++-- po/fr_FR

[Qemu-devel] [PATCH v2] Convert stderr message calling error_get_pretty() to error_report()

2013-08-05 Thread Seiji Aguchi
Convert stderr messages calling error_get_pretty() to error_report(). Timestamp is prepended by -msg timstamp option with it. Per Markus's comment below, A conversion from fprintf() to error_report() is always an improvement, regardless of error_get_pretty(). http://marc.info/?l=qemu-devel&m=13

Re: [Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-05 Thread Charlie Shepherd
On 05/08/2013 20:23, Gabriel Kerneis wrote: On Mon, Aug 05, 2013 at 08:44:05PM +0200, Charlie Shepherd wrote: This patch converts the .bdrv_open, .bdrv_file_open and .bdrv_create members of struct BlockDriver to be explicitly annotated as coroutine_fn, rather than yielding dynamically dependin

Re: [Qemu-devel] RFC: [PATCH 0/5] Explicitly annotating coroutine_fn functions

2013-08-05 Thread Charlie Shepherd
On 05/08/2013 19:44, Charlie Shepherd wrote: In order to compile the tree with CPC: $ git clone git://github.com/kerneis/cpc.git $ cd cpc $ make $ ./configure $ make $ cd .. $ export CPC=$(pwd)/cpc/bin/cpc $ cd qemu $ mkdir -p bin/cpc $ cd bin/cpc $ ../../configure --enable

Re: [Qemu-devel] [PATCH for 1.6] mips: revert commit b332d24a8e1290954029814d09156b06ede358e2

2013-08-05 Thread Richard Henderson
On 08/05/2013 07:36 AM, Andreas Färber wrote: > By comparison, having -alpha firmware just print "Hello" does not seem > all that useful to me... I wouldn't mind error'ing out without useful > arguments there. One of these days I'll get around to adding the bits that let you say "boot" on the PALc

Re: [Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-05 Thread Gabriel Kerneis
Hi Charlie, Many thanks for this patch series. On Mon, Aug 05, 2013 at 08:44:05PM +0200, Charlie Shepherd wrote: > This patch converts the .bdrv_open, .bdrv_file_open and .bdrv_create members > of struct BlockDriver > to be explicitly annotated as coroutine_fn, rather than yielding dynamically

[Qemu-devel] [PATCH] configure: disable clang -Wstring-plus-int warning

2013-08-05 Thread Peter Maydell
Some versions of clang will warn about adding integers to strings: disas/i386.c:4753:23: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int] oappend ("%es:" + intel_syntax); ~~~^~ disas/i386.c:4753:23: note: use arra

[Qemu-devel] [PATCH] Test coroutine execution order

2013-08-05 Thread Charlie Shepherd
This patch adds a test for coroutine execution order in test-coroutine - this catches a bug in the CPC coroutine implementation. --- tests/test-coroutine.c | 54 ++ 1 file changed, 54 insertions(+) diff --git a/tests/test-coroutine.c b/tests/test-c

Re: [Qemu-devel] [PULL 0/6] target-xtensa queue

2013-08-05 Thread Max Filippov
On Mon, Jul 29, 2013 at 7:16 PM, Max Filippov wrote: > Hello Blue/Antony, > > Please pull my current target-xtensa patch queue. There's a number of > assorted fixes, new testcase and performance optimization patch. > Changes since 2013-07-21: trivial rebase. Ping? > The following changes since c

[Qemu-devel] [PATCH for-next 05/15] tcg-ppc64: Look through the function descriptor when profitable

2013-08-05 Thread Richard Henderson
Loading 32-bit immediates instead of memory will be faster. Don't attempt to generate full 64-bit immediates. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index ddc9581

[Qemu-devel] [PATCH for-next 6/8] tcg-i386: Use new return-argument ld/st helpers

2013-08-05 Thread Richard Henderson
Discontinue the jump-around-jump-to-jump scheme, trading it for a single immediate move instruction. The two extra jumps always consume 7 bytes, whereas the immediate move is either 5 or 7 bytes depending on where the code_gen_buffer gets located. Signed-off-by: Richard Henderson --- include/ex

[Qemu-devel] [PATCH 5/5] Convert block layer callers' annotations

2013-08-05 Thread Charlie Shepherd
This patch updates the callers of block layer functions converted to explicit coroutine_fn annotation in the previous patch. --- block/bochs.c| 4 ++-- block/cloop.c| 4 ++-- block/cow.c | 8 +++ block/dmg.c | 8 +++ block/qcow.c

[Qemu-devel] [PATCH 4/5] Convert block functions to coroutine versions

2013-08-05 Thread Charlie Shepherd
This patch follows on from the previous one and converts some block layer functions to be explicitly annotated with coroutine_fn instead of yielding depending upon calling context. --- block.c | 235 ++ block/mirror.c| 4 +-

[Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-05 Thread Charlie Shepherd
This patch converts the .bdrv_open, .bdrv_file_open and .bdrv_create members of struct BlockDriver to be explicitly annotated as coroutine_fn, rather than yielding dynamically depending on whether they are executed in a coroutine context or not. --- block.c | 16 +++

[Qemu-devel] [PATCH 2/5] qemu_coroutine_self should not be marked coroutine_fn as it cannot yield

2013-08-05 Thread Charlie Shepherd
From: Charlie Shepherd While it only really makes sense to call qemu_coroutine_self() in a coroutine context, it cannot actually yield execution itself, so remove the coroutine_fn annotation. --- include/block/coroutine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includ

[Qemu-devel] [PATCH 1/5] Add an explanation of when a function should be marked coroutine_fn

2013-08-05 Thread Charlie Shepherd
From: Charlie Shepherd Coroutine functions that can yield directly or indirectly should be annotated with a coroutine_fn annotation. Add an explanation to that effect in include/block/coroutine.h. --- include/block/coroutine.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/block/

[Qemu-devel] RFC: [PATCH 0/5] Explicitly annotating coroutine_fn functions

2013-08-05 Thread Charlie Shepherd
This patch series is a follow up to a previous RFC about converting functions that dynamically yield execution depending on whether they are in executing in a coroutine context or not to be explicitly statically annotated. This change is necessary for the GSoC CPC project, but was also agreed in an

[Qemu-devel] [PATCH for-next 10/15] tcg-ppc64: Use indirect jump threading

2013-08-05 Thread Richard Henderson
We were always doing an indirect jump anyway, and the sequence is never longer than the 6 insns we were reserving for the direct jump. Futher cleanups will reduce the length of the constant address load. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 3 ++- tcg/ppc64/tcg-target.

[Qemu-devel] [PATCH for-next 13/15] tcg-ppc64: Tidy tcg_target_qemu_prologue

2013-08-05 Thread Richard Henderson
Use the helper macros like TAI. Fix formatting. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index d4e1efc..90d033c 100644

[Qemu-devel] [PATCH for-next 15/15] tcg-ppc64: Implement CONFIG_QEMU_LDST_OPTIMIZATION

2013-08-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- configure | 2 +- include/exec/exec-all.h | 4 +- tcg/ppc64/tcg-target.c | 219 +++- 3 files changed, 146 insertions(+), 79 deletions(-) diff --git a/configure b/configure index 18fa608..5b9a66c 1

[Qemu-devel] [PATCH for-next 11/15] tcg-ppc64: Setup TCG_REG_TB

2013-08-05 Thread Richard Henderson
A handy value "near" the rest of the program's dynamic allocation. We'll be able to use this value for constant address generation, cross-TB references, and in the further future, constant pool refs. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 23 ++- 1 file

[Qemu-devel] [PATCH for-next 14/15] tcg-ppc64: Streamline tcg_out_tlb_read

2013-08-05 Thread Richard Henderson
Less conditional compilation. Merge an add insn with the indexed memory load insn. Load the tlb addend earlier. Avoid the address update memory form. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 202 +++-- 1 file changed, 95 inserti

Re: [Qemu-devel] [SeaBIOS] [PATCH] don't expose pvpanic device in the UI

2013-08-05 Thread Michael S. Tsirkin
On Mon, Aug 05, 2013 at 07:04:22PM +0300, Gleb Natapov wrote: > On Mon, Aug 05, 2013 at 06:03:34PM +0300, Michael S. Tsirkin wrote: > > On Mon, Aug 05, 2013 at 12:20:44PM +0300, Gleb Natapov wrote: > > > On Mon, Aug 05, 2013 at 12:18:26PM +0300, Michael S. Tsirkin wrote: > > > > On Mon, Aug 05, 201

[Qemu-devel] [PATCH for-next 07/15] tcg-ppc64: Tidy register allocation order

2013-08-05 Thread Richard Henderson
Remove conditionalization from tcg_target_reg_alloc_order, relying on reserved_regs to prevent register allocation that shouldn't happen. So R11 is now present in reg_alloc_order for __APPLE__, but also now reserved. Sort reg_alloc_order into call-saved, call-clobbered, and parameters. This reduce

[Qemu-devel] [PATCH for-next 12/15] tcg-ppc64: Use TCG_REG_TB in tcg_out_movi and tcg_out_mem_long

2013-08-05 Thread Richard Henderson
This results in significant code size reductions when manipulating pointers into TCG's own data structures. E.g. -OUT: [size=180] +OUT: [size=132] ... -xxx: li r2,16383 # goto_tb -xxx: rldicr r2,r2,32,31 -xxx: orisr2,r2,39128 -xxx: ori r2,r2,376 -xxx: ldx r3

[Qemu-devel] [PATCH for-next 09/15] tcg-ppc64: Handle long offsets better

2013-08-05 Thread Richard Henderson
Previously we'd only handle 16-bit offsets from memory operand without falling back to indexed, but it's easy to use ADDIS to handle full 32-bit offsets. This also lets us unify code that existed inline in tcg_out_op for handling addition of large constants. Signed-off-by: Richard Henderson ---

[Qemu-devel] [PATCH for-next 04/15] tcg-ppc64: Don't load the static chain from TCG

2013-08-05 Thread Richard Henderson
There are no helpers that require the static chain. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index fce3e5d..ddc9581 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target

[Qemu-devel] [PATCH for-next 08/15] tcg-ppc64: Create PowerOpcode

2013-08-05 Thread Richard Henderson
This makes some bits easier to debug, being presented with a symbol instead of a number inside gdb. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 273 + 1 file changed, 138 insertions(+), 135 deletions(-) diff --git a/tcg/ppc64/tcg

[Qemu-devel] [PATCH for-next 00/15] Collection of improvements for tcg/ppc64

2013-08-05 Thread Richard Henderson
About half of these patches are focused on reducing the number of full 64-bit constants that need to be generated for addresses: E.g. patch 5, looking through the function descriptor. If the program is built --disable-pie, the elements of the function descriptors are all 32-bit constants. E.g. t

[Qemu-devel] [PATCH for-next 03/15] tcg-ppc64: Use the branch absolute instruction when possible

2013-08-05 Thread Richard Henderson
... before falling back to an indirect branch. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 94960a3..fce3e5d 100644 --- a/tcg

[Qemu-devel] [PATCH for-next 06/15] tcg-ppc64: Move AREG0 to r31

2013-08-05 Thread Richard Henderson
Now that AREG0 doesn't need to be a global register, non-conflicting with the normal frame pointer, move it out of the middle of the set. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 4 ++-- tcg/ppc64/tcg-target.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --

[Qemu-devel] [PATCH for-next 02/15] tcg-ppc64: Add an LK argument to tcg_out_call

2013-08-05 Thread Richard Henderson
This will enable the generation of tail-calls in a future patch. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 0e3147b.

[Qemu-devel] [PATCH for-next 01/15] tcg-ppc64: Avoid code for nop move

2013-08-05 Thread Richard Henderson
While these are rare from code that's been through the optimizer, it's not uncommon within the tcg backend. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 067

[Qemu-devel] [PATCH for-next 7/8] tcg-arm: Use ldrd/strd for appropriate qemu_ld/st64

2013-08-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c | 48 +++- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 6c4854d..9a14a20 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-ta

[Qemu-devel] [PATCH] hw/openrisc/openrisc_sim: Avoid using uninitialised variable 'entry'

2013-08-05 Thread Peter Maydell
clang warns that cpu_openrisc_load_kernel() can use 'entry' uninitialized: hw/openrisc/openrisc_sim.c:69:9: error: variable 'entry' is used uninitialized whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized] if (kernel_filename && !qtest_enabled()) { ^

[Qemu-devel] [PATCH for-next 1/8] tcg-i386: Add and use tcg_out64

2013-08-05 Thread Richard Henderson
No point in splitting the write into 32-bit pieces. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 3 +-- tcg/tcg.c | 6 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index 87eeab3..841bd75 100644 ---

[Qemu-devel] [PATCH for-next 2/8] tcg-i386: Try pc-relative lea for constant formation

2013-08-05 Thread Richard Henderson
Use a 7 byte lea before the ultimate 10 byte movq. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index 841bd75..456bd9e 100644 --- a/tcg/i386/tcg-ta

[Qemu-devel] [PATCH for-next 3/8] tcg-i386: Tidy qemu_ld/st slow path

2013-08-05 Thread Richard Henderson
Use existing stack space for arguments; don't push/pop. Use less ifdefs and more C ifs. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 159 +- 1 file changed, 68 insertions(+), 91 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg

[Qemu-devel] [PATCH for-next 4/8] tcg: Add mmu helpers that take a return address argument

2013-08-05 Thread Richard Henderson
Allow the code that tcg generates to be less obtuse, passing in the return address directly instead of computing it in the helper. Maintain the old entrance point unchanged as an alternate entry point. Signed-off-by: Richard Henderson --- include/exec/softmmu_defs.h | 46 +++

[Qemu-devel] [PATCH for-next 0/8] Improve tcg ldst optimization

2013-08-05 Thread Richard Henderson
The existing code for the i386 ldst optimization does jmps.+5 jmplrestart jmplrestart for the store path. This is idiotic to say the least. Especially for x86_64, where we have available parameter registers. We replace that with a simple leaqres

[Qemu-devel] [PATCH for-next 5/8] tcg: Tidy softmmu_template.h

2013-08-05 Thread Richard Henderson
Avoid a loop in the tlb_fill path; the fill will either succeed or generate an exception. Inline the slow_ld/st function; it was a complete copy of the main helper except for the actual cross-page unaligned code, and the compiler was inlining it anyway. Add unlikely markers optimizing for the mos

[Qemu-devel] [PATCH for-next 8/8] tcg-arm: Rearrange slow-path qemu_ld/st

2013-08-05 Thread Richard Henderson
Instead of using a branch-call-branch sequence, arrange for a call-branch sequence, using the ARM's conditional call insn. This reduces the size of the slow-path within the TB, and makes the GETPC_EXT implementation identical for TCG and not-TCG. Signed-off-by: Richard Henderson --- include/exec

[Qemu-devel] [PATCH for-next 5/5] target-alpha: Implement the typhoon iommu

2013-08-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- hw/alpha/typhoon.c | 202 + 1 file changed, 174 insertions(+), 28 deletions(-) diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c index b7fb044..2450045 100644 --- a/hw/alpha/typhoon.c +++ b/hw/alpha/typho

[Qemu-devel] [PATCH for-next 4/5] target-alpha: Build in QXL driver

2013-08-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- default-configs/alpha-softmmu.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak index bc07600..0810a2e 100644 --- a/default-configs/alpha-softmmu.mak +++ b/default-configs/alpha-softm

[Qemu-devel] [PATCH for-next 2/5] target-alpha: Use goto_tb in call_pal

2013-08-05 Thread Richard Henderson
With appropriate flushing when the PALBR changes, the target of a CALL_PAL is so predictable we can chain to it. Signed-off-by: Richard Henderson --- target-alpha/helper.h | 1 + target-alpha/sys_helper.c | 5 + target-alpha/translate.c | 20 3 files changed, 26 i

[Qemu-devel] [PATCH for-next 3/5] target-alpha: Consider the superpage when threading and ending TBs

2013-08-05 Thread Richard Henderson
This allows significantly more threading, and occasionally larger TBs, when processing code for the kernel and PALcode. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 37 + 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/target-

[Qemu-devel] [PATCH for-next 1/5] target-alpha: Implement call_pal without an exception

2013-08-05 Thread Richard Henderson
The destination of the call_pal, and the cpu state, is very predictable; there's no need for exiting the cpu loop. Signed-off-by: Richard Henderson --- target-alpha/helper.h | 1 + target-alpha/sys_helper.c | 12 target-alpha/translate.c | 25 ++--- 3 files

[Qemu-devel] [PATCH for-next 0/5] alpha-softmmu improvements

2013-08-05 Thread Richard Henderson
Two patches that improve the code paths generated for syscalls; generating an exception is silly, as we can directly chain the TBs. One patch improving the code for the kernel itself, since the KSEG superpage never changes. This idea probably applies to several other targets as well. One patch t

Re: [Qemu-devel] [PATCH qom-next for-next 1/6] ipack: Convert to QOM realize

2013-08-05 Thread Andreas Färber
Am 05.08.2013 17:16, schrieb Alberto Garcia: > On Fri, Aug 02, 2013 at 11:16:56PM +0200, Andreas Färber wrote: > >> +#define IPOCTAL_GET_PARENT_CLASS(obj) \ >> +OBJECT_GET_PARENT_CLASS(obj, TYPE_IPOCTAL) > > Hey, I cannot make it compile with the latest master: > > hw/char/ipoctal232.c: In f

Re: [Qemu-devel] [Bug 1208540] [NEW] RDMSR of register 0x345 (IA32_PERF_CAPABILITIES) fails in guest

2013-08-05 Thread Gleb Natapov
On Mon, Aug 05, 2013 at 05:17:30PM -, Jari Ruusu wrote: > Public bug reported: > > I have a problem with qemu when I attempt to configure qemu in a way that > AES-NI op-codes are enabled in quest. To do that, I have to configure qemu > to emulate a recent CPU. But that causes a problem, becaus

Re: [Qemu-devel] [PATCH for 1.6] mips: revert commit b332d24a8e1290954029814d09156b06ede358e2

2013-08-05 Thread Andreas Färber
Am 05.08.2013 18:43, schrieb Anthony Liguori: > Andreas Färber writes: > >> Am 05.08.2013 00:06, schrieb Aurelien Jarno: >>> On Sun, Aug 04, 2013 at 02:03:20PM +0200, Andreas Färber wrote: Am 04.08.2013 00:02, schrieb Aurelien Jarno: > Now that this code path is not triggered anymore dur

[Qemu-devel] [Bug 1208540] [NEW] RDMSR of register 0x345 (IA32_PERF_CAPABILITIES) fails in guest

2013-08-05 Thread Jari Ruusu
Public bug reported: I have a problem with qemu when I attempt to configure qemu in a way that AES-NI op-codes are enabled in quest. To do that, I have to configure qemu to emulate a recent CPU. But that causes a problem, because with recent CPUs, guest linux kernel code assumes that RDMSR of regi

Re: [Qemu-devel] [PATCH qom-next for-next 1/6] ipack: Convert to QOM realize

2013-08-05 Thread Alberto Garcia
On Fri, Aug 02, 2013 at 11:16:56PM +0200, Andreas Färber wrote: > +#define IPOCTAL_GET_PARENT_CLASS(obj) \ > +OBJECT_GET_PARENT_CLASS(obj, TYPE_IPOCTAL) Hey, I cannot make it compile with the latest master: hw/char/ipoctal232.c: In function ‘ipoctal_realize’: hw/char/ipoctal232.c:544:5: erro

Re: [Qemu-devel] [PATCH v2] target-arm: Implement 'int' loglevel

2013-08-05 Thread Richard Henderson
On 08/05/2013 01:06 AM, Peter Maydell wrote: > The 'int' loglevel for recording interrupts and exceptions > requires support in the target-specific code. Implement > it for ARM. This improves debug logging in some situations > that were otherwise pretty opaque, such as when we fault > trying to exe

Re: [Qemu-devel] PING for-1.6 Re: [PATCH for-1.6] fw_cfg: the I/O port variant expects little-endian

2013-08-05 Thread Laszlo Ersek
On 08/05/13 18:21, Paolo Bonzini wrote: > On 07/28/2013 02:35 PM, Paolo Bonzini wrote: >> The I/O port variant of fw_cfg is used by sparc64, which is a >> big-endian machine. >> Firmware swaps bytes before sending them to fw_cfg, so we need to >> unswap them in >> the device. >> >> This is only use

Re: [Qemu-devel] [PATCH for 1.6] mips: revert commit b332d24a8e1290954029814d09156b06ede358e2

2013-08-05 Thread Anthony Liguori
Andreas Färber writes: > Am 05.08.2013 00:06, schrieb Aurelien Jarno: >> On Sun, Aug 04, 2013 at 02:03:20PM +0200, Andreas Färber wrote: >>> Am 04.08.2013 00:02, schrieb Aurelien Jarno: Now that this code path is not triggered anymore during the tests, revert commit b332d24a8e1290954029

Re: [Qemu-devel] [PATCH v2] target-arm: Implement 'int' loglevel

2013-08-05 Thread Richard Henderson
On 08/05/2013 01:06 AM, Peter Maydell wrote: > +const char *exc = NULL; > + > +if (idx >= 0 && idx < ARRAY_SIZE(excnames)) { > +exc = excnames[idx]; > +} > +if (!exc) { > +exc = "unknown"; > +} Gah. Nevermind that last comment, I kne

Re: [Qemu-devel] [PATCH v2] target-arm: Implement 'int' loglevel

2013-08-05 Thread Richard Henderson
On 08/05/2013 01:06 AM, Peter Maydell wrote: > +const char *exc = NULL; > + > +if (idx >= 0 && idx < ARRAY_SIZE(excnames)) { > +exc = excnames[idx]; > +} > +if (!exc) { > +exc = "unknown"; > +} Silly test for null here. const char

[Qemu-devel] [PATCH v2] target-mips: fix decoding of microMIPS POOL32Axf instructions

2013-08-05 Thread Leon Alrae
Fix incorrect assumption that DSP and non-DSP versions of the following instructions have the same encoding: MULT, MULTU, MADD, MADDU, MSUB, MSUBU, MFHI, MFLO, MTHI, MTLO. Correct the existing (non-DSP) instructions and add DSP equivalents. Reference: MIPS Architecture for Programmers Volume II-B:

  1   2   3   >