Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-05-01 Thread Le Tan
2014-04-24 19:38 GMT+08:00 Andreas Färber :
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Am 24.04.2014 08:19, schrieb Jan Kiszka:
>> On 2014-04-23 11:25, Stefan Hajnoczi wrote:
>>> Dear QEMU, Libvirt, and KVM communities, We are participating in
>>> Google Summer of Code 2014 (http://google-melange.com/) and
>>> Outreach Program for Women (http://opw.gnome.org/).  Both
>>> programs fund candidates to work on our open source projects for
>>> 12 weeks this summer.
>>
>> To follow up on this: I'm currently looking for optional tiny
>> "warmup" tasks for our QEMU students during the bonding period
>> (till May 18). If you have any trivial issues or extensions in mind
>> that someone could address within a few days or even hours, that
>> would be perfect. It could even be something like "reformat the
>> printing of these messages" or so.
>
> Replacing some more fprintf(stderr, "foo\n") with error_report("foo")
> comes to mind. :)

Hi,
Having consulted my mentor, I want to pick up this as the warm-up
task.:) I will dig into it in the following
days and learn how to contribute in the community.
Thanks!

--Le Tan



Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-25 Thread Marc Marí
2014-04-25 14:25 GMT+02:00 Andreas Färber :
>
> Am 25.04.2014 11:22, schrieb Peter Crosthwaite:
> > On Fri, Apr 25, 2014 at 5:55 PM, Marc Marí 
wrote:
> >> I'm now looking at the conditional fprintf's. I'll need a bit of help
later
> >> in sending the patches :D.
>
> For starters, please use plain text format mails and don't top-post. :)
>
> > CC me in on the results.
>
> Me, too, please. If you search the archives, you will find that I
> already tried this for target-* and there were a lot of discussions
> surrounding DOs and DON'Ts.
> https://github.com/afaerber/qemu-cpu/commits/dprintf is still in a state
> I was instructed to, but that was later considered too
> performance-intrusive due to variable usage.
>
> In particular I believe we concluded that unlike Peter's pseudocode we
> need separate preprocessor macro naming between how the user enables it
> and how we check it inside the macro. Also macros should not end in a
> semicolon.
>

I see your code is a lot more intrusive. I'm doing as Peter said:
separating the print code macro as a conditional with parameter the other
macro, from this (in xen-all.c):
 #ifdef DEBUG_XEN
