Re: [RFC] Unify KVM kernel-space and user-space code into a single project

2010-03-24 Thread Paolo Bonzini
On 03/22/2010 08:13 AM, Avi Kivity wrote: (btw, why are you interested in desktop-on-desktop? one use case is developers, which don't really need fancy GUIs; a second is people who test out distributions, but that doesn't seem to be a huge population; and a third is people running Windows for

Re: Another SIGFPE in display code, now in cirrus

2010-05-13 Thread Paolo Bonzini
On 05/12/2010 05:57 PM, Stefano Stabellini wrote: I guess even a src blt pitch of 0 could be useful there, however in practice I think the only rop function that was written with this case in mind has: dstpitch -= bltwidth; srcpitch -= bltwidth; if (dstpitch 0 || srcpitch 0) { /* is 0

Re: [PATCH] Make sure get_user_desc() doesn't sign extend.

2009-10-21 Thread Paolo Bonzini
On 10/21/2009 09:40 AM, Chris Lalancette wrote: The current implementation of get_user_desc() sign extends the return value because of integer promotion rules. For the most part, this doesn't matter, because the top bit of base2 is usually 0. If, however, that bit is 1, then the entire value

Re: [Linux-fbdev-devel] [Qemu-devel] Re: [PATCH] Add VirtIO Frame Buffer Support

2009-11-03 Thread Paolo Bonzini
On 11/03/2009 05:05 PM, Avi Kivity wrote: On 11/03/2009 05:29 PM, Ondrej Zajicek wrote: On Tue, Nov 03, 2009 at 11:38:18AM +0200, Avi Kivity wrote: On 11/03/2009 01:25 PM, Vincent Hanquez wrote: not sure if i'm missing the point here, but couldn't it be hypothetically extended to stuff 3d (or

Re: [PATCH master, stable-0.12] linuxboot: fix gdt address calculation

2009-12-24 Thread Paolo Bonzini
On 12/24/2009 02:38 PM, Avi Kivity wrote: The gdt address calculation in linuxboot.bin is broken in two ways: first it loads %cs into %eax, but that instruction leaves the high bits of %eax undefined and we did not clear them. Secondly, we completely ignore the incorrect %eax, and use the

Re: [PATCH 08/22] kvm: Provide sigbus services arch-independently

2011-01-27 Thread Paolo Bonzini
+505,13 @@ bool kvm_arch_stop_on_emulation_error(CPUState *env) { return true; } + +int kvm_arch_on_sigbus_vcpu(CPUState *env, int code, void *addr) +{ +return 1; +} + +int kvm_arch_on_sigbus(int code, void *addr) +{ +return 1; +} Reviewed-by: Paolo Bonzini pbonz...@redhat.com

Re: [PATCH 10/22] kvm: Set up signal mask also for !CONFIG_IOTHREAD

2011-01-28 Thread Paolo Bonzini
, kvm_init_vcpu failed: %s\n, strerror(-r)); exit(1); } +qemu_kvm_init_cpu_signals(env); } } Reviewed-by: Paolo Bonzini pbonz...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 12/22] kvm: Call qemu_kvm_eat_signals also under !CONFIG_IOTHREAD

2011-01-28 Thread Paolo Bonzini
) { +r = qemu_cpu_exec(env); +if (kvm_enabled()) { +qemu_kvm_eat_signals(env); +} +if (r == EXCP_DEBUG) { break; } } else if (env-stop) { Reviewed-by: Paolo Bonzini pbonz...@redhat.com Paolo

Re: [PATCH 13/22] Set up signalfd under !CONFIG_IOTHREAD

2011-01-28 Thread Paolo Bonzini
(sigfd, O_NONBLOCK); - -qemu_set_fd_handler2(sigfd, NULL, sigfd_handler, NULL, - (void *)(unsigned long) sigfd); - -return 0; -} - int qemu_init_main_loop(void) { int ret; Reviewed-by: Paolo Bonzini pbonz...@redhat.com Paolo -- To unsubscribe from

Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Paolo Bonzini
On 01/28/2011 08:21 AM, Yoshiaki Tamura wrote: +/* check ft_mode option */ +p = strstr(uri, ft_mode); +if (p !strcmp(p, ft_mode)) { +ft_mode = FT_INIT; +} + This works for TCP mode, but: 1) I am not sure what would happen with -incoming exec; 2) it is tricky! :)

