Re: [Qemu-devel] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second

2013-10-09 Thread Alex Bligh
On 9 Oct 2013, at 20:42, Hans de Goede wrote: > Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has > clearly shown it self by trying to make a timer fire every nano second. > > Note we have a similar problem in 1.6, 1.5 and older but there > MIN_REARM_TIMER_NS limits the

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-09 Thread Paolo Bonzini
Il 09/10/2013 23:26, Paolo Bonzini ha scritto: > Il 09/10/2013 21:41, Marcelo Tosatti ha scritto: How was that tested? For BUS_MCEERR_AO it can work, but BUS_MCEERR_AR calls force_sig_info which does this: ignored = action->sa.sa_handler == SIG_IGN; blocked

Re: [Qemu-devel] [PATCH V3 2/7] qemu-nbd: support internal snapshot export

2013-10-09 Thread Wenchao Xia
于 2013/10/10 14:00, Wenchao Xia 写道: 于 2013/10/2 0:08, Paolo Bonzini 写道: Il 26/09/2013 02:16, Wenchao Xia ha scritto: Now it is possible to directly export an internal snapshot, which can be used to probe the snapshot's contents without qemu-img convert. Signed-off-by: Wenchao Xia --- block/s

Re: [Qemu-devel] [PATCH V3 7/7] qemu-iotests: add test for snapshot in qemu-img convert

2013-10-09 Thread Wenchao Xia
于 2013/10/1 22:57, Eric Blake 写道: On 09/25/2013 06:16 PM, Wenchao Xia wrote: Signed-off-by: Wenchao Xia --- @@ -53,6 +55,7 @@ _cleanup() kill $NBD_SNAPSHOT_PID fi _cleanup_test_img +rm -f $converted_image Indentation is off. will fix.

Re: [Qemu-devel] [PATCH V3 6/7] qemu-img: add doc for param -L in convert

2013-10-09 Thread Wenchao Xia
于 2013/10/1 22:56, Eric Blake 写道: On 09/25/2013 06:16 PM, Wenchao Xia wrote: Also renamed snapshot_name to snapshot_id_or_name to tip better. s/to tip better/as a better hint of what it does/ Signed-off-by: Wenchao Xia --- qemu-img-cmds.hx |2 +- qemu-img.c |2 ++ qemu-img.t

Re: [Qemu-devel] [PATCH V3 5/7] qemu-img: add -L for snapshot in convert

2013-10-09 Thread Wenchao Xia
于 2013/10/2 0:07, Paolo Bonzini 写道: Il 26/09/2013 02:16, Wenchao Xia ha scritto: +c = getopt(argc, argv, "f:O:B:s:hce6o:pS:t:qnL:"); if (c == -1) { break; } @@ -1183,6 +1184,9 @@ static int img_convert(int argc, char **argv) case 's':

Re: [Qemu-devel] [PATCH V3 4/7] qemu-iotests: add 058 internal snapshot export with qemu-nbd case

2013-10-09 Thread Wenchao Xia
于 2013/10/1 22:53, Eric Blake 写道: On 09/25/2013 06:16 PM, Wenchao Xia wrote: Signed-off-by: Wenchao Xia --- +_export_nbd_snapshot() +{ +eval "$QEMU_NBD -v -t -b 127.0.0.1 -p $nbd_snapshot_port $TEST_IMG -l $1&" Uggh. Why do you need an eval here? Especially given that there was recently a

Re: [Qemu-devel] [PATCH V3 3/7] qemu-nbd: add doc for internal snapshot export

2013-10-09 Thread Wenchao Xia
于 2013/10/1 22:49, Eric Blake 写道: On 09/25/2013 06:16 PM, Wenchao Xia wrote: Signed-off-by: Wenchao Xia --- qemu-nbd.c| 11 ++- qemu-nbd.texi | 11 ++- 2 files changed, 20 insertions(+), 2 deletions(-) This should be squashed into 2/7. When adding new options, the d

Re: [Qemu-devel] [PATCH V3 2/7] qemu-nbd: support internal snapshot export

2013-10-09 Thread Wenchao Xia
于 2013/10/2 0:08, Paolo Bonzini 写道: Il 26/09/2013 02:16, Wenchao Xia ha scritto: Now it is possible to directly export an internal snapshot, which can be used to probe the snapshot's contents without qemu-img convert. Signed-off-by: Wenchao Xia --- block/snapshot.c | 18

Re: [Qemu-devel] [PATCH V3 1/7] snapshot: distinguish id and name in load_tmp

2013-10-09 Thread Wenchao Xia
于 2013/10/1 22:35, Eric Blake 写道: On 09/25/2013 06:16 PM, Wenchao Xia wrote: Since later this function will be used so improve it. The only caller of it now is qemu-img, and it is not impacted by introduce function bdrv_snapshot_load_tmp_by_id_or_name() that call bdrv_snapshot_load_tmp() twice t

Re: [Qemu-devel] savevm/loadvm

2013-10-09 Thread Alexey Kardashevskiy
On 10/09/2013 06:47 PM, Paolo Bonzini wrote: > Il 09/10/2013 09:15, Alexey Kardashevskiy ha scritto: >> Sorry for my ignorance (I never ever touched this part of qemu) but how can >> you possibly avoid block.c while doing savevm? The qcow2 driver must not >> use posix read()/write(), right? So no m

Re: [Qemu-devel] [PATCH v2 2/4] Curling: cmdline interface.

2013-10-09 Thread Jules
On Wed, 2013-10-09 at 06:02 -0600, Eric Blake wrote: > [your emailer munged the reply, making it a bit hard to read. Are you > set for plain-text-only mail to the list?] Thanks VERY much for remind me that, I'm using another client now. > On 10/09/2013 12:49 AM, junqing.w...@cs2c.com.cn wrote: >

[Qemu-devel] [PATCH] block: improve error message for read-only whitelisted driver

2013-10-09 Thread Fam Zheng
Supplement of 7780d47, with message reworded and format probe case included: print an easy to understand message, when user tries to open a read-only format as read-write. Signed-off-by: Fam Zheng --- block.c| 8 +++- blockdev.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) d

