[Qemu-devel] [PATCH RESEND v3] fix vnc regression

2011-03-11 Thread Wen Congyang
This patch fix the following regression: 1. we should use bitmap_set() and bitmap_clear() to replace vnc_set_bits(). Signed-off-by: Wen Congyang --- ui/vnc.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 34dc0cd..8fd35c1 100644 --- a/u

[Qemu-devel] vhost performance numbers and test configuration

2011-03-11 Thread rukhsana ansari
The KVM website states: "VhostNet provides better latency (10% less than e1000 on my system) and greater throughput (8x the normal virtio, around 7~8 Gigabits/sec here) for network. " I did look trough the mailing list but couldn't find information on the t

Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.14.0

2011-03-11 Thread SAURAV LAHIRI
Thank you Stefan, Jes. So it appears that snapshot_blkdev is the way to go for vm disk backup with running vms. In regard to merging changes, assuming that we go snapshot_blkdev rightaway. Stefan's suggestion: "qemu-img commit" Jes's suggestion: "qemu-img convert" Does qemu-img convert apply to

[Qemu-devel] How to do qemu profiling?

2011-03-11 Thread मनीष शर्मा
Hi All, To enable profiling of qemu, I used the option "-pg". while compiling I got following error. CCarm-softmmu/arch_init.o CCarm-softmmu/cpus.o CCarm-softmmu/monitor.o CCarm-softmmu/cpu-exec.o gcc: -pg and -fomit-frame-pointer are incompatible make[1]: *** [cpu-exec.o]

Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.14.0

2011-03-11 Thread Jes Sorensen
On 03/11/11 10:39, SAURAV LAHIRI wrote: > Thank you Stefan, Jes. So it appears that snapshot_blkdev is the way > to go for vm disk backup with running vms. > > In regard to merging changes, assuming that we go snapshot_blkdev > rightaway. Stefan's suggestion: "qemu-img commit" Jes's suggestion: >

[Qemu-devel] [PATCH] target-arm: Set Q bit for overflow in SMUAD and SMLAD

2011-03-11 Thread Peter Maydell
SMUAD and SMLAD are supposed to set the Q bit if the addition of the two 16x16 multiply products and optional accumulator overflows considered as a signed value. However we were only doing this check for the addition of the accumulator, not when adding the products, with the effect that we were mis

Re: [Xen-devel] Re: [Qemu-devel] [PATCH V10 02/15] xen: Make xen build only on x86 target.

2011-03-11 Thread Stefano Stabellini
On Fri, 11 Mar 2011, Alexander Graf wrote: > > On 24.02.2011, at 18:59, Anthony Liguori wrote: > > > On 02/24/2011 11:46 AM, Jan Kiszka wrote: > >> On 2011-02-24 18:27, Anthony Liguori wrote: > >> > >>> On 02/24/2011 10:25 AM, Anthony PERARD wrote: > >>> > On Thu, Feb 24, 2011 at 16:

Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.14.0

2011-03-11 Thread Stefan Hajnoczi
On Fri, Mar 11, 2011 at 9:50 AM, Jes Sorensen wrote: > On 03/11/11 10:39, SAURAV LAHIRI wrote: >> Thank you Stefan, Jes. So it appears that snapshot_blkdev is the way >> to go for vm disk backup with running vms. >> >> In regard to merging changes, assuming that we go snapshot_blkdev >> rightaway.

[Qemu-devel] [PATCH] Make VNC support optional

2011-03-11 Thread Jes . Sorensen
From: Jes Sorensen Per default VNC is enabled. Signed-off-by: Jes Sorensen --- Makefile.objs | 19 ++- configure | 37 + monitor.c | 16 vl.c | 10 +- 4 files changed, 60 insertions(+), 22 del

[Qemu-devel] [PATCH 2/2][REPOST] Move the xenfb pointer handler to the connected method

2011-03-11 Thread stefano . stabellini
From: John Haxby Ensure that we read "request-abs-pointer" after the frontend has written it. This means that we will correctly set up an ansolute or relative pointer handler correctly. Signed-off-by: John Haxby Acked-by: Stefano Stabellini --- hw/xenfb.c | 19 ++- 1 files

[Qemu-devel] [PATCH 1/2][REPOST] Introduce a new 'connected' xendev op called when Connected.

2011-03-11 Thread stefano . stabellini
From: John Haxby Rename the existing xendev 'connect' op to 'initialised' and introduce a new 'connected' op. This new op, if defined, is called when the backend is connected. Note that since there is no state transition this may be called more than once. Signed-off-by: John Haxby Acked-by: S

[Qemu-devel] Re: [PATCH 1 of 2] Introduce a new 'connected' xendev op called when Connected.

