[Qemu-devel] [PATCH 3/4] trace: Clean up the "try to update atomic until it worked" loops

2013-01-25 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- trace/simple.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/trace/simple.c b/trace/simple.c index 592ff48..74701e3 100644 --- a/trace/simple.c +++ b/trace/simple.c @@ -171,13 +171,10 @@ static gpointer

[Qemu-devel] [PATCH 4/4] trace: Fix location of simpletrace.py in docs

2013-01-25 Thread Markus Armbruster
Missed when commit 4c3b5a48 moved it. Signed-off-by: Markus Armbruster --- docs/tracing.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tracing.txt b/docs/tracing.txt index 453cc4a..14db3bf 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -23,7 +23,7

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-25 Thread Markus Armbruster
Blue Swirl writes: > On Thu, Jan 24, 2013 at 5:17 PM, Andreas Färber wrote: >> Am 17.01.2013 21:13, schrieb Blue Swirl: >>> On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi wrote: Tell me what you consider the "correct" tab width for readers and I'll find a piece of QEMU code that was

Re: [Qemu-devel] hd-geo-test failing on OpenIndiana

2013-01-27 Thread Markus Armbruster
Andreas Färber writes: > Hello Markus, > > On OpenIndiana 151a7 I am seeing assertion failures for ret == 0 in > hd-geo-test.c:35:create_test_img(). It seems it is refusing to blow up > the temporary file. Any suggestion what to do about that? Fine print on ftruncate(): If fildes refers to

Re: [Qemu-devel] [PATCH v2 0/6] bdrv_open() error return fixes

2013-01-28 Thread Markus Armbruster
You addressed all my comments. Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v2 2/5] block: Use error code EMEDIUMTYPE for wrong format in some block drivers

2013-01-28 Thread Markus Armbruster
Stefan Weil writes: > Kevin, Stefan, maybe you can take patches 1, 3, 4 and 5 from > this series, so I don't have to resend them. > > I'll split patch 2 in order to realize Markus' suggestion. > Or you take it as it is, resulting in half-broken (instead of > full broken) xxx_open functions, and p

Re: [Qemu-devel] [PATCH V11 3/4] Use QemuOpts support in block layer

2013-01-28 Thread Markus Armbruster
Dong Xu Wang writes: > Markus Armbruster writes: >> Dong Xu Wang writes: >> >>> This patch will use QemuOpts related functions in block layer, add >>> a member bdrv_create_options to BlockDriver struct, it will return >>> a QemuOptsList pointer

Re: [Qemu-devel] [RFC 10/19] target-alpha: Refactor debug output macros

2013-01-29 Thread Markus Armbruster
Peter Maydell writes: > On 28 January 2013 19:14, Andreas Färber wrote: >> Am 28.01.2013 19:59, schrieb Peter Maydell: >>> Er, what? "do ... while (0)" is completely standard practice >>> for writing robust macros in C. Patches which don't do that >>> should fail code review. >> >> Oh really? No

Re: [Qemu-devel] [PATCH V11 3/4] Use QemuOpts support in block layer

2013-01-29 Thread Markus Armbruster
Dong Xu Wang writes: > Markus Armbruster writes: >> Dong Xu Wang writes: >> >>> Markus Armbruster writes: >>>> Dong Xu Wang writes: [...] >>>>> @@ -264,17 +264,13 @@ static int cow_create(const char *filename, >&

Re: [Qemu-devel] [RFC 10/19] target-alpha: Refactor debug output macros

2013-01-29 Thread Markus Armbruster
Andreas Färber writes: > Am 28.01.2013 22:10, schrieb Peter Maydell: > [lengthy discussion of what may go wrong without do { ... } while (0)] > > We seem to to agree to disagree here. > > The use of an if (foo) { ... } inside Fred's macro (or my pseudocode?) > was what prompted this whole mess, s

Re: [Qemu-devel] [RFC 10/19] target-alpha: Refactor debug output macros

2013-01-29 Thread Markus Armbruster
Andreas Färber writes: > Am 29.01.2013 11:03, schrieb Markus Armbruster: >> Andreas Färber writes: >> >>> b) Working around an issue resulting from hiding C statements inside a >>> preprocessor macro is totally backwards compared to properly using the C >

Re: [Qemu-devel] [PATCH] hmp: hmp_memchar_read(): skip non-printable chars

2013-01-29 Thread Markus Armbruster
Luiz Capitulino writes: > Otherwise we can get funny stuff printed and if the buffer contains > a '\0' char it won't be fully printed. > > Signed-off-by: Luiz Capitulino > --- > hmp.c | 14 -- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/hmp.c b/hmp.c > index

Re: [Qemu-devel] [PATCH] qemu-iotests: Test qcow2 image creation options

