Re: [Qemu-devel] VNC key presses not correct

2013-08-22 Thread Markus Armbruster
Erik Rull writes: > Markus Armbruster wrote: >> Erik Rull writes: >> >>> Hi all, >>> >>> I'm struggling with the QEMU VNC on qemu-kvm-1.2.0 a bit, the following two >>> things are not working properly: >> >> Have you tried to reproduce on a current version? >> > > Hello Markus, > > yes, I was ab

[Qemu-devel] [PATCH v2] block: Introduce bs->zero_beyond_eof

2013-08-22 Thread Asias He
In 4146b46c42e0989cb5842e04d88ab6ccb1713a48 (block: Produce zeros when protocols reading beyond end of file), we break qemu-iotests ./check -qcow2 022. This happens because qcow2 temporarily sets ->growable = 1 for vmstate accesses (which are stored beyond the end of regular image data). We introd

Re: [Qemu-devel] [PATCH] block: Introduce bs->zero_beyond_eof

2013-08-22 Thread Asias He
On Wed, Aug 21, 2013 at 05:44:08PM +0200, Stefan Hajnoczi wrote: > On Wed, Aug 21, 2013 at 04:26:04PM +0800, Asias He wrote: > > @@ -868,6 +868,7 @@ int bdrv_file_open(BlockDriverState **pbs, const char > > *filename, > > QDECREF(options); > > > > bs->growable = 1; > > +bs->zero_be

[Qemu-devel] [PATCH] block: better error message for read only format name

2013-08-22 Thread Fam Zheng
When user tries to use read-only whitelist format in the command line option, failure message was "'foo' invalid format". It might be invalid only for writable, but valid for read-only, so it is confusing. Give the user easier to understand information. Signed-off-by: Fam Zheng --- blockdev.c |

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Stefan Hajnoczi
On Thu, Aug 22, 2013 at 11:29:47AM +0530, Bharata B Rao wrote: > On Wed, Aug 21, 2013 at 05:40:11PM +0200, Paolo Bonzini wrote: > > Il 21/08/2013 17:24, Stefan Hajnoczi ha scritto: > > > On Wed, Aug 21, 2013 at 10:02:47AM +0800, Asias He wrote: > > >> In block/gluster.c, we have > > >> > > >> glust

[Qemu-devel] [PATCH v2 0/3] vfio: fixes for better support for 128 bit memory section sizes

2013-08-22 Thread Alexey Kardashevskiy
I made a couple of small patches while debugging VFIO on SPAPR which uses IOMMU MemoryRegion 2^64 bytes long. Changes: v2: * added int128_exts64() function as a separate patch and used in "vfio: Fix 128 bit handling". Alexey Kardashevskiy (3): int128: add int128_exts64() vfio: Fix debug outp

[Qemu-devel] [PATCH v2 1/3] int128: add int128_exts64()

2013-08-22 Thread Alexey Kardashevskiy
This adds macro to extend signed 64bit value to signed 128bit value. Signed-off-by: Alexey Kardashevskiy --- include/qemu/int128.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/qemu/int128.h b/include/qemu/int128.h index 9ed47aa..987a1a9 100644 --- a/include/qemu/int128.h +++

[Qemu-devel] [PATCH v2 3/3] vfio: Fix 128 bit handling

2013-08-22 Thread Alexey Kardashevskiy
Upcoming VFIO on SPAPR PPC64 support will initialize the IOMMU memory region with UINT64_MAX (2^64 bytes) size so int128_get64() will assert. The patch takes care of this check. The existing type1 IOMMU code is not expected to map all 64 bits of RAM so the patch does not touch that part. Signed-o

[Qemu-devel] [PATCH v2 2/3] vfio: Fix debug output for int128 values

2013-08-22 Thread Alexey Kardashevskiy
Memory regions can easily be 2^64 byte long and therefore overflow for just a bit but that is enough for int128_get64() to assert. This takes care of debug printing of huge section sizes. Signed-off-by: Alexey Kardashevskiy --- hw/misc/vfio.c | 6 -- 1 file changed, 4 insertions(+), 2 delet

Re: [Qemu-devel] updated: kvm PCI todo wiki

2013-08-22 Thread Nicholas A. Bellinger
On Wed, 2013-08-21 at 14:45 +0200, Hannes Reinecke wrote: > On 08/21/2013 12:48 PM, Michael S. Tsirkin wrote: > > Hey guys, > > I've put up a wiki page with a kvm PCI todo list, > > mainly to avoid effort duplication, but also in the hope > > to draw attention to what I think we should try addressi

Re: [Qemu-devel] updated: kvm PCI todo wiki

2013-08-22 Thread Michael S. Tsirkin
On Thu, Aug 22, 2013 at 01:29:34AM -0700, Nicholas A. Bellinger wrote: > On Wed, 2013-08-21 at 14:45 +0200, Hannes Reinecke wrote: > > On 08/21/2013 12:48 PM, Michael S. Tsirkin wrote: > > > Hey guys, > > > I've put up a wiki page with a kvm PCI todo list, > > > mainly to avoid effort duplication,

[Qemu-devel] [RFC 0/2] osdep: warn if opening a file O_DIRECT on tmpfs fails

2013-08-22 Thread Stefan Hajnoczi
This is an implementation of Dan and Eric's idea for probing a failed O_DIRECT open(2) call to see if the file system does not support O_DIRECT. I wanted to see what the implementation looks like but I don't like it: 1. We still need to guess if O_DIRECT is supported in the O_CREAT EINVAL case

Re: [Qemu-devel] [PATCH] vl: allow "cont" from panicked state

2013-08-22 Thread Laszlo Ersek
On 08/21/13 17:32, Paolo Bonzini wrote: > To support 1.5, libvirt should simply be ready to react to unanticipated > GUEST_PANICKED events. reboot-on-panic will simply be broken for 1.5 > and Linux 3.10+ guests. :( I'm probably misunderstanding the discussion, but it might be possible to disable

[Qemu-devel] [RFC 2/2] osdep: warn if opening a file O_DIRECT on tmpfs fails

2013-08-22 Thread Stefan Hajnoczi
Print a warning when opening a file O_DIRECT on tmpfs fails with EINVAL. This saves users a lot of time trying to figure out the EINVAL error. Reported-by: Deepak C Shetty Suggested-by: Eric Blake Suggested-by: Daniel P. Berrange Signed-off-by: Stefan Hajnoczi --- util/osdep.c | 62 ++

[Qemu-devel] [RFC 1/2] libcacard: link against qemu-error.o for error_report()

2013-08-22 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- libcacard/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcacard/Makefile b/libcacard/Makefile index 47827a0..4d15da4 100644 --- a/libcacard/Makefile +++ b/libcacard/Makefile @@ -4,7 +4,8 @@ TOOLS += vscclient$(EXESUF) # obje

Re: [Qemu-devel] [PATCH v3 6/6] hw: Clean up bogus default boot order

2013-08-22 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Wed, Aug 21, 2013 at 06:01:45PM +0200, Markus Armbruster wrote: >> "Michael S. Tsirkin" writes: >> >> > On Wed, Aug 21, 2013 at 05:10:56PM +0200, Markus Armbruster wrote: >> >> "Michael S. Tsirkin" writes: >> >> >> >> > On Mon, Jul 22, 2013 at 01:38:47PM +020

Re: [Qemu-devel] [PATCH V8 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-22 Thread Laszlo Ersek
On 08/22/13 05:16, Wanlong Gao wrote: > On 08/22/2013 10:29 AM, Eric Blake wrote: >> On 08/21/2013 07:12 PM, Wanlong Gao wrote: >> > + '*mem':'str' }} Why is size passed as a 'str' instead of an integral type? If anything, at the QMP layer, it should be an integer represen

Re: [Qemu-devel] [RFC PATCH 3/4] qmp: Add "snapshot=" option to nbd-server-add

2013-08-22 Thread Fam Zheng
On Wed, 08/21 15:02, Stefan Hajnoczi wrote: > On Mon, Jul 29, 2013 at 12:25:31PM +0800, Fam Zheng wrote: > > +/* create a point-in-time snapshot BDS from an existing BDS */ > > +static BlockDriverState *nbd_create_snapshot(BlockDriverState *orig_bs) > > +{ > > +int ret; > > +char filename[1

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 09:48, Stefan Hajnoczi ha scritto: >> > gluster_finish_aiocb gets called from gluster thread, is it safe to create >> > and schedule a bh from such a thread ? >> > >> > In my first implementation >> > (http://lists.gnu.org/archive/html/qemu-devel/2012-06/msg01748.html), I >> > was

Re: [Qemu-devel] [PATCH v2 1/3] int128: add int128_exts64()

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 10:20, Alexey Kardashevskiy ha scritto: > This adds macro to extend signed 64bit value to signed 128bit value. > > Signed-off-by: Alexey Kardashevskiy > --- > include/qemu/int128.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/include/qemu/int128.h b/include/qemu/i

Re: [Qemu-devel] [PATCH v2 3/3] vfio: Fix 128 bit handling

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 10:20, Alexey Kardashevskiy ha scritto: > iova = TARGET_PAGE_ALIGN(section->offset_within_address_space); > -end = (section->offset_within_address_space + > int128_get64(section->size)) & > - TARGET_PAGE_MASK; > +llend = int128_make64(section->offset_within_addr

Re: [Qemu-devel] [PATCH V8 00/13] monitor: support sub command group in auto completion and help

2013-08-22 Thread Wenchao Xia
于 2013-8-20 22:04, Luiz Capitulino 写道: On Tue, 30 Jul 2013 12:03:11 -0400 Luiz Capitulino wrote: On Fri, 26 Jul 2013 11:20:29 +0800 Wenchao Xia wrote: This series make auto completion and help functions works normal for sub command, by using reentrant functions. In order to do that, global

Re: [Qemu-devel] [RFC PATCH v2 0/3] Start fixing the pvpanic mess

2013-08-22 Thread Daniel P. Berrange
On Wed, Aug 21, 2013 at 06:56:52PM +0200, Paolo Bonzini wrote: > Il 21/08/2013 18:55, Daniel P. Berrange ha scritto: > > On Wed, Aug 21, 2013 at 06:51:11PM +0200, Paolo Bonzini wrote: > >> Il 21/08/2013 18:48, Daniel P. Berrange ha scritto: > >>> No, is the right thing to be using for this from >

Re: [Qemu-devel] [PATCH] vl: allow "cont" from panicked state

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 10:38, Laszlo Ersek ha scritto: >> > To support 1.5, libvirt should simply be ready to react to unanticipated >> > GUEST_PANICKED events. reboot-on-panic will simply be broken for 1.5 >> > and Linux 3.10+ guests. :( > I'm probably misunderstanding the discussion, but it might be poss

Re: [Qemu-devel] [RFC PATCH 3/4] qmp: Add "snapshot=" option to nbd-server-add

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 10:53, Fam Zheng ha scritto: >> > This is handy but only works if the QEMU process has permission to >> > create temporary files. >> > > Yes, this is a shortcut, it has this limitation, but the good side is > it's easy to get and no other dependency. > > To avoid creating file, we'l

[Qemu-devel] [PATCH 0/2] osdep: warn if open(O_DIRECT) on fails with EINVAL

2013-08-22 Thread Stefan Hajnoczi
After trying out a few approaches, here is what I think is the simplest viable way to print a user-friendly warning if opening a file O_DIRECT fails with EINVAL. This happens on Linux tmpfs. We don't really know why we got EINVAL but if O_DIRECT was used it's a good clue that the file system does

[Qemu-devel] [PATCH 1/2] libcacard: link against qemu-error.o for error_report()

2013-08-22 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- libcacard/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcacard/Makefile b/libcacard/Makefile index 47827a0..4d15da4 100644 --- a/libcacard/Makefile +++ b/libcacard/Makefile @@ -4,7 +4,8 @@ TOOLS += vscclient$(EXESUF) # obje

Re: [Qemu-devel] [PATCH] vl: allow "cont" from panicked state

2013-08-22 Thread Michael S. Tsirkin
On Thu, Aug 22, 2013 at 11:19:44AM +0200, Paolo Bonzini wrote: > Il 22/08/2013 10:38, Laszlo Ersek ha scritto: > >> > To support 1.5, libvirt should simply be ready to react to unanticipated > >> > GUEST_PANICKED events. reboot-on-panic will simply be broken for 1.5 > >> > and Linux 3.10+ guests.

Re: [Qemu-devel] [RFC PATCH 3/4] qmp: Add "snapshot=" option to nbd-server-add

2013-08-22 Thread Fam Zheng
On Thu, 08/22 11:22, Paolo Bonzini wrote: > Il 22/08/2013 10:53, Fam Zheng ha scritto: > >> > This is handy but only works if the QEMU process has permission to > >> > create temporary files. > >> > > > Yes, this is a shortcut, it has this limitation, but the good side is > > it's easy to get and

Re: [Qemu-devel] [PATCH v2 1/3] int128: add int128_exts64()

2013-08-22 Thread Peter Maydell
On 22 August 2013 10:09, Paolo Bonzini wrote: > Il 22/08/2013 10:20, Alexey Kardashevskiy ha scritto: >> +static inline Int128 int128_exts64(int64_t a) >> +{ >> +return (Int128) { .lo = a, .hi = (a >> 63) ? -1 : 0 }; >> +} > > The "? -1 : 0" is not necessary, but the compiler will remove it at

[Qemu-devel] [PATCH 2/2] osdep: warn if open(O_DIRECT) on fails with EINVAL

2013-08-22 Thread Stefan Hajnoczi
Print a warning when opening a file O_DIRECT fails with EINVAL. This saves users a lot of time trying to figure out the EINVAL error, which is typical when attempting to open a file O_DIRECT on Linux tmpfs. Reported-by: Deepak C Shetty Signed-off-by: Stefan Hajnoczi --- util/osdep.c | 7 ++

Re: [Qemu-devel] [PATCH v2 1/3] int128: add int128_exts64()

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 11:47, Peter Maydell ha scritto: > On 22 August 2013 10:09, Paolo Bonzini wrote: >> Il 22/08/2013 10:20, Alexey Kardashevskiy ha scritto: >>> +static inline Int128 int128_exts64(int64_t a) >>> +{ >>> +return (Int128) { .lo = a, .hi = (a >> 63) ? -1 : 0 }; >>> +} >> >> The "? -1 :

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 11:50, Asias He ha scritto: > On Wed, Aug 21, 2013 at 10:16:02AM +0200, Paolo Bonzini wrote: >> Il 21/08/2013 04:02, Asias He ha scritto: >>> In block/gluster.c, we have >>> >>> gluster_finish_aiocb >>> { >>>if (retval != sizeof(acb)) { >>> qemu_mutex_lock_iothread(); /* We

Re: [Qemu-devel] [PATCH v3 6/6] hw: Clean up bogus default boot order

2013-08-22 Thread Michael S. Tsirkin
On Thu, Aug 22, 2013 at 10:39:34AM +0200, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > On Wed, Aug 21, 2013 at 06:01:45PM +0200, Markus Armbruster wrote: > >> "Michael S. Tsirkin" writes: > >> > >> > On Wed, Aug 21, 2013 at 05:10:56PM +0200, Markus Armbruster wrote: > >> >> "Mi

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Bharata B Rao
On Thu, Aug 22, 2013 at 11:06:47AM +0200, Paolo Bonzini wrote: > Il 22/08/2013 09:48, Stefan Hajnoczi ha scritto: > >> > gluster_finish_aiocb gets called from gluster thread, is it safe to > >> > create > >> > and schedule a bh from such a thread ? > >> > > >> > In my first implementation > >> >

[Qemu-devel] [PATCH] chardev: fix pty_chr_timer

2013-08-22 Thread Gerd Hoffmann
pty_chr_timer first calls pty_chr_update_read_handler(), then clears timer_tag (because it is a one-shot timer). This is the wrong order though. pty_chr_update_read_handler might re-arm time timer, and the new timer_tag gets overwitten in that case. This leads to crashes when unplugging a pty c

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 11:55, Bharata B Rao ha scritto: > This was the first apporach I had. I used to abort when writes to pipe > fail. But there were concerns raised about handling the failures gracefully > and hence we ended up doing all that error handling of completing the aio > with -EIO, closing the

Re: [Qemu-devel] [PATCH] vl: allow "cont" from panicked state

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 11:37, Michael S. Tsirkin ha scritto: >> No, you're not misunderstanding the discussion. >> >> Depending on the priorities of the pvpanic and legacy-DMA regions, it >> would break DMA channel 0. Channel 0 is (was) used for DRAM refresh, so >> it should not have any visible effect. H

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Bharata B Rao
On Thu, Aug 22, 2013 at 12:00:48PM +0200, Paolo Bonzini wrote: > Il 22/08/2013 11:55, Bharata B Rao ha scritto: > > This was the first apporach I had. I used to abort when writes to pipe > > fail. But there were concerns raised about handling the failures gracefully > > and hence we ended up doing

Re: [Qemu-devel] [PATCH] vl: allow "cont" from panicked state

2013-08-22 Thread Laszlo Ersek
On 08/22/13 11:19, Paolo Bonzini wrote: > Il 22/08/2013 10:38, Laszlo Ersek ha scritto: To support 1.5, libvirt should simply be ready to react to unanticipated GUEST_PANICKED events. reboot-on-panic will simply be broken for 1.5 and Linux 3.10+ guests. :( >> I'm probably misunderst

Re: [Qemu-devel] [PATCH v2 3/3] vfio: Fix 128 bit handling

2013-08-22 Thread Alexey Kardashevskiy
On 08/22/2013 07:11 PM, Paolo Bonzini wrote: > Il 22/08/2013 10:20, Alexey Kardashevskiy ha scritto: >> iova = TARGET_PAGE_ALIGN(section->offset_within_address_space); >> -end = (section->offset_within_address_space + >> int128_get64(section->size)) & >> - TARGET_PAGE_MASK; >> +

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Asias He
On Wed, Aug 21, 2013 at 10:16:02AM +0200, Paolo Bonzini wrote: > Il 21/08/2013 04:02, Asias He ha scritto: > > In block/gluster.c, we have > > > > gluster_finish_aiocb > > { > >if (retval != sizeof(acb)) { > > qemu_mutex_lock_iothread(); /* We are in gluster thread context */ > > .

Re: [Qemu-devel] [PATCH v3 00/24] arm: ARM11MPCore+A9MPCore+A15MPCore QOM'ification

2013-08-22 Thread Andreas Färber
Am 21.08.2013 23:01, schrieb Peter Maydell: > On 20 August 2013 16:20, Andreas Färber wrote: >> From: Andreas Färber >> >> Hello Peter, >> >> This series fully QOM'ifies A9MPCore so that it can be embedded for Tegra2. >> It goes on to do the same for A15MPCore, which had previously been taken as

Re: [Qemu-devel] [PATCH v2 1/3] int128: add int128_exts64()

2013-08-22 Thread Peter Maydell
On 22 August 2013 10:48, Paolo Bonzini wrote: > Il 22/08/2013 11:47, Peter Maydell ha scritto: >> We can avoid relying on implementation defined >> behaviour here by using >> .hi = (a < 0) ? -1 : 0; >> >> (I know we allow ourselves to assume right-shift of signed >> ints is arithmetic shift, but

Re: [Qemu-devel] [PATCH] vl: allow "cont" from panicked state

2013-08-22 Thread Laszlo Ersek
On 08/22/13 12:34, Laszlo Ersek wrote: > (I think I'm recalling this from the 0xCF9 reset control register, which > falls into the [0xCF8..0xCFA] range.) [0xCF8..0xCFB], sigh

Re: [Qemu-devel] [PATCH v2 1/3] int128: add int128_exts64()

2013-08-22 Thread Alexey Kardashevskiy
On 08/22/2013 07:48 PM, Paolo Bonzini wrote: > Il 22/08/2013 11:47, Peter Maydell ha scritto: >> On 22 August 2013 10:09, Paolo Bonzini wrote: >>> Il 22/08/2013 10:20, Alexey Kardashevskiy ha scritto: +static inline Int128 int128_exts64(int64_t a) +{ +return (Int128) { .lo = a,

Re: [Qemu-devel] [PATCH v3 11/24] cpu/a15mpcore: Embed GICState

2013-08-22 Thread Andreas Färber
Am 21.08.2013 23:05, schrieb Peter Maydell: > On 20 August 2013 16:21, Andreas Färber wrote: >> From: Andreas Färber >> >> This covers both emulated and KVM GIC. > >> @@ -35,40 +36,48 @@ typedef struct A15MPPrivState { >> uint32_t num_cpu; >> uint32_t num_irq; >> MemoryRegion cont

Re: [Qemu-devel] [PATCH] chardev: fix pty_chr_timer

2013-08-22 Thread Laszlo Ersek
On 08/22/13 11:57, Gerd Hoffmann wrote: > pty_chr_timer first calls pty_chr_update_read_handler(), then clears > timer_tag (because it is a one-shot timer). This is the wrong order > though. pty_chr_update_read_handler might re-arm time timer, and the > new timer_tag gets overwitten in that case

Re: [Qemu-devel] [PATCH v2 3/3] vfio: Fix 128 bit handling

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 12:41, Alexey Kardashevskiy ha scritto: > On 08/22/2013 07:11 PM, Paolo Bonzini wrote: >> Il 22/08/2013 10:20, Alexey Kardashevskiy ha scritto: >>> iova = TARGET_PAGE_ALIGN(section->offset_within_address_space); >>> -end = (section->offset_within_address_space + >>> int128_g

Re: [Qemu-devel] [PATCH v2 1/3] int128: add int128_exts64()

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 12:50, Alexey Kardashevskiy ha scritto: > 1) return (Int128) { .lo = a, .hi = (a < 0) ? -1 : 0 }; > 2) return (Int128) { .lo = a, .hi = (a < 0) }; > 3) return (Int128) { .lo = a, .hi = a >> 63 }; > > So with which one should I repost the patch? The second would be "-(a < 0)" actuall

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 12:28, Bharata B Rao ha scritto: > On Thu, Aug 22, 2013 at 12:00:48PM +0200, Paolo Bonzini wrote: >> Il 22/08/2013 11:55, Bharata B Rao ha scritto: >>> This was the first apporach I had. I used to abort when writes to pipe >>> fail. But there were concerns raised about handling the fa

Re: [Qemu-devel] [PATCH v3 6/6] hw: Clean up bogus default boot order

2013-08-22 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Thu, Aug 22, 2013 at 10:39:34AM +0200, Markus Armbruster wrote: >> "Michael S. Tsirkin" writes: >> >> > On Wed, Aug 21, 2013 at 06:01:45PM +0200, Markus Armbruster wrote: >> >> "Michael S. Tsirkin" writes: >> >> >> >> > On Wed, Aug 21, 2013 at 05:10:56PM +020

[Qemu-devel] [PATCH v3 1/3] int128: add int128_exts64()

2013-08-22 Thread Alexey Kardashevskiy
This adds macro to extend signed 64bit value to signed 128bit value. Signed-off-by: Alexey Kardashevskiy --- Changes: v3: * (.hi = (a >> 63) ? -1 : 0) changed to (.hi = (a < 0) ? -1 : 0) --- include/qemu/int128.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/qemu/int128.h b/in

[Qemu-devel] [PATCH v3 0/3] vfio: fixes for better support for 128 bit memory section sizes

2013-08-22 Thread Alexey Kardashevskiy
I made a couple of small patches while debugging VFIO on SPAPR which uses IOMMU MemoryRegion 2^64 bytes long. Changes: v3: * "int128: add int128_exts64()" updated v2: * added int128_exts64() function as a separate patch and used in "vfio: Fix 128 bit handling" Alexey Kardashevskiy (3): int12

[Qemu-devel] [PATCH v3 2/3] vfio: Fix debug output for int128 values

2013-08-22 Thread Alexey Kardashevskiy
Memory regions can easily be 2^64 byte long and therefore overflow for just a bit but that is enough for int128_get64() to assert. This takes care of debug printing of huge section sizes. Signed-off-by: Alexey Kardashevskiy --- hw/misc/vfio.c | 6 -- 1 file changed, 4 insertions(+), 2 delet

[Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling

2013-08-22 Thread Alexey Kardashevskiy
Upcoming VFIO on SPAPR PPC64 support will initialize the IOMMU memory region with UINT64_MAX (2^64 bytes) size so int128_get64() will assert. The patch takes care of this check. The existing type1 IOMMU code is not expected to map all 64 bits of RAM so the patch does not touch that part. Signed-o

Re: [Qemu-devel] [PATCH] vl: allow "cont" from panicked state

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 12:34, Laszlo Ersek ha scritto: > Actually it's fine to clarify these things! Hence the longish digression below. > I think before priority comes into the picture, the access size would > matter first, no? > > (I think I'm recalling this from the 0xCF9 reset control register, whi

Re: [Qemu-devel] [PATCH v5 0/8] Implement reference count for BlockDriverState [resend]

2013-08-22 Thread Stefan Hajnoczi
On Fri, Aug 09, 2013 at 06:01:53PM +0800, Fam Zheng wrote: > [resend to the correct list] > > BlockDriverState lifecycle management is needed by future features such as > image fleecing and blockdev-add. This series adds reference count to > BlockDriverState. > > The first two patches clean up tw

Re: [Qemu-devel] [RFC] Convert AioContext to Gsource sub classes

2013-08-22 Thread Stefan Hajnoczi
On Wed, Aug 21, 2013 at 05:33:41PM +0800, Wenchao Xia wrote: > 于 2013-8-21 16:45, Stefan Hajnoczi 写道: > >On Tue, Aug 20, 2013 at 05:59:58PM +0800, Wenchao Xia wrote: > >>于 2013-8-16 16:12, Wenchao Xia 写道: > >>>于 2013-8-16 15:15, Wenchao Xia 写道: > 于 2013-8-16 0:32, Michael Roth 写道: > >Quotin

Re: [Qemu-devel] [PATCH v3 11/24] cpu/a15mpcore: Embed GICState

2013-08-22 Thread Peter Maydell
On 22 August 2013 11:56, Andreas Färber wrote: > Am 21.08.2013 23:05, schrieb Peter Maydell: > Not sure if a union of only one member is permitted? We're not actually > accessing the GICState, only void* and DEVICE()/SYS_BUS_DEVICE(), so it > just needs to block the memory, hopefully without needi

Re: [Qemu-devel] [PATCHv4] add qemu-img convert -C option (skip target volume creation)

2013-08-22 Thread Stefan Hajnoczi
On Mon, Aug 12, 2013 at 12:41:50PM +0100, Alex Bligh wrote: > From: Alexandre Derumier > > Add a -C option to skip volume creation on qemu-img convert. > This is useful for targets such as rbd / ceph, where the > target volume may already exist; we cannot always rely on > qemu-img convert to crea

Re: [Qemu-devel] [PATCH]virtio: virtqueue_get_avail_bytes: fix desc_pa when loop over the indirect descriptor table

2013-08-22 Thread Stefan Hajnoczi
On Thu, Aug 22, 2013 at 02:47:16PM +0800, yinyin wrote: > virtqueue_get_avail_bytes: when found a indirect desc, we need loop over it. >/* loop over the indirect descriptor table */ >indirect = 1; >max = vring_desc_len(desc_pa, i) / sizeof(VRingDesc); >

Re: [Qemu-devel] [PATCH v3 0/3] slirp: fill mainloop with more precise timeout value

2013-08-22 Thread Stefan Hajnoczi
On Wed, Aug 21, 2013 at 10:15:49AM +0800, Liu Ping Fan wrote: > With this series, we can set the mainloop timeout more precisely when slirp > has > to emulate tcp timeout problem. > > v3: > fix comment: document timeout unit "milliseconds" > fix logic: no slirps, no timeout modifications in s

Re: [Qemu-devel] [PATCH v2] block: Introduce bs->zero_beyond_eof

2013-08-22 Thread Stefan Hajnoczi
On Thu, Aug 22, 2013 at 03:24:14PM +0800, Asias He wrote: > In 4146b46c42e0989cb5842e04d88ab6ccb1713a48 (block: Produce zeros when > protocols reading beyond end of file), we break qemu-iotests ./check > -qcow2 022. This happens because qcow2 temporarily sets ->growable = 1 > for vmstate accesses (

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

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

[Qemu-devel] [PATCH ] hw: Modified usb-tablet category from Misc to Input

2013-08-22 Thread Marcel Apfelbaum
Thanks to Markus Armbruster for finding this bug. Signed-off-by: Marcel Apfelbaum --- hw/usb/dev-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index 66c6331..5956720 100644 --- a/hw/usb/dev-hid.c +++ b/hw/usb/dev-hid.c @@ -658,7 +6

Re: [Qemu-devel] [PATCH] block: better error message for read only format name

2013-08-22 Thread Stefan Hajnoczi
On Thu, Aug 22, 2013 at 03:36:59PM +0800, Fam Zheng wrote: > When user tries to use read-only whitelist format in the command line > option, failure message was "'foo' invalid format". It might be invalid > only for writable, but valid for read-only, so it is confusing. Give the > user easier to un

Re: [Qemu-devel] [PULL 06/18] aio: stop using .io_flush()

2013-08-22 Thread Stefan Hajnoczi
On Wed, Aug 21, 2013 at 07:55:42PM +0200, Stefan Weil wrote: > this patch was committed yesterday. It breaks MinGW builds: > > aio-win32.c: In function ‘aio_poll’: > aio-win32.c:128:21: error: ‘AioHandler’ has no member named ‘opaque’ > aio-win32.c:191:25: error: ‘AioHandler’ has no member named ‘

Re: [Qemu-devel] [PATCHv4] add qemu-img convert -C option (skip target volume creation)

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 13:45, Stefan Hajnoczi ha scritto: > On Mon, Aug 12, 2013 at 12:41:50PM +0100, Alex Bligh wrote: >> > From: Alexandre Derumier >> > >> > Add a -C option to skip volume creation on qemu-img convert. >> > This is useful for targets such as rbd / ceph, where the >> > target volume may

Re: [Qemu-devel] [PATCH 3/3] pvpanic: rename to isa-pvpanic

2013-08-22 Thread Laszlo Ersek
On 08/21/13 19:06, Paolo Bonzini wrote: > Il 21/08/2013 19:07, Michael S. Tsirkin ha scritto: >> NACK > > You know that a single developer's NACK counts nothing (it can be you, > it can be me), don't you? going meta... What's this? All I know (... I think I know) about patch acceptance is that

Re: [Qemu-devel] [PATCH 3/3] pvpanic: rename to isa-pvpanic

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 14:43, Laszlo Ersek ha scritto: > On 08/21/13 19:06, Paolo Bonzini wrote: >> Il 21/08/2013 19:07, Michael S. Tsirkin ha scritto: > >>> NACK >> >> You know that a single developer's NACK counts nothing (it can be you, >> it can be me), don't you? > > going meta... > > What's this? >

[Qemu-devel] [PATCH ] qemu-help: add category headlines

2013-08-22 Thread Marcel Apfelbaum
This patch follows Markus Armbruster suggestion: A possibly better way to group help by category: instead of adding categories to each line, add category headlines, like this: Controller/Bridge/Hub devices: name "NAME", bus "BUS"... ... USB devices: name "NAME", bus "BUS"...

Re: [Qemu-devel] [PATCH V8 00/13] monitor: support sub command group in auto completion and help

2013-08-22 Thread Luiz Capitulino
On Thu, 22 Aug 2013 17:16:23 +0800 Wenchao Xia wrote: > 于 2013-8-20 22:04, Luiz Capitulino 写道: > > On Tue, 30 Jul 2013 12:03:11 -0400 > > Luiz Capitulino wrote: > > > >> On Fri, 26 Jul 2013 11:20:29 +0800 > >> Wenchao Xia wrote: > >> > >>> This series make auto completion and help functions wor

Re: [Qemu-devel] [PATCH ] hw: Modified usb-tablet category from Misc to Input

2013-08-22 Thread Andreas Färber
Am 22.08.2013 14:14, schrieb Marcel Apfelbaum: > Thanks to Markus Armbruster > for finding this bug. The simplest way to record that is: Reported-by: Markus Armbruster And since this doesn't affect all of hw/, something like "usb/dev-hid:" might been better; but Gerd as USB maintainer (CC'ed) w

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Bharata B Rao
On Thu, Aug 22, 2013 at 01:15:59PM +0200, Paolo Bonzini wrote: > Il 22/08/2013 12:28, Bharata B Rao ha scritto: > > On Thu, Aug 22, 2013 at 12:00:48PM +0200, Paolo Bonzini wrote: > >> Il 22/08/2013 11:55, Bharata B Rao ha scritto: > >>> This was the first apporach I had. I used to abort when writes

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 15:25, Bharata B Rao ha scritto: > On Thu, Aug 22, 2013 at 01:15:59PM +0200, Paolo Bonzini wrote: >> Il 22/08/2013 12:28, Bharata B Rao ha scritto: >>> On Thu, Aug 22, 2013 at 12:00:48PM +0200, Paolo Bonzini wrote: Il 22/08/2013 11:55, Bharata B Rao ha scritto: > This was the

[Qemu-devel] [PATCH 2/2] win32-aio: drop win32_aio_flush_cb()

2013-08-22 Thread Stefan Hajnoczi
The io_flush argument to qemu_aio_set_event_notifier() has been removed since the block layer learnt to drain requests by itself. Fix the Windows build for win32-aio.o by updating the qemu_aio_set_event_notifier() call and dropping win32_aio_flush_cb(). Signed-off-by: Stefan Hajnoczi --- block/

[Qemu-devel] [PATCH 0/2] win32: build fixes due to io_flush removal

2013-08-22 Thread Stefan Hajnoczi
Stefan Weil noticed that the win32 build is broken with my io_flush changes applied. The issues are simple build failures that should have been avoided by test building Windows, which I didn't. To make amends I've set up a mingw cross-compiler and have fixed the build. Sorry for the breakage. I

[Qemu-devel] [PATCH 1/2] aio-win32: replace incorrect AioHandler->opaque usage with ->e

2013-08-22 Thread Stefan Hajnoczi
The AioHandler->opaque field does not exist in aio-win32.c. The code that uses it was incorrectly copied from aio-posix.c. For Windows we can use AioHandler->e to match against AioContext->notifier. This patch fixes the Windows build for aio-win32.o. Signed-off-by: Stefan Hajnoczi --- aio-win

Re: [Qemu-devel] [PATCH v3 0/4] vmdk: Support ESX files

2013-08-22 Thread Stefan Hajnoczi
On Mon, Aug 19, 2013 at 06:54:24PM +0800, Fam Zheng wrote: > This series add support for VMFS and VMFSSPARSE extents, these types are found > in description file from ESX hosts. > > - VMFS is in monolithiFlat format (raw), but hosted in ESX. > > - VMFSSPARSE is the format we call "vmdk3" with m

[Qemu-devel] [PATCH v2] usb/dev-hid: Modified usb-tablet category from Misc to Input

2013-08-22 Thread Marcel Apfelbaum
usb-tablet device was wrongy assgined to Misc category Reported-by: Markus Armbruster Signed-off-by: Marcel Apfelbaum Reviewed-by: Andreas Färber --- Changes from v2: - Add cc to qemu-stable and Gerd Hoffmann - Changed subject prefix from hw to usb/dev-hid hw/usb/dev-hid.c | 2 +- 1 file ch

[Qemu-devel] [PATCH v3] usb/dev-hid: Modified usb-tablet category from Misc to Input

2013-08-22 Thread Marcel Apfelbaum
usb-tablet device was wrongly assigned to Misc category Reported-by: Markus Armbruster Signed-off-by: Marcel Apfelbaum Reviewed-by: Andreas Färber --- Changes from v2: - Corrected spelling Changes from v1: - Add cc to qemu-stable and Gerd Hoffmann - Changed subject prefix from hw to usb/dev-

Re: [Qemu-devel] [PATCH ] qemu-help: add category headlines

2013-08-22 Thread Andreas Färber
Am 22.08.2013 14:48, schrieb Marcel Apfelbaum: > This patch follows Markus Armbruster suggestion: > > A possibly better way to group help by category: instead of adding > categories to each line, add category headlines, like this: > > Controller/Bridge/Hub devices: > name "NAME", bus "BUS

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Bharata B Rao
On Thu, Aug 22, 2013 at 03:27:35PM +0200, Paolo Bonzini wrote: > Looking at write(2), it looks like it is impossible > > EAGAIN or EWOULDBLOCK > can't happen, blocking file descriptor > > EBADF, EPIPE > shouldn't happen

Re: [Qemu-devel] [PATCH ] qemu-help: add category headlines

2013-08-22 Thread Markus Armbruster
Andreas Färber writes: > Am 22.08.2013 14:48, schrieb Marcel Apfelbaum: >> This patch follows Markus Armbruster suggestion: >> >> A possibly better way to group help by category: instead of adding >> categories to each line, add category headlines, like this: >> >> Controller/Bridge/Hub dev

Re: [Qemu-devel] [PATCH] rdma: clean up of qemu_rdma_cleanup()

2013-08-22 Thread Michael R. Hines
On 08/12/2013 10:12 PM, Isaku Yamahata wrote: - It can't be determined by RDMAContext::cm_id != NULL if the connection is established or not. - RDMAContext::cm_id is leaked and not destroyed because it is set to NULL too early. - RDMAContext::qp is created by rdma_create_qp() so that it sho

Re: [Qemu-devel] [PATCH 0/2] win32: build fixes due to io_flush removal

2013-08-22 Thread Stefan Weil
Am 22.08.2013 15:28, schrieb Stefan Hajnoczi: > Stefan Weil noticed that the win32 build is broken with my io_flush changes > applied. The issues are simple build failures that should have been avoided > by > test building Windows, which I didn't. > > To make amends I've set up a mingw cross-comp

Re: [Qemu-devel] [PATCH] kvm: shoten the parameter list for get_real_device()

2013-08-22 Thread Alex Williamson
On Mon, 2013-08-19 at 09:19 +0800, Wei Yang wrote: > get_real_device() has 5 parameters with the last 4 is contained in the first > structure. > > This patch removes the last 4 parameters and directly use them from the first > parameter. > > Signed-off-by: Wei Yang Seems harmless enough Acked

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Paolo Bonzini
Il 22/08/2013 16:01, Bharata B Rao ha scritto: EFAULT means the buffer address is invalid, I/O error would be EIO, but... > I remember this was one of the motivations to > handle this failure. ... this write is on the pipe, not on a disk. >>> >>> Right. Failure to comple

Re: [Qemu-devel] [PATCH v2] usb/dev-hid: Modified usb-tablet category from Misc to Input

2013-08-22 Thread Andreas Färber
Am 22.08.2013 15:39, schrieb Marcel Apfelbaum: > usb-tablet device was wrongy assgined to Misc category > > Reported-by: Markus Armbruster > Signed-off-by: Marcel Apfelbaum > Reviewed-by: Andreas Färber > --- > Changes from v2: > - Add cc to qemu-stable and Gerd Hoffmann FWIW I literally mean

Re: [Qemu-devel] [PATCH ] qemu-help: add category headlines

2013-08-22 Thread Eric Blake
On 08/22/2013 08:13 AM, Markus Armbruster wrote: >>> +++ b/qdev-monitor.c >>> @@ -156,6 +156,8 @@ static void qdev_print_category_devices(DeviceCategory >>> category) >>> DeviceClass *dc; >>> GSList *list, *curr; >>> >>> +error_printf("%s devices:\n", qdev_category_get_name(catego

[Qemu-devel] [PATCH] kvm: warn if num cpus is greater than num recommended

2013-08-22 Thread Andrew Jones
The comment in kvm_max_vcpus() states that it's using the recommended procedure from the kernel API documentation to get the max number of vcpus that kvm supports. It is, but by always returning the maximum number supported. The maximum number should only be used for development purposes. qemu shou

[Qemu-devel] pvpanic plans?

2013-08-22 Thread Paolo Bonzini
The thread from yesterday has died off (perhaps also because of my inappropriate answer to Michael, for which I apologize to him and everyone). I took some time to discuss the libvirt requirements further with Daniel Berrange and Eric Blake on IRC. If anyone is interested, I can give logs. This

Re: [Qemu-devel] [PATCH] kvm: warn if num cpus is greater than num recommended

2013-08-22 Thread Eduardo Habkost
On 22/08/2013, at 12:39, Andrew Jones wrote: > The comment in kvm_max_vcpus() states that it's using the recommended > procedure from the kernel API documentation to get the max number > of vcpus that kvm supports. It is, but by always returning the > maximum number supported. The maximum number

Re: [Qemu-devel] [PATCH V8 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-22 Thread Eric Blake
On 08/22/2013 02:46 AM, Laszlo Ersek wrote: > Yes. This part of the schema is not for exposure over QMP, it just > generates stuff for OptsVisitor, and it must remain compatible with the > original, manual parsing of the option. > > This came up for V6: > > http://thread.gmane.org/gmane.comp.emul

Re: [Qemu-devel] [PATCH] kvm: warn if num cpus is greater than num recommended

2013-08-22 Thread Andreas Färber
Am 22.08.2013 18:12, schrieb Eduardo Habkost: > > On 22/08/2013, at 12:39, Andrew Jones wrote: > >> The comment in kvm_max_vcpus() states that it's using the recommended >> procedure from the kernel API documentation to get the max number >> of vcpus that kvm supports. It is, but by always retur

Re: [Qemu-devel] [PATCH V8 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-22 Thread Laszlo Ersek
On 08/22/13 18:14, Eric Blake wrote: > On 08/22/2013 02:46 AM, Laszlo Ersek wrote: >> Yes. This part of the schema is not for exposure over QMP, it just >> generates stuff for OptsVisitor, and it must remain compatible with the >> original, manual parsing of the option. >> >> This came up for V6: >

Re: [Qemu-devel] pvpanic plans?

2013-08-22 Thread Anthony Liguori
Paolo Bonzini writes: > The thread from yesterday has died off (perhaps also because of > my inappropriate answer to Michael, for which I apologize to him > and everyone). I took some time to discuss the libvirt requirements > further with Daniel Berrange and Eric Blake on IRC. If anyone is > i

Re: [Qemu-devel] [PATCH 3/3] pvpanic: rename to isa-pvpanic

2013-08-22 Thread Anthony Liguori
Laszlo Ersek writes: > On 08/21/13 19:06, Paolo Bonzini wrote: >> Il 21/08/2013 19:07, Michael S. Tsirkin ha scritto: > >>> NACK >> >> You know that a single developer's NACK counts nothing (it can be you, >> it can be me), don't you? > > going meta... > > What's this? > > All I know (... I thin

[Qemu-devel] [PATCH 01/18] qtest: Fix FMT_timeval vs time_t

2013-08-22 Thread Richard Henderson
Since FMT_timeval unconditionally uses %ld, cast tv_sec to long. Signed-off-by: Richard Henderson --- qtest.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qtest.c b/qtest.c index 74f1842..4f6963b 100644 --- a/qtest.c +++ b/qtest.c @@ -177,7 +177,7 @@ static void qt

  1   2   3   >