2011-03-11 Thread John Haxby
It's been something over six months since this patch was submitted (actually it was resend because the first version didn't say "PATCH" in the subject. So far as I can tell it's not made it into qemu git (hw/xen_backend.h, for example, doesn't show the extra field in struct XenDevOps). This prob

[Qemu-devel] Re: [PATCH v2 0/3] really fix -icount with iothread

2011-03-11 Thread Edgar E. Iglesias
On Thu, Mar 10, 2011 at 01:12:48PM +0100, Paolo Bonzini wrote: > This is a "real" fix for -icount, real in the sense that it > works in all cases including those that weren't fixed by my > first attempt. > > Patch 1 is the three-line fix. With that in, patch 2 can revert > the previous attempt(s)

[Qemu-devel] [PATCH] target-arm: Fix TCG temporary leaks for scalar VMULL

2011-03-11 Thread Peter Maydell
Fix a TCG temporary leak when translating 32-bit scalar VMULL. Signed-off-by: Peter Maydell --- This was found by the TCG leak-checking support that was committed a little while back. Score one for debug code :-) target-arm/translate.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)

[Qemu-devel] Re: [PATCH] Make VNC support optional

2011-03-11 Thread Anthony Liguori
On 03/11/2011 06:38 AM, jes.soren...@redhat.com wrote: From: Jes Sorensen Per default VNC is enabled. Signed-off-by: Jes Sorensen --- Makefile.objs | 19 ++- configure | 37 + monitor.c | 16 vl.c |

[Qemu-devel] Re: [PATCH v2 0/3] really fix -icount with iothread

2011-03-11 Thread Paolo Bonzini
On 03/11/2011 01:57 PM, Edgar E. Iglesias wrote: Hi Paulo, I gave this patchset a run and it runs icount and iothread very fast in all my testcases. Thanks, that's good news. But, it suffers from the problem that commit 225d02cd1a34d5d87e8acefbf8e244a5d12f5f8c tried to fix. If the virtual C

[Qemu-devel] Re: [PATCH] Make VNC support optional

2011-03-11 Thread Jes Sorensen
On 03/11/11 14:36, Anthony Liguori wrote: >> diff --git a/monitor.c b/monitor.c >> index 22ae3bb..4425315 100644 >> --- a/monitor.c >> +++ b/monitor.c >> @@ -441,6 +441,7 @@ void monitor_protocol_event(MonitorEvent event, >> QObject *data) >> case QEVENT_RESUME: >> event_nam

Re: [Qemu-devel] Re: [PATCH] Make VNC support optional

2011-03-11 Thread Anthony Liguori
On 03/11/2011 07:43 AM, Jes Sorensen wrote: On 03/11/11 14:36, Anthony Liguori wrote: diff --git a/monitor.c b/monitor.c index 22ae3bb..4425315 100644 --- a/monitor.c +++ b/monitor.c @@ -441,6 +441,7 @@ void monitor_protocol_event(MonitorEvent event, QObject *data) case QEVENT_RESUME:

[Qemu-devel] Re: [PATCH v2 0/3] really fix -icount with iothread

2011-03-11 Thread Paolo Bonzini
On 03/11/2011 02:36 PM, Edgar E. Iglesias wrote: Yes, something like that. Or somehow sleep for some time related to the time left until the next event to avoid the warps from beeing too visible externally (e.g like sending a network packet continously instead of every 100ms). The important part

[Qemu-devel] Re: [PATCH v2 0/3] really fix -icount with iothread

2011-03-11 Thread Edgar E. Iglesias
On Fri, Mar 11, 2011 at 02:36:49PM +0100, Paolo Bonzini wrote: > On 03/11/2011 01:57 PM, Edgar E. Iglesias wrote: > > Hi Paulo, > > > > I gave this patchset a run and it runs icount and iothread very > > fast in all my testcases. > > Thanks, that's good news. > > > But, it suffers from the proble

[Qemu-devel] [PATCH v2] Make VNC support optional

2011-03-11 Thread Jes . Sorensen
From: Jes Sorensen Per default VNC is enabled. Signed-off-by: Jes Sorensen --- Makefile.objs | 19 ++- configure | 37 + console.h | 26 -- monitor.c | 22 ++ qerror.h |

[Qemu-devel] Re: [PATCH v2] Make VNC support optional

2011-03-11 Thread Anthony Liguori
On 03/11/2011 08:37 AM, jes.soren...@redhat.com wrote: From: Jes Sorensen Per default VNC is enabled. Signed-off-by: Jes Sorensen --- Makefile.objs | 19 ++- configure | 37 + console.h | 26 -- monit

[Qemu-devel] Re: [PATCH v2] Make VNC support optional