2013-01-29 Thread Markus Armbruster
ed. #define BLOCK_OPT_PREALLOC "preallocation" Check #define BLOCK_OPT_SUBFMT"subformat" Not covered, used by vmdk and vpc. #define BLOCK_OPT_COMPAT_LEVEL "compat" Check #define BLOCK_OPT_LAZY_REFCOUNTS"lazy_refcounts" Check Good enough for me, and matches commit message. > diff --git a/tests/qemu-iotests/048.out b/tests/qemu-iotests/048.out > new file mode 100644 > index 000..8569f3e > --- /dev/null > +++ b/tests/qemu-iotests/048.out [...] I figure this is simply current output, and we assume it's good. > diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group > index 1bbd2bf..a4175b2 100644 > --- a/tests/qemu-iotests/group > +++ b/tests/qemu-iotests/group > @@ -54,3 +54,4 @@ > 045 rw auto > 046 rw auto aio > 047 rw auto > +048 rw auto Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH] qemu-iotests: Test qcow2 image creation options

2013-01-29 Thread Markus Armbruster
Kevin Wolf writes: > Am 29.01.2013 14:43, schrieb Markus Armbruster: >>> +echo "=== Check correct interpretation of suffixes for image size ===" >>> +echo >>> +sizes="1024 1024b 1k 1K 1M 1G 1T " >>> +sizes+="1024.0 1024.0b 1

[Qemu-devel] What to do about non-qdevified devices? (was: KVM call minutes 2013-01-29)

2013-01-29 Thread Markus Armbruster
Anthony Liguori writes: [...] > The problems I ran into were (1) this is a lot of work (2) it basically > requires that all bus children have been qdev/QOM-ified. Even with > something like the ISA bus which is where I started, quite a few devices > were not qdevified still. So what's the plan

Re: [Qemu-devel] [PATCH] vmdk: Allow space in file name

2013-01-30 Thread Markus Armbruster
e as the file name, disallowing line breaks. > > Signed-off-by: Philipp Hahn Reviewed-by: Markus Armbruster

Re: [Qemu-devel] What to do about non-qdevified devices?

2013-01-30 Thread Markus Armbruster
Peter Maydell writes: > On 30 January 2013 07:02, Markus Armbruster wrote: >> Anthony Liguori writes: >> >> [...] >>> The problems I ran into were (1) this is a lot of work (2) it basically >>> requires that all bus children have been qdev/QOM-ified. E

Re: [Qemu-devel] KVM call minutes 2013-01-29 - Port I/O

2013-01-30 Thread Markus Armbruster
Peter Maydell writes: > On 30 January 2013 11:39, Andreas Färber wrote: >> Proposal by hpoussin was to move _list_add() code to ISADevice: >> http://lists.gnu.org/archive/html/qemu-devel/2013-01/msg00508.html >> >> Concerns: >> * PCI devices (VGA, QXL) register I/O ports as well >> => above pa

Re: [Qemu-devel] [PATCH 0/4] Fix misuse of atomics in trace/simple.c

2013-01-31 Thread Markus Armbruster
Ping? Markus Armbruster writes: > More old news: casting pointers considered harmful, and atomics > considered hard to use correctly. > > Markus Armbruster (4): > trace: Fix simple trace dropped event record for big endian > trace: Direct access of atomics is verboten, use

Re: [Qemu-devel] [PATCH] Fix monitor 'info registers' command on multi processor guests

2013-01-31 Thread Markus Armbruster
"Erlon Cruz" writes: > QEMU monitor command 'info registers' only displays information for the first > CPU. This fix that by show registers information for each CPU in the system This is incorrect. It displays information for the *current* CPU. Monitor command "cpu" selects the current CPU. I

Re: [Qemu-devel] [PATCH 1/4] trace: Fix simple trace dropped event record for big endian

2013-01-31 Thread Markus Armbruster
Laszlo Ersek writes: > comments in-line > > On 01/25/13 16:43, Markus Armbruster wrote: >> We use atomic operations to keep track of dropped events. >> >> Inconveniently, GLib supports only int and void * atomics, but the >> counter dropped_events is uint64_t. &

Re: [Qemu-devel] [PATCH] Fix monitor 'info registers' command on multi processor guests

2013-01-31 Thread Markus Armbruster
Luiz Capitulino writes: > On Thu, 31 Jan 2013 10:51:10 +0100 > Markus Armbruster wrote: > >> "Erlon Cruz" writes: >> >> > QEMU monitor command 'info registers' only displays information >> > for the first >> > CPU. Th

Re: [Qemu-devel] What to do about non-qdevified devices?

2013-01-31 Thread Markus Armbruster
Andreas Färber writes: > Am 30.01.2013 13:35, schrieb Markus Armbruster: >> Peter Maydell writes: >> >>> On 30 January 2013 07:02, Markus Armbruster wrote: >>>> Anthony Liguori writes: >>>> >>>> [...] >>>>&

Re: [Qemu-devel] [RFC][PATCH]Add timestamp to error message

2013-02-01 Thread Markus Armbruster
Seiji Aguchi writes: > [Issue] > When we offer a customer support service and a problem happens > in a customer's system, we try to understand the problem by > comparing what the customer reports with message logs of the > customer's system. > > In this case, we often need to know when the pro