Re: [Qemu-devel] problems with 1G hugepages and linux 3.12-rc3

2013-10-09 Thread Andrea Arcangeli
Hi Andy, > On Sun, Oct 06, 2013 at 02:47:41AM +0200, andy123 wrote: > > Hi, > > > > as the subject states, I have some problems with 1G hugepages with > > qemu(-vfio-git) on Linux 3.12-rc3. > > > > I start qemu like this, for example: > > "/usr/bin/qemu-system-x86_64 -enable-kvm -m 1024 -mem-pa

Re: [Qemu-devel] [PATCHv3 3/3] seccomp: general fixes

2013-10-09 Thread Paul Moore
On Tuesday, October 08, 2013 09:42:26 PM Eduardo Otubo wrote: > 1) On qemu-seccomp.c:255, the variable ctx was being used > uninitialized; now it's initialized with NULL and it's being checked at > the end of the function. > > 2) Changed the name of the command line option from "enable" to > "sa

Re: [Qemu-devel] [PATCHv3 1/3] seccomp: adding blacklist support

2013-10-09 Thread Paul Moore
On Tuesday, October 08, 2013 09:42:24 PM Eduardo Otubo wrote: > v3: The "-netdev tap" option is checked in the vl.c file during the > process of the command line argument list. It sets tap_enabled to true > or false according to the configuration found. Later at the seccomp > filter installation, t

Re: [Qemu-devel] [patch 0/2] force -mem-path RAM allocation

2013-10-09 Thread Paolo Bonzini
Il 09/10/2013 22:05, Marcelo Tosatti ha scritto: >>> > > Can the new option format for memory be created incrementally on >>> > > top of -mem-path-force? (agree its a good thing, it avoids proliferation >>> > > of new options). >> > >> > If you do it on top, it won't avoid proliferation, or am I

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-09 Thread Paolo Bonzini
Il 09/10/2013 21:41, Marcelo Tosatti ha scritto: >> > How was that tested? For BUS_MCEERR_AO it can work, but BUS_MCEERR_AR >> > calls force_sig_info which does this: >> > >> > ignored = action->sa.sa_handler == SIG_IGN; >> > blocked = sigismember(&t->blocked, sig); >> > i

[Qemu-devel] [Bug 1237625] [NEW] Cannot read serial from /sys/bus/usb/devices/

2013-10-09 Thread debfreak
Public bug reported: After an update to qemu 1.6 I can't start any of my images. Qemu always crashs. I tried it with root and as a normal user... Here are some log entries I get: Type: Warning Num: 85 Date: 2013.10.09 23:48:46 549 Sender: bool System_Info::Scan_USB_Sys( QList &list ) Message: Can

Re: [Qemu-devel] [PATCH 12/13] Add xxspltw