2011-03-11 Thread Jes Sorensen
On 03/11/11 15:39, Anthony Liguori wrote: >> +#ifdef CONFIG_VNC >> /* init remote displays */ >> if (vnc_display) { >> vnc_display_init(ds); >> @@ -3088,6 +3095,7 @@ int main(int argc, char **argv, char **envp) >> printf("VNC server running on `%s'\n", >> vnc_dis

[Qemu-devel] Re: [PATCH v2] Make VNC support optional

2011-03-11 Thread Anthony Liguori
On 03/11/2011 08:54 AM, Jes Sorensen wrote: On 03/11/11 15:39, Anthony Liguori wrote: +#ifdef CONFIG_VNC /* init remote displays */ if (vnc_display) { vnc_display_init(ds); @@ -3088,6 +3095,7 @@ int main(int argc, char **argv, char **envp) printf("VNC serv

[Qemu-devel] [PATCH v3] Make VNC support optional

2011-03-11 Thread Jes . Sorensen
From: Jes Sorensen Per default VNC is enabled. Signed-off-by: Jes Sorensen --- Makefile.objs | 19 ++- configure | 37 + console.h | 26 -- monitor.c | 22 ++ qerror.h |

[Qemu-devel] Re: [PATCH v2] Make VNC support optional

2011-03-11 Thread Jes Sorensen
On 03/11/11 15:55, Anthony Liguori wrote: > On 03/11/2011 08:54 AM, Jes Sorensen wrote: >> On 03/11/11 15:39, Anthony Liguori wrote: +#ifdef CONFIG_VNC /* init remote displays */ if (vnc_display) { vnc_display_init(ds); @@ -3088,6 +3095,7 @@ int mai

Re: [Qemu-devel] Re: [PATCH v2] Make VNC support optional

2011-03-11 Thread Peter Maydell
On 11 March 2011 14:55, Anthony Liguori wrote: > On 03/11/2011 08:54 AM, Jes Sorensen wrote: >> On 03/11/11 15:39, Anthony Liguori wrote: >>> So what ends up being the default display if VNC and SDL are both >>> disabled?  Have you tested this? >> >> Then you cry :) actually you just don't get vid

Re: [Qemu-devel] Re: [V8 PATCH 11/11] virtio-9p: Chroot environment for other functions

2011-03-11 Thread Venkateswararao Jujjuri (JV)
On 3/10/2011 10:30 PM, Stefan Hajnoczi wrote: > On Fri, Mar 11, 2011 at 5:54 AM, Venkateswararao Jujjuri (JV) > wrote: >> On 3/10/2011 4:29 AM, Stefan Hajnoczi wrote: >>> On Wed, Mar 9, 2011 at 5:16 PM, M. Mohan Kumar wrote: Add chroot functionality for systemcalls that can operate on a file

Re: [Qemu-devel] Re: [PATCH v2] Make VNC support optional

2011-03-11 Thread Anthony Liguori
On 03/11/2011 09:11 AM, Peter Maydell wrote: On 11 March 2011 14:55, Anthony Liguori wrote: On 03/11/2011 08:54 AM, Jes Sorensen wrote: On 03/11/11 15:39, Anthony Liguori wrote: So what ends up being the default display if VNC and SDL are both disabled? Have you tested this? Then you cry :)

Re: [Qemu-devel] [PATCH V11 00/15] Xen device model support

2011-03-11 Thread Anthony Liguori
On 03/01/2011 12:35 PM, anthony.per...@citrix.com wrote: From: Anthony PERARD Hi all, Here is the few change since the V10: - Add braces for blocks with single statement in the clean-up patch; - the patch that builds Xen only for x86 have been removed, instead, xen_domainbuild is bu

Re: [Qemu-devel] Re: [PATCH v2] Make VNC support optional