#define DPRINTF(fmt, ...) \
do { fprintf(stderr, "xen: " fmt, ## __VA_ARGS__); } while (0)
#else
#define DPRINTF(fmt, ...) \
do { } while (0)
#endif

to this:
#ifndef DEBUG_XEN
#define DEBUG_XEN 0
#endif

#define DPRINTF(fmt, ...) \
do { \
if(DEBUG_XEN) { \
fprintf(stderr, "xen: " fmt, ## __VA_ARGS__); \
} \
} while (0)

I expect this is the way you were thinking. I've modified three files
already, and when I have a few more, I'll start looking to how do you send
the patches properly formatted to the list.

> Regards,
> Andreas
>
> P.S. "Here" probably didn't strictly mean replying to Jan's message. ;)
>

P.S. I'm going offtopic to this thread, and probably I should start
another.

> --
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg


Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-25 Thread Andreas Färber
Am 25.04.2014 11:22, schrieb Peter Crosthwaite:
> On Fri, Apr 25, 2014 at 5:55 PM, Marc Marí  
> wrote:
>> I'm now looking at the conditional fprintf's. I'll need a bit of help later
>> in sending the patches :D.

For starters, please use plain text format mails and don't top-post. :)

> CC me in on the results.

Me, too, please. If you search the archives, you will find that I
already tried this for target-* and there were a lot of discussions
surrounding DOs and DON'Ts.
https://github.com/afaerber/qemu-cpu/commits/dprintf is still in a state
I was instructed to, but that was later considered too
performance-intrusive due to variable usage.

In particular I believe we concluded that unlike Peter's pseudocode we
need separate preprocessor macro naming between how the user enables it
and how we check it inside the macro. Also macros should not end in a
semicolon.

Regards,
Andreas

P.S. "Here" probably didn't strictly mean replying to Jan's message. ;)

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-25 Thread Andreas Färber
Am 25.04.2014 08:38, schrieb Markus Armbruster:
> Andreas Färber  writes:
> 
>> Am 24.04.2014 08:19, schrieb Jan Kiszka:
>>> On 2014-04-23 11:25, Stefan Hajnoczi wrote:
 Dear QEMU, Libvirt, and KVM communities, We are participating in
 Google Summer of Code 2014 (http://google-melange.com/) and
 Outreach Program for Women (http://opw.gnome.org/).  Both
 programs fund candidates to work on our open source projects for
 12 weeks this summer.
>>>
>>> To follow up on this: I'm currently looking for optional tiny
>>> "warmup" tasks for our QEMU students during the bonding period
>>> (till May 18). If you have any trivial issues or extensions in mind
>>> that someone could address within a few days or even hours, that
>>> would be perfect. It could even be something like "reformat the
>>> printing of these messages" or so.
>>
>> Replacing some more fprintf(stderr, "foo\n") with error_report("foo")
>> comes to mind. :)
> 
> A logical next step after this kind of warmup would be a simple
> conversion to error_set().  Perhaps a good place to start would be
> qmp_chardev_add().  The switch there has some cases converted already.
> Convert one or more of the remaining ones.  Beware of the rabbit holes!
[snip]

Jumping in on error_set*(), a cute idea might be to evaluate improving
error_propagate(). Right now, it just pointer-wise (or contents-wise?)
propagates the supplied Error object. This may lead to the root error
cause being badly understandable for the end user in a long chain of
propagations. Think of realizing a SoC device or a PCI host bridge,
which in turn has child objects getting realized, doing things in their
realize function that might fail: We may end up getting a standard error
such as "Permission denied" without any context of where or why. Compare
that to Java where you'd get (too verbose) recursive Exception objects
telling you that this failed because that failed because that failed.
While it might not be handy to introduce recursively allocated Error
objects, simply prepending something to the Error's description should
be more easily doable, i.e. error_propagate_foo(errp, local_err, "Foo
failed") -> "Foo failed: Original message".

On that matter, I had once sprouted the idea of introducing a statically
allocated error_oom, similar to error_abort, for avoiding aborts on
out-of-memory for user-initiated operations such as hot-add. Unlike the
scenario described above, the idea here is to avoid any dynamic
allocations, to make it safer to work with guests in low memory
situations. This also involves avoiding the aborting object_new() in
favor of g_try_malloc() together with a proposed QOM API extension for
obtaining the .instance_size of a type:
http://patchwork.ozlabs.org/patch/269591/

Cheers,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-25 Thread Daniel P. Berrange
On Thu, Apr 24, 2014 at 08:19:19AM +0200, Jan Kiszka wrote:
> On 2014-04-23 11:25, Stefan Hajnoczi wrote:
> > Dear QEMU, Libvirt, and KVM communities,
> > We are participating in Google Summer of Code 2014
> > (http://google-melange.com/) and Outreach Program for Women
> > (http://opw.gnome.org/).  Both programs fund candidates to work on our
> > open source projects for 12 weeks this summer.
> 
> To follow up on this: I'm currently looking for optional tiny "warmup"
> tasks for our QEMU students during the bonding period (till May 18). If
> you have any trivial issues or extensions in mind that someone could
> address within a few days or even hours, that would be perfect. It could
> even be something like "reformat the printing of these messages" or so.
> 
> We used this mechanism last year with the KVM student quite
> successfully. The idea is to give the student very early a chance to get
> in contact with the community and with the patch submission & review
> procedure. So the focus is more on dealing with patches than on solving
> a technical problem in QEMU. If all works fine, this should encourage
> her/him to work with the community right from the beginning, ask
> question, post things early etc.

Currently QEMU uses a handful of GCC warning flags:

  -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
  -Wmissing-prototypes -fno-strict-aliasing -fno-common -Wendif-labels
  -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security
  -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration
  -Wold-style-definition -Wtype-limits

There are a lot more gcc warning flags that are potentially useful
to QEMU. For example libvirt builds with this (possibly insanely)
large set:

  -W -Waddress -Waggressive-loop-optimizations -Wall -Warray-bounds
  -Wattributes -Wbad-function-cast -Wbuiltin-macro-redefined -Wcast-align
  -Wchar-subscripts -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch
  -Wcpp -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero
  -Wdouble-promotion -Wempty-body -Wendif-labels -Wextra -Wformat-contains-nul
  -Wformat-extra-args -Wformat-security -Wformat-y2k -Wformat-zero-length
  -Wfree-nonheap-object -Wignored-qualifiers -Wimplicit
  -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Winline
  -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wjump-misses-init
  -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmissing-braces
  -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs
  -Wmissing-parameter-type -Wmissing-prototypes -Wmultichar -Wnarrowing
  -Wnested-externs -Wnonnull -Wnormalized=nfc -Wold-style-declaration
  -Wold-style-definition -Woverflow -Woverride-init -Wpacked-bitfield-compat
  -Wparentheses -Wpointer-arith -Wpointer-sign -Wpointer-to-int-cast
  -Wpragmas -Wreturn-local-addr -Wreturn-type -Wsequence-point -Wshadow
  -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-prototypes
  -Wsuggest-attribute=const -Wsuggest-attribute=format
  -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wswitch -Wsync-nand
  -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas
  -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable
  -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-parameter
  -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros
  -Wvector-operation-performance -Wvolatile-register-var -Wwrite-strings
  -Wno-sign-compare -Wjump-misses-init -Wno-format-nonliteral
  -Wframe-larger-than=4096 -Wno-suggest-attribute=pure
  -Wno-suggest-attribute=const 

I've previously submitted a patch series which attempted to enable some
more of these for QEMU, but I never got time to address the feedback I
received on it. Might be something someone can pick up from where I left
off...

  http://lists.gnu.org/archive/html/qemu-devel/2012-04/msg00085.html


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|



Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-25 Thread Peter Crosthwaite
On Fri, Apr 25, 2014 at 5:55 PM, Marc Marí  wrote:
> I'm now looking at the conditional fprintf's. I'll need a bit of help later
> in sending the patches :D.
>

CC me in on the results.

Regards,
Peter

> Marc
>
>
> 2014-04-25 9:24 GMT+02:00 Jan Kiszka :
>
>> On 2014-04-24 08:19, Jan Kiszka wrote:
>> > On 2014-04-23 11:25, Stefan Hajnoczi wrote:
>> >> Dear QEMU, Libvirt, and KVM communities,
>> >> We are participating in Google Summer of Code 2014
>> >> (http://google-melange.com/) and Outreach Program for Women
>> >> (http://opw.gnome.org/).  Both programs fund candidates to work on our
>> >> open source projects for 12 weeks this summer.
>> >
>> > To follow up on this: I'm currently looking for optional tiny "warmup"
>> > tasks for our QEMU students during the bonding period (till May 18). If
>> > you have any trivial issues or extensions in mind that someone could
>> > address within a few days or even hours, that would be perfect. It could
>> > even be something like "reformat the printing of these messages" or so.
>> >
>> > We used this mechanism last year with the KVM student quite
>> > successfully. The idea is to give the student very early a chance to get
>> > in contact with the community and with the patch submission & review
>> > procedure. So the focus is more on dealing with patches than on solving
>> > a technical problem in QEMU. If all works fine, this should encourage
>> > her/him to work with the community right from the beginning, ask
>> > question, post things early etc.
>>
>> Thanks for all these suggestion so far! I personally wasn't able to look
>> into them in details yet.
>>
>> A wish to the mentors and students: if someone picks up a task, please
>> drop a note here so that we can avoid duplicate work!
>>
>> Jan
>>
>



Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-25 Thread Marc Marí
I'm now looking at the conditional fprintf's. I'll need a bit of help later
in sending the patches :D.

Marc


2014-04-25 9:24 GMT+02:00 Jan Kiszka :

> On 2014-04-24 08:19, Jan Kiszka wrote:
> > On 2014-04-23 11:25, Stefan Hajnoczi wrote:
> >> Dear QEMU, Libvirt, and KVM communities,
> >> We are participating in Google Summer of Code 2014
> >> (http://google-melange.com/) and Outreach Program for Women
> >> (http://opw.gnome.org/).  Both programs fund candidates to work on our
> >> open source projects for 12 weeks this summer.
> >
> > To follow up on this: I'm currently looking for optional tiny "warmup"
> > tasks for our QEMU students during the bonding period (till May 18). If
> > you have any trivial issues or extensions in mind that someone could
> > address within a few days or even hours, that would be perfect. It could
> > even be something like "reformat the printing of these messages" or so.
> >
> > We used this mechanism last year with the KVM student quite
> > successfully. The idea is to give the student very early a chance to get
> > in contact with the community and with the patch submission & review
> > procedure. So the focus is more on dealing with patches than on solving
> > a technical problem in QEMU. If all works fine, this should encourage
> > her/him to work with the community right from the beginning, ask
> > question, post things early etc.
>
> Thanks for all these suggestion so far! I personally wasn't able to look
> into them in details yet.
>
> A wish to the mentors and students: if someone picks up a task, please
> drop a note here so that we can avoid duplicate work!
>
> Jan
>
>


Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-25 Thread Jan Kiszka
On 2014-04-24 08:19, Jan Kiszka wrote:
> On 2014-04-23 11:25, Stefan Hajnoczi wrote:
>> Dear QEMU, Libvirt, and KVM communities,
>> We are participating in Google Summer of Code 2014
>> (http://google-melange.com/) and Outreach Program for Women
>> (http://opw.gnome.org/).  Both programs fund candidates to work on our
>> open source projects for 12 weeks this summer.
> 
> To follow up on this: I'm currently looking for optional tiny "warmup"
> tasks for our QEMU students during the bonding period (till May 18). If
> you have any trivial issues or extensions in mind that someone could
> address within a few days or even hours, that would be perfect. It could
> even be something like "reformat the printing of these messages" or so.
> 
> We used this mechanism last year with the KVM student quite
> successfully. The idea is to give the student very early a chance to get
> in contact with the community and with the patch submission & review
> procedure. So the focus is more on dealing with patches than on solving
> a technical problem in QEMU. If all works fine, this should encourage
> her/him to work with the community right from the beginning, ask
> question, post things early etc.

Thanks for all these suggestion so far! I personally wasn't able to look
into them in details yet.

A wish to the mentors and students: if someone picks up a task, please
drop a note here so that we can avoid duplicate work!

Jan



signature.asc
Description: OpenPGP digital signature


Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-24 Thread Markus Armbruster
Andreas Färber  writes:

> Am 24.04.2014 08:19, schrieb Jan Kiszka:
>> On 2014-04-23 11:25, Stefan Hajnoczi wrote:
>>> Dear QEMU, Libvirt, and KVM communities, We are participating in
>>> Google Summer of Code 2014 (http://google-melange.com/) and
>>> Outreach Program for Women (http://opw.gnome.org/).  Both
>>> programs fund candidates to work on our open source projects for
>>> 12 weeks this summer.
>> 
>> To follow up on this: I'm currently looking for optional tiny
>> "warmup" tasks for our QEMU students during the bonding period
>> (till May 18). If you have any trivial issues or extensions in mind
>> that someone could address within a few days or even hours, that
>> would be perfect. It could even be something like "reformat the
>> printing of these messages" or so.
>
> Replacing some more fprintf(stderr, "foo\n") with error_report("foo")
> comes to mind. :)

A logical next step after this kind of warmup would be a simple
conversion to error_set().  Perhaps a good place to start would be
qmp_chardev_add().  The switch there has some cases converted already.
Convert one or more of the remaining ones.  Beware of the rabbit holes!
In case of vertigo, contact your mentor immediately ;)

[...]



Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-24 Thread Fam Zheng
On Thu, 04/24 08:19, Jan Kiszka wrote:
> On 2014-04-23 11:25, Stefan Hajnoczi wrote:
> > Dear QEMU, Libvirt, and KVM communities,
> > We are participating in Google Summer of Code 2014
> > (http://google-melange.com/) and Outreach Program for Women
> > (http://opw.gnome.org/).  Both programs fund candidates to work on our
> > open source projects for 12 weeks this summer.
> 
> To follow up on this: I'm currently looking for optional tiny "warmup"
> tasks for our QEMU students during the bonding period (till May 18). If
> you have any trivial issues or extensions in mind that someone could
> address within a few days or even hours, that would be perfect. It could
> even be something like "reformat the printing of these messages" or so.

Jan,

A simple task:

There are a few "if (error_is_set(&ERR_VAR))" that could be converted to "if
(ERR_VAR)".

Thanks,
Fam

> 
> We used this mechanism last year with the KVM student quite
> successfully. The idea is to give the student very early a chance to get
> in contact with the community and with the patch submission & review
> procedure. So the focus is more on dealing with patches than on solving
> a technical problem in QEMU. If all works fine, this should encourage
> her/him to work with the community right from the beginning, ask
> question, post things early etc.
> 
> Jan
> 
> 





Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-24 Thread Fam Zheng
On Fri, 04/25 11:01, Fam Zheng wrote:
> On Thu, 04/24 08:19, Jan Kiszka wrote:
> > On 2014-04-23 11:25, Stefan Hajnoczi wrote:
> > > Dear QEMU, Libvirt, and KVM communities,
> > > We are participating in Google Summer of Code 2014
> > > (http://google-melange.com/) and Outreach Program for Women
> > > (http://opw.gnome.org/).  Both programs fund candidates to work on our
> > > open source projects for 12 weeks this summer.
> > 
> > To follow up on this: I'm currently looking for optional tiny "warmup"
> > tasks for our QEMU students during the bonding period (till May 18). If
> > you have any trivial issues or extensions in mind that someone could
> > address within a few days or even hours, that would be perfect. It could
> > even be something like "reformat the printing of these messages" or so.
> 
> (Previous sending seems lost, send again)
> 
> Jan,
> 
> A simple task:
> 
> There are a few "if (error_is_set(&ERR_VAR))" that could be converted to "if
> (ERR_VAR)".
> 

Ignore this please, Markus has a patch on the list already.

[PATCH 1/5] Use error_is_set() only when necessary (again)

Thanks,
Fam



Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-24 Thread Stefan Hajnoczi
On Thu, Apr 24, 2014 at 04:45:00PM +1000, Peter Crosthwaite wrote:
> Convert conditional compilation of debug printfs to regular ifs.
> 
> good:
> 
> #ifdef DEBUG_FOO
> #define DEBUG_FOO 0
> #endif
> 
> #define DB_PRINTF \
>   if (DEBUG_FOO) { \
>  fprintf(...) \
>   }
> 
> bad:
> 
> #ifdef DEBUG_FOO
> #define DB_PRINTF
>  fprintf(...) \
> #else
> #define DB_PRINTF do { } while(0);
> #endif
> 
> The reasoning is so that debug messages and their formats will always
> be compile tested regardless of whether they are wanted at run time.

Yes, please!  There are many files that use the "bad" approach and can
be easily converted.

Stefan



Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-24 Thread Fam Zheng
On Thu, 04/24 08:19, Jan Kiszka wrote:
> On 2014-04-23 11:25, Stefan Hajnoczi wrote:
> > Dear QEMU, Libvirt, and KVM communities,
> > We are participating in Google Summer of Code 2014
> > (http://google-melange.com/) and Outreach Program for Women
> > (http://opw.gnome.org/).  Both programs fund candidates to work on our
> > open source projects for 12 weeks this summer.
> 
> To follow up on this: I'm currently looking for optional tiny "warmup"
> tasks for our QEMU students during the bonding period (till May 18). If
> you have any trivial issues or extensions in mind that someone could
> address within a few days or even hours, that would be perfect. It could
> even be something like "reformat the printing of these messages" or so.

(Previous sending seems lost, send again)

Jan,

A simple task:

There are a few "if (error_is_set(&ERR_VAR))" that could be converted to "if
(ERR_VAR)".

Thanks,
Fam

> 
> We used this mechanism last year with the KVM student quite
> successfully. The idea is to give the student very early a chance to get
> in contact with the community and with the patch submission & review
> procedure. So the focus is more on dealing with patches than on solving
> a technical problem in QEMU. If all works fine, this should encourage
> her/him to work with the community right from the beginning, ask
> question, post things early etc.
> 
> Jan
> 
> 





Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-24 Thread Andreas Färber
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 24.04.2014 08:19, schrieb Jan Kiszka:
> On 2014-04-23 11:25, Stefan Hajnoczi wrote:
>> Dear QEMU, Libvirt, and KVM communities, We are participating in
>> Google Summer of Code 2014 (http://google-melange.com/) and
>> Outreach Program for Women (http://opw.gnome.org/).  Both
>> programs fund candidates to work on our open source projects for
>> 12 weeks this summer.
> 
> To follow up on this: I'm currently looking for optional tiny
> "warmup" tasks for our QEMU students during the bonding period
> (till May 18). If you have any trivial issues or extensions in mind
> that someone could address within a few days or even hours, that
> would be perfect. It could even be something like "reformat the
> printing of these messages" or so.

Replacing some more fprintf(stderr, "foo\n") with error_report("foo")
comes to mind. :)

I'd also be happy to get some more stub qtests for devices not by
default in any machines, in particular PCI devices.
Cf. https://github.com/afaerber/qemu-cpu/commits/qtest

There's probably also still enough QOM DO_UPCAST() cleanups to be
done, but they too would need test cases to avoid yet another
two-distinct-devices-share-struct bug [*].

If someone had a cool idea how to figure out which devices (QOM types)
are being covered by qtests at all (and thus, which are missing) that
would be appreciated - but probably too involved for a newbie.

Cheers,
Andreas

[*]
http://git.qemu-project.org/?p=qemu.git;a=commit;h=19d46d711d93cb3a37dada945cb3410278b94bc3

- -- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJTWPeyAAoJEPou0S0+fgE/RykP/jZ9Tjrk/v6tRSwxnBLgyo5F
QMD/SrjBrX5JkBtQu2+T10mV2RGLuMobbTxqzFKcE4VVaEcCjr+q2LzDcYuXv6I6
GdGOnos83MnuBrbvGqCsfGorcW9xRzSrYqXUdIH8bc0Z0MDwuBA+Hliy2/e/TOz/
umIQU8wyHW8pQrxXZuc17ZJPy0gbXV7KzO/e9lLfcq6kbj/CdNLUbAlsH7l/mVdr
fn1HvOU7thTVJxxrdIS78b6TaWhv/c6Uua2NsaqfkLsRzBL74oN+d5gbhOn9bcIT
3b64xS8so06DNfC5eJt/2U3EOT3riW+O5+h96kMwTkcAIl2N+y6LFSJvUNu7vbCJ
oSWZNjqaBPmu/0hqh6TdG+mBzGFUz7H8846PtcnELipVfx0ASR2PdU9h5dwIqqjT
J7sC2nua4j5nsS89BQHb31fHi8HPi5BMfan9YHXsWKox+ItYQX1gLHdlRMurev2+
8A3Dg6+zGibyv+BHXFcWUqLAXq9VkTs+pZ9mNMbEnCAyEFlSut1kqEtyF87MhjtD
yCo+VMsnI+5ShcI0VQpqvPunzIA07tLZNfsu+KJBnhxdmG5JQmfUyveTYuZms2t+
pcQaDyZZNHZJ4sqPQqDjK/i0DJ+qeAi+HSZMyFfg4/6bVVJ0h7ryWPirgdFqqL16
hAskg5UV0FK7Rw5nbjpP
=cCL5
-END PGP SIGNATURE-



Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-23 Thread Peter Crosthwaite
On Thu, Apr 24, 2014 at 4:45 PM, Peter Crosthwaite
 wrote:
> Hi Jan,
>
> IDEA1:
>
> "Convert existing device models to use FIFO API" is one. FIFO API is a
> factored out circular buffer helper that avoids having all the head
> and tail pointer arithmetic in every device model.
>
> Check util/fifo.c
>
> git grep -i fifo hw
>
> will hit candidate device models.
>
> The biggest obstacle is VMSD. But for ARM VMSD version bumps are
> torerable and for Microblaze (which has several candidates) they are a
> total non issue. In some cases FIFO API use cases can be converted
> with full backwards compatibility (like I did for serial.c) if you
> resort to migrating the private struct fields.
>
> IDEA2:
>
> Convert conditional compilation of debug printfs to regular ifs.
>
> good:
>
> #ifdef DEBUG_FOO

#ifndef

sry

Regards,
Peter

> #define DEBUG_FOO 0
> #endif
>
> #define DB_PRINTF \
>   if (DEBUG_FOO) { \
>  fprintf(...) \
>   }
>
> bad:
>
> #ifdef DEBUG_FOO
> #define DB_PRINTF
>  fprintf(...) \
> #else
> #define DB_PRINTF do { } while(0);
> #endif
>
> The reasoning is so that debug messages and their formats will always
> be compile tested regardless of whether they are wanted at run time.
>
> Regards,
> Peter
>
> On Thu, Apr 24, 2014 at 4:19 PM, Jan Kiszka  wrote:
>> On 2014-04-23 11:25, Stefan Hajnoczi wrote:
>>> Dear QEMU, Libvirt, and KVM communities,
>>> We are participating in Google Summer of Code 2014
>>> (http://google-melange.com/) and Outreach Program for Women
>>> (http://opw.gnome.org/).  Both programs fund candidates to work on our
>>> open source projects for 12 weeks this summer.
>>
>> To follow up on this: I'm currently looking for optional tiny "warmup"
>> tasks for our QEMU students during the bonding period (till May 18). If
>> you have any trivial issues or extensions in mind that someone could
>> address within a few days or even hours, that would be perfect. It could
>> even be something like "reformat the printing of these messages" or so.
>>
>> We used this mechanism last year with the KVM student quite
>> successfully. The idea is to give the student very early a chance to get
>> in contact with the community and with the patch submission & review
>> procedure. So the focus is more on dealing with patches than on solving
>> a technical problem in QEMU. If all works fine, this should encourage
>> her/him to work with the community right from the beginning, ask
>> question, post things early etc.
>>
>> Jan
>>
>>



Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-23 Thread Peter Crosthwaite
Hi Jan,

IDEA1:

"Convert existing device models to use FIFO API" is one. FIFO API is a
factored out circular buffer helper that avoids having all the head
and tail pointer arithmetic in every device model.

Check util/fifo.c

git grep -i fifo hw

will hit candidate device models.

The biggest obstacle is VMSD. But for ARM VMSD version bumps are
torerable and for Microblaze (which has several candidates) they are a
total non issue. In some cases FIFO API use cases can be converted
with full backwards compatibility (like I did for serial.c) if you
resort to migrating the private struct fields.

IDEA2:

Convert conditional compilation of debug printfs to regular ifs.

good:

#ifdef DEBUG_FOO
#define DEBUG_FOO 0
#endif

#define DB_PRINTF \
  if (DEBUG_FOO) { \
 fprintf(...) \
  }

bad:

#ifdef DEBUG_FOO
#define DB_PRINTF
 fprintf(...) \
#else
#define DB_PRINTF do { } while(0);
#endif

The reasoning is so that debug messages and their formats will always
be compile tested regardless of whether they are wanted at run time.

Regards,
Peter

On Thu, Apr 24, 2014 at 4:19 PM, Jan Kiszka  wrote:
> On 2014-04-23 11:25, Stefan Hajnoczi wrote:
>> Dear QEMU, Libvirt, and KVM communities,
>> We are participating in Google Summer of Code 2014
>> (http://google-melange.com/) and Outreach Program for Women
>> (http://opw.gnome.org/).  Both programs fund candidates to work on our
>> open source projects for 12 weeks this summer.
>
> To follow up on this: I'm currently looking for optional tiny "warmup"
> tasks for our QEMU students during the bonding period (till May 18). If
> you have any trivial issues or extensions in mind that someone could
> address within a few days or even hours, that would be perfect. It could
> even be something like "reformat the printing of these messages" or so.
>
> We used this mechanism last year with the KVM student quite
> successfully. The idea is to give the student very early a chance to get
> in contact with the community and with the patch submission & review
> procedure. So the focus is more on dealing with patches than on solving
> a technical problem in QEMU. If all works fine, this should encourage
> her/him to work with the community right from the beginning, ask
> question, post things early etc.
>
> Jan
>
>



Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-23 Thread Marc Marí
I was waiting to chat with my mentors, but I wanted to ask the same thing.
So, if you have any, I'm also interested.

Marc


2014-04-24 8:19 GMT+02:00 Jan Kiszka :

> On 2014-04-23 11:25, Stefan Hajnoczi wrote:
> > Dear QEMU, Libvirt, and KVM communities,
> > We are participating in Google Summer of Code 2014
> > (http://google-melange.com/) and Outreach Program for Women
> > (http://opw.gnome.org/).  Both programs fund candidates to work on our
> > open source projects for 12 weeks this summer.
>
> To follow up on this: I'm currently looking for optional tiny "warmup"
> tasks for our QEMU students during the bonding period (till May 18). If
> you have any trivial issues or extensions in mind that someone could
> address within a few days or even hours, that would be perfect. It could
> even be something like "reformat the printing of these messages" or so.
>
> We used this mechanism last year with the KVM student quite
> successfully. The idea is to give the student very early a chance to get
> in contact with the community and with the patch submission & review
> procedure. So the focus is more on dealing with patches than on solving
> a technical problem in QEMU. If all works fine, this should encourage
> her/him to work with the community right from the beginning, ask
> question, post things early etc.
>
> Jan
>
>
>


[Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-23 Thread Jan Kiszka
On 2014-04-23 11:25, Stefan Hajnoczi wrote:
> Dear QEMU, Libvirt, and KVM communities,
> We are participating in Google Summer of Code 2014
> (http://google-melange.com/) and Outreach Program for Women
> (http://opw.gnome.org/).  Both programs fund candidates to work on our
> open source projects for 12 weeks this summer.

To follow up on this: I'm currently looking for optional tiny "warmup"
tasks for our QEMU students during the bonding period (till May 18). If
you have any trivial issues or extensions in mind that someone could
address within a few days or even hours, that would be perfect. It could
even be something like "reformat the printing of these messages" or so.

We used this mechanism last year with the KVM student quite
successfully. The idea is to give the student very early a chance to get
in contact with the community and with the patch submission & review
procedure. So the focus is more on dealing with patches than on solving
a technical problem in QEMU. If all works fine, this should encourage
her/him to work with the community right from the beginning, ask
question, post things early etc.

Jan




signature.asc
Description: OpenPGP digital signature