2013-10-09 Thread Richard Henderson
On 10/04/2013 06:26 AM, Tom Musta wrote: > +case 0: { > +tcg_gen_mov_i64(b, cpu_vsrh(xB(ctx->opcode))); > +tcg_gen_andi_i64(b, b, 0xul); > +tcg_gen_shri_i64(b, b, 32); > +break; ... > +case 2: { > +tcg_gen_m

Re: [Qemu-devel] [PATCH 11/13] Add xxsel

2013-10-09 Thread Richard Henderson
On 10/04/2013 06:24 AM, Tom Musta wrote: > +tcg_gen_and_i64(b, b, c); > +tcg_gen_not_i64(c, c); > +tcg_gen_and_i64(a, a, c); tcg_gen_andc_i64. > +#define GEN_XXSEL() \ > +GEN_XXSEL_ROW(0x00) \ > +GEN_XXSEL_ROW(0x01) \ Why bother with defining GEN_XXSEL when its only used once? Surely

Re: [Qemu-devel] [PATCH 10/13] Add xxmrgh/xxmrgl

2013-10-09 Thread Richard Henderson
On 10/04/2013 06:23 AM, Tom Musta wrote: > +tcg_gen_andi_i64(a0, a0, 0xul); \ > +tcg_gen_shli_i64(a1, a1, 32); \ > +tcg_gen_shri_i64(b0, b0, 32); \ > +tcg_gen_andi_i64(b0, b0, 0xul);

Re: [Qemu-devel] [patch 0/2] force -mem-path RAM allocation

2013-10-09 Thread Marcelo Tosatti
On Wed, Oct 09, 2013 at 08:23:26AM +0200, Markus Armbruster wrote: > Marcelo Tosatti writes: > > > On Tue, Oct 08, 2013 at 10:02:26AM +0200, Paolo Bonzini wrote: > >> Il 08/10/2013 09:32, Markus Armbruster ha scritto: > >> > We have > >> > > >> > -mem-path FILE provide backing storage for g

Re: [Qemu-devel] [PATCH 27/28] memory: cpu_physical_memory_set_dirty_range() now uses bitmap operations

2013-10-09 Thread Eric Blake
On 10/09/2013 05:28 AM, Juan Quintela wrote: > We were setting a range of bits, so use bitmap_set(). > > Note: xen has always been wrong, and should have used start insntead s/insntead/instead/ > of addr from the beggining. s/beggining/beginning/ > > Signed-off-by: Juan Quintela > --- > inc

Re: [Qemu-devel] [PATCH 04/13] Add lxvw4x

2013-10-09 Thread Richard Henderson
On 10/04/2013 06:16 AM, Tom Musta wrote: > +tcg_gen_shli_tl(xth, xth, 32); > +tcg_gen_addi_tl(EA, EA, 4); > +gen_qemu_ld32u(ctx, tmp, EA); > +tcg_gen_or_tl(xth, xth, tmp); Better with deposit_i64. r~

Re: [Qemu-devel] [PATCH 26/28] memory: use find_next_bit() to find dirty bits

2013-10-09 Thread Eric Blake
On 10/09/2013 05:28 AM, Juan Quintela wrote: > This operation is way faster that doing it bit by bit. s/that/than/ > > Signed-off-by: Juan Quintela > --- > include/exec/memory-internal.h | 15 ++- > 1 file changed, 6 insertions(+), 9 deletions(-) -- Eric Blake eblake redhat com

[Qemu-devel] [ANNOUNCE] QEMU 1.6.1 Stable released

2013-10-09 Thread Michael Roth
Hi everyone, I am pleased to announce that the QEMU v1.6.1 stable release is now available at: http://wiki.qemu.org/download/qemu-1.6.1.tar.bz2 v1.6.1 is now tagged in the official qemu.git repository, and the stable-1.6 branch has been updated accordingly: http://git.qemu.org/?p=qemu.git;a

Re: [Qemu-devel] [PATCH 19/28] memory: split dirty bitmap into three

2013-10-09 Thread Eric Blake
On 10/09/2013 05:28 AM, Juan Quintela wrote: > After all the previous patches, spliting the bitmap gets direct. > > ToDo: Why can't i include "exec/memory.h" into cpu-all.h? This is the > reason that I have duplicated DIRTY_MEMORY_NUM. > > ToDo2: current bitmaps have one int as index, this

[Qemu-devel] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second

2013-10-09 Thread Hans de Goede
Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has clearly shown it self by trying to make a timer fire every nano second. Note we have a similar problem in 1.6, 1.5 and older but there MIN_REARM_TIMER_NS limits the wakeups caused by audio being active to 4000 times / seco

[Qemu-devel] [PATCH 2/2] audio: Lower default wakeup rate to 100 times / second

2013-10-09 Thread Hans de Goede
This is more then plenty to keep audio card fifos filles / emptied. This drops host cpu-load for audio playback inside a linux vm from 13% to 9%. Signed-off-by: Hans de Goede --- audio/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/audio.c b/audio/audio.c inde

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-09 Thread Marcelo Tosatti
On Wed, Oct 09, 2013 at 10:05:44AM +0200, Paolo Bonzini wrote: > Il 08/10/2013 23:51, Marcelo Tosatti ha scritto: > > On Tue, Oct 08, 2013 at 10:03:48AM +0200, Paolo Bonzini wrote: > >> Il 08/10/2013 02:41, Marcelo Tosatti ha scritto: > >>> +/* unblock SIGBUS */ > >>> +pthread_sigma

Re: [Qemu-devel] [PATCH 13/28] memory: use DIRTY_MEMORY_* instead of *_DIRTY_FLAG

2013-10-09 Thread Eric Blake
On 10/09/2013 05:28 AM, Juan Quintela wrote: > Instead of the bitmap, we use the bitmap number. Once done this, we s/done this/this is done/ > change all names from dirty_flag to memory regions naming of client. > > Signed-off-by: Juan Quintela > --- -- Eric Blake eblake redhat com+1-9

Re: [Qemu-devel] [PATCH 14/28] memory: use bit 2 for migration

2013-10-09 Thread Eric Blake
On 10/09/2013 05:28 AM, Juan Quintela wrote: > For historical reasons it was bit 3. One there create a constant to s/One there/Once there,/ > know the number of clients. > > Signed-off-by: Juan Quintela > --- -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library

Re: [Qemu-devel] [PATCH 08/28] exec: simplify notdirty_mem_write()

2013-10-09 Thread Eric Blake
On 10/09/2013 01:10 PM, Eric Blake wrote: > On 10/09/2013 05:28 AM, Juan Quintela wrote: >> We don't need to make special things for CODE, just set the other two bits >> >> Signed-off-by: Juan Quintela >> --- >> exec.c | 8 ++-- >> 1 file changed, 2 insertions(+), 6 deletions(-) >> > >> -

Re: [Qemu-devel] [PATCH 12/28] memory: cpu_physical_memory_mask_dirty_range() allways clear a single flag

2013-10-09 Thread Eric Blake
On 10/09/2013 05:28 AM, Juan Quintela wrote: > Document it s/allways/always/ in the subject -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 09:03 PM, Paolo Bonzini wrote: Il 09/10/2013 20:49, Hans de Goede ha scritto: I wonder whether it's meant to be 1 millisecond or 1 microsecond? Maybe once it was 1 ms, this code just exists to keep the buffers of a soundcard filled / emptied in time. 100 times / second is m

Re: [Qemu-devel] [PATCH 08/28] exec: simplify notdirty_mem_write()

2013-10-09 Thread Eric Blake
On 10/09/2013 05:28 AM, Juan Quintela wrote: > We don't need to make special things for CODE, just set the other two bits > > Signed-off-by: Juan Quintela > --- > exec.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > -dirty_flags |= (0xff & ~CODE_DIRTY_FLAG); > -cp

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Paolo Bonzini
Il 09/10/2013 20:49, Hans de Goede ha scritto: >> >> I wonder whether it's meant to be 1 millisecond or 1 microsecond? > > Maybe once it was 1 ms, this code just exists to keep the buffers > of a soundcard filled / emptied in time. 100 times / second is more > then plenty for that, so that is what

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 08:36 PM, Alex Bligh wrote: On 9 Oct 2013, at 19:28, Alex Bligh wrote: static void audio_reset_timer (AudioState *s) { if (audio_is_timer_needed ()) { timer_mod (s->ts, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + 1); } else { timer_del (s->ts); } } st

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Alex Bligh
On 9 Oct 2013, at 19:28, Alex Bligh wrote: >> >> static void audio_reset_timer (AudioState *s) >> { >> if (audio_is_timer_needed ()) { >> timer_mod (s->ts, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + 1); >> } >> else { >> timer_del (s->ts); >> } >> } >> >> static void audio_time

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Alex Bligh
On 9 Oct 2013, at 19:03, Hans de Goede wrote: > static void audio_reset_timer (AudioState *s) > { >if (audio_is_timer_needed ()) { >timer_mod (s->ts, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + 1); >} >else { >timer_del (s->ts); >} > } > > static void audio_timer (voi

Re: [Qemu-devel] [PATCH 28/28] memory: cpu_physical_memory_clear_dirty_range() now uses bitmap operations

2013-10-09 Thread Richard Henderson
On 10/09/2013 04:28 AM, Juan Quintela wrote: > We were clearing a range of bits, so use bitmap_set(). Comment is slightly wrong. ;-) > > Signed-off-by: Juan Quintela > --- > include/exec/memory-internal.h | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/inc

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 08:03 PM, Hans de Goede wrote: So I started looking for suspecious timers under audio/*.c and immediately found this in audio/audio.c : static void audio_reset_timer (AudioState *s) { if (audio_is_timer_needed ()) { timer_mod (s->ts, qemu_clock_get_ns(QEMU_CLO

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 04:37 PM, Paolo Bonzini wrote: Il 09/10/2013 14:58, Hans de Goede ha scritto: I still think we should add my patch in some form, since the lock starvation caused by timers set to expire in the past could still happen in other cases, esp for timer users who take a time stamp

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 03:18 PM, Alex Bligh wrote: qemu_mod_timer(timer->timer, qemu_get_clock_ms(rt_clock) + ms); qemu_mod_timer does not exist in master. This line is now: timer_mod(timer->timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + ms); Ah yes my bad, I was accidentally looking a

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 06:26 PM, Paolo Bonzini wrote: Il 09/10/2013 18:19, Alex Bligh ha scritto: Do you also agree that the equivalent workaround, before Alex's patch, was MIN_REARM_TIMER_NS (and thus 250 microseconds)? I don't think this was the case, as if it's a timer constantly expiring we'd

Re: [Qemu-devel] [RFC] map 64-bit PCI devices after all possible RAM

2013-10-09 Thread Igor Mammedov
On Wed, 09 Oct 2013 15:12:08 +0200 Gerd Hoffmann wrote: > On Mi, 2013-10-09 at 14:23 +0200, Igor Mammedov wrote: > > I'm posting it to get an oppinion on one of possible approaches > > on where to map a hotplug memory. > > > > This patch assumes that a space for hotplug memory is located right >

Re: [Qemu-devel] [PATCH v5] Extend qemu-ga's 'guest-info' command to expose flag 'success-response'

2013-10-09 Thread Michael Roth
Quoting Mark Wu (2013-10-08 21:37:26) > Now we have several qemu-ga commands not returning response on success. > It has been documented in qga/qapi-schema.json already. This patch exposes > the 'success-response' flag by extending 'guest-info' command. With this > change, the clients can handle th

Re: [Qemu-devel] [PATCH v4] Add interface to traverse the qmp command list by QmpCommand

2013-10-09 Thread Michael Roth
Quoting Mark Wu (2013-10-08 22:25:07) > In the original code, qmp_get_command_list is used to construct > a list of all commands' name. To get the information of all qga > commands, it traverses the name list and search the command info > with its name. So it can cause O(n^2) in the number of comm

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Alex Bligh
On 9 Oct 2013, at 17:26, Paolo Bonzini wrote: > I think Hans already debugged it to the (supposedly) 33 Hz timer that > spice audio uses. > > If it turns out the bug is in the QEMU part of spice, I think it makes > sense _not_ to include this patch at all. > > If it turns out to be in spice its

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Paolo Bonzini
Il 09/10/2013 18:19, Alex Bligh ha scritto: >> Do you also agree that the equivalent workaround, before >> > Alex's patch, was MIN_REARM_TIMER_NS (and thus 250 microseconds)? > I don't think this was the case, as if it's a timer constantly > expiring we'd have seen select() exit as soon as it was e

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Alex Bligh
On 9 Oct 2013, at 15:37, Paolo Bonzini wrote: > > I agree. Do you also agree that the equivalent workaround, before > Alex's patch, was MIN_REARM_TIMER_NS (and thus 250 microseconds)? I don't think this was the case, as if it's a timer constantly expiring we'd have seen select() exit as soon a

Re: [Qemu-devel] [PATCH 0/4] qdev: switch reset to post-order, clean up PCI reset

2013-10-09 Thread Paolo Bonzini
Il 06/10/2013 22:34, Paolo Bonzini ha scritto: > Il 06/10/2013 20:28, Michael S. Tsirkin ha scritto: > For each PCI device I tried creating a VM with an instance of it (a few > devices at a time), and did VM resets. Earlier versions were tested by > the guy who reported the SCSI proble

Re: [Qemu-devel] [PATCH 03/13] usb-host-libusb: Detach kernel drivers earlier

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 03:35 PM, Gerd Hoffmann wrote: Hi, Assuming we have a device with multiple configurations, each configuration has a different set of interfaces, guest switches from one config to another. Do we correctly unbind kernel / claim interfaces then? Yes we still have a usb_hos

[Qemu-devel] [PULL 1/2] block/iscsi: reenable iscsi_co_get_block_status

2013-10-09 Thread Paolo Bonzini
From: Peter Lieven Commit f35c934a accidently disabled iscsi_co_get_block_status for all libiscsi versions. Its not possible to check for enumeration constants in the C preprocessor. This patch changes the check to the preprocessor constant LIBISCSI_FEATURE_IOVECTOR which was introduced shortly a

[Qemu-devel] [PULL 2/2] scsi: Allocate SCSITargetReq r->buf dynamically [CVE-2013-4344]

2013-10-09 Thread Paolo Bonzini
From: Asias He r->buf is hardcoded to 2056 which is (256 + 1) * 8, allowing 256 luns at most. If more than 256 luns are specified by user, we have buffer overflow in scsi_target_emulate_report_luns. To fix, we allocate the buffer dynamically. Signed-off-by: Asias He Tested-by: Michael Roth Si

[Qemu-devel] [PULL v2 0/2] SCSI patches for 2013-10-09

2013-10-09 Thread Paolo Bonzini
Anthony, The following changes since commit a684f3cf9b9b9c3cb82be87aafc463de8974610c: Merge remote-tracking branch 'kraxel/seabios-1.7.3.2' into staging (2013-09-30 17:15:27 -0500) are available in the git repository at: git://github.com/bonzini/qemu.git scsi-next for you to fetch changes

Re: [Qemu-devel] [PATCHv3 1/3] seccomp: adding blacklist support

2013-10-09 Thread Corey Bryant
On 10/08/2013 08:42 PM, Eduardo Otubo wrote: v3: The "-netdev tap" option is checked in the vl.c file during the process of the command line argument list. It sets tap_enabled to true or false according to the configuration found. Later at the seccomp filter installation, this value is checked

Re: [Qemu-devel] [PATCH] Ensure PCIR is aligned to 4 bytes

2013-10-09 Thread Andreas Färber
Am 09.10.2013 03:56, schrieb Brad Smith: > On 25/09/13 7:24 PM, Brad Smith wrote: >> On 21/09/13 12:38 PM, Sebastian Herbszt wrote: >>> Brad Smith wrote: On 19/09/13 12:53 PM, Sebastian Herbszt wrote: > Brad Smith wrote: >> On 20/01/13 1:12 PM, David Woodhouse wrote: >>> The PCI Fi

Re: [Qemu-devel] [PULL 0/6] VFIO updates for QEMU

2013-10-09 Thread Alex Williamson
On Wed, 2013-10-09 at 07:54 -0700, Anthony Liguori wrote: > Alex Williamson writes: > > > The following changes since commit a684f3cf9b9b9c3cb82be87aafc463de8974610c: > > > > Merge remote-tracking branch 'kraxel/seabios-1.7.3.2' into staging > > (2013-09-30 17:15:27 -0500) > > > > are availabl

Re: [Qemu-devel] [PULL 0/6] VFIO updates for QEMU

2013-10-09 Thread Anthony Liguori
Alex Williamson writes: > The following changes since commit a684f3cf9b9b9c3cb82be87aafc463de8974610c: > > Merge remote-tracking branch 'kraxel/seabios-1.7.3.2' into staging > (2013-09-30 17:15:27 -0500) > > are available in the git repository at: > > > git://github.com/awilliam/qemu-vfio.gi

[Qemu-devel] [PULL 2/2] scsi: Allocate SCSITargetReq r->buf dynamically

2013-10-09 Thread Paolo Bonzini
From: Asias He r->buf is hardcoded to 2056 which is (256 + 1) * 8, allowing 256 luns at most. If more than 256 luns are specified by user, we have buffer overflow in scsi_target_emulate_report_luns. To fix, we allocate the buffer dynamically. Signed-off-by: Asias He Tested-by: Michael Roth Si

[Qemu-devel] [PULL 0/2] SCSI patches for 2013-10-09

2013-10-09 Thread Paolo Bonzini
Anthony, The following changes since commit a684f3cf9b9b9c3cb82be87aafc463de8974610c: Merge remote-tracking branch 'kraxel/seabios-1.7.3.2' into staging (2013-09-30 17:15:27 -0500) are available in the git repository at: git://github.com/bonzini/qemu.git scsi-next for you to fetch changes

[Qemu-devel] [PULL 1/2] block/iscsi: reenable iscsi_co_get_block_status

2013-10-09 Thread Paolo Bonzini
From: Peter Lieven Commit f35c934a accidently disabled iscsi_co_get_block_status for all libiscsi versions. Its not possible to check for enumeration constants in the C preprocessor. This patch changes the check to the preprocessor constant LIBISCSI_FEATURE_IOVECTOR which was introduced shortly a

Re: [Qemu-devel] [PATCHv3 2/3] seccomp: adding command line support for blacklist

2013-10-09 Thread Eduardo Otubo
On 10/08/2013 09:42 PM, Eduardo Otubo wrote: v3: The options for blacklist in the command line also checkes the existence of "-netdev tap", leaving a warning message in a positive case. New command line options for the seccomp blacklist feature: $ qemu -sandbox on[,strict=] The strict para

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Paolo Bonzini
Il 09/10/2013 14:58, Hans de Goede ha scritto: > > > I still think we should add my patch in some form, since the lock > starvation > caused by timers set to expire in the past could still happen in other > cases, > esp for timer users who take a time stamp once and then add incremental > values

Re: [Qemu-devel] KVM Guest keymap issue

2013-10-09 Thread Matej Mailing
If I could help with some further testing, please send me more information and I will be glad to help. Thanks, Matej 2013/10/8 Jan Krupa : > On 10/08/2013 05:51 PM, Andreas Färber wrote: >> Hi, >> >> Am 08.10.2013 11:07, schrieb Matej Mailing: >>> the strange thing is that all other keys and comb

Re: [Qemu-devel] [PATCH] qcow2: Fix snapshot restoration in snapshot_create

2013-10-09 Thread Kevin Wolf
Am 09.10.2013 um 14:42 hat Max Reitz geschrieben: > If the new snapshot table could not be written in qcow2_snapshot_create, > the old snapshot table has to be restored in memory and the new one > released. This should include restoration of the old snapshot count as > well, which is added by this

Re: [Qemu-devel] [PATCH 03/13] usb-host-libusb: Detach kernel drivers earlier

2013-10-09 Thread Gerd Hoffmann
Hi, > > Assuming we have a device with multiple configurations, each > > configuration has a different set of interfaces, guest switches from one > > config to another. Do we correctly unbind kernel / claim interfaces > > then? > > Yes we still have a usb_host_detach_kernel() call in the begin

Re: [Qemu-devel] [RFC 00/28] bitmap handling optimization

2013-10-09 Thread Paolo Bonzini
Il 09/10/2013 13:28, Juan Quintela ha scritto: > Hi > > This series split the dirty bitmap (8 bits per page, only three used) > into 3 individual bitmaps. Once the conversion is done, operations > are handled by bitmap operations, not bit by bit. > > - *_DIRTY_FLAG flags are gone, now we use mem

Re: [Qemu-devel] [PATCH 5/6] qcow2: Add more overlap check bitmask macros

2013-10-09 Thread Max Reitz
On 2013-10-09 15:07, Kevin Wolf wrote: Am 20.09.2013 um 10:37 hat Max Reitz geschrieben: Introduces the macros QCOW2_OL_CONSTANT and QCOW2_OL_ALL in addition to the already existing QCOW2_OL_CACHED, signifying all metadata overlap checks that can be performed in constant time (regardless of imag

Re: [Qemu-devel] [PATCH] qcow2: Add missing space in error message

2013-10-09 Thread Kevin Wolf
Am 09.10.2013 um 14:40 hat Max Reitz geschrieben: > The error message in qcow2_downgrade about an unsupported refcount > order is missing a space. This patch adds it. > > Signed-off-by: Max Reitz Thanks, applied to the block branch. Kevin

Re: [Qemu-devel] [PATCH] qcow2: Use better type for numerical snapshot ID

2013-10-09 Thread Kevin Wolf
Am 09.10.2013 um 14:42 hat Max Reitz geschrieben: > When trying to find a new snapshot ID, the existing ones are converted > to integers using strtoul. This function returns an unsigned long, > therefore its result should be saved in an unsigned long as well. > > Signed-off-by: Max Reitz Thanks,

Re: [Qemu-devel] [PATCH] qcow2: Remove wrong metadata overlap check

2013-10-09 Thread Kevin Wolf
Am 09.10.2013 um 14:41 hat Max Reitz geschrieben: > In qcow2_write_compressed, if the compression fails, a normal cluster is > written to disk. This is done through bdrv_write on the qcow2 BDS > itself (using the guest offset), thus it is wrong to do a metadata > overlap check before. > > Signed-o

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Alex Bligh
On 9 Oct 2013, at 13:58, Hans de Goede wrote: > I got an off-list email this morning from a kind soul informing me that > he was seeing the same issue as me, but only when using audio over > spice. I've just tried things with "-device hda -device hda-duplex" > removed from my qemu cmdline and I c

Re: [Qemu-devel] [RFC] map 64-bit PCI devices after all possible RAM

2013-10-09 Thread Gerd Hoffmann
On Mi, 2013-10-09 at 14:23 +0200, Igor Mammedov wrote: > I'm posting it to get an oppinion on one of possible approaches > on where to map a hotplug memory. > > This patch assumes that a space for hotplug memory is located right > after RamSizeOver4G region and QEMU will provide romfile to specify

Re: [Qemu-devel] [PATCHv3 1/3] seccomp: adding blacklist support

2013-10-09 Thread Eduardo Otubo
On 10/08/2013 11:05 PM, Eric Blake wrote: On 10/08/2013 06:42 PM, Eduardo Otubo wrote: v3: The "-netdev tap" option is checked in the vl.c file during the process of the command line argument list. It sets tap_enabled to true or false according to the configuration found. Later at the seccomp

Re: [Qemu-devel] [PATCH 03/13] usb-host-libusb: Detach kernel drivers earlier

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 10:55 AM, Gerd Hoffmann wrote: On Di, 2013-10-08 at 21:58 +0200, Hans de Goede wrote: If we detach the kernel drivers on the first set_config, then they will be still attached when the device gets its initial reset. Causing the drivers to re-initialize the device after the res

Re: [Qemu-devel] [PATCH 5/6] qcow2: Add more overlap check bitmask macros

2013-10-09 Thread Kevin Wolf
Am 20.09.2013 um 10:37 hat Max Reitz geschrieben: > Introduces the macros QCOW2_OL_CONSTANT and QCOW2_OL_ALL in addition to > the already existing QCOW2_OL_CACHED, signifying all metadata overlap > checks that can be performed in constant time (regardless of image size > etc.) and truly all availab

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/08/2013 10:50 PM, Paolo Bonzini wrote: Il 08/10/2013 22:16, Hans de Goede ha scritto: No, it is calling main_loop_wait with nonblocking set to 0, so normally the lock would get released. But timerlistgroup_deadline_ns(&main_loop_tlg) is returning 0, causing timeout_ns to be 0, and thi

Re: [Qemu-devel] [PATCH v4] block: qemu-iotests for vhdx, read sample dynamic image

2013-10-09 Thread Kevin Wolf
Am 27.09.2013 um 14:48 hat Jeff Cody geschrieben: > This adds the VHDX format to the qemu-iotests format, and adds > a read test. The test reads from an existing sample image, that > was created with Hyper-V under Windwos Server 2012. > > The image file is a 1GB dynamic image, with 32MB blocks. >

[Qemu-devel] [PATCH 20/28] memory: unfold cpu_physical_memory_clear_dirty_flag() in its only user

2013-10-09 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/exec/memory-internal.h | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 71f198e..d6d3537 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-i

[Qemu-devel] [PATCH 14/28] memory: use bit 2 for migration

2013-10-09 Thread Juan Quintela
For historical reasons it was bit 3. One there create a constant to know the number of clients. Signed-off-by: Juan Quintela --- include/exec/memory.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 4bb20d0..a28c6bd 10064

[Qemu-devel] [PATCH 26/28] memory: use find_next_bit() to find dirty bits

2013-10-09 Thread Juan Quintela
This operation is way faster that doing it bit by bit. Signed-off-by: Juan Quintela --- include/exec/memory-internal.h | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 0c1dbfa..5a5bc0d 100644

Re: [Qemu-devel] problems with 1G hugepages and linux 3.12-rc3

2013-10-09 Thread Gleb Natapov
Copying Andrea, On Sun, Oct 06, 2013 at 02:47:41AM +0200, andy123 wrote: > Hi, > > as the subject states, I have some problems with 1G hugepages with > qemu(-vfio-git) on Linux 3.12-rc3. > > I start qemu like this, for example: > "/usr/bin/qemu-system-x86_64 -enable-kvm -m 1024 -mem-path /dev/h

[Qemu-devel] [PATCH] qcow2: Use better type for numerical snapshot ID

2013-10-09 Thread Max Reitz
When trying to find a new snapshot ID, the existing ones are converted to integers using strtoul. This function returns an unsigned long, therefore its result should be saved in an unsigned long as well. Signed-off-by: Max Reitz --- block/qcow2-snapshot.c | 5 +++-- 1 file changed, 3 insertions(

[Qemu-devel] [PATCH] qcow2: Fix snapshot restoration in snapshot_create

2013-10-09 Thread Max Reitz
If the new snapshot table could not be written in qcow2_snapshot_create, the old snapshot table has to be restored in memory and the new one released. This should include restoration of the old snapshot count as well, which is added by this patch. Signed-off-by: Max Reitz --- block/qcow2-snapsho

[Qemu-devel] [PATCH] qcow2: Remove wrong metadata overlap check

2013-10-09 Thread Max Reitz
In qcow2_write_compressed, if the compression fails, a normal cluster is written to disk. This is done through bdrv_write on the qcow2 BDS itself (using the guest offset), thus it is wrong to do a metadata overlap check before. Signed-off-by: Max Reitz --- block/qcow2.c | 8 1 file chan

[Qemu-devel] [PATCH 08/28] exec: simplify notdirty_mem_write()

2013-10-09 Thread Juan Quintela
We don't need to make special things for CODE, just set the other two bits Signed-off-by: Juan Quintela --- exec.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/exec.c b/exec.c index 07b625f..b9f2825 100644 --- a/exec.c +++ b/exec.c @@ -1447,12 +1447,8 @@ found: st

[Qemu-devel] [PATCH 07/28] memory: make cpu_physical_memory_is_dirty return bool

2013-10-09 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/exec/memory-internal.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 9cd2f53..eefe501 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-i

[Qemu-devel] [PATCH 10/28] memory: set single dirty flags when possible

2013-10-09 Thread Juan Quintela
Signed-off-by: Juan Quintela --- exec.c | 7 --- include/exec/memory-internal.h | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/exec.c b/exec.c index b9f2825..0fd9c58 100644 --- a/exec.c +++ b/exec.c @@ -1887,7 +1887,8 @@ static void invalidate

[Qemu-devel] [PATCH] qcow2: Add missing space in error message

2013-10-09 Thread Max Reitz
The error message in qcow2_downgrade about an unsupported refcount order is missing a space. This patch adds it. Signed-off-by: Max Reitz --- block/qcow2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c index d59ecbd..1385f92 100644 --- a/block/

[Qemu-devel] [PATCH 05/28] memory: create function to set a single dirty bit

2013-10-09 Thread Juan Quintela
Signed-off-by: Juan Quintela --- cputlb.c | 2 +- include/exec/memory-internal.h | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cputlb.c b/cputlb.c index 19ecf60..3aaa016 100644 --- a/cputlb.c +++ b/cputlb.c @@ -137,7 +137,7 @@ void tlb_protect_cod

[Qemu-devel] [PATCH 24/28] memory: cpu_physical_memory_get_dirty() is used as returning a bool

2013-10-09 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/exec/memory-internal.h | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index f66d2ce..de8f279 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/m

[Qemu-devel] [PATCH 13/28] memory: use DIRTY_MEMORY_* instead of *_DIRTY_FLAG

2013-10-09 Thread Juan Quintela
Instead of the bitmap, we use the bitmap number. Once done this, we change all names from dirty_flag to memory regions naming of client. Signed-off-by: Juan Quintela --- cputlb.c | 4 ++-- exec.c | 18 +- include/exec/memory-interna

[Qemu-devel] [RFC] map 64-bit PCI devices after all possible RAM

2013-10-09 Thread Igor Mammedov
I'm posting it to get an oppinion on one of possible approaches on where to map a hotplug memory. This patch assumes that a space for hotplug memory is located right after RamSizeOver4G region and QEMU will provide romfile to specify where it ends so that BIOS could know from what base to start 64

[Qemu-devel] [PATCH 19/28] memory: split dirty bitmap into three

2013-10-09 Thread Juan Quintela
After all the previous patches, spliting the bitmap gets direct. ToDo: Why can't i include "exec/memory.h" into cpu-all.h? This is the reason that I have duplicated DIRTY_MEMORY_NUM. ToDo2: current bitmaps have one int as index, this limit us to 8TB RAM guest, Should we move to long

Re: [Qemu-devel] [PATCH] ahci: set ahci mode on reset

2013-10-09 Thread Kevin Wolf
Am 28.09.2013 um 23:09 hat Michael S. Tsirkin geschrieben: > ATM we set AHCI mode on 1st GHC write. > Spec says we should set it on reset. > > Signed-off-by: Michael S. Tsirkin Thanks, applied to the block branch. Kevin

Re: [Qemu-devel] [PATCH v2 2/4] Curling: cmdline interface.

2013-10-09 Thread Eric Blake
[your emailer munged the reply, making it a bit hard to read. Are you set for plain-text-only mail to the list?] On 10/09/2013 12:49 AM, junqing.w...@cs2c.com.cn wrote: > >> +++ b/hmp.c >>> @@ -1213,10 +1213,11 @@ void hmp_migrate(Monitor *mon, const QDict *qdict) >>> int detach = qdict_ge

[Qemu-devel] [PATCH 15/28] memory: make sure that client is always inside range

2013-10-09 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/exec/memory-internal.h | 4 1 file changed, 4 insertions(+) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 3947caa..e08ac42 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @@ -43,6

  1   2   >