Re: [PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-01-28 Thread Paolo Bonzini
On 01/28/2011 08:21 AM, Yoshiaki Tamura wrote: +int qemu_savevm_trans_begin(Monitor *mon, QEMUFile *f, int init) +{ +SaveStateEntry *se; +int skipped = 0; + +QTAILQ_FOREACH(se,savevm_handlers, entry) { +int len, stage, ret; + +if (se-save_live_state == NULL) { +

Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Paolo Bonzini
On 01/28/2011 02:53 PM, Yoshiaki Tamura wrote: 1) I am not sure what would happen with -incoming exec; Nothing happens if used with other protocols, but I assume you're mentioning that it's not clear from the code, which makes sense. I assume nothing just because the code for other

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Paolo Bonzini
On 01/28/2011 04:05 PM, Yoshiaki Tamura wrote: Having a scheme like kemari:tcp:host:port looks quite challenging to me. We can of course add some quick hacks for it, but adding a nice layered architecture should be more appropriate. Similar to protocols and formats in block layer? At the same

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Paolo Bonzini
On 01/28/2011 04:31 PM, Yoshiaki Tamura wrote: That's the hack I was imaging:) So your original patch is also a hack? :) Maybe this is just an issue of preference, but I'm not sure adding kemari: to be intuitive. If there were similar extensions having the same problem, I would have agreed

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-29 Thread Paolo Bonzini
On 01/29/2011 10:31 AM, Yoshiaki Tamura wrote: OK, then while keeping -incoming kemari:tcp:host:port as a strong solution, could you please explain why placing the original parser under tcp handler wasn't a good idea? With that, -incoming exec .*,ft_mode shouldn't be a problem. But a

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-29 Thread Paolo Bonzini
On 01/29/2011 12:32 PM, Yoshiaki Tamura wrote: But a hypothetical -incoming unix.*,ft_mode would have to be implemented twice. You mean Kemari should be able to use with unix domain sockets, or other local communication patch? Since Kemari needs two remote hosts, I don't see why need to

Re: KVM call agenda for Feb 1

2011-02-01 Thread Paolo Bonzini
On 01/31/2011 10:39 PM, Anthony Liguori wrote: On 01/31/2011 12:10 PM, Jan Kiszka wrote: On 2011-01-31 11:02, Juan Quintela wrote: Please send in any agenda items you are interested incovering. o KVM upstream merge: status, plans, coordination o QMP support status for 0.14. Luiz and I

Re: [PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-02-02 Thread Paolo Bonzini
On 02/01/2011 07:21 PM, Yoshiaki Tamura wrote: Paolo, I refactored the savevm functions. Could you give me your comments? I didn't review it thoroughly, but the abstractions seem okay. Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: KVM call minutes for Feb 1

2011-02-03 Thread Paolo Bonzini
On 02/01/2011 06:53 PM, Christoph Hellwig wrote: I'd really prefer to let you finish up all the major work that way before starting massive revamping like the glib main loop. Yes, the glib main loop is not going to go anywhere if it cannot be applied to both qemu and qemu-kvm. (And, I

Re: [PATCH 18/19] Introduce -k option to enable FT migration mode (Kemari).

2011-02-08 Thread Paolo Bonzini
On 02/08/2011 12:01 PM, Yoshiaki Tamura wrote: When -k option is set to migrate command, it will turn on ft_mode to start FT migration mode (Kemari). This could also use a kemari: prefix. Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH 18/18] Introduce kemari: to enable FT migration mode (Kemari).

2011-02-10 Thread Paolo Bonzini
(Kemari protocol), .user_print = monitor_user_noop, .mhandler.cmd_new = do_migrate, }, Acked-by: Paolo Bonzini pbonz...@redhat.com Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo

Re: [Qemu-devel] KVM call minutes for Feb 8

2011-02-14 Thread Paolo Bonzini
On 02/13/2011 08:57 PM, Anthony Liguori wrote: It shouldn't be able to dead lock if the locking is designed right. As an aside, one advantage of the qemuthread wrappers is that we can add lockdep mechanisms. (It's true that these could be added to glib as well, but getting stuff into glib

[PATCH v3 uq/master 00/22] Win32 iothread support

2011-02-28 Thread Paolo Bonzini
. v2-v3 Fixed structure naming, renamed qemu_signalfd_init, dropped owner tracking in QemuMutex for now. Aurelien Jarno (1): target-sh4: move intr_at_halt out of cpu_halted() Jan Kiszka (1): Refactor thread retrieval and check Paolo Bonzini (20): unlock iothread during

[PATCH v3 uq/master 02/22] implement win32 dynticks timer

2011-02-28 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-timer.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 88c7b28..122e7ed 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -1004,6 +1004,7 @@ static void win32_stop_timer

[PATCH v3 uq/master 03/22] use win32 timer queues

2011-02-28 Thread Paolo Bonzini
Multimedia timers are only useful for compatibility with Windows NT 4.0 and earlier. Plus, the implementation in Wine is extremely heavyweight. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-timer.c | 86 +++-- 1 files changed, 35

[PATCH v3 uq/master 04/22] Refactor thread retrieval and check

2011-02-28 Thread Paolo Bonzini
qemu_cpu_is_self and qemu_thread_is_self as well ass qemu_thread_get_self. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c | 22 -- exec.c |2 +- qemu-common.h |2 +- qemu

[PATCH v3 uq/master 05/22] add win32 qemu-thread implementation

2011-02-28 Thread Paolo Bonzini
For now, qemu_cond_timedwait and qemu_mutex_timedlock are left as POSIX-only functions. They can be removed later, once the patches that remove their uses are in. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- Makefile.objs|4 +- qemu-thread.c = qemu-thread

[PATCH v3 uq/master 06/22] include qemu-thread.h early

2011-02-28 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index 09ce6fe..c5743c4 100644 --- a/cpus.c +++ b/cpus.c @@ -32,6 +32,7 @@ #include kvm.h #include exec-all.h +#include qemu-thread.h #include

[PATCH v3 uq/master 08/22] remove CONFIG_THREAD

2011-02-28 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- configure |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 3036faf..4de26d2 100755 --- a/configure +++ b/configure @@ -2662,7 +2662,6 @@ if test $vnc_png != no ; then fi if test $vnc_thread

[PATCH v3 uq/master 07/22] add assertions on the owner of a QemuMutex

2011-02-28 Thread Paolo Bonzini
These are already present in the Win32 implementation, add them to the pthread wrappers as well. Use PTHREAD_MUTEX_ERRORCHECK for mutex operations. Later we'll add tracking of the owner for cond_signal/broadcast. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-thread-posix.c | 23

[PATCH v3 uq/master 01/22] unlock iothread during WaitForMultipleObjects

2011-02-28 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- os-win32.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/os-win32.c b/os-win32.c index b214e6a..c971d92 100644 --- a/os-win32.c +++ b/os-win32.c @@ -140,7 +140,9 @@ void os_host_main_loop_wait(int *timeout

[PATCH v3 uq/master 10/22] inline cpu_halted into sole caller

2011-02-28 Thread Paolo Bonzini
All implementations are now the same, and there is only one caller, so inline the function there. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpu-exec.c |9 +++-- target-alpha/exec.h | 11 --- target-arm/exec.h| 13 - target

[PATCH v3 uq/master 12/22] exit round-robin vcpu loop if cpu-stopped is true

2011-02-28 Thread Paolo Bonzini
Sometimes vcpus are stopped directly without going through -stop = 1. Exit the VCPU execution loop in this case as well. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpus.c b/cpus.c index c5743c4..785a104

[PATCH v3 uq/master 11/22] always qemu_cpu_kick after unhalting a cpu

2011-02-28 Thread Paolo Bonzini
This ensures env-halt_cond is broadcast, and the loop in qemu_tcg_wait_io_event and qemu_kvm_wait_io_event is exited naturally rather than through a timeout. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/ppc.c |2 ++ hw/sun4m.c | 10 -- hw/sun4u.c

[PATCH v3 uq/master 15/22] do not use timedwait on qemu_system_cond

2011-02-28 Thread Paolo Bonzini
qemu_main_loop_start is the only place where qemu_system_ready is set to 1. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index 4c3837f..e367b3b 100644 --- a/cpus.c +++ b/cpus.c @@ -823,7

[PATCH v3 uq/master 18/22] iothread stops the vcpu thread via IPI

2011-02-28 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus.c index 4305184..32e9352 100644 --- a/cpus.c +++ b/cpus.c @@ -1086,9 +1086,11 @@ bool cpu_exec_all(void) qemu_clock_enable(vm_clock

[PATCH v3 uq/master 19/22] merge all signal initialization with qemu_signalfd_init, rename

2011-02-28 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c | 87 ++- 1 files changed, 36 insertions(+), 51 deletions(-) diff --git a/cpus.c b/cpus.c index 32e9352..2b491a9 100644 --- a/cpus.c +++ b/cpus.c @@ -346,11 +346,37 @@ static

[PATCH v3 uq/master 20/22] provide dummy signal init functions for win32

2011-02-28 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c | 143 --- 1 files changed, 73 insertions(+), 70 deletions(-) diff --git a/cpus.c b/cpus.c index 2b491a9..e0bcb5c 100644 --- a/cpus.c +++ b/cpus.c @@ -196,6 +196,16 @@ static

[PATCH v3 uq/master 21/22] protect qemu_cpu_kick_self for Win32

2011-02-28 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus.c index e0bcb5c..7559a02 100644 --- a/cpus.c +++ b/cpus.c @@ -867,12 +867,16 @@ void qemu_cpu_kick(void *_env) void qemu_cpu_kick_self(void

[PATCH v3 uq/master 22/22] add Win32 IPI service

2011-02-28 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c | 25 ++--- qemu-thread-posix.c |9 - qemu-thread-posix.h |1 - 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/cpus.c b/cpus.c index 7559a02..077729c 100644

[PATCH v3 uq/master 16/22] do not use timedwait on qemu_pause_cond

2011-02-28 Thread Paolo Bonzini
all_vcpus_paused can start returning true after penv-stopped changes from 0 to 1. When this is done, qemu_pause_cond is always signaled. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpus.c b/cpus.c index

[PATCH v3 uq/master 13/22] always signal pause_cond after stopping a VCPU

2011-02-28 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus.c index 785a104..6cfb45b 100644 --- a/cpus.c +++ b/cpus.c @@ -1012,8 +1012,10 @@ void qemu_notify_event(void) void cpu_stop_current(void

[PATCH v3 uq/master 17/22] do not use timedwait on qemu_cpu_cond

2011-02-28 Thread Paolo Bonzini
Whenever env-created becomes true, qemu_cpu_cond is signaled by {kvm,tcg}_cpu_thread_fn. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index 8f169ad..4305184 100644 --- a/cpus.c +++ b/cpus.c

[PATCH v3 uq/master 14/22] do not use timedwait on qemu_halt_cond

2011-02-28 Thread Paolo Bonzini
resume_all_vcpus - env-halted = 0: see previous patch - qemu_cpu_has_work(env): when it becomes true, board code should set env-halted = 0 too. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpus.c b

[PATCH v3 uq/master 09/22] target-sh4: move intr_at_halt out of cpu_halted()

2011-02-28 Thread Paolo Bonzini
handling out of it, by setting this variable while executing the sleep instruction, and clearing it when the CPU has been woken-up by an interrupt, whatever the state of SR.BL. Also rename this variable in_sleep. Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Aurelien Jarno aurel...@aurel32

Re: [PATCH v3 uq/master 00/22] Win32 iothread support

2011-02-28 Thread Paolo Bonzini
On 02/28/2011 10:16 AM, Avi Kivity wrote: Why is that? uq/master is for kvm code, and this touches two or three lines? iothread code is also going in via uq/master often. I started with uq/master because I depended on Jan's changes which are now upstream, I have no problems with this going

[PATCH v4 uq/master] add win32 qemu-thread implementation

2011-02-28 Thread Paolo Bonzini
For now, qemu_cond_timedwait and qemu_mutex_timedlock are left as POSIX-only functions. They can be removed later, once the patches that remove their uses are in. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- Makefile.objs|4 +- qemu-thread.c = qemu-thread

Re: [PATCH v3 uq/master 00/22] Win32 iothread support

2011-02-28 Thread Paolo Bonzini
On 02/28/2011 01:13 PM, Avi Kivity wrote: If there's a git tree of this I'll be happy to do an autotest run. Sure, it's branch iothread-win32 of git://github.com/bonzini/qemu.git Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH v3 uq/master 00/22] Win32 iothread support

2011-03-03 Thread Paolo Bonzini
On 03/03/2011 10:07 AM, Jan Kiszka wrote: Does it fail every time? Have you tested if qemu.git also fails without the patches? Then we may have a chance to bisect. I plan to check this sometime between today and Monday. One thing Avi can answer is: do you routinely test qemu.git with or

Re: kvm crashes with spice while loading qxl

2011-03-05 Thread Paolo Bonzini
On 03/05/2011 05:35 PM, Marcelo Tosatti wrote: TCG and KVM execution behaviour can become more similar wrt locking by dropping qemu_global_mutex during generation and execution of TBs. Of course for memory or PIO accesses from vcpu context qemu_global_mutex must be acquired. -icount already

Re: kvm crashes with spice while loading qxl

2011-03-07 Thread Paolo Bonzini
On 03/07/2011 05:13 PM, Marcelo Tosatti wrote: Is write access to memory map necessary from vcpu context? At least in x86 world SMM is entered from vcpu context, so I guess yes. Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: kvm crashes with spice while loading qxl

2011-03-08 Thread Paolo Bonzini
On 03/08/2011 10:17 AM, Avi Kivity wrote: Memory map can be protected by a read-write lock initially, so that vcpu thread holds it for read. Later can be converted to URCU. rwlock is insufficient, need a way to force the vcpu off so a writer can actually do something. So we need some kind of

Re: KVM call minutes for Mar 8

2011-03-08 Thread Paolo Bonzini
On 03/08/2011 05:51 PM, Jan Kiszka wrote: iothread merge? - progressing slowly, marcelo working on it - have found regressions (signal handling code) (ifdef'd away for now) The regressions will automagically go away (to be replaced with others then...) when the switch of qemu-kvm to

Re: KVM call minutes for Mar 8

2011-03-08 Thread Paolo Bonzini
On 03/08/2011 06:10 PM, Jan Kiszka wrote: The qemu.git bit seen with my win32 patch series should also be a regression from qemu-kvm.git to qemu.git, no? Can't follow. What do you mean? I didn't understand very well Avi and Marcelo's exchange, but this test definitely 1) fails with qemu

Re: segmentation fault in qemu-kvm-0.14.0

2011-03-09 Thread Paolo Bonzini
On 03/09/2011 08:37 AM, Jan Kiszka wrote: It's probably worth validating that the iothread lock is always held when qemu_set_fd_handler2 is invoked to confirm this race theory, adding something like assert(pthread_mutex_trylock(qemu_mutex) != 0); (that's for qemu-kvm only) Alternatively,

Re: [PATCH v2] vnc: threaded server depends on io-thread

2011-03-09 Thread Paolo Bonzini
); +qemu_mutex_unlock_iothread(); } vnc_lock_queue(queue); Acked-by: Paolo Bonzini pbonz...@redhat.com for stable. For 0.15, I believe an iohandler-list lock is a better solution. Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord

Re: [PATCH 2/2] vnc: don't mess up with iohandlers in the vnc thread

2011-03-10 Thread Paolo Bonzini
On 03/10/2011 01:59 PM, Corentin Chary wrote: Instead, we now store the data in a temporary buffer, and use a socket pair to notify the main thread that new data is available. You can use a bottom half for this instead of a special socket. Signaling a bottom half is async-signal- and

Re: [PATCH 2/2] vnc: don't mess up with iohandlers in the vnc thread

2011-03-10 Thread Paolo Bonzini
On 03/10/2011 02:45 PM, Anthony Liguori wrote: On 03/10/2011 07:06 AM, Paolo Bonzini wrote: On 03/10/2011 01:59 PM, Corentin Chary wrote: Instead, we now store the data in a temporary buffer, and use a socket pair to notify the main thread that new data is available. You can use a bottom

Re: [PATCH 2/2] vnc: don't mess up with iohandlers in the vnc thread

2011-03-10 Thread Paolo Bonzini
On 03/10/2011 02:54 PM, Corentin Chary wrote: You can use a bottom half for this instead of a special socket. Signaling a bottom half is async-signal- and thread-safe. Bottom halves are thread safe? I don't think so. The bottom halves API is not thread safe, but calling

Re: Slow PXE boot in qemu.git (fast in qemu-kvm.git)

2011-04-12 Thread Paolo Bonzini
On 04/11/2011 10:18 PM, Jan Kiszka wrote: At least Windows should no longer we a functional blocker thanks to Paolo's work. What's left now is icount. I also have had patches ready for a while, I'll send them out. Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the

Re: [RFC PATCH 7/6] savevm: Create a new continue flag to avoid resending block name

2010-06-08 Thread Paolo Bonzini
On 06/08/2010 11:32 PM, Alex Williamson wrote: On Tue, 2010-06-08 at 15:11 -0600, Alex Williamson wrote: Allows us to compress the protocol a bit. ... @@ -284,6 +290,33 @@ int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque) return (stage == 2) (expected_time=

Re: KSM For All Via LD_PRELOAD?

2010-06-09 Thread Paolo Bonzini
On 06/09/2010 10:33 AM, Dor Laor wrote: What I'm thinking about is somehow intercepting malloc() and wrapping it so that all malloc()-ed memory gets madvise()-d as well. You can also operate at a lower level and intercept mmap and brk, not malloc. (But see below). Or is this too crazy an

Re: KVM call minutes for June 15

2010-06-16 Thread Paolo Bonzini
On 06/15/2010 05:18 PM, Chris Wright wrote: - size for each section would be useful (breaks protocol) - while size is possibly useful, breaks protocol It is not necessary to break the protocol. If you're okay with only having the size information when the migration data has been saved to

Re: [PATCH] x86 emulator: Add IRET instruction

2010-07-25 Thread Paolo Bonzini
On 07/25/2010 09:20 PM, Mohammed Gamal wrote: + if (c-op_bytes == 4) + temp_eflags = ((temp_eflags 0x257fd5) | (ctxt-eflags 0x1a)); Should this do also if (c-op_bytes == 2) temp_eflags = ((temp_eflags 0x7fd5) | (ctxt-eflags ~0xL)); ? Or better, extract a

Re: [PATCH] x86 emulator: Add IRET instruction

2010-07-26 Thread Paolo Bonzini
On 07/26/2010 02:07 AM, Mohammed Gamal wrote: On Mon, Jul 26, 2010 at 2:59 AM, Paolo Bonzinipbonz...@redhat.com wrote: On 07/25/2010 09:20 PM, Mohammed Gamal wrote: + if (c-op_bytes == 4) + temp_eflags = ((temp_eflags 0x257fd5) | (ctxt-eflags 0x1a)); Should this

Re: [PATCH] x86 emulator: Add IRET instruction

2010-07-26 Thread Paolo Bonzini
On 07/26/2010 11:00 AM, Avi Kivity wrote: On 07/26/2010 11:47 AM, Paolo Bonzini wrote: I don't think this is needed. The temp_eflags value is assigned directly to eflags if we're operand size is 16 bits. At least that's what the Intel manual says! That's fine, but please make sure that mov

Re: [PATCH] x86 emulator: Add IRET instruction

2010-07-26 Thread Paolo Bonzini
On 07/26/2010 11:00 AM, Avi Kivity wrote: On 07/26/2010 11:47 AM, Paolo Bonzini wrote: I don't think this is needed. The temp_eflags value is assigned directly to eflags if we're operand size is 16 bits. At least that's what the Intel manual says! That's fine, but please make sure that mov

Re: [PATCH] x86 emulator: Add IRET instruction

2010-07-28 Thread Paolo Bonzini
On 07/28/2010 11:38 AM, Mohammed Gamal wrote: + unsigned long mask = EFLG_CF | EFLG_PF | EFLG_AF | EFLG_ZF | EFLG_SF | EFLG_TF | +EFLG_IF | EFLG_DF | EFLG_OF | EFLG_IOPL | EFLG_NT | EFLG_RF | +EFLG_AC | EFLG_ID | (1 1); /* Last one

Re: [PATCH] x86 emulator: Add IRET instruction

2010-07-28 Thread Paolo Bonzini
On 07/28/2010 03:30 PM, Paolo Bonzini wrote: On 07/28/2010 11:38 AM, Mohammed Gamal wrote: + unsigned long mask = EFLG_CF | EFLG_PF | EFLG_AF | EFLG_ZF | EFLG_SF | EFLG_TF | + EFLG_IF | EFLG_DF | EFLG_OF | EFLG_IOPL | EFLG_NT | EFLG_RF | + EFLG_AC | EFLG_ID | (1 1); /* Last one is the reserved

Re: [PATCH 15/15] KVM: x86 emulator: Decode memory operands directly into a 'struct operand'

2010-08-02 Thread Paolo Bonzini
On 08/01/2010 04:23 PM, Avi Kivity wrote: if (c-src.type == OP_MEM) { + if (c-d NoAccess) + goto no_fetch; rc = read_emulated(ctxt, ops, c-src.addr.mem, c-src.valptr, c-src.bytes);

Re: [PATCH] KVM: x86 emulator: fix LMSW able to clear cr0.pe

2010-08-02 Thread Paolo Bonzini
On 08/02/2010 05:35 AM, Avi Kivity wrote: LMSW is documented not to be able to set cr0.pe; make it so. The code is correct, but LMSW is documented not to be able to _clear_ cr0.pe. :) Paolo Signed-off-by: Avi Kivitya...@redhat.com --- arch/x86/kvm/emulate.c |2 +- 1 files changed,

Re: [Qemu-devel] Anyone seeing huge slowdown launching qemu with Linux 2.6.35?

2010-08-03 Thread Paolo Bonzini
On 08/03/2010 10:49 PM, Anthony Liguori wrote: On the other hand we end up with stuff like only being able to add 29 virtio-blk devices to a single guest. As best as I can tell, this comes from PCI No, this comes from us being too clever for our own good and not following the way hardware

Re: [Qemu-devel] Anyone seeing huge slowdown launching qemu with Linux 2.6.35?

2010-08-04 Thread Paolo Bonzini
On 08/03/2010 11:34 PM, Anthony Liguori wrote: Comparing (from personal experience) the complexity of the Windows drivers for Xen and virtio shows that it's not a bad idea at all. Not quite sure what you're suggesting, but I could have been clearer. Instead of having virtio-blk where a virtio

Re: [PATCH] KVM: x86 emulator: cleanup for BitOp instruction emulation

2010-08-04 Thread Paolo Bonzini
On 08/04/2010 11:01 AM, Wei Yongjun wrote: Signed-off-by: Wei Yongjunyj...@cn.fujitsu.com --- arch/x86/kvm/emulate.c | 12 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index eba5a67..c05a5d7 100644 ---

Re: [PATCH] KVM: x86 emulator: fix group 8 instruction decoding

2010-08-04 Thread Paolo Bonzini
On 08/04/2010 10:27 AM, Wei Yongjun wrote: Group 8 instruction, BT[S|R|C] should be mask as BitOp. Signed-off-by: Wei Yongjunyj...@cn.fujitsu.com --- arch/x86/kvm/emulate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c

Re: [PATCHv2] KVM: x86 emulator: cleanup for BitOp instruction emulation

2010-08-04 Thread Paolo Bonzini
On 08/04/2010 11:37 AM, Wei Yongjun wrote: Signed-off-by: Wei Yongjunyj...@cn.fujitsu.com --- arch/x86/kvm/emulate.c | 12 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index eba5a67..74008ed 100644 ---

Re: [Qemu-devel] Anyone seeing huge slowdown launching qemu with Linux 2.6.35?

2010-08-04 Thread Paolo Bonzini
On 08/04/2010 04:00 PM, Gleb Natapov wrote: Maybe we're just being too fancy here. We could rewrite -kernel/-append/-initrd to just generate a floppy image in RAM, and just boot from floppy. May be. Can floppy be 100M? Well, in theory you can have 16384 bytes/sector, 256 tracks, 255

Re: [Qemu-devel] Anyone seeing huge slowdown launching qemu with Linux 2.6.35?

2010-08-04 Thread Paolo Bonzini
On 08/04/2010 06:49 PM, Anthony Liguori wrote: Right, the only question is, to you inject your own bus or do you just reuse SCSI. On the surface, it seems like reusing SCSI has a significant number of advantages. For instance, without changing the guest's drivers, we can implement PV cdroms or

Re: [PATCH 1/3] KVM: x86 emulator: fix negative bit offset BitOp instruction emulation

2010-08-06 Thread Paolo Bonzini
; break; case DstAcc: The whole series looks good now. Thanks! Reviewed-by: Paolo Bonzini pbonz...@redhat.com Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH] test: Add test for setcc instruction

2010-08-06 Thread Paolo Bonzini
On 08/06/2010 11:11 AM, Wei Yongjun wrote: Signed-off-by: Wei Yongjunyj...@cn.fujitsu.com diff --git a/x86/emulator.c b/x86/emulator.c index e278812..5c8093e 100644 --- a/x86/emulator.c +++ b/x86/emulator.c @@ -375,6 +375,44 @@ void test_btc(void *mem) report(btcl reg, r/m, a[0] ==

Re: [Qemu-devel] Win2K8 32-bit Mix of IDE and SCSI assertion

2010-08-06 Thread Paolo Bonzini
On 08/06/2010 01:08 PM, Michal Novotny wrote: Aug 5 20:43:06 172.21.59.142 kvm: Aborted Aug 5 20:43:06 172.21.59.142 kvm errno=134 when I tried to seach some information on errno=134 (based on assumption it's a standard OS error) I don't know where exactly the output is coming from, but in

Re: [Qemu-devel] [PATCH v8 5/5] RESEND: Inter-VM shared memory PCI device

2010-08-11 Thread Paolo Bonzini
On 08/11/2010 11:49 AM, Cam Macdonell wrote: The win32 problems (missing mmap, maybe more) remain. Could you please fix them? Could that be accomplished with excluding it on Windows on the makefiles? Yes, just use obj-$(CONFIG_POSIX). Paolo -- To unsubscribe from this list: send the line

Re: [Qemu-devel] [PATCH 1/2] Add kvm_set_ioeventfd_mmio_long definition for non-KVM systems

2010-08-11 Thread Paolo Bonzini
On 08/11/2010 02:32 PM, Cam Macdonell wrote: On Wed, Aug 11, 2010 at 2:28 PM, Stefan Weilw...@mail.berlios.de wrote: Am 11.08.2010 20:16, schrieb Cam Macdonell: --- kvm-stub.c | 5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/kvm-stub.c b/kvm-stub.c index

[qemu-kvm PATCH 0/3] small qemu-kvm cleanups

2010-08-12 Thread Paolo Bonzini
Nothing earth shattering. :) Paolo Bonzini (3): move kvm_set_irqfd to kvm-stub.c remove unused function make kvm_mutex_*lock static kvm-all.c |5 + kvm-stub.c |6 ++ kvm.h |9 - qemu-kvm.c |4 ++-- qemu-kvm.h |8 5 files changed, 13

[qemu-kvm PATCH 1/3] move kvm_set_irqfd to kvm-stub.c

2010-08-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- kvm-all.c |5 + kvm-stub.c |6 ++ kvm.h |9 - 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 47f58a6..78983ee 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1298,6

[qemu-kvm PATCH 2/3] remove unused function

2010-08-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-kvm.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/qemu-kvm.h b/qemu-kvm.h index 6f6c6d8..c08e9b8 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -896,11 +896,6 @@ int handle_tpr_access(void *opaque, CPUState

[qemu-kvm PATCH 3/3] make kvm_mutex_*lock static

2010-08-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-kvm.c |4 ++-- qemu-kvm.h |3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 96d458c..f46c394 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1798,13 +1798,13 @@ int kvm_set_irq(int

Re: [PATCH 2/2] KVM: x86 emulator: add XADD instruction emulation

2010-08-12 Thread Paolo Bonzini
On 08/12/2010 09:41 AM, Wei Yongjun wrote: + case 0xc0 ... 0xc1: /* xadd */ + /* Write back the register source. */ + write_register_operand(c-src, c-dst.val, c-dst.bytes); + /* Write back the memory destination with implicit LOCK prefix. */ +

[PATCH 0/4] qemu-kvm: prepare for adding eventfd usage to upstream

2010-02-10 Thread Paolo Bonzini
This patch series morphs the code in qemu-kvm's eventfd so that it looks like the code in upstream qemu. Patch 4 is not yet in upstream QEMU, I'm submitting it first to qemu-kvm to avoid conflicts. Paolo Bonzini (4): morph qemu_kvm_notify_work into qemu.git's qemu_event_increment morph

[PATCH 1/4] qemu-kvm: morph qemu_kvm_notify_work into qemu.git's qemu_event_increment

2010-02-10 Thread Paolo Bonzini
No need to loop if 8 bytes are written, since that will happen only for pipes and is harmless. eventfd writes of 8 bytes will always succeed or fail with EAGAIN. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-kvm.c | 34 -- 1 files changed, 12

[PATCH 3/4] qemu-kvm: fix placement of config-host.h inclusion

2010-02-10 Thread Paolo Bonzini
Cherry-picked from upstream f582af5. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- osdep.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/osdep.c b/osdep.c index e613e4b..616e821 100644 --- a/osdep.c +++ b/osdep.c @@ -28,14 +28,15 @@ #include errno.h

[PATCH 4/4] qemu-kvm: move qemu_eventfd to osdep.c

2010-02-10 Thread Paolo Bonzini
Upstream has no compatfd.[ch], so move the code to the most similar place. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- compatfd.c| 26 -- compatfd.h|2 -- osdep.c | 32 qemu-common.h |1 + 4 files changed

[PATCH 2/4] qemu-kvm: morph io_thread_wakeup into qemu.git's qemu_event_read

2010-02-10 Thread Paolo Bonzini
Again, no need to loop if less than a full buffer is read, the next read would return EAGAIN. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-kvm.c | 16 +--- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 669a784..50e1303

[PATCH] [uq/master] use eventfd for iothread

2010-02-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- osdep.c | 32 qemu-common.h |1 + vl.c |9 + 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/osdep.c b/osdep.c index 9059f01..9e4b17b 100644 --- a/osdep.c +++ b

Re: [PATCH] KVM: x86: Add instruction length to VCPU event state

2010-02-14 Thread Paolo Bonzini
On 02/13/2010 08:20 PM, Jan Kiszka wrote: But I still fail to see the case where event_exit_inst_len is set to anything but 1 or 2 and where it is related to anything else than exits at INT3, INT X, or INTO. What about BOUND? (I want to hide for suggesting anyone uses that instruction).

Re: buildbot failure in qemu-kvm on disable_kvm_x86_64_debian_5_0

2010-02-25 Thread Paolo Bonzini
On 02/25/2010 01:26 PM, qemu-...@buildbot.b1-systems.de wrote: The Buildbot has detected a new failure of disable_kvm_x86_64_debian_5_0 on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/disable_kvm_x86_64_debian_5_0/builds/283 Buildbot URL:

Re: Enhance perf to support KVM

2010-03-02 Thread Paolo Bonzini
On 02/26/2010 03:23 PM, Ingo Molnar wrote: I do think tools/X and tools/libc would make quite a bit of sense - this is one of the better design aspects of FreeBSD et al. It's a mistake that it's not being done. I don't see what it would buy to have tools/libc. You cannot force users to

Re: Enhance perf to support KVM

2010-03-02 Thread Paolo Bonzini
On 03/02/2010 06:12 PM, Arnaldo Carvalho de Melo wrote: You imply lockstep updates because both are on the same source tree? I don't see why that would be required, there is an ABI contract to be respected no matter where the sources for the signatories live. It's not about ABIs, it's about

Re: Ideas wiki for GSoC 2010

2010-03-11 Thread Paolo Bonzini
On 03/11/2010 08:55 AM, Avi Kivity wrote: On 03/10/2010 11:30 PM, Luiz Capitulino wrote: 2. Do we have kvm-specific projects? Can they be part of the QEMU project or do we need a different mentoring organization for it? Something really interesting is kvm-assisted tcg. I'm afraid it's a bit

Re: Ideas wiki for GSoC 2010

2010-03-11 Thread Paolo Bonzini
On 03/11/2010 12:25 PM, Alexander Graf wrote: == Write a C QMP library based on QEMU JSON and QMP code == Suggested by Anthony, mentored by Anthony?:) Possible other candidates are Luiz and Kraxel I guess? I haven't really tracked QMP that much. If you guys are okay with this, I think I

  1   2   3   4   5   6   7   8   9   10   >