Re: [Qemu-devel] [RFC][PATCH]Add timestamp to error message

2013-02-01 Thread Markus Armbruster
Seiji Aguchi writes: >> > Are gmtime() + strftime() unsuitable for some reason? >> >> They are not async-signal safe, so they are not usable in between a >> fork() and exec*(). Libvirt avoids them because it DOES log >> information including timestamps in between fork/exec (and prior to >> writ

Re: [Qemu-devel] [PATCH for-1.4] tests/test-string-input-visitor: Handle errors provoked by fuzz test

2013-02-03 Thread Markus Armbruster
[Note cc: Luiz] Peter Maydell writes: > On 2 February 2013 21:37, Andreas Färber wrote: >> Am 02.02.2013 22:19, schrieb Peter Maydell: >>> It's OK and expected for visitors to return errors when presented with >>> the fuzz test's random data. This means the test harness needs to >>> handle them

Re: [Qemu-devel] [PATCH] get_tmp_filename: add explicit error message

2013-02-04 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Fri, Feb 01, 2013 at 06:13:51PM +0100, Fabien Chouteau wrote: >> >> Signed-off-by: Fabien Chouteau >> --- >> block.c | 13 ++--- >> 1 file changed, 10 insertions(+), 3 deletions(-) > > Hi Fabien, > Please always CC qemu-devel@nongnu.org. All patches must

Re: [Qemu-devel] Question about default floppy and stdvga memory

2013-02-04 Thread Markus Armbruster
Fabio Fantoni writes: > I tried to disable "default floppy" without use -nodefaults option > that disable other things. > I didn't found other parameters to do that in docs and code for now. > Can someone tell me if there is another way to disable default floppy only? As far as I know, there is

Re: [Qemu-devel] [RFC][PATCH]Add timestamp to error message

2013-02-04 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Sat, Feb 02, 2013 at 08:31:45AM +0100, Markus Armbruster wrote: >> Seiji Aguchi writes: >> >> > [Issue] >> > When we offer a customer support service and a problem happens >> > in a customer's system, we try to und

Re: [Qemu-devel] [PATCH] get_tmp_filename: add explicit error message

2013-02-04 Thread Markus Armbruster
Fabien Chouteau writes: > On 02/04/2013 11:34 AM, Markus Armbruster wrote: >> Stefan Hajnoczi writes: >> >>> On Fri, Feb 01, 2013 at 06:13:51PM +0100, Fabien Chouteau wrote: >>>> >>>> Signed-off-by: Fabien Chouteau >>>> ---

Re: [Qemu-devel] Question about default floppy and stdvga memory

2013-02-04 Thread Markus Armbruster
Fabio Fantoni writes: > Il 04/02/2013 11:36, Markus Armbruster ha scritto: >> Fabio Fantoni writes: >> >>> I tried to disable "default floppy" without use -nodefaults option >>> that disable other things. >>> I didn't found other parame

Re: [Qemu-devel] [PATCH] block/raw-posix: detect readonly LVM volumes using BLKROGET

2013-02-04 Thread Markus Armbruster
Stefan Hajnoczi writes: > LVM volumes can be set read-only with "lvchange --permission r > ". The device node permissions remain unchanged so the volume > can still be opened O_RDWR. Actual writes will fail. Are you sure it's just LVM? blockdev(8) suggests it's a more general issue. Check ou

[Qemu-devel] [PATCH] check-qjson: More thorough testing of UTF-8 in strings

2013-02-04 Thread Markus Armbruster
and are to be replaced by correct ones as the bugs get fixed. See comments in new utf8_string() for details. Signed-off-by: Markus Armbruster --- tests/check-qjson.c | 625 1 file changed, 625 insertions(+) diff --git a/tests/check-qjson.c b/t

Re: [Qemu-devel] [PATCH] check-qjson: More thorough testing of UTF-8 in strings

2013-02-04 Thread Markus Armbruster
Paolo Bonzini writes: > Il 04/02/2013 18:19, Markus Armbruster ha scritto: >> +/* 2 Boundary condition test cases */ >> +/* 2.1 First possible sequence of a certain length */ >> +/* 2.1.5 5 bytes U+20 */ >> +{ >> +

Re: [Qemu-devel] [PATCH] check-qjson: More thorough testing of UTF-8 in strings

2013-02-04 Thread Markus Armbruster
Blue Swirl writes: > On Mon, Feb 4, 2013 at 5:19 PM, Markus Armbruster wrote: >> Test cases are scraped from Markus Kuhn's UTF-8 decoder capability and >> stress test at >> http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt > > There's no license. Ca

[Qemu-devel] [PATCH v2] check-qjson: More thorough testing of UTF-8 in strings

2013-02-05 Thread Markus Armbruster
and are to be replaced by correct ones as the bugs get fixed. See comments in new utf8_string() for details. Signed-off-by: Markus Armbruster --- tests/check-qjson.c | 664 1 file changed, 664 insertions(+) v2: long lines wrapped, a fe

Re: [Qemu-devel] [PATCH v2] block/raw-posix: detect readonly Linux block devices using BLKROGET

2013-02-05 Thread Markus Armbruster
> I/O error. > > This patch checks whether the block device is read-only so that Linux > block devices behave like regular files. > > Reported-by: Sibiao Luo > Suggested-by: Paolo Bonzini > Signed-off-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster

[Qemu-devel] [PATCH for-1.4 07/12] qemu-char: Fix chardev "memory" not to drop IAC characters

2013-02-05 Thread Markus Armbruster
Undocumented misfeature, get rid of it while we can. Signed-off-by: Markus Armbruster --- qemu-char.c | 5 - 1 file changed, 5 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 0f91ca4..9460a9d 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2678,11 +2678,6 @@ static int

[Qemu-devel] [PATCH for-1.4 09/12] qemu-char: Redo chardev "memory" size configuration

2013-02-05 Thread Markus Armbruster
e=64K", * Fix chardev-add to report errors to current monitor, not stderr. Signed-off-by: Markus Armbruster --- qemu-char.c | 11 +-- qemu-options.hx | 11 --- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index ab011c6..8972

[Qemu-devel] [PATCH for-1.4 05/12] qmp: Drop superfluous special case "empty" in qmp_memchar_read()

2013-02-05 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 4 1 file changed, 4 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 9bf53e0..036ca2c 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2818,10 +2818,6 @@ char *qmp_memchar_read(const char *device, int64_t size, } count

[Qemu-devel] [PATCH for-1.4 02/12] qmp: Clean up design of memchar-read

2013-02-05 Thread Markus Armbruster
The data returned has a well-defined size, which makes the size returned along with it redundant at best. Drop it. Signed-off-by: Markus Armbruster --- hmp.c| 11 --- qapi-schema.json | 18 ++ qemu-char.c | 21 + qmp-commands.hx

[Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-05 Thread Markus Armbruster
ppily reading beyond data. Copies crap from the heap or even crashes. Drop the size parameter, and always copy the full data argument. Signed-off-by: Markus Armbruster --- hmp.c| 4 +--- qapi-schema.json | 4 +--- qemu-char.c | 8 +++- qmp-commands.hx | 4 +--- 4 files chang

Re: [Qemu-devel] [PATCH for-1.4 02/12] qmp: Clean up design of memchar-read

2013-02-05 Thread Markus Armbruster
Eric Blake writes: > On 02/05/2013 09:22 AM, Markus Armbruster wrote: >> The data returned has a well-defined size, which makes the size >> returned along with it redundant at best. Drop it. >> >> Signed-off-by: Markus Armbruster >> --- >> hmp

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-05 Thread Markus Armbruster
Eric Blake writes: > On 02/05/2013 09:22 AM, Markus Armbruster wrote: >> Command memchar-write takes data and size parameter. Begs the >> question what happens when data doesn't match size. >> >> With format base64, qmp_memchar_write() copies the full data

[Qemu-devel] [PATCH for-1.4 03/12] qmp: Clean up type usage in qmp_memchar_write(), qmp_memchar_read()

2013-02-05 Thread Markus Armbruster
Const-correctness, consistently use standard C types instead of mixing them with GLib types. Signed-off-by: Markus Armbruster --- qemu-char.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 6de8aff..892d5bb 100644 --- a/qemu-char.c +++ b

[Qemu-devel] [PATCH for-1.4 04/12] qmp: Plug memory leaks in memchar-write, memchar-read

2013-02-05 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 5 + 1 file changed, 5 insertions(+) diff --git a/qemu-char.c b/qemu-char.c index 892d5bb..9bf53e0 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2782,6 +2782,10 @@ void qmp_memchar_write(const char *device, const char *data, ret

[Qemu-devel] [PATCH for-1.4 06/12] qmp: Drop wasteful zero-initialization in qmp_memchar_read()

2013-02-05 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index 036ca2c..0f91ca4 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2819,7 +2819,7 @@ char *qmp_memchar_read(const char *device, int64_t size

[Qemu-devel] [PATCH for-1.4 08/12] qemu-char: Drop undocumented chardev "memory" compatibility syntax

2013-02-05 Thread Markus Armbruster
This is a new device, so there's no compatibility to maintain, and its use case isn't common enough to justify shorthand syntax. Signed-off-by: Markus Armbruster --- qemu-char.c | 5 - 1 file changed, 5 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 9460a9d..ab011c6 10

[Qemu-devel] [PATCH for-1.4 00/12] Fix memchar-read/-write before API gets released

2013-02-05 Thread Markus Armbruster
configuration [PATCH 09], improve documentation [PATCH 12], and clean up some [other patches]. Markus Armbruster (12): qmp: Fix design bug and read beyond buffer in memchar-write qmp: Clean up design of memchar-read qmp: Clean up type usage in qmp_memchar_write(), qmp_memchar_read() qmp: Plug

[Qemu-devel] [PATCH for-1.4 12/12] QAPI QMP HMP: Fix and improve memchar-read/-write docs

2013-02-05 Thread Markus Armbruster
In particular, document the impact of our crappy UTF-8 handling on reading. Now the QMP examples even work. Signed-off-by: Markus Armbruster --- hmp-commands.hx | 20 qapi-schema.json | 37 +++-- qemu-char.c | 7 +++ qmp

[Qemu-devel] [PATCH for-1.4 11/12] qmp: Use generic errors in memchar-read, memchar-write

2013-02-05 Thread Markus Armbruster
From: Markus Armbruster New errors should be generic unless there's a real use case for rich errors. Signed-off-by: Markus Armbruster --- qapi-schema.json | 2 -- qemu-char.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/qapi-schema.json b/qapi-schema

[Qemu-devel] [PATCH for-1.4 10/12] qemu-char: General chardev "memory" code cleanup

2013-02-05 Thread Markus Armbruster
haracter device, which isn't what I'd expect. Replace it by the saner and more obviously correct chr_is_cirmem(). Also avoids encouraging testing for specific character devices elsewhere. Signed-off-by: Markus Armbruster --- qemu-char.c | 31 --- 1 file chan

Re: [Qemu-devel] [PATCH 0/4] Fix misuse of atomics in trace/simple.c

2013-02-05 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Fri, Jan 25, 2013 at 04:43:36PM +0100, Markus Armbruster wrote: >> More old news: casting pointers considered harmful, and atomics >> considered hard to use correctly. >> >> Markus Armbruster (4): >> trace: Fix simple trace dr

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: > >> On 02/05/2013 09:22 AM, Markus Armbruster wrote: >>> Command memchar-write takes data and size parameter. Begs the >>> question what happens when data doesn't match size. >>> >>> With fo

Re: [Qemu-devel] [PATCH for-1.4 12/12] QAPI QMP HMP: Fix and improve memchar-read/-write docs

2013-02-06 Thread Markus Armbruster
Eric Blake writes: > On 02/05/2013 09:22 AM, Markus Armbruster wrote: >> In particular, document the impact of our crappy UTF-8 handling on >> reading. >> >> Now the QMP examples even work. >> >> Signed-off-by: Markus Armbruster >> --- >>

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Markus Armbruster
Luiz Capitulino writes: > On Wed, 06 Feb 2013 10:06:03 +0100 > Markus Armbruster wrote: > >> Markus Armbruster writes: >> >> > Eric Blake writes: >> > >> >> On 02/05/2013 09:22 AM, Markus Armbruster wrote: >> >>> Command memc

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Markus Armbruster
Luiz Capitulino writes: > On Tue, 5 Feb 2013 17:22:04 +0100 > Markus Armbruster wrote: > >> Command memchar-write takes data and size parameter. Begs the >> question what happens when data doesn't match size. >> >> With format base64, qmp_memchar

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Markus Armbruster
Peter Maydell writes: > On 6 February 2013 09:06, Markus Armbruster wrote: >> As far as I can tell, it never fails, but silently ignores characters >> outside the alphabet [A-Za-z0-9+/] > > This bit at least is required behaviour: see RFC2045 section 6.8: > >An

[Qemu-devel] QMP's chardev-add less capable than HMP's

2013-02-06 Thread Markus Armbruster
As a general rule, HMP commands must be built on top of the QMP API. Luiz and others have worked long & hard to make HMP conform to this rule. However, a new command has crept in that violates it. QMP's chardev-add runs qmp_chardev_add(), which supports backends * file with parameters in, out *

[Qemu-devel] [PATCH for-1.4] hmp: Disable chardev-add and chardev-remove

2013-02-06 Thread Markus Armbruster
a to complete it step by step, then switch over the HMP command to use it. Unfortunately, we're not there, yet, and we don't want to release with chardev-add in a "HMP is more powerful than QMP" state. Disable the HMP command for now, along with its chardev-remove buddy. Signed-o

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Markus Armbruster
Luiz Capitulino writes: > On Wed, 06 Feb 2013 14:51:44 +0100 > Markus Armbruster wrote: > >> Back to your question, namely how to document enumeration DataFormat. >> Perhaps: >> >> ## >> # @DataFormat: >> # >> # An enumeration of data format

Re: [Qemu-devel] [PATCH for-1.4 04/12] qmp: Plug memory leaks in memchar-write, memchar-read

2013-02-06 Thread Markus Armbruster
Luiz Capitulino writes: > On Tue, 5 Feb 2013 17:22:07 +0100 > Markus Armbruster wrote: > >> >> Signed-off-by: Markus Armbruster >> --- >> qemu-char.c | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --git a/qemu-char.c b/qemu-ch

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Markus Armbruster
mdroth writes: > On Wed, Feb 06, 2013 at 10:06:03AM +0100, Markus Armbruster wrote: >> Markus Armbruster writes: >> >> > Eric Blake writes: >> > >> >> On 02/05/2013 09:22 AM, Markus Armbruster wrote: >> >>> Command memchar-write t

[Qemu-devel] [PATCH for-1.4 v2 09/13] qemu-char: Drop undocumented chardev "memory" compatibility syntax

2013-02-06 Thread Markus Armbruster
This is a new device, so there's no compatibility to maintain, and its use case isn't common enough to justify shorthand syntax. Signed-off-by: Markus Armbruster --- qemu-char.c | 5 - 1 file changed, 5 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 2f59a61..cdbbafe 10

[Qemu-devel] [PATCH for-1.4 v2 11/13] qemu-char: Saner naming of memchar stuff & doc fixes

2013-02-06 Thread Markus Armbruster
ts, but they'd change the same documentation lines multiple times. Not worth it. Signed-off-by: Markus Armbruster --- hmp-commands.hx | 37 +++- hmp.c| 8 +++ hmp.h| 4 ++--

[Qemu-devel] [PATCH for-1.4 v2 07/13] qmp: Drop wasteful zero-initialization in qmp_memchar_read()

2013-02-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index 9d1c02c..b0e4b41 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2819,7 +2819,7 @@ char *qmp_memchar_read(const char *device, int64_t size

[Qemu-devel] [PATCH for-1.4 v2 04/13] qmp: Clean up type usage in qmp_memchar_write(), qmp_memchar_read()

2013-02-06 Thread Markus Armbruster
Const-correctness, consistently use standard C types instead of mixing them with GLib types. Signed-off-by: Markus Armbruster --- qemu-char.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 2bdd1bb..b1c6132 100644 --- a/qemu-char.c +++ b

[Qemu-devel] [PATCH for-1.4 v2 06/13] qmp: Drop superfluous special case "empty" in qmp_memchar_read()

2013-02-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 4 1 file changed, 4 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 4dd01e6..9d1c02c 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2818,10 +2818,6 @@ char *qmp_memchar_read(const char *device, int64_t size, } count

[Qemu-devel] [PATCH for-1.4 v2 12/13] qemu-char: Support suffixed ringbuf size arguments like "size=64K"

2013-02-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 8a35403..a3ba021 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -98,7 +98,6 @@ #include "ui/qemu-spice.h" #define READ_BU

[Qemu-devel] [PATCH for-1.4 v2 08/13] qemu-char: Fix chardev "memory" not to drop IAC characters

2013-02-06 Thread Markus Armbruster
Undocumented misfeature, get rid of it while we can. Signed-off-by: Markus Armbruster --- qemu-char.c | 5 - 1 file changed, 5 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index b0e4b41..2f59a61 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2678,11 +2678,6 @@ static int

[Qemu-devel] [PATCH for-1.4 v2 05/13] qmp: Plug memory leaks in memchar-write, memchar-read

2013-02-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 5 + 1 file changed, 5 insertions(+) diff --git a/qemu-char.c b/qemu-char.c index b1c6132..4dd01e6 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2782,6 +2782,10 @@ void qmp_memchar_write(const char *device, const char *data, ret

[Qemu-devel] [PATCH for-1.4 v2 03/13] qmp: Use generic errors in memchar-read, memchar-write

2013-02-06 Thread Markus Armbruster
New errors should be generic unless there's a real use case for rich errors. Signed-off-by: Markus Armbruster --- qapi-schema.json | 2 -- qemu-char.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index d8fa1c3..6f63791 1

[Qemu-devel] [PATCH for-1.4 v2 00/13] Rework ring buffer chardev before API calcifies

2013-02-06 Thread Markus Armbruster
't do that. Markus Armbruster (13): qmp: Fix design bug and read beyond buffer in memchar-write qmp: Clean up design of memchar-read qmp: Use generic errors in memchar-read, memchar-write qmp: Clean up type usage in qmp_memchar_write(), qmp_memchar_read() qmp: Plug memory leaks in mem

[Qemu-devel] [PATCH for-1.4 v2 13/13] hmp: make memchar-read escape ASCII control chars except \n and \t

2013-02-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hmp-commands.hx | 2 ++ hmp.c | 15 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 66ec716..4c100d7 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -869,6 +869,8

[Qemu-devel] [PATCH for-1.4 v2 10/13] qemu-char: General chardev "memory" code cleanup

2013-02-06 Thread Markus Armbruster
haracter device, which isn't what I'd expect. Replace it by the saner and more obviously correct chr_is_cirmem(). Also avoids encouraging testing for specific character devices elsewhere. Signed-off-by: Markus Armbruster --- qemu-char.c | 31 --- 1 file chan

[Qemu-devel] [PATCH for-1.4 v2 01/13] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Markus Armbruster
ppily reading beyond data. Copies crap from the heap or even crashes. Drop the size parameter, and always copy the full data argument. Signed-off-by: Markus Armbruster --- hmp.c| 4 +--- qapi-schema.json | 4 +--- qemu-char.c | 8 +++- qmp-commands.hx | 4 +--- 4 files chang

[Qemu-devel] [PATCH for-1.4 v2 02/13] qmp: Clean up design of memchar-read

2013-02-06 Thread Markus Armbruster
The data returned has a well-defined size, which makes the size returned along with it redundant at best. Drop it. Signed-off-by: Markus Armbruster --- hmp.c| 11 --- qapi-schema.json | 18 ++ qemu-char.c | 21 + qmp-commands.hx

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Markus Armbruster
mdroth writes: > On Wed, Feb 06, 2013 at 09:14:12PM +0100, Markus Armbruster wrote: >> mdroth writes: >> >> > On Wed, Feb 06, 2013 at 10:06:03AM +0100, Markus Armbruster wrote: [...] >> >> -- >> >> in : 1 >> >> out: >> >

Re: [Qemu-devel] q35 machine type and libvirt.

2013-02-07 Thread Markus Armbruster
Cc'ing a few QOMmers... Laine Stump writes: > Now that qemu is getting the q35 machine type, libvirt needs to support it. > > As far as I understand, from libvirt's point of view, q35 is just > another x86_64 system, but with a different set of implicit devices, > and possibly some extra rules l

[Qemu-devel] [PATCH for-1.4 3/6] error: Strip trailing '\n' from error string arguments (again)

2013-02-08 Thread Markus Armbruster
ot; % (p[0].file, p[0].line, p[0].column, fmt) Signed-off-by: Markus Armbruster --- block/gluster.c | 2 +- hmp.c | 2 +- hw/9pfs/virtio-9p-proxy.c | 2 +- hw/pci/pci.c| 2 +- hw/qdev.c | 4 +- hw/qxl.c

[Qemu-devel] [PATCH for-1.4 6/6] vl: Exit unsuccessfully on option argument syntax error

2013-02-08 Thread Markus Armbruster
We exit successfully after reporting syntax error for argument of --sandbox and --add-fd. We continue undaunted after reporting it for argument of --option-rom and --object then. Change all four to exit unsuccessfully, like the other options. Signed-off-by: Markus Armbruster --- vl.c | 10

[Qemu-devel] [PATCH for-1.4 5/6] vl: Drop redundant "parse error" reports

2013-02-08 Thread Markus Armbruster
qemu_opts_parse() reports the error already, and in a much more useful way. Signed-off-by: Markus Armbruster --- vl.c | 4 1 file changed, 4 deletions(-) diff --git a/vl.c b/vl.c index a8dc73d..73122d8 100644 --- a/vl.c +++ b/vl.c @@ -3334,7 +3334,6 @@ int main(int argc, char **argv, char

[Qemu-devel] [PATCH for-1.4 2/6] error: Clean up abuse of error_report() for help

2013-02-08 Thread Markus Armbruster
Use error_printf() instead, so the help gets presented more nicely. Signed-off-by: Markus Armbruster --- hw/vfio_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 66537b7..a934f13 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c

[Qemu-devel] [PATCH for-1.4 4/6] qemu-option: Disable two helpful messages that got broken recently

2013-02-08 Thread Markus Armbruster
u-system-x86_64: -machine kvm_shadow_mem=dunno: Parameter 'kvm_shadow_mem' expects a size Pity. Disable them for now. Signed-off-by: Markus Armbruster --- util/qemu-option.c | 4 1 file changed, 4 insertions(+) diff --git a/util/qemu-option.c b/util/qemu-option.c index c12e724..

[Qemu-devel] [PATCH for-1.4 0/6] Error reporting fixes

2013-02-08 Thread Markus Armbruster
I tagged this for 1.4 because the patches improve the user experience a bit, and are all low risk. Markus Armbruster (6): error: Clean up error strings with embedded newlines error: Clean up abuse of error_report() for help error: Strip trailing '\n' from error string argume

[Qemu-devel] [PATCH for-1.4 1/6] error: Clean up error strings with embedded newlines

2013-02-08 Thread Markus Armbruster
The arguments of error_report() should yield a short error string without newlines. A few places try to print additional help after the error message by embedding newlines in the error string. That's nice, but let's do it the right way. Signed-off-by: Markus Armbruster --- hw/kvm/pc

Re: [Qemu-devel] [PATCH for-1.4 1/6] error: Clean up error strings with embedded newlines

2013-02-08 Thread Markus Armbruster
Peter Maydell writes: > On 8 February 2013 12:15, Markus Armbruster wrote: >> The arguments of error_report() should yield a short error string >> without newlines. >> >> A few places try to print additional help after the error message by >> embedding newlines

[Qemu-devel] [PATCH for-1.4 v2 6/6] vl: Exit unsuccessfully on option argument syntax error

2013-02-08 Thread Markus Armbruster
We exit successfully after reporting syntax error for argument of --sandbox and --add-fd. We continue undaunted after reporting it for argument of --option-rom and --object then. Change all four to exit unsuccessfully, like the other options. Signed-off-by: Markus Armbruster --- vl.c | 10

[Qemu-devel] [PATCH for-1.4 v2 3/6] error: Strip trailing '\n' from error string arguments (again)

2013-02-08 Thread Markus Armbruster
ot; % (p[0].file, p[0].line, p[0].column, fmt) Signed-off-by: Markus Armbruster --- block/gluster.c | 2 +- hmp.c | 2 +- hw/9pfs/virtio-9p-proxy.c | 2 +- hw/pci/pci.c| 2 +- hw/qdev.c | 4 +- hw/qxl.c

[Qemu-devel] [PATCH for-1.4 v2 5/6] vl: Drop redundant "parse error" reports

2013-02-08 Thread Markus Armbruster
qemu_opts_parse() reports the error already, and in a much more useful way. Signed-off-by: Markus Armbruster --- vl.c | 4 1 file changed, 4 deletions(-) diff --git a/vl.c b/vl.c index a8dc73d..73122d8 100644 --- a/vl.c +++ b/vl.c @@ -3334,7 +3334,6 @@ int main(int argc, char **argv, char

[Qemu-devel] [PATCH for-1.4 v2 0/6] Error reporting fixes

2013-02-08 Thread Markus Armbruster
I tagged this for 1.4 because the patches improve the user experience a bit, and are all low risk. v2: * Clean up messages touched by PATCH 01 some more (Peter Maydell) * The other patches are unchanged Markus Armbruster (6): error: Clean up error strings with embedded newlines error: Clean

[Qemu-devel] [PATCH for-1.4 v2 4/6] qemu-option: Disable two helpful messages that got broken recently

2013-02-08 Thread Markus Armbruster
u-system-x86_64: -machine kvm_shadow_mem=dunno: Parameter 'kvm_shadow_mem' expects a size Pity. Disable them for now. Signed-off-by: Markus Armbruster --- util/qemu-option.c | 4 1 file changed, 4 insertions(+) diff --git a/util/qemu-option.c b/util/qemu-option.c index c12e724..

[Qemu-devel] [PATCH for-1.4 v2 2/6] error: Clean up abuse of error_report() for help

2013-02-08 Thread Markus Armbruster
Use error_printf() instead, so the help gets presented more nicely. Signed-off-by: Markus Armbruster --- hw/vfio_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 66537b7..a934f13 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c

[Qemu-devel] [PATCH for-1.4 v2 1/6] error: Clean up error strings with embedded newlines

2013-02-08 Thread Markus Armbruster
y, drop a stray preposition and some tabs. We don't use tabs for similar messages elsewhere. Signed-off-by: Markus Armbruster --- hw/kvm/pci-assign.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index 896cfe8..da64b5b

Re: [Qemu-devel] [PATCH for-1.4 v2 6/6] vl: Exit unsuccessfully on option argument syntax error

2013-02-08 Thread Markus Armbruster
Luiz Capitulino writes: > On Fri, 8 Feb 2013 17:17:12 +0100 > Markus Armbruster wrote: > >> We exit successfully after reporting syntax error for argument of >> --sandbox and --add-fd. >> >> We continue undaunted after reporting it for argument of

Re: [Qemu-devel] [PATCH for-1.4 v2 1/6] error: Clean up error strings with embedded newlines

2013-02-08 Thread Markus Armbruster
Luiz Capitulino writes: > On Fri, 8 Feb 2013 17:17:07 +0100 > Markus Armbruster wrote: > >> The arguments of error_report() should yield a short error string >> without newlines. >> >> A few places try to print additional help after the error message by &

Re: [Qemu-devel] [PATCH for-1.4 v2 0/6] Error reporting fixes

2013-02-08 Thread Markus Armbruster
Luiz, would you like to take v3 through your tree? In that case I'd drop qemu-trivial.

Re: [Qemu-devel] [PATCH for-1.4 v2 4/6] qemu-option: Disable two helpful messages that got broken recently

2013-02-08 Thread Markus Armbruster
Luiz Capitulino writes: > On Fri, 8 Feb 2013 17:17:10 +0100 > Markus Armbruster wrote: > >> commit 8be7e7e4 and commit ec7b2ccb messed up the ordering of error >> message and the helpful explanation that should follow it, like this: >> >> $ qemu-syste

Re: [Qemu-devel] [PATCH for-1.4 v2 4/6] qemu-option: Disable two helpful messages that got broken recently

2013-02-08 Thread Markus Armbruster
Luiz Capitulino writes: > On Fri, 08 Feb 2013 19:58:42 +0100 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >> > On Fri, 8 Feb 2013 17:17:10 +0100 >> > Markus Armbruster wrote: >> > >> >> commit 8be7e7e4 and commit ec

Re: [Qemu-devel] [PATCH for-1.4 v2 1/6] error: Clean up error strings with embedded newlines

2013-02-08 Thread Markus Armbruster
Luiz Capitulino writes: > On Fri, 08 Feb 2013 19:56:17 +0100 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >> > On Fri, 8 Feb 2013 17:17:07 +0100 >> > Markus Armbruster wrote: >> > >> >> The arguments of error_repor

<    1   2   3   4   5   6   7   8   9   10   >