2011-03-11 Thread Jes Sorensen
On 03/11/11 16:50, Anthony Liguori wrote: > On 03/11/2011 09:11 AM, Peter Maydell wrote: >> (Also the "-nographic" running of serial over stdio doesn't let >> you kill qemu with ^C, the way "-serial stdio" does, which is >> just annoyingly inconsistent...) > > So if we want to have another mode th

[Qemu-devel] Re: [PATCH v2] Make VNC support optional

2011-03-11 Thread Jan Kiszka
On 2011-03-11 16:11, Peter Maydell wrote: > On 11 March 2011 14:55, Anthony Liguori wrote: >> On 03/11/2011 08:54 AM, Jes Sorensen wrote: >>> On 03/11/11 15:39, Anthony Liguori wrote: So what ends up being the default display if VNC and SDL are both disabled? Have you tested this? >>> >

Re: [Qemu-devel] Re: [PATCH v2] Make VNC support optional

2011-03-11 Thread Anthony Liguori
On 03/11/2011 10:30 AM, Jes Sorensen wrote: On 03/11/11 16:50, Anthony Liguori wrote: On 03/11/2011 09:11 AM, Peter Maydell wrote: (Also the "-nographic" running of serial over stdio doesn't let you kill qemu with ^C, the way "-serial stdio" does, which is just annoyingly inconsistent...) So i

Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.14.0

2011-03-11 Thread SAURAV LAHIRI
Thank you very much Stefan and Jes for brining about clarity to the issue of snapshots in qemu.  One last question which we would be interested in is when is the back merge of snapshots for running vms expected to be released. Regards sl --- On Fri, 11/3/11, Jes Sorensen wrote: From: Jes Sore

[Qemu-devel] Re: [V7 PATCH 9/9] virtio-9p: Chroot environment for other functions

2011-03-11 Thread Stefan Hajnoczi
On Fri, Mar 4, 2011 at 9:25 AM, M. Mohan Kumar wrote: > @@ -296,8 +357,23 @@ static int local_chmod(FsContext *fs_ctx, const char > *path, FsCred *credp) >  { >     if (fs_ctx->fs_sm == SM_MAPPED) { >         return local_set_xattr(rpath(fs_ctx, path), credp); > -    } else if ((fs_ctx->fs_sm ==

[Qemu-devel] [PATCH 4/7] target-arm: Fix VCLE.F32 #0, VCLT.F32 #0 NaN handling

2011-03-11 Thread Peter Maydell
Implementing the floating-point versions of VCLE #0 and VCLT #0 by doing a GT comparison and inverting the result gives the wrong result if the input is a NaN. Implement as a GT comparison with the operands swapped instead. Signed-off-by: Peter Maydell --- target-arm/translate.c | 18 +

[Qemu-devel] [PATCH 5/7] target-arm: Correct ABD's handling of negative zeroes

2011-03-11 Thread Peter Maydell
Implement ABD by taking the absolute value of the difference of the operands (as the ARM ARM specifies) rather than by flipping the order of the operands to the subtract based on the results of a comparison. The latter approch gives the wrong answers for some edge cases like negative zero. Signed-

[Qemu-devel] [PATCH 2/7] target-arm/neon_helper.c: Use make_float32/float32_val macros

2011-03-11 Thread Peter Maydell
Use the softfloat make_float32 and float32_val macros to convert between softfloat's float32 type and raw uint32_t types, rather than private conversion functions. Signed-off-by: Peter Maydell --- target-arm/neon_helper.c | 56 ++ 1 files changed, 17

[Qemu-devel] [PATCH 6/7] softfloat: Add float*_min() and float*_max() functions

2011-03-11 Thread Peter Maydell
Add min and max operations to softfloat. This allows us to implement propagation of NaNs and handling of negative zero correctly (unlike the approach of having target helper routines return one of the operands based on the result of a comparison op). Signed-off-by: Peter Maydell --- fpu/softfloa

[Qemu-devel] [PATCH 3/7] target-arm: Return right result for Neon comparison with NaNs

2011-03-11 Thread Peter Maydell
Fix the helper functions implementing the Neon floating point comparison ops (VCGE, VCGT, VCEQ, VACGT, VACGE) to return the right answer when one of the values being compared is a NaN. Signed-off-by: Peter Maydell --- target-arm/neon_helper.c | 28 ++-- 1 files changed,

[Qemu-devel] [PATCH 1/7] target-arm: Make Neon helper routines use correct FP status

2011-03-11 Thread Peter Maydell
Make the Neon helper routines use the correct FP status from the CPUEnv rather than using a dummy static one. This means they will correctly handle denormals and NaNs and will set FPSCR exception bits properly. Signed-off-by: Peter Maydell --- target-arm/helpers.h | 22 +++-

[Qemu-devel] [PATCH 7/7] target-arm: Use new softfloat min/max functions for VMAX, VMIN

2011-03-11 Thread Peter Maydell
Use the new softfloat min/max functions to implement the Neon VMAX and VMIN instructions. This allows us to get the right behaviour for NaN and negative zero. Signed-off-by: Peter Maydell --- target-arm/neon_helper.c |8 ++-- 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a

[Qemu-devel] [PATCH 0/7] ARM: minor Neon fixes (mostly NaN related)

2011-03-11 Thread Peter Maydell
This patch series fixes a number of minor Neon bugs, mostly related to edge cases involving NaN handling. The patch series includes adding support for float*_min() and float*_max() operations to softfloat, because this makes it easy to get NaN propagation and handling of zeroes correct. I've only

Re: [Qemu-devel] [PATCH 6/7] softfloat: Add float*_min() and float*_max() functions

2011-03-11 Thread Nathan Froyd
On Fri, Mar 11, 2011 at 06:12:25PM +, Peter Maydell wrote: > Add min and max operations to softfloat. This allows us to implement > propagation of NaNs and handling of negative zero correctly (unlike > the approach of having target helper routines return one of the operands > based on the resul

Re: [Qemu-devel] [PATCH 2/7] target-arm/neon_helper.c: Use make_float32/float32_val macros

2011-03-11 Thread Nathan Froyd
On Fri, Mar 11, 2011 at 06:12:21PM +, Peter Maydell wrote: > Use the softfloat make_float32 and float32_val macros to convert between > softfloat's float32 type and raw uint32_t types, rather than private > conversion functions. Reviewed-by: Nathan Froyd -Nathan

Re: [Qemu-devel] [PATCH 1/7] target-arm: Make Neon helper routines use correct FP status

2011-03-11 Thread Nathan Froyd
On Fri, Mar 11, 2011 at 06:12:20PM +, Peter Maydell wrote: > Make the Neon helper routines use the correct FP status from > the CPUEnv rather than using a dummy static one. This means > they will correctly handle denormals and NaNs and will set > FPSCR exception bits properly. Is there a reaso

Re: [Qemu-devel] Re: RFC: emulation of system flash

2011-03-11 Thread Jordan Justen
On Thu, Mar 10, 2011 at 16:27, Carl-Daniel Hailfinger wrote: > Auf 11.03.2011 01:19, Jan Kiszka schrieb: >> At least it's an in-band interface, which is the better choice as we >> currently only have a PIIX3 southbridge for x86, predating even FWHs. >> > > Right, that pretty much kills the option

Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.14.0

2011-03-11 Thread SAURAV LAHIRI
Thank you Stefan that does clarify on how to correctly use "qemu-img commit " Regards sl --- On Fri, 11/3/11, Stefan Hajnoczi wrote: From: Stefan Hajnoczi Subject: Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.14.0 To: "SAURAV LAHIRI" Cc: "Jes Sorensen" , qemu-devel@nongnu.

Re: [Qemu-devel] [PATCH V11 00/15] Xen device model support

2011-03-11 Thread Alexander Graf
On 11.03.2011, at 17:29, Anthony Liguori wrote: > On 03/01/2011 12:35 PM, anthony.per...@citrix.com wrote: >> From: Anthony PERARD >> >> Hi all, >> >> Here is the few change since the V10: >> >> - Add braces for blocks with single statement in the clean-up patch; >> - the patch that builds

[Qemu-devel] [PATCH 07/11] json: propagate error from parser

2011-03-11 Thread Anthony Liguori
Signed-off-by: Anthony Liguori diff --git a/json-parser.c b/json-parser.c index 6c06ef9..ac4063a 100644 --- a/json-parser.c +++ b/json-parser.c @@ -22,9 +22,11 @@ #include "qbool.h" #include "json-parser.h" #include "json-lexer.h" +#include "qerror.h" typedef struct JSONParserContext { +

[Qemu-devel] [PATCH 05/11] qerror: add new error message for invalid enum values

2011-03-11 Thread Anthony Liguori
Signed-off-by: Anthony Liguori diff --git a/qerror.c b/qerror.c index 78d3884..5a1e637 100644 --- a/qerror.c +++ b/qerror.c @@ -109,6 +109,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Duplicate ID '%(id)' for %(object)", }, { +.error_fmt = QERR_

[Qemu-devel] [PATCH 01/11] Add hard build dependency on glib

2011-03-11 Thread Anthony Liguori
GLib is an extremely common library that has a portable thread implementation along with tons of other goodies. GLib and GObject have a fantastic amount of infrastructure we can leverage in QEMU including an object oriented programming infrastructure. Short term, it has a very nice thread pool im

[Qemu-devel] [PATCH 04/11] qerror: split out the reporting bits of QError

2011-03-11 Thread Anthony Liguori
These make it very hard to compile QError outside of QEMU. Signed-off-by: Anthony Liguori diff --git a/Makefile.objs b/Makefile.objs index da31530..69f0383 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -2,7 +2,7 @@ # QObject qobject-obj-y = qint.o qstring.o qdict.o qlist.o qfloat.o qbool.o

[Qemu-devel] [PATCH 02/11] qerror: expose a function to format an error

2011-03-11 Thread Anthony Liguori
This will let Error share the QError human formatting. This is only used for HMP. Signed-off-by: Anthony Liguori diff --git a/qerror.c b/qerror.c index 4855604..13d53c9 100644 --- a/qerror.c +++ b/qerror.c @@ -326,12 +326,18 @@ QError *qerror_from_info(const char *file, int linenr, const char

[Qemu-devel] [PATCH 11/11] json-parser: detect premature EOI

2011-03-11 Thread Anthony Liguori
We don't handle premature EOI very well and may SEGV. Signed-off-by: Anthony Liguori diff --git a/json-parser.c b/json-parser.c index ac4063a..58e973b 100644 --- a/json-parser.c +++ b/json-parser.c @@ -275,10 +275,15 @@ out: */ static int parse_pair(JSONParserContext *ctxt, QDict *dict, QList

[Qemu-devel] [00/11] QAPI Round 0 (JSON improvements)

2011-03-11 Thread Anthony Liguori
As part of making QAPI usable for virt-agent, Mike Roth and I spent some time hardening the current JSON infrastructure against malicious input. I thought it would be useful to split this out independently of QAPI Round 1. This does include Error and glib. To propagate JSON errors, we need Error

[Qemu-devel] [PATCH 09/11] json-lexer: limit the maximum size of a given token

2011-03-11 Thread Anthony Liguori
This is a security consideration. We don't want a client to cause an arbitrary amount of memory to be allocated in QEMU. For now, we use a limit of 64MB which should be large enough for any reasonably sized token. This is important for parsing JSON from untrusted sources. Signed-off-by: Anthony

[Qemu-devel] Re: [PATCH 02/11] qerror: expose a function to format an error

2011-03-11 Thread Anthony Liguori
On 03/11/2011 03:00 PM, Anthony Liguori wrote: This will let Error share the QError human formatting. This is only used for HMP. Signed-off-by: Anthony Liguori diff --git a/qerror.c b/qerror.c index 4855604..13d53c9 100644 --- a/qerror.c +++ b/qerror.c @@ -326,12 +326,18 @@ QError *qerror_from

[Qemu-devel] [PATCH 03/11] add a generic Error object

2011-03-11 Thread Anthony Liguori
The Error class is similar to QError (now deprecated) except that it supports propagation. This allows for higher quality error handling. It's losely modeled after glib style GErrors. Signed-off-by: Anthony Liguori diff --git a/Makefile.objs b/Makefile.objs index 0ba02c7..da31530 100644 --- a/

[Qemu-devel] [PATCH 10/11] json-streamer: limit the maximum recursion depth and maximum token count

2011-03-11 Thread Anthony Liguori
The JSON parse we use is a recursive decent parser which means that recursion is used to backtrack. To avoid stack overflows from malformed input, we need to limit recursion depth. Fortunately, we know the maximum recursion depth in the message parsing phase so we can very easily check for unreas

[Qemu-devel] [PATCH 08/11] json-lexer: reset the lexer state on an invalid token

2011-03-11 Thread Anthony Liguori
Not everything handles errors from json parsing gracefully. By at least resetting the lexer, we'll start generating valid tokens again and hopefully recover the stream. Signed-off-by: Anthony Liguori diff --git a/json-lexer.c b/json-lexer.c index c736f42..834d7af 100644 --- a/json-lexer.c +++ b

[Qemu-devel] [PATCH 06/11] qerror: add JSON parsing error message

2011-03-11 Thread Anthony Liguori
Using a string like this is a cop-out. I plan on changing this before 0.15. Signed-off-by: Anthony Liguori diff --git a/qerror.c b/qerror.c index 5a1e637..c12dd3d 100644 --- a/qerror.c +++ b/qerror.c @@ -145,6 +145,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "I

[Qemu-devel] Re: [PATCH 11/15] kvm: Rework inner loop of kvm_cpu_exec

2011-03-11 Thread Marcelo Tosatti
On Sat, Mar 05, 2011 at 07:12:50PM +0100, Jan Kiszka wrote: > >> @@ -956,7 +956,6 @@ int kvm_cpu_exec(CPUState *env) > >> abort(); > >> } > >> > >> -ret = 0; /* exit loop */ > >> switch (run->exit_reason) { > > > > Better keep ret assignment here so default

[Qemu-devel] Re: RFC: emulation of system flash

2011-03-11 Thread Jordan Justen
On Thu, Mar 10, 2011 at 12:21, Gleb Natapov wrote: > On Thu, Mar 10, 2011 at 11:50:42AM -0800, Jordan Justen wrote: >> >> So, perhaps this feature should build upon the other feature you and >> Jan are discussing.  When will it become available? >> > When somebody will be motivated enough to send

Re: [Qemu-devel] [PATCH 1/7] target-arm: Make Neon helper routines use correct FP status

2011-03-11 Thread Peter Maydell
On 11 March 2011 18:30, Nathan Froyd wrote: > On Fri, Mar 11, 2011 at 06:12:20PM +, Peter Maydell wrote: >> Make the Neon helper routines use the correct FP status from >> the CPUEnv rather than using a dummy static one. This means >> they will correctly handle denormals and NaNs and will set

[Qemu-devel] [PATCH 03/15] qapi: add core QMP server support (v2)

2011-03-11 Thread Anthony Liguori
This is the infrastructure to register commands. Signed-off-by: Anthony Liguori --- v1 -> v2 - support async commands diff --git a/Makefile.objs b/Makefile.objs index f51eab3..dbdce3c 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -103,6 +103,7 @@ common-obj-y += block-migration.o common-ob

[Qemu-devel] [PATCH 05/15] qapi: add QAPI module type

2011-03-11 Thread Anthony Liguori
This lets us register marshaling handlers using a module init function. Signed-off-by: Anthony Liguori diff --git a/module.h b/module.h index 9263f1c..ef66730 100644 --- a/module.h +++ b/module.h @@ -24,12 +24,14 @@ typedef enum { MODULE_INIT_BLOCK, MODULE_INIT_DEVICE, MODULE_INIT

[Qemu-devel] [PATCH 04/15] qapi: add signal support to core QMP server

2011-03-11 Thread Anthony Liguori
Signed-off-by: Anthony Liguori diff --git a/qmp-core.c b/qmp-core.c index d906557..7f60942 100644 --- a/qmp-core.c +++ b/qmp-core.c @@ -42,6 +42,13 @@ struct QmpCommandState QObject *tag; }; +struct QmpState +{ +int (*add_connection)(QmpState *s, QmpConnection *conn); +void (*del_

[Qemu-devel] [PATCH 00/15] QAPI Round 1 (core code generator) (v2)

2011-03-11 Thread Anthony Liguori
For more information about the background of QAPI, see http://wiki.qemu.org/Features/QAPI This series depends on 'QAPI Round 0' which I posted earlier. Since v2, the major changes are: - Switch to a multiline code emitter to ease readability - Use named parameters for escape sequences - Add s

[Qemu-devel] [PATCH 10/15] qapi: add QMP quit command

2011-03-11 Thread Anthony Liguori
This is needed by the test suite. Signed-off-by: Anthony Liguori diff --git a/qmp-schema.json b/qmp-schema.json index e72bc18..d19cf73 100644 --- a/qmp-schema.json +++ b/qmp-schema.json @@ -88,3 +88,15 @@ # Since: 0.14.0 ## { 'command': 'query-version', 'returns': 'VersionInfo' } + +## +# @qu

[Qemu-devel] [PATCH 01/15] qapi: add code generator for qmp-types (v2)

2011-03-11 Thread Anthony Liguori
Only generate qmp-types.[ch]. These files contain the type definitions for QMP along with the alloc/free functions for these types. Functions to convert enum values to integers and vice versa are also included. qmp-types is used both within QEMU and within libqmp Special alloc/free functions ar

[Qemu-devel] [PATCH 09/15] vl: add a new -qmp2 option to expose experimental QMP server

2011-03-11 Thread Anthony Liguori
This is temporary until we implement all QMP commands. Signed-off-by: Anthony Liguori diff --git a/qemu-options.hx b/qemu-options.hx index badb730..957d935 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1881,6 +1881,9 @@ serial port). The default device is @code{vc} in graphical mode an

[Qemu-devel] [PATCH 11/15] qapi: add QMP qmp_capabilities command

2011-03-11 Thread Anthony Liguori
For now, it's a nop. In the near future, it will be used to register default signals. Signed-off-by: Anthony Liguori diff --git a/qmp-core.c b/qmp-core.c index 22b413b..ccc2b7d 100644 --- a/qmp-core.c +++ b/qmp-core.c @@ -447,3 +447,7 @@ void qmp_init_chardev(CharDriverState *chr) qemu_chr

[Qemu-devel] [PATCH 13/15] qapi: add code generator for libqmp (v2)

2011-03-11 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- v1 -> v2 - update code generator to use multiline - proxy command support - async command support diff --git a/Makefile b/Makefile index 47a755d..5170675 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ GENERATED_HEADERS = config-host.h trace.h qemu-optio

[Qemu-devel] [PATCH 02/15] qapi: add code generator for type marshallers

2011-03-11 Thread Anthony Liguori
This code will marshal a QMP type from native representation to a QObject and vice versa. Marshaling from a native representation to a QObject can never generate an Error although the opposite direction may. Signed-off-by: Anthony Liguori --- v1 -> v2 - update code generator to use multiline st

[Qemu-devel] [PATCH 15/15] qapi: generate HTML report for test-libqmp

2011-03-11 Thread Anthony Liguori
Signed-off-by: Anthony Liguori diff --git a/Makefile b/Makefile index 1d363d7..c5a4820 100644 --- a/Makefile +++ b/Makefile @@ -216,6 +216,15 @@ LIBQMP_OBJS += $(oslib-obj-y) $(trace-obj-y) qemu-malloc.o test-libqmp: test-libqmp.o $(LIBQMP_OBJS) qemu-timer-common.o +check: test-libqmp +

[Qemu-devel] Re: [PATCH 09/15] vl: add a new -qmp2 option to expose experimental QMP server

2011-03-11 Thread Anthony Liguori
On 03/11/2011 05:05 PM, Anthony Liguori wrote: This is temporary until we implement all QMP commands. And just to be clear, they all are already implemented in my QAPI tree. Just batching things up for the purposes of reviewing. Regards, Anthony Liguori

[Qemu-devel] [PATCH 12/15] qapi: add QMP put-event command

2011-03-11 Thread Anthony Liguori
This is needed for libqmp to support events. put-event is used to disconnect from signals. Signed-off-by: Anthony Liguori diff --git a/qmp-schema.json b/qmp-schema.json index e0789d0..17db1cb 100644 --- a/qmp-schema.json +++ b/qmp-schema.json @@ -110,3 +110,18 @@ # Since: 0.14.0 ## { 'comman

[Qemu-devel] [PATCH 08/15] qapi: add new QMP server that uses CharDriverState (v2)

2011-03-11 Thread Anthony Liguori
This will replace the current QMP server once all the functions are implemented. Signed-off-by: Anthony Liguori --- v1 -> v2 - support for get_fd - support for async commands - free request object on error path diff --git a/qmp-core.c b/qmp-core.c index 7f60942..22b413b 100644 --- a/qmp-core.

[Qemu-devel] [PATCH 07/15] qapi: add query-version QMP command

2011-03-11 Thread Anthony Liguori
This is used internally by QMP. It's also a pretty good example of a typical command conversion. Signed-off-by: Anthony Liguori diff --git a/Makefile.objs b/Makefile.objs index 5dae800..e1a2756 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -103,7 +103,7 @@ common-obj-y += block-migration.o

Re: [Qemu-devel] Re: RFC: emulation of system flash

2011-03-11 Thread Michal Suchanek
Hello, On 11 March 2011 20:09, Jordan Justen wrote: > On Thu, Mar 10, 2011 at 16:27, Carl-Daniel Hailfinger > wrote: >> Auf 11.03.2011 01:19, Jan Kiszka schrieb: >>> At least it's an in-band interface, which is the better choice as we >>> currently only have a PIIX3 southbridge for x86, predatin

[Qemu-devel] [PATCH 06/15] qapi: add code generators for QMP command marshaling

2011-03-11 Thread Anthony Liguori
This generates qmp.h which contains the declarations of all of QMP functions to be dispatched, plus a function that registers marshallers for each of the QMP functions. Signed-off-by: Anthony Liguori --- v1 -> v2 - change code generator to use multiline - proxy support - async command support

Re: [Qemu-devel] [PATCH 10/11] json-streamer: limit the maximum recursion depth and maximum token count

2011-03-11 Thread Michael Roth
On 03/11/2011 03:00 PM, Anthony Liguori wrote: The JSON parse we use is a recursive decent parser which means that recursion is used to backtrack. To avoid stack overflows from malformed input, we need to limit recursion depth. Fortunately, we know the maximum recursion depth in the message par

[Qemu-devel] [PATCH 14/15] qapi: add test-libqmp

2011-03-11 Thread Anthony Liguori
This provides a glib-test based testing framework for QMP Signed-off-by: Anthony Liguori diff --git a/Makefile b/Makefile index 5170675..1d363d7 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,8 @@ defconfig: -include config-all-devices.mak +TOOLS += test-libqmp + build-all: $(DOCS) $(TO

[Qemu-devel] Re: [PATCH 01/15] qapi: add code generator for qmp-types (v2)

2011-03-11 Thread Anthony Liguori
On 03/11/2011 05:05 PM, Anthony Liguori wrote: Only generate qmp-types.[ch]. These files contain the type definitions for QMP along with the alloc/free functions for these types. Functions to convert enum values to integers and vice versa are also included. qmp-types is used both within QEMU a

Re: [Qemu-devel] [PATCH 6/7] softfloat: Add float*_min() and float*_max() functions

2011-03-11 Thread Peter Maydell
On 11 March 2011 18:28, Nathan Froyd wrote: > On Fri, Mar 11, 2011 at 06:12:25PM +, Peter Maydell wrote: >> Add min and max operations to softfloat. This allows us to implement >> propagation of NaNs and handling of negative zero correctly (unlike >> the approach of having target helper routin

[Qemu-devel] Opportunity

2011-03-11 Thread Daniel Matei
Hello, I am developing an international business and I am looking for 2 partners. I entered innovative technologies with international monopoly. The company is listed on NYSE.com and FORBES Magazine Award. The information are PUBLIC. If you are interested to find more about it, please rep