[Qemu-devel] [PATCH v2 14/15] qcow2: small math optimization

2011-08-09 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2-refcount.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 14b2f67..0e31868 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -140,10 +140,7

[Qemu-devel] [PATCH v2 11/15] qcow2: reindent and use while before the big jump

2011-08-09 Thread Frediano Ziglio
prepare to remove read/write callbacks Signed-off-by: Frediano Ziglio --- block/qcow2.c | 272 - 1 files changed, 135 insertions(+), 137 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index c7445cc..dfb969e 100644 --- a/block

[Qemu-devel] [PATCH v2 10/15] qcow2: remove common from QCowAIOCB

2011-08-09 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 446946e..c7445cc 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -373,7 +373,7 @@ int qcow2_backing_read1(BlockDriverState *bs

[Qemu-devel] [PATCH v2 06/15] qcow2: removed unused fields

2011-08-09 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index edc068e..5c454bb 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -381,11 +381,8 @@ typedef struct QCowAIOCB { uint64_t

[Qemu-devel] [PATCH v2 07/15] qcow2: removed cur_nr_sectors field in QCowAIOCB

2011-08-09 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c | 98 + 1 files changed, 43 insertions(+), 55 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 5c454bb..0cf4465 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -377,7

[Qemu-devel] [PATCH v2 08/15] qcow2: remove l2meta from QCowAIOCB

2011-08-09 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 0cf4465..adf31ce 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -381,7 +381,6 @@ typedef struct QCowAIOCB

[Qemu-devel] [PATCH v2 09/15] qcow2: remove cluster_offset from QCowAIOCB

2011-08-09 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index adf31ce..446946e 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -378,7 +378,6 @@ typedef struct QCowAIOCB

[Qemu-devel] [PATCH v2 05/15] qcow: remove old #undefined code

2011-08-09 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow.c | 63 -- 1 files changed, 0 insertions(+), 63 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 00f339f..0989799 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -190,24 +190,6

[Qemu-devel] [PATCH v2 12/15] qcow2: removed QCowAIOCB entirely

2011-08-09 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c | 207 ++--- 1 files changed, 80 insertions(+), 127 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index dfb969e..6073568 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -372,83

[Qemu-devel] [PATCH v2 04/15] qcow: embed qcow_aio_read_cb into qcow_co_readv and qcow_aio_write_cb into qcow_co_writev

2011-08-09 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow.c | 291 - 1 files changed, 123 insertions(+), 168 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index e17f9c5..00f339f 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -486,223

[Qemu-devel] full allocation and file fragmentation.

2011-08-13 Thread Frediano Ziglio
Looking at you patch for full image preallocation I noted you used bdrv_write to fill space with zeroes. Nothing wrong but I would add a call to fallocate or posix_fallocate in order to get less fragmentation on file system. Perhaps there should be a bdrv_preallocate call ?? Regards Frediano

[Qemu-devel] [PATCH v3 00/15] qcow/qcow2 cleanups

2011-08-23 Thread Frediano Ziglio
These patches mostly cleanup some AIO code using coroutines. Mostly they use stack instead of allocated AIO structure. Feel free to collapse it too short. Frediano Ziglio (15): qcow: allocate QCowAIOCB structure using stack qcow: QCowAIOCB field cleanup qcow: move some blocks of code to

[Qemu-devel] [PATCH v3 01/15] qcow: allocate QCowAIOCB structure using stack

2011-08-23 Thread Frediano Ziglio
instead of calling qemi_aio_get use stack Signed-off-by: Frediano Ziglio --- block/qcow.c | 52 block/qcow2.c | 38 +++--- 2 files changed, 27 insertions(+), 63 deletions(-) diff --git a/block/qcow.c b

[Qemu-devel] [PATCH v3 02/15] qcow: QCowAIOCB field cleanup

2011-08-23 Thread Frediano Ziglio
remove unused field from this structure and put some of them in qcow_aio_read_cb and qcow_aio_write_cb Signed-off-by: Frediano Ziglio --- block/qcow.c | 137 +++-- 1 files changed, 65 insertions(+), 72 deletions(-) diff --git a/block/qcow.c

[Qemu-devel] [PATCH v3 03/15] qcow: move some blocks of code to avoid useless variable initialization

2011-08-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow.c | 53 ++--- 1 files changed, 26 insertions(+), 27 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 9754ca9..4ede7f3 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -520,35 +520,18

[Qemu-devel] [PATCH v3 05/15] qcow: remove old #undefined code

2011-08-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow.c | 63 -- 1 files changed, 0 insertions(+), 63 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index f28c821..8cbabdd 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -190,24 +190,6

[Qemu-devel] [PATCH v3 12/15] qcow2: removed QCowAIOCB entirely

2011-08-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c | 207 ++--- 1 files changed, 80 insertions(+), 127 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 287dd99..d34bd72 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -372,83

[Qemu-devel] [PATCH v3 13/15] qcow2: remove memory leak

2011-08-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index d34bd72..07529b1 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -492,6 +492,7 @@ fail: qemu_co_mutex_unlock(&s-&

[Qemu-devel] [PATCH v3 14/15] qcow2: small math optimization

2011-08-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2-refcount.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 2a915be..0f9a64a 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -140,10 +140,7

[Qemu-devel] [PATCH v3 15/15] qcow2: small optimization

2011-08-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2-refcount.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 0f9a64a..243c24b 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -681,14 +681,13

[Qemu-devel] [PATCH v3 04/15] qcow: embed qcow_aio_read_cb into qcow_co_readv and qcow_aio_write_cb into qcow_co_writev

2011-08-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow.c | 291 - 1 files changed, 123 insertions(+), 168 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 4ede7f3..f28c821 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -486,223

[Qemu-devel] [PATCH v3 09/15] qcow2: remove cluster_offset from QCowAIOCB

2011-08-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 4b9ec29..7e13283 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -378,7 +378,6 @@ typedef struct QCowAIOCB

[Qemu-devel] [PATCH v3 10/15] qcow2: remove common from QCowAIOCB

2011-08-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 7e13283..519fc8b 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -373,7 +373,7 @@ int qcow2_backing_read1(BlockDriverState *bs

Re: [Qemu-devel] [PATCH v2 00/15] qcow/qcow2 cleanups

2011-08-23 Thread Frediano Ziglio
2011/8/22 Kevin Wolf : > Am 09.08.2011 09:46, schrieb Frediano Ziglio: >> These patches mostly cleanup some AIO code using coroutines. >> Mostly they use stack instead of allocated AIO structure. >> Feel free to collapse it too short. >> >> Frediano Ziglio (1

[Qemu-devel] [PATCH v3 06/15] qcow2: removed unused fields

2011-08-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index bb6c75e..4171b47 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -381,11 +381,8 @@ typedef struct QCowAIOCB { uint64_t

[Qemu-devel] [PATCH v3 07/15] qcow2: removed cur_nr_sectors field in QCowAIOCB

2011-08-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c | 98 + 1 files changed, 43 insertions(+), 55 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 4171b47..f920dbe 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -377,7

[Qemu-devel] [PATCH v3 11/15] qcow2: reindent and use while before the big jump

2011-08-23 Thread Frediano Ziglio
prepare to remove read/write callbacks Signed-off-by: Frediano Ziglio --- block/qcow2.c | 272 - 1 files changed, 135 insertions(+), 137 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 519fc8b..287dd99 100644 --- a/block

[Qemu-devel] [PATCH v3 08/15] qcow2: remove l2meta from QCowAIOCB

2011-08-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index f920dbe..4b9ec29 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -381,7 +381,6 @@ typedef struct QCowAIOCB

[Qemu-devel] [PATCH] disasm: update comment

2011-08-25 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- disas.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/disas.c b/disas.c index 1334b8e..611b30b 100644 --- a/disas.c +++ b/disas.c @@ -137,7 +137,7 @@ print_insn_thumb1(bfd_vma pc, disassemble_info *info) /* Disassemble this for

[Qemu-devel] [PATCH] qcow2: use always stderr for debugging

2011-08-25 Thread Frediano Ziglio
let all DEBUG_ALLOC2 printf goes to stderr Signed-off-by: Frediano Ziglio --- block/qcow2-cluster.c |2 +- block/qcow2-refcount.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 9269dda..9034840 100644 --- a

[Qemu-devel] [PATCH] qcow2: remove unused qcow2_create_refcount_update function

2011-08-25 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2-refcount.c | 18 -- block/qcow2.h |2 -- 2 files changed, 0 insertions(+), 20 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 2a915be..62946bb 100644 --- a/block/qcow2-refcount.c +++ b

Re: [Qemu-devel] [PATCH 2/2] disasm: update comment

2011-08-25 Thread Frediano Ziglio
2011/8/25 Peter Maydell : > On 25 August 2011 09:44, Stefan Hajnoczi wrote: >>  /* Disassemble this for me please... (debugging). 'flags' has the following >>    values: >> -    i386 - nonzero means 16 bit code >> +    i386 - 1 means 16 bit code, 2 means 64 bit code > > ...presumably 0 means 32 bi

[Qemu-devel] [PATCH] linux aio: some comments

2011-08-30 Thread Frediano Ziglio
Add some notes about Linux AIO explaining why we don't use AIO in some situations. Signed-off-by: Frediano Ziglio --- block/raw-posix.c |4 linux-aio.c |1 + 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index c5

[Qemu-devel] [PATCH] rename qemu_malloc and related to glib names for coherence

2011-08-31 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- trace-events | 10 +- vl.c |6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/trace-events b/trace-events index dc300a2..37da2e0 100644 --- a/trace-events +++ b/trace-events @@ -14,7 +14,7 @@ # # [disable

[Qemu-devel] [PATCH] qcow2: removed unused depends_on field

2011-09-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2-cluster.c |3 +-- block/qcow2.h |1 - 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index e06be64..113db8b 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c

[Qemu-devel] Suspicious code in qcow2.

2011-09-07 Thread Frediano Ziglio
Actually it does not cause problems but this code order seems a bit wrong to me (block/qcow2-cluster.c) QLIST_INSERT_HEAD(&s->cluster_allocs, m, next_in_flight); /* allocate a new cluster */ cluster_offset = qcow2_alloc_clusters(bs, nb_clusters * s->cluster_size); if (cluster_of

[Qemu-devel] [PATCH] qcow2: initialize metadata before inserting in cluster_allocs

2011-09-08 Thread Frediano Ziglio
QCow2Meta structure was inserted into list before many fields are initialized. Currently is not a problem cause all occur in a lock but if qcow2_alloc_clusters would in a future unlock this lock some issues could arise. Initializing fields before inserting fix the problem. Signed-off-by: Frediano

[Qemu-devel] [PATCH 1/1] fix operator precedence

2011-06-20 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- cmd.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd.c b/cmd.c index db2c9c4..ecca167 100644 --- a/cmd.c +++ b/cmd.c @@ -486,7 +486,7 @@ timestr( snprintf(ts, size, "%u:%02u

Re: [Qemu-devel] [RFC PATCH v2] Specification for qcow2 version 3

2011-06-28 Thread Frediano Ziglio
used bonnie++ program to test speed and performances allocating data is about 15-20% of allocated one. I'm working (in the few spare time I have) improving it. VirtualBox and ESX use large clusters (1mb) to mitigate allocation/metadata problem. Perhaps raising default cluster size would help changing a spread idea of bad qemu i/o performance. Regards Frediano Ziglio

Re: [Qemu-devel] Default cache mode

2011-06-29 Thread Frediano Ziglio
is stored) dependent but when data are allocated speed is good. raw disks are not so fast as expected? Try to use fallocate command to allocate the file than do a dd to fill the entire file with zeros and writethrough will perform very well. Allocating raw with qemu-img lead to a normal sparse file which written with O_DSYNC flag is quite slow due to extents allocation and fragmentation. Regards Frediano Ziglio

[Qemu-devel] [PATCH] qcow2: fix range check

2011-09-10 Thread Frediano Ziglio
QCowL2Meta::offset is not cluster aligned but only sector aligned however nb_clusters count cluster from cluster start. This fix range check. Note that old code have no corruption issues related to this check cause it only cause intersection to occur when shouldn't. Signed-off-by: Frediano Z

[Qemu-devel] [PATCH] qcow2: align cluster_data to block to improve performance using O_DIRECT

2011-09-10 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow2.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 8aed310..510ff68 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -237,7 +237,7 @@ static int qcow2_open(BlockDriverState

[Qemu-devel] [PATCH][RFC][0/2] REF+/REF- optimization

2011-09-13 Thread Frediano Ziglio
works and pass all io-tests but for instance I would avoid allocating new clusters for refcount during preallocation. End speed up is quite visible allocating clusters (more then 20%). Frediano Ziglio (2): qcow2: optimize refminus updates qcow2: ref+ optimization block/qcow2-refcoun

[Qemu-devel] [PATCH][RFC][1/2] qcow2: optimize refminus updates

2011-09-13 Thread Frediano Ziglio
Cache refcount decrement in an array to trade-off between leaks and speed. Signed-off-by: Frediano Ziglio --- block/qcow2-refcount.c | 142 ++-- block/qcow2.c |1 + block/qcow2.h | 14 + 3 files changed, 153 insertions

[Qemu-devel] [PATCH][RFC][2/2] qcow2: ref+ optimization

2011-09-13 Thread Frediano Ziglio
preallocate multiple refcount increment in order to collapse allocation writes. This cause leaks in case of Qemu crash but no corruptions. Signed-off-by: Frediano Ziglio --- block/qcow2-refcount.c | 128 --- block/qcow2.c |1 + block

Re: [Qemu-devel] [PATCH] qcow2: fix range check

2011-09-13 Thread Frediano Ziglio
2011/9/12 Kevin Wolf : > Am 10.09.2011 10:23, schrieb Frediano Ziglio: >> QCowL2Meta::offset is not cluster aligned but only sector aligned >> however nb_clusters count cluster from cluster start. >> This fix range check. Note that old code have no corruption issues >>

[Qemu-devel] qcow2: snapshot and resize possible?

2011-09-13 Thread Frediano Ziglio
Looking at block TODOs I saw qcow2 resize with snapshot. However I would ask if this is technical possible with current format. The reason is that snapshots have no size (only l1_size, QCowHeader have a size field) however I think that size if part of machine state and is not possible to compute ex

Re: [Qemu-devel] [PATCH][RFC][0/2] REF+/REF- optimization

2011-09-13 Thread Frediano Ziglio
2011/9/13 Kevin Wolf : > Am 13.09.2011 09:53, schrieb Frediano Ziglio: >> These patches try to trade-off between leaks and speed for clusters >> refcounts. >> >> Refcount increments (REF+ or refp) are handled in a different way from >> decrements (REF- or refm).

Re: [Qemu-devel] [PATCH][RFC][0/2] REF+/REF- optimization

2011-09-13 Thread Frediano Ziglio
2011/9/13 Kevin Wolf : > Am 13.09.2011 09:53, schrieb Frediano Ziglio: >> These patches try to trade-off between leaks and speed for clusters >> refcounts. >> >> Refcount increments (REF+ or refp) are handled in a different way from >> decrements (REF- or refm).

Re: [Qemu-devel] [PATCH][RFC][0/2] REF+/REF- optimization

2011-09-14 Thread Frediano Ziglio
2011/9/14 Kevin Wolf : > Am 13.09.2011 15:36, schrieb Frediano Ziglio: >> 2011/9/13 Kevin Wolf : >>> Am 13.09.2011 09:53, schrieb Frediano Ziglio: >>>> These patches try to trade-off between leaks and speed for clusters >>>> refcounts. >>>> &g

Re: [Qemu-devel] [PATCH][RFC][0/2] REF+/REF- optimization

2011-09-14 Thread Frediano Ziglio
2011/9/14 Kevin Wolf : ... omissis... > >> To optimize REF+ I mark a range as allocated and use this range to >> get new ones (avoiding writing refcount to disk). When a flush is >> requested or in some situations (like snapshot) this cache is disabled >> and flushed (written as REF

Re: [Qemu-devel] [PATCH][RFC][0/2] REF+/REF- optimization

2011-09-15 Thread Frediano Ziglio
2011/9/14 Kevin Wolf : ... > > But let's measure the effects first, I suspect that for cluster > allocation it doesn't help much because every REF- comes with a REF+. > That's 50% of effort if REF- clusters are far from REF+ :) >>> >>> I would expect that the next REF+ allocat

[Qemu-devel] [PATCH] removed usused offset variable

2011-09-16 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- posix-aio-compat.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/posix-aio-compat.c b/posix-aio-compat.c index 3193dbf..63a8fae 100644 --- a/posix-aio-compat.c +++ b/posix-aio-compat.c @@ -181,7 +181,6 @@ qemu_pwritev(int fd

[Qemu-devel] [PATCH 0/2][RFC?] Remove SIGUSR2 from posix-aio

2011-09-19 Thread Frediano Ziglio
readable. Doubts: - any sense having two patches and not only last one? - comment is perhaps wrong as is also affect main core - is ok if KVM is disabled? more testing required Frediano Ziglio (2): block: avoid storing a constant in qemu_paiocb structure block: avoid SIGUSR2 cpus.c

[Qemu-devel] [PATCH 1/2] block: avoid storing a constant in qemu_paiocb structure

2011-09-19 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- posix-aio-compat.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/posix-aio-compat.c b/posix-aio-compat.c index 3193dbf..7ea63a1 100644 --- a/posix-aio-compat.c +++ b/posix-aio-compat.c @@ -42,7 +42,6 @@ struct qemu_paiocb

[Qemu-devel] [PATCH 2/2] block: avoid SIGUSR2

2011-09-19 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- cpus.c |5 - posix-aio-compat.c | 14 -- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/cpus.c b/cpus.c index 54c188c..d0cfe91 100644 --- a/cpus.c +++ b/cpus.c @@ -380,11 +380,6 @@ static int qemu_signal_init

[Qemu-devel] [PATCH v2] block: avoid SIGUSR2

2011-09-19 Thread Frediano Ziglio
Now that iothread is always compiled sending a signal seems only an additional step. This patch also avoid writing to two pipe (one from signal and one in qemu_service_io). Work with kvm enabled or disabled. strace output is more readable (less syscalls). Signed-off-by: Frediano Ziglio

[Qemu-devel] [PATCH] core: remove qemu_service_io

2011-09-22 Thread Frediano Ziglio
qemu_service_io was mainly an alias to qemu_notify_event, currently used only by PPC for timer hack, so call qemu_notify_event directly. Signed-off-by: Frediano Ziglio --- arch_init.c |5 - qemu-common.h|3 --- qemu-tool.c |4 target-ppc/kvm_ppc.c

Re: [Qemu-devel] [PATCH] qcow2: Unlock during COW

2011-09-22 Thread Frediano Ziglio
2011/9/19 Kevin Wolf : > Unlocking during COW allows for more parallelism. One change it requires is > that buffers are dynamically allocated instead of just using a per-image > buffer. > > While touching the code, drop the synchronous qcow2_read() function and > replace > it by a bdrv_read() call

[Qemu-devel] [PATCH] qcow2: fix 028 iotest

2011-09-23 Thread Frediano Ziglio
This fix bound check bug accessing last cluster if image size is not cluster aligned caused by "Unlock during COW" patch. Signed-off-by: Frediano Ziglio --- block/qcow2-cluster.c |8 ++-- block/qcow2.c |2 +- block/qcow2.h |2 ++ 3 files changed, 9

Re: [Qemu-devel] [Xen-devel] Project idea: make QEMU more flexible

2014-01-06 Thread Frediano Ziglio
On Mon, 2014-01-06 at 12:54 +, Wei Liu wrote: > Hi all > > This idea is to modify QEMU's Makefiles, plus implementing some stubs to > make it possible to tailor QEMU to a smaller binary. > > The current setup for Xen on X86 is to build i386-softmmu, and uses this > single binary for two purpo

[Qemu-devel] [PATCH] vnc: send cursor when a new client is connecting

2016-03-02 Thread Frediano Ziglio
If you have hardware cursor and you are reconnecting the VNC client you need to send the cursor. Failing to do so make the cursor invisible till is changed. Signed-off-by: Frediano Ziglio --- ui/vnc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/vnc.c b/ui/vnc.c index ce4c669

Re: [Qemu-devel] [RFC PATCH v3] tests: rtl8139: test timers and interrupt

2015-01-22 Thread Frediano Ziglio
2015-01-20 13:36 GMT+00:00 Paolo Bonzini : > > > On 08/01/2015 19:38, Frediano Ziglio wrote: >> Test behaviour of timers and interrupts related to timeouts. >> >> Signed-off-by: Frediano Ziglio >> --- >> tests/Makefile

Re: [Qemu-devel] [RFC PATCH v3] tests: rtl8139: test timers and interrupt

2015-02-06 Thread Frediano Ziglio
2015-02-06 16:54 GMT+00:00 Stefan Hajnoczi : > On Thu, Jan 08, 2015 at 06:38:23PM +0000, Frediano Ziglio wrote: >> Test behaviour of timers and interrupts related to timeouts. >> >> Signed-off-by: Frediano Ziglio >> --- >> tests/Makefile | 2

Re: [Qemu-devel] [PATCH v3] qxl: allow to specify head limit to qxl driver

2015-07-13 Thread Frediano Ziglio
Ping - Original Message - > From: "Frediano Ziglio" > To: kra...@redhat.com, spice-de...@lists.freedesktop.org, berra...@redhat.com > Cc: qemu-devel@nongnu.org, "Frediano Ziglio" > Sent: Monday, July 6, 2015 7:56:38 AM > Subject: [Qemu-devel] [PATCH v

Re: [Qemu-devel] [PATCH v3] qxl: allow to specify head limit to qxl driver

2015-07-14 Thread Frediano Ziglio
> > Hi, > > > > This patch rely on some change in spice-protocol which are not still > > > accepted. See > > > http://lists.freedesktop.org/archives/spice-devel/2015-June/020221.html. > > What is the upstream status here? accepted meanwhile? > > cheers, > Gerd > Accepted and merged, see pa

[Qemu-devel] [PATCH] qxl: Fix new function name for spice-server library

2015-07-20 Thread Frediano Ziglio
The new spice-server function to limit the number of monitors (0.12.6) changed while development from spice_qxl_set_monitors_config_limit to spice_qxl_max_monitors (accepted upstream). By mistake I post patch with former name. This patch fix the function name. Signed-off-by: Frediano Ziglio

[Qemu-devel] [PATCH v3] qxl: allow to specify head limit to qxl driver

2015-07-05 Thread Frediano Ziglio
could be confusing). This patch rely on some change in spice-protocol which are not still accepted. See http://lists.freedesktop.org/archives/spice-devel/2015-June/020221.html. Signed-off-by: Frediano Ziglio --- hw/display/qxl.c | 26 +- hw/display/qxl.h | 3 +++ 2 files

[Qemu-devel] [RFC PATCH] vga: Start supporting resolution not multiple of 16 correctly.

2013-03-15 Thread Frediano Ziglio
make this alignment? Signed-off-by: Frediano Ziglio --- hw/vga.c |2 +- ui/vnc.c | 27 +-- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/hw/vga.c b/hw/vga.c index 1caf23d..d229f06 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -651,7 +651,7 @@ void

Re: [Qemu-devel] [RFC PATCH] vga: Start supporting resolution not multiple of 16 correctly.

2013-07-28 Thread Frediano Ziglio
2013/7/23 Gerd Hoffmann > Hi, > > > Tested-by: Fabio Fantoni > > > > I tested it for a long time with spice on xen (because qxl will be fully > > working only after adding SSE support on hvm domUs). It works, I think > > it is good to add this and the respective vgabios patch on upstream. > >

Re: [Qemu-devel] [RFC PATCH] vga: Start supporting resolution not multiple of 16 correctly.

2013-06-18 Thread Frediano Ziglio
Modern notebook support 1366x768 resolution. The resolution width is not multiple of 16 causing some problems. QEMU VGA emulation requires width resolution to be multiple of 8. VNC implementation requires width resolution to be multiple of 16. Signed-off-by: Frediano Ziglio --- hw/display

[Qemu-devel] [RFC PATCH] tests: rtl8139: test timers and interrupt

2015-01-07 Thread Frediano Ziglio
Test behaviour of timers and interrupts related to timeouts. Signed-off-by: Frediano Ziglio --- tests/Makefile | 2 +- tests/rtl8139-test.c | 164 +++ 2 files changed, 165 insertions(+), 1 deletion(-) This patch was derived from a test I

[Qemu-devel] [RFC PATCH v2] tests: rtl8139: test timers and interrupt

2015-01-07 Thread Frediano Ziglio
Test behaviour of timers and interrupts related to timeouts. Signed-off-by: Frediano Ziglio --- tests/Makefile | 2 +- tests/rtl8139-test.c | 180 +++ 2 files changed, 181 insertions(+), 1 deletion(-) This patch was derived from a test I

[Qemu-devel] [RFC PATCH v3] tests: rtl8139: test timers and interrupt

2015-01-08 Thread Frediano Ziglio
Test behaviour of timers and interrupts related to timeouts. Signed-off-by: Frediano Ziglio --- tests/Makefile | 2 +- tests/rtl8139-test.c | 181 +++ 2 files changed, 182 insertions(+), 1 deletion(-) This patch was derived from a test I

[Qemu-devel] [PATCH] x86_64: optimise muldiv64 for x86_64 architecture

2015-01-09 Thread Frediano Ziglio
As this platform can do multiply/divide using 128 bit precision use these instruction to implement it. Signed-off-by: Frediano Ziglio --- include/qemu-common.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/qemu-common.h b/include/qemu-common.h index f862214..5366220

Re: [Qemu-devel] [PATCH] x86_64: optimise muldiv64 for x86_64 architecture

2015-01-09 Thread Frediano Ziglio
2015-01-09 10:35 GMT+00:00 Paolo Bonzini : > > > On 09/01/2015 11:27, Frediano Ziglio wrote: >> >> Signed-off-by: Frediano Ziglio >> --- >> include/qemu-common.h | 13 + >> 1 file changed, 13 insertions(+) >> >> diff --git a/inc

[Qemu-devel] [PATCH 2/2] qemu-common.h: optimise muldiv64 for x86_64 architecture

2015-01-09 Thread Frediano Ziglio
As this platform can do multiply/divide using 128 bit precision use these instructions to implement it. Signed-off-by: Frediano Ziglio --- include/qemu-common.h | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/qemu-common.h b/include/qemu-common.h index

[Qemu-devel] [PATCH 1/2] qemu-common.h: optimise muldiv64 if int128 is available

2015-01-09 Thread Frediano Ziglio
Let compiler do the job to optimise the function. Signed-off-by: Frediano Ziglio --- include/qemu-common.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/qemu-common.h b/include/qemu-common.h index f862214..f3033ae 100644 --- a/include/qemu-common.h +++ b/include/qemu

Re: [Qemu-devel] [PATCH] x86_64: optimise muldiv64 for x86_64 architecture

2015-01-09 Thread Frediano Ziglio
2015-01-09 11:24 GMT+00:00 Paolo Bonzini : > > > On 09/01/2015 12:04, Frediano Ziglio wrote: >> 2015-01-09 10:35 GMT+00:00 Paolo Bonzini : >>> >>> >>> On 09/01/2015 11:27, Frediano Ziglio wrote: >>>> >>>> Signed-

Re: [Qemu-devel] [PATCH 2/2] qemu-common.h: optimise muldiv64 for x86_64 architecture

2015-01-09 Thread Frediano Ziglio
2015-01-09 11:43 GMT+00:00 Paolo Bonzini : > > > On 09/01/2015 12:25, Frediano Ziglio wrote: >> /* compute with 96 bit intermediate result: (a*b)/c */ >> -#ifdef CONFIG_INT128 >> +#if defined(CONFIG_INT128) && !defined(__x86_64__) >> static inline

[Qemu-devel] [PATCH 1/2] qemu-common.h: optimise muldiv64 if int128 is available

2015-01-09 Thread Frediano Ziglio
Let compiler do the job to optimise the function. Signed-off-by: Frediano Ziglio --- include/qemu-common.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/qemu-common.h b/include/qemu-common.h index f862214..f3033ae 100644 --- a/include/qemu-common.h +++ b/include/qemu

[Qemu-devel] [PATCH] x86_64: optimise muldiv64 for x86_64 architecture

2015-01-09 Thread Frediano Ziglio
As this platform can do multiply/divide using 128 bit precision use these instruction to implement it. Signed-off-by: Frediano Ziglio --- include/qemu-common.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/qemu-common.h b/include/qemu-common.h index f862214..5366220

Re: [Qemu-devel] [PATCH 2/2] qemu-common.h: optimise muldiv64 for x86_64 architecture

2015-01-09 Thread Frediano Ziglio
2015-01-09 12:22 GMT+00:00 Peter Maydell : > On 9 January 2015 at 11:25, Frediano Ziglio wrote: >> As this platform can do multiply/divide using 128 bit precision use >> these instructions to implement it. >> >> Signed-off-by: Frediano Ziglio >> -

Re: [Qemu-devel] [PATCH 2/2] qemu-common.h: optimise muldiv64 for x86_64 architecture

2015-01-09 Thread Frediano Ziglio
2015-01-09 15:52 GMT+00:00 Peter Maydell : > On 9 January 2015 at 15:41, Frediano Ziglio wrote: >> 2015-01-09 12:22 GMT+00:00 Peter Maydell : >>>> +/* Optimised x64 version. This assume that a*b/c fits in 64 bit */ >>> >>> This assumption isn't necess

Re: [Qemu-devel] [PATCH] RFC: qxl: allow to specify head limit to qxl driver

2015-06-09 Thread Frediano Ziglio
2015-06-09 10:12 GMT+01:00 Gerd Hoffmann : > On Di, 2015-06-09 at 09:49 +0100, Frediano Ziglio wrote: >> This patch allow to limit number of heads using qxl driver. By default >> qxl driver is not limited on any kind on head use so can decide to use >> as much heads. > &g

[Qemu-devel] [PATCH] RFC: qxl: allow to specify head limit to qxl driver

2015-06-09 Thread Frediano Ziglio
x27;m looking anyway to a way to enforce this in spice-server. Signed-off-by: Frediano Ziglio --- hw/display/qxl.c | 6 ++ hw/display/qxl.h | 1 + 2 files changed, 7 insertions(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index b220e2d..e9ccd30 100644 --- a/hw/display/qxl.c +++ b/hw/di

Re: [Qemu-devel] [PATCH] RFC: qxl: allow to specify head limit to qxl driver

2015-06-09 Thread Frediano Ziglio
2015-06-09 10:43 GMT+01:00 Gerd Hoffmann : > On Di, 2015-06-09 at 10:26 +0100, Frediano Ziglio wrote: >> 2015-06-09 10:12 GMT+01:00 Gerd Hoffmann : >> > On Di, 2015-06-09 at 09:49 +0100, Frediano Ziglio wrote: >> >> This patch allow to limit number of heads using qx

[Qemu-devel] [PATCH v2] RFC: qxl: allow to specify head limit to qxl driver

2015-06-11 Thread Frediano Ziglio
could be confusing). This patch rely on some change in spice-protocol which are not still accepted. See http://lists.freedesktop.org/archives/spice-devel/2015-June/020221.html. Signed-off-by: Frediano Ziglio --- hw/display/qxl.c | 20 +++- hw/display/qxl.h | 1 + 2 files changed

[Qemu-devel] [PATCH 2/2] Check value for invalid negative values

2015-06-11 Thread Frediano Ziglio
In qxl_v2n check that value is not negative. Signed-off-by: Frediano Ziglio --- hw/display/qxl-logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/qxl-logger.c b/hw/display/qxl-logger.c index d944d3f..faed869 100644 --- a/hw/display/qxl-logger.c +++ b/hw

[Qemu-devel] [PATCH 1/2] Constify some variable

2015-06-11 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- hw/display/qxl-logger.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/display/qxl-logger.c b/hw/display/qxl-logger.c index c900c2c..d944d3f 100644 --- a/hw/display/qxl-logger.c +++ b/hw/display/qxl-logger.c @@ -22,7

Re: [Qemu-devel] [PATCH v2] RFC: qxl: allow to specify head limit to qxl driver

2015-06-12 Thread Frediano Ziglio
> > On Do, 2015-06-11 at 10:38 +0100, Frediano Ziglio wrote: > > libvirt has this as a video card parameter (actually set to 1 but not > > used). This parameter will allow to limit setting a use can do (which > > could be confusing). > > Hmm. So heads is '1&#

[Qemu-devel] [RFC PATCH v2] qxl: allows to specify head limit to qxl driver

2015-06-12 Thread Frediano Ziglio
could be confusing). This patch rely on some change in spice-protocol which are not still accepted. See http://lists.freedesktop.org/archives/spice-devel/2015-June/020221.html. Signed-off-by: Frediano Ziglio --- hw/display/qxl.c | 26 +- hw/display/qxl.h | 3 +++ 2 files

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Check value for invalid negative values

2015-06-18 Thread Frediano Ziglio
mpiler is able to optimize if (v < 0 || v >= l) with if ((unsigned) v >= l) Frediano > > 11.06.2015 16:17, Frediano Ziglio wrote: > > In qxl_v2n check that value is not negative. > > Why do you think it is necessary? > > Thanks, > > /mjt >

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Check value for invalid negative values

2015-06-18 Thread Frediano Ziglio
> On Do, 2015-06-18 at 05:58 -0400, Frediano Ziglio wrote: > > For the same reason there is the v >= l test. > > The v >= l test state that the value can be out of range so it not always a > > constant in the range. > > Adding the v < 0 check for every inval

Re: [Qemu-devel] [PULL 1/2] qxl: store channel id in qxl->id

2018-11-02 Thread Frediano Ziglio
> > See qemu_spice_add_display_interface(), the console index is also used > as channel id. So put that into the qxl->id field too. > > In typical use cases (one primary qxl-vga device, optionally one or more > secondary qxl devices, no non-qxl display devices) this doesn't change > anything. >

Re: [Qemu-devel] [PULL 1/2] qxl: store channel id in qxl->id

2018-11-05 Thread Frediano Ziglio
> > Hi, > > > > vga->con = graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl); > > > +qxl->id = qemu_console_get_index(vga->con); /* == channel_id */ > > > +if (qxl->id != 0) { > > > +error_setg(errp, "primary qxl-vga device must be console 0 " > > > + "(fi

Re: [Qemu-devel] [RFC PATCH spice v2 1/2] QXL interface: add functions to identify monitors in the guest

2018-11-05 Thread Frediano Ziglio
> > > 2. Have a single function as follows: > > > > void spice_qxl_set_device_info(QXLInstance *instance, > >const char *device_address, > >uint32_t device_display_id_start, > >uint32_t device_display_

Re: [Qemu-devel] [PULL 1/2] qxl: store channel id in qxl->id

2018-11-05 Thread Frediano Ziglio
> Hi, > > > > vga->con = graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl); > > > +qxl->id = qemu_console_get_index(vga->con); /* == channel_id */ > > > +if (qxl->id != 0) { > > > +error_setg(errp, "primary qxl-vga device must be console 0 " > > > + "(first

Re: [Qemu-devel] [RFC PATCH spice v2 1/2] QXL interface: add functions to identify monitors in the guest

2018-11-05 Thread Frediano Ziglio
> On Mon, 2018-11-05 at 07:52 +0100, Gerd Hoffmann wrote: > > > 2. Have a single function as follows: > > > > > > void spice_qxl_set_device_info(QXLInstance *instance, > > >const char *device_address, > > >uint32_t device_display_id_s

Re: [Qemu-devel] [RFC PATCH spice v2 1/2] QXL interface: add functions to identify monitors in the guest

2018-11-05 Thread Frediano Ziglio
> > On Mon, 2018-11-05 at 14:08 +0100, Gerd Hoffmann wrote: > > On Mon, Nov 05, 2018 at 01:18:57PM +0100, Lukáš Hrázký wrote: > > > On Mon, 2018-11-05 at 07:52 +0100, Gerd Hoffmann wrote: > > > > > 2. Have a single function as follows: > > > > > > > > > > void spice_qxl_set_device_info(QXLInstanc

<    1   2   3   >