[Qemu-devel] Re: Ideas wiki for GSoC 2010

2010-03-10 Thread Avi Kivity
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 too complicated to GSoC. -- err

Re: [Qemu-devel] Regression: more 0.12 regression (SeaBIOS related?)

2010-03-10 Thread Roy Tam
2010/3/11 Kevin O'Connor : > On Wed, Mar 10, 2010 at 01:24:27PM +0800, Roy Tam wrote: >> 2010/3/10 Kevin O'Connor : >> > I don't see an "Illegal Instruction" message. Instead, I see the >> > keyboard just not working. What qemu version and what command line >> > did you use? >> >> latest git toda

[Qemu-devel] Re: [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Avi Kivity
On 03/10/2010 04:04 PM, Arnd Bergmann wrote: On Tuesday 09 March 2010, Cam Macdonell wrote: We could make the masking in RAM, not in registers, like virtio, which would require no exits. It would then be part of the application specific protocol and out of scope of of this spec. T

[Qemu-devel] Re: [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Avi Kivity
On 03/10/2010 06:36 PM, Cam Macdonell wrote: On Wed, Mar 10, 2010 at 2:21 AM, Avi Kivity wrote: On 03/09/2010 08:34 PM, Cam Macdonell wrote: On Tue, Mar 9, 2010 at 10:28 AM, Avi Kivitywrote: On 03/09/2010 05:27 PM, Cam Macdonell wrote:

[Qemu-devel] Accessing host file system from QEMU VM

2010-03-10 Thread Taimoor Mirza
Hi all, Is there any way in QEMU to read/write to host file system from QEMU VM? QEMU has a Samba server in user networking that allows to access file system but isn't there any other way around? BR, Taimoor

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Avi Kivity
On 03/10/2010 07:41 PM, Paul Brook wrote: You're much better off using a bulk-data transfer API that relaxes coherency requirements. IOW, shared memory doesn't make sense for TCG Rather, tcg doesn't make sense for shared memory smp. But we knew that already. In think TCG SMP is

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Nick Piggin
On Thu, Mar 11, 2010 at 03:10:47AM +, Jamie Lokier wrote: > Paul Brook wrote: > > > > In a cross environment that becomes extremely hairy. For example the > > > > x86 > > > > architecture effectively has an implicit write barrier before every > > > > store, and an implicit read barrier before

Re: [Qemu-devel] Regression: more 0.12 regression (SeaBIOS related?)

2010-03-10 Thread Kevin O'Connor
On Wed, Mar 10, 2010 at 01:24:27PM +0800, Roy Tam wrote: > 2010/3/10 Kevin O'Connor : > > I don't see an "Illegal Instruction" message. Instead, I see the > > keyboard just not working. What qemu version and what command line > > did you use? > > latest git today. when you type fast. Bleh. Tha

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Jamie Lokier
Paul Brook wrote: > > > In a cross environment that becomes extremely hairy. For example the x86 > > > architecture effectively has an implicit write barrier before every > > > store, and an implicit read barrier before every load. > > > > Btw, x86 doesn't have any implicit barriers due to ordina

[Qemu-devel] [PATCH 2/6] Use TARGET_VIRT_ADDR_SPACE_BITS in h2g_valid.

2010-03-10 Thread Richard Henderson
Previously, only 32-bit guests had a proper check for the validity of the virtual address. Extend that check to 64-bit guests with a restricted virtual address space. Signed-off-by: Richard Henderson --- cpu-all.h | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff

[Qemu-devel] [PATCH 5/6] Implement multi-level page tables.

2010-03-10 Thread Richard Henderson
Define L1_MAP_ADDR_SPACE_BITS to be either the virtual address size (in user mode) or physical address size (in system mode), and use that to size l1_map. This rewrites page_find_alloc, page_flush_tb, and walk_memory_regions. Use TARGET_PHYS_ADDR_SPACE_BITS for the physical memory map based off o

[Qemu-devel] [PATCH 4/6] linux-user: Fix mmap_find_vma returning invalid addresses.

2010-03-10 Thread Richard Henderson
Don't return addresses that aren't properly aligned for the guest, e.g. when the guest has a larger page size than the host. Don't return addresses that are outside the virtual address space for the target, by paying proper attention to the h2g/g2h macros. At the same time, place the default mapp

[Qemu-devel] [PATCH 1/6] Move TARGET_PHYS_ADDR_SPACE_BITS to target-*/cpu.h.

2010-03-10 Thread Richard Henderson
Removes a set of ifdefs from exec.c. Introduce TARGET_VIRT_ADDR_SPACE_BITS for all targets other than Alpha. This will be used for page_find_alloc, which is supposed to be using virtual addresses in the first place. Signed-off-by: Richard Henderson --- exec.c | 17 --

[Qemu-devel] [PATCH 3/6] linux-user: Use h2g_valid in qemu_vmalloc.

2010-03-10 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/mmap.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 25fc0b2..65fdc33 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -80,16 +80,15 @@ void mmap_unlock(void) v

[Qemu-devel] [PATCH 6/6] Fix last page errors in page_check_range and page_set_flags.

2010-03-10 Thread Richard Henderson
The addr < end comparison prevents iterating over the last page in the guest address space; an iteration based on length avoids this problem. At the same time, assert that the given address is in the guest address space. Signed-off-by: Richard Henderson --- exec.c | 54 +++

[Qemu-devel] [PATCH 0/6] Multi-level page tables and userland mapping fixes, v3

2010-03-10 Thread Richard Henderson
Changes since v2: * Fix two errors pointed out by pbrook: l1_map size in system mode, and h2g_valid definition for 64-on-32-bit. * Assertions that addresses are not outside the bounds of the guest address space. * Re-base vs master, after l1_map_phys changes. r~ Richard Henderson

[Qemu-devel] Re: [PATCH 6/7] input: make vnc use mouse mode notifiers

2010-03-10 Thread Gerd Hoffmann
On 03/10/10 17:51, Anthony Liguori wrote: When we switch to absolute mode, we send out a notification (if the client supports it). Today, we only send this notification when the client sends us a mouse event and we're in the wrong mode. Very nice. ACK for the whole patch series. cheers, Ge

[Qemu-devel] Ideas wiki for GSoC 2010

2010-03-10 Thread Luiz Capitulino
Hi there, Our wiki page for the Summer of Code 2010 is doing quite well: http://wiki.qemu.org/Google_Summer_of_Code_2010 Now the most important is: 1. Get mentors assigned to projects. Just put your name and email in the right field. It's ok and even desirable to have two mentors per pro

Re: [Qemu-devel] [PATCH 0/3]: BLOCK_WATERMARK QMP event

2010-03-10 Thread Anthony Liguori
On 03/10/2010 02:40 AM, Kevin Wolf wrote: Am 10.03.2010 00:08, schrieb Anthony Liguori: On 03/09/2010 04:53 PM, Luiz Capitulino wrote: Hi, This series is based on a previous series submitted by Uri Lublin: http://lists.gnu.org/archive/html/qemu-devel/2009-03/msg00864.html

Re: [Qemu-devel] Re: [PATCH 0/3]: BLOCK_WATERMARK QMP event

2010-03-10 Thread Luiz Capitulino
On Wed, 10 Mar 2010 10:28:43 +0100 Christoph Hellwig wrote: > On Wed, Mar 10, 2010 at 09:33:31AM +0100, Kevin Wolf wrote: > > When should a low watermark trigger? Images only ever grow, so testing > > if the highest allocated block goes below some watermark would never > > work (except for some u

Re: [Qemu-devel] [PATCH 0/3]: BLOCK_WATERMARK QMP event

2010-03-10 Thread Luiz Capitulino
On Wed, 10 Mar 2010 09:40:42 +0100 Kevin Wolf wrote: > Am 10.03.2010 00:08, schrieb Anthony Liguori: > > On 03/09/2010 04:53 PM, Luiz Capitulino wrote: > >> Hi, > >> > >> This series is based on a previous series submitted by Uri Lublin: > >> > >> http://lists.gnu.org/archive/html/qemu-devel/

Re: [Qemu-devel] [PATCH 0/3]: BLOCK_WATERMARK QMP event

2010-03-10 Thread Luiz Capitulino
On Tue, 09 Mar 2010 17:55:41 -0600 Anthony Liguori wrote: > On 03/09/2010 05:25 PM, Luiz Capitulino wrote: > > Also note that this applies for other events and if this becomes the > > standard mode of operation, the end result is that we're delegating > > event generation for the management too

Re: [Qemu-devel] Summer of Code 2010

2010-03-10 Thread Natalia Portillo
I've expanded my suggestions to the new template with description :p El 10/03/2010, a las 20:11, Luiz Capitulino escribió: On Tue, 9 Mar 2010 15:55:39 + Natalia Portillo wrote: http://wiki.qemu.org/Google_Summer_of_Code_2010 This is a start. Thanks a lot Natalia, I've edited the whole

Re: [Qemu-devel] Summer of Code 2010

2010-03-10 Thread Luiz Capitulino
On Tue, 9 Mar 2010 15:55:39 + Natalia Portillo wrote: > http://wiki.qemu.org/Google_Summer_of_Code_2010 > > This is a start. Thanks a lot Natalia, I've edited the whole page and created a common template for all projects. I will talk more about this in a separate email.

Re: [Qemu-devel] Summer of Code 2010

2010-03-10 Thread Luiz Capitulino
On Tue, 9 Mar 2010 15:53:15 +0100 (CET) Johannes Schindelin wrote: > Hi, > > On Tue, 9 Mar 2010, Luiz Capitulino wrote: > > > On Tue, 9 Mar 2010 10:31:23 +0100 (CET) > > Johannes Schindelin wrote: > > > > > On Mon, 8 Mar 2010, Luiz Capitulino wrote: > > > > > > > Google has this wonderful p

Re: [Qemu-devel] [PATCH] hw/usb-msd: fix some usb requests

2010-03-10 Thread David S. Ahern
On 03/10/2010 02:45 AM, Arnaud Patard (Rtp) wrote: > > The usb-msd device emulation needs some small tweaks in the requests > emulations. For instance, the reset/maxlun requests are class/interface > specific so requests for them with the type class and recipient interface > bits sets have to b

Re: [Qemu-devel] Re: Summer of Code 2010

2010-03-10 Thread Johannes Schindelin
Hi, On Wed, 10 Mar 2010, Paolo Bonzini wrote: > On 03/09/2010 07:36 PM, Johannes Schindelin wrote: > > > On Tue, 9 Mar 2010, Paolo Bonzini wrote: > > > > > On 03/09/2010 05:01 PM, Natalia Portillo wrote: > > > > Documenting QEMU's hardware model may be also a good idea for > > > > GSoC2010, as m

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Paul Brook
> > You're much better off using a bulk-data transfer API that relaxes > > coherency requirements. IOW, shared memory doesn't make sense for TCG > > Rather, tcg doesn't make sense for shared memory smp. But we knew that > already. In think TCG SMP is a hard, but soluble problem, especially when

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Avi Kivity
On 03/10/2010 07:13 PM, Anthony Liguori wrote: On 03/10/2010 03:25 AM, Avi Kivity wrote: On 03/09/2010 11:44 PM, Anthony Liguori wrote: Ah yes. For cross tcg environments you can map the memory using mmio callbacks instead of directly, and issue the appropriate barriers there. Not good eno

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Anthony Liguori
On 03/10/2010 03:25 AM, Avi Kivity wrote: On 03/09/2010 11:44 PM, Anthony Liguori wrote: Ah yes. For cross tcg environments you can map the memory using mmio callbacks instead of directly, and issue the appropriate barriers there. Not good enough unless you want to severely restrict the use

[Qemu-devel] [PATCH 4/7] Add notifier for mouse mode changes

2010-03-10 Thread Anthony Liguori
Right now, DisplayState clients rely on polling the mouse mode to determine when the device is changed to an absolute device. Use a notification list to add an explicit notification. Signed-off-by: Anthony Liguori --- console.h |3 +++ input.c | 37 -

[Qemu-devel] [PATCH 7/7] sdl: use mouse mode notifier

2010-03-10 Thread Anthony Liguori
Today we poll the mouse mode whenever there is a mouse movement. There is a subtle usability problem with this though. If we're in relative mode and grab is enabled, when we change to absolute mode, we break grab. This gives a user a seamless transition when the new pointer is enabled. But beca

[Qemu-devel] [PATCH 6/7] input: make vnc use mouse mode notifiers

2010-03-10 Thread Anthony Liguori
When we switch to absolute mode, we send out a notification (if the client supports it). Today, we only send this notification when the client sends us a mouse event and we're in the wrong mode. Signed-off-by: Anthony Liguori --- vnc.c | 13 - vnc.h |2 ++ 2 files changed, 10

[Qemu-devel] [PATCH 3/7] Add kbd_mouse_has_absolute()

2010-03-10 Thread Anthony Liguori
kbd_mouse_is_absolute tells us whether the current mouse handler is an absolute device. kbd_mouse_has_absolute tells us whether we have any device that is capable of absolute input. This lets us tell a user that they have configured an absolute device but that the guest is not currently using it.

[Qemu-devel] [PATCH 5/7] Expose whether a mouse is an absolute device via QMP and the human monitor.

2010-03-10 Thread Anthony Liguori
For QMP, we just add an attribute which is backwards compatible. For the human monitor, we add (absolute) to the end of the line. Signed-off-by: Anthony Liguori --- input.c | 18 -- 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/input.c b/input.c index cbf55b7

[Qemu-devel] [PATCH 2/7] Rewrite mouse handlers to use QTAILQ and to have an activation function

2010-03-10 Thread Anthony Liguori
And convert usb-hid to use it (to avoid regression with bisection) Right now, when we do info mice and we've added a usb tablet, we don't see it until the guest starts using the tablet. We implement this behavior in order to provide a means to delay registration of a mouse handler since we treat

[Qemu-devel] [PATCH 1/7] Add support for generic notifier lists

2010-03-10 Thread Anthony Liguori
Notifiers are data-less callbacks and a notifier list is a list of registered notifiers that all are interested in a particular event. We'll use this in a few patches to implement mouse change notification. Signed-off-by: Anthony Liguori --- Makefile.objs |1 + notify.c | 53

[Qemu-devel] [PATCH] scsi-disk: fix buffer overflow

2010-03-10 Thread Gerd Hoffmann
In case s->version is shorter than 4 bytes we overflow the memcpy src buffer. Fix it by clearing the target buffer, then copy only the amount of bytes we actually have. Signed-off-by: Gerd Hoffmann --- hw/scsi-disk.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw

[Qemu-devel] Re: [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Cam Macdonell
On Wed, Mar 10, 2010 at 2:21 AM, Avi Kivity wrote: > On 03/09/2010 08:34 PM, Cam Macdonell wrote: >> >> On Tue, Mar 9, 2010 at 10:28 AM, Avi Kivity  wrote: >> >>> >>> On 03/09/2010 05:27 PM, Cam Macdonell wrote: >>> > > >> >>  Registers are used >> for synchronization

[Qemu-devel] [PATCH] fdc: fix drive property handling.

2010-03-10 Thread Gerd Hoffmann
Fix the floppy controller init wrappers to set the drive properties only in case the DriveInfo pointers passed in are non NULL. This allows to set the properties using -global. [ v2: fix code style issues pointed out by Aurelien Jarno ] Signed-off-by: Gerd Hoffmann --- hw/fdc.c | 20

[Qemu-devel] [PATCH] vnc: add no-lock-key-sync option

2010-03-10 Thread Gerd Hoffmann
Add an option to disable the heuristics which try to keep capslock and numlock state for guest and host in sync. Signed-off-by: Gerd Hoffmann --- vnc.c | 16 vnc.h |1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/vnc.c b/vnc.c index 38690e2..3cfe2ca 10

Re: [Qemu-devel] [PATCH] QMP: Really move the RESET event to qemu_system_reset()

2010-03-10 Thread Anthony Liguori
On 03/10/2010 08:54 AM, Luiz Capitulino wrote: Something bad has happened in the merge of commit 0ee44250, as the log message says it's supposed to be in qemu_system_reset() but it is do_vm_stop(). Possibly, it was a problem with the conflict resolution with ea375f9a (which has been merged first

Re: [Qemu-devel] [PATCH] QMP: Really move the RESET event to qemu_system_reset()

2010-03-10 Thread Anthony Liguori
On 03/10/2010 08:54 AM, Luiz Capitulino wrote: Something bad has happened in the merge of commit 0ee44250, as the log message says it's supposed to be in qemu_system_reset() but it is do_vm_stop(). Possibly, it was a problem with the conflict resolution with ea375f9a (which has been merged first

[Qemu-devel] Re: [PATCH] use absolute URLs for .gitmodules

2010-03-10 Thread Paolo Bonzini
On 03/10/2010 03:21 PM, Anthony Liguori wrote: If we also get rid of the savannah git repo, or plan to do so, I have no issue with reverting this patch. If someone can suggest a solution for mailing list hosting, I'd be happy to leave Savannah tomorrow. There is still the problem that "g

[Qemu-devel] Re: [PATCH] use absolute URLs for .gitmodules

2010-03-10 Thread Anthony Liguori
On 03/10/2010 08:44 AM, Avi Kivity wrote: On 03/10/2010 04:21 PM, Anthony Liguori wrote: On 03/10/2010 04:15 AM, Paolo Bonzini wrote: If we also get rid of the savannah git repo, or plan to do so, I have no issue with reverting this patch. If someone can suggest a solution for mailing list ho

[Qemu-devel] [PATCH] QMP: Really move the RESET event to qemu_system_reset()

2010-03-10 Thread Luiz Capitulino
Something bad has happened in the merge of commit 0ee44250, as the log message says it's supposed to be in qemu_system_reset() but it is do_vm_stop(). Possibly, it was a problem with the conflict resolution with ea375f9a (which has been merged first). This commit moves (again) the RESET event in

[Qemu-devel] Re: [PATCH] use absolute URLs for .gitmodules

2010-03-10 Thread Avi Kivity
On 03/10/2010 04:21 PM, Anthony Liguori wrote: On 03/10/2010 04:15 AM, Paolo Bonzini wrote: If we also get rid of the savannah git repo, or plan to do so, I have no issue with reverting this patch. If someone can suggest a solution for mailing list hosting, I'd be happy to leave Savannah tomo

[Qemu-devel] Re: [PATCH] use absolute URLs for .gitmodules

2010-03-10 Thread Anthony Liguori
On 03/10/2010 04:15 AM, Paolo Bonzini wrote: If we also get rid of the savannah git repo, or plan to do so, I have no issue with reverting this patch. If someone can suggest a solution for mailing list hosting, I'd be happy to leave Savannah tomorrow. I'm not overly eager to do a mailing lis

[Qemu-devel] Re: [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Arnd Bergmann
On Tuesday 09 March 2010, Cam Macdonell wrote: > > > > We could make the masking in RAM, not in registers, like virtio, which would > > require no exits. It would then be part of the application specific > > protocol and out of scope of of this spec. > > > > This kind of implementation would be p

[Qemu-devel] Re: [PATCH 01/14] Convert io handlers to QLIST

2010-03-10 Thread Juan Quintela
malc wrote: > On Wed, 10 Mar 2010, Juan Quintela wrote: > >> malc wrote: >> > On Wed, 10 Mar 2010, Juan Quintela wrote: >> > >> >> malc wrote: >> >> > On Wed, 10 Mar 2010, Juan Quintela wrote: >> >> >> >> >> -for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) { >> >> >> +

[Qemu-devel] Re: [PATCH 01/14] Convert io handlers to QLIST

2010-03-10 Thread malc
On Wed, 10 Mar 2010, Juan Quintela wrote: > malc wrote: > > On Wed, 10 Mar 2010, Juan Quintela wrote: > > > >> malc wrote: > >> > On Wed, 10 Mar 2010, Juan Quintela wrote: > >> > >> >> -for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) { > >> >> +QTAILQ_FOREACH(ioh, &io_

[Qemu-devel] Re: [PATCH 01/14] Convert io handlers to QLIST

2010-03-10 Thread Juan Quintela
malc wrote: > On Wed, 10 Mar 2010, Juan Quintela wrote: > >> malc wrote: >> > On Wed, 10 Mar 2010, Juan Quintela wrote: >> >> >> -for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) { >> >> +QTAILQ_FOREACH(ioh, &io_handlers, next) { >> >> if (ioh->fd == fd) >>

[Qemu-devel] Re: [PATCH 01/14] Convert io handlers to QLIST

2010-03-10 Thread malc
On Wed, 10 Mar 2010, Juan Quintela wrote: > malc wrote: > > On Wed, 10 Mar 2010, Juan Quintela wrote: > > >> -for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) { > >> +QTAILQ_FOREACH(ioh, &io_handlers, next) { > >> if (ioh->fd == fd) > >> got

[Qemu-devel] Re: [PATCH 01/14] Convert io handlers to QLIST

2010-03-10 Thread Juan Quintela
malc wrote: > On Wed, 10 Mar 2010, Juan Quintela wrote: >> -for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) { >> +QTAILQ_FOREACH(ioh, &io_handlers, next) { >> if (ioh->fd == fd) >> goto found; >> } >> ioh = qemu_mallocz(siz

Re: [Qemu-devel] [PATCH 01/14] Convert io handlers to QLIST

2010-03-10 Thread malc
On Wed, 10 Mar 2010, Juan Quintela wrote: > > Signed-off-by: Juan Quintela > --- > vl.c | 35 ++- > 1 files changed, 14 insertions(+), 21 deletions(-) > > diff --git a/vl.c b/vl.c > index 10d8e34..83ff652 100644 > --- a/vl.c > +++ b/vl.c > @@ -2597,10 +2597,12

Re: [Qemu-devel] Summer of Code 2010

2010-03-10 Thread Alexander Graf
On 10.03.2010, at 12:23, Jes Sorensen wrote: > On 03/09/10 16:56, Alexander Graf wrote: >> >> On 09.03.2010, at 16:50, Natalia Portillo wrote: >> >>> "Qemu towards what xnu expects" --> that's what I called "Mac's memory >>> space". >>> >>> Of course is not only memory, the SMU, TPM module,

Re: [Qemu-devel] Summer of Code 2010

2010-03-10 Thread Jes Sorensen
On 03/09/10 16:56, Alexander Graf wrote: On 09.03.2010, at 16:50, Natalia Portillo wrote: "Qemu towards what xnu expects" --> that's what I called "Mac's memory space". Of course is not only memory, the SMU, TPM module, anything it will search for without hacking. (If you need testing comm

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Paul Brook
> >> As of March 2009[1] Intel guarantees that memory reads occur in order > >> (they may only be reordered relative to writes). It appears AMD do not > >> provide this guarantee, which could be an interesting problem for > >> heterogeneous migration.. > > > > Interesting, but what ordering would c

[Qemu-devel] [PATCH 17/18] disentangle tcg and deadline calculation

2010-03-10 Thread Paolo Bonzini
Just tell main_loop_wait whether to be blocking or nonblocking, so that there is no need to call qemu_cpus_have_work from the timer subsystem. Instead, tcg_cpu_exec can say "we want the main loop not to block because we have stuff to do". Signed-off-by: Paolo Bonzini --- hw/xenfb.c |6 --

[Qemu-devel] [PATCH 16/18] place together more #ifdef CONFIG_IOTHREAD blocks

2010-03-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- vl.c | 78 +++-- 1 files changed, 37 insertions(+), 41 deletions(-) diff --git a/vl.c b/vl.c index 3d8f089..d97da4d 100644 --- a/vl.c +++ b/vl.c @@ -3282,13 +3282,39 @@ void qemu_system_powerdown_reque

[Qemu-devel] [PATCH 15/18] move vmstate registration of vmstate_timers earlier

2010-03-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- vl.c | 62 +++--- 1 files changed, 31 insertions(+), 31 deletions(-) diff --git a/vl.c b/vl.c index d10319f..3d8f089 100644 --- a/vl.c +++ b/vl.c @@ -722,36 +722,6 @@ static void icount_adjust_vm(void * op

[Qemu-devel] [PATCH 14/18] new function qemu_icount_delta

2010-03-10 Thread Paolo Bonzini
Tweaking the rounding in qemu_next_deadline ensures that there's no change whatsoever. Signed-off-by: Paolo Bonzini --- vl.c | 29 ++--- 1 files changed, 18 insertions(+), 11 deletions(-) diff --git a/vl.c b/vl.c index 18bd2ee..d10319f 100644 --- a/vl.c +++ b/vl.c @@ -

[Qemu-devel] [PATCH 12/18] add qemu_icount_round

2010-03-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- vl.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index d05bae5..2f78817 100644 --- a/vl.c +++ b/vl.c @@ -731,6 +731,11 @@ static void configure_icount(const char *option) qemu_get_clock(vm_cl

[Qemu-devel] [PATCH 09/18] change qemu_run_timers interface

2010-03-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- vl.c | 18 -- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/vl.c b/vl.c index 3347ba0..2b9b379 100644 --- a/vl.c +++ b/vl.c @@ -903,10 +903,13 @@ int qemu_timer_expired(QEMUTimer *timer_head, int64_t current_time) return (

[Qemu-devel] [PATCH 13/18] add qemu_alarm_pending

2010-03-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- vl.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/vl.c b/vl.c index 2f78817..18bd2ee 100644 --- a/vl.c +++ b/vl.c @@ -601,6 +601,13 @@ struct qemu_alarm_timer { char pending; }; +static struct qemu_alarm_timer *alarm_t

[Qemu-devel] [PATCH 11/18] centralize handling of -icount

2010-03-10 Thread Paolo Bonzini
A simple patch to place together all handling of -icount. Signed-off-by: Paolo Bonzini --- vl.c | 33 +++-- 1 files changed, 19 insertions(+), 14 deletions(-) diff --git a/vl.c b/vl.c index 6cd77e6..d05bae5 100644 --- a/vl.c +++ b/vl.c @@ -701,8 +701,23 @@ static v

[Qemu-devel] [PATCH 10/18] introduce and use qemu_clock_enable

2010-03-10 Thread Paolo Bonzini
By adding the possibility to turn on/off a clock, yet another incestuous relationship between timers and CPUs can be disentangled. Signed-off-by: Paolo Bonzini --- vl.c | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 2b9b379..6cd77e6 100

[Qemu-devel] [PATCH 06/18] tweak qemu_notify_event

2010-03-10 Thread Paolo Bonzini
Instead of testing specially next_cpu in host_alarm_handler, just do that in qemu_notify_event. The idea is, if we are not running (or not yet running) target CPU code, prepare things so that the execution loop is exited asap; just make that clear. Signed-off-by: Paolo Bonzini --- vl.c | 10 +

[Qemu-devel] [PATCH 08/18] extract timer handling out of main_loop_wait

2010-03-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- vl.c | 47 +-- 1 files changed, 25 insertions(+), 22 deletions(-) diff --git a/vl.c b/vl.c index d6bbdbe..3347ba0 100644 --- a/vl.c +++ b/vl.c @@ -1002,7 +1002,30 @@ static const VMStateDescription vmstate_timers = {

[Qemu-devel] [PATCH 07/18] remove qemu_rearm_alarm_timer from main loop

2010-03-10 Thread Paolo Bonzini
Make the timer subsystem register its own callback instead. Signed-off-by: Paolo Bonzini --- vl.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 1328979..d6bbdbe 100644 --- a/vl.c +++ b/vl.c @@ -1417,6 +1417,12 @@ static void win32_rearm_timer(s

[Qemu-devel] [PATCH 05/18] do not use qemu_event_increment outside qemu_notify_event

2010-03-10 Thread Paolo Bonzini
qemu_notify_event in the non-iothread case is only stopping the current CPU. However, if the CPU is idle and the main loop is in the select call then a call to qemu_event_increment is needed too (as done in host_alarm_handler). Since in general one doesn't know whether the CPU is executing or not

[Qemu-devel] [PATCH 04/18] more alarm timer cleanup

2010-03-10 Thread Paolo Bonzini
The timer_alarm_pending variable is related to the alarm timer but not placed in the struct. Also, in qemu_mod_timer the wrong flag was being tested: the timer is rearmed in the alarm timer "bottom half", so the right flag to test there is the "pending" flag. Finally, I hoisted the NULL checks fr

[Qemu-devel] [PATCH 03/18] only one flag is needed for alarm_timer

2010-03-10 Thread Paolo Bonzini
The ALARM_FLAG_DYNTICKS can be testing simply by checking if there is a rearm function. Signed-off-by: Paolo Bonzini --- vl.c | 31 +++ 1 files changed, 15 insertions(+), 16 deletions(-) diff --git a/vl.c b/vl.c index 7958a26..086982f 100644 --- a/vl.c +++ b/vl.c @

[Qemu-devel] [PATCH 02/18] fix error in win32_rearm_timer

2010-03-10 Thread Paolo Bonzini
The TIME_ONESHOT and TIME_PERIODIC flags are mutually exclusive. The code after the patch matches the flags used in win32_start_timer. Signed-off-by: Paolo Bonzini --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 6b1e1a7..7958a26 100644 --- a/v

[Qemu-devel] [PATCH 00/18] extract qemu-timer.c

2010-03-10 Thread Paolo Bonzini
This is the update of my series to remove timer handling for vl.c. main changes from v1: - improved some commit messages - reordered patches a bit - removed some irrelevant cleanups, will submit as followup - removed switch of timer handling to use a bottom half - fixed one bisectability issue Pa

[Qemu-devel] [PATCH 01/18] avoid dubiously clever code in win32_start_timer

2010-03-10 Thread Paolo Bonzini
The code is initializing an unsigned int to UINT_MAX using "-1", so that the following always-true comparison seems to be always-false at a first look. Since alarm timer initializations are never nested, it is simpler to unconditionally store the result of timeGetDevCaps into data->period. Signed

Re: [Qemu-devel] Re: extended vga modes?

2010-03-10 Thread Roy Tam
2010/3/8 Avi Kivity : > On 03/08/2010 01:07 PM, Michael Tokarev wrote: >> >> Avi Kivity wrote: >> [] >> In short, when vgabios were dropped from qemu-kvm (for whatever yet unknown reason), >>> >>> What do you mean? qemu-kvm still carries a local vgabios (see >>> kvm/vgabios in

[Qemu-devel] Re: [PATCH] use absolute URLs for .gitmodules

2010-03-10 Thread Paolo Bonzini
On 03/09/2010 06:08 PM, Anthony Liguori wrote: On 03/09/2010 10:38 AM, Paolo Bonzini wrote: diff --git a/.gitmodules b/.gitmodules index dd4745e..5217ce7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "roms/vgabios"] path = roms/vgabios - url = ../vgabios.git + url = git:/

[Qemu-devel] [PATCH 12/14] Remove qemu_set_fd_handler2()

2010-03-10 Thread Juan Quintela
Now that there are no more poll_read users, we can remove it. Convert all users to qemu_set_fd_handler(). Signed-off-by: Juan Quintela --- aio.c |2 +- migration-exec.c|6 +++--- migration-fd.c |4 ++-- migration-tcp.c | 10 +- migration-unix.c

[Qemu-devel] [PATCH 14/14] Add qemu_remove_fd_handler()

2010-03-10 Thread Juan Quintela
Switch all users of qemu_set_fd_handler(fd, NULL, NULL, NULL) to this new function. Signed-off-by: Juan Quintela --- audio/alsaaudio.c |4 ++-- audio/ossaudio.c |6 +++--- hw/xen_backend.c |4 ++-- migration-exec.c |2 +- migration-fd.c|2 +- migration-tcp.c |4 +

[Qemu-devel] [PATCH 13/14] Remove now unused fd_read_poll and all its only left user

2010-03-10 Thread Juan Quintela
Signed-off-by: Juan Quintela --- vl.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index a961710..3bf8b87 100644 --- a/vl.c +++ b/vl.c @@ -2590,7 +2590,6 @@ void pcmcia_info(Monitor *mon) typedef struct IOHandlerRecord { int fd; -IOCanReadHa

[Qemu-devel] [PATCH 09/14] qemu-char:fd insert poll call into read one

2010-03-10 Thread Juan Quintela
This way we can remove the poll test Signed-off-by: Juan Quintela --- qemu-char.c | 15 --- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 063da94..875f254 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -536,15 +536,6 @@ static int fd

[Qemu-devel] [PATCH 10/14] qemu-char:pty insert poll call into read one

2010-03-10 Thread Juan Quintela
This way we can remove the poll test Signed-off-by: Juan Quintela --- qemu-char.c | 16 +--- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 875f254..bc294af 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -833,15 +833,6 @@ static int p

[Qemu-devel] [PATCH 11/14] qemu-char:udp insert poll call into read one

2010-03-10 Thread Juan Quintela
This way we can remove the poll test Signed-off-by: Juan Quintela --- qemu-char.c | 13 ++--- 1 files changed, 2 insertions(+), 11 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index bc294af..9098d79 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1767,7 +1767,7 @@ static int udp

[Qemu-devel] [PATCH 06/14] tap: insert tap_can_send() into tap_send()

2010-03-10 Thread Juan Quintela
This way we can remove the poll test Signed-off-by: Juan Quintela --- net/tap.c | 27 +-- 1 files changed, 9 insertions(+), 18 deletions(-) diff --git a/net/tap.c b/net/tap.c index 7a7320c..3ab65a3 100644 --- a/net/tap.c +++ b/net/tap.c @@ -61,17 +61,15 @@ typedef stru

[Qemu-devel] [PATCH 08/14] qemu-char:tcp insert poll call into read one

2010-03-10 Thread Juan Quintela
This way we can remove the poll test Signed-off-by: Juan Quintela --- qemu-char.c | 18 +- 1 files changed, 5 insertions(+), 13 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 93b3ea4..063da94 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1899,16 +1899,6 @@ static i

[Qemu-devel] [PATCH 07/14] qemu-char:stdio insert poll call into read one

2010-03-10 Thread Juan Quintela
This way we can remove the poll test Signed-off-by: Juan Quintela --- qemu-char.c | 22 +++--- 1 files changed, 7 insertions(+), 15 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 6ea4e8c..93b3ea4 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -664,8 +664,10 @@ static

[Qemu-devel] [PATCH 05/14] Handle deleted IOHandlers in a single pass

2010-03-10 Thread Juan Quintela
Previous code 1st call normal functions and then remove deleted handlers in the following pass. Calllapse the two walks. Signed-off-by: Juan Quintela --- vl.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/vl.c b/vl.c index 354ea31..c2ae185 100644 ---

[Qemu-devel] [PATCH 04/14] bt: remove bt_host_read_poll()

2010-03-10 Thread Juan Quintela
It allways returned true, that is the equivalent of not having the callback. Signed-off-by: Juan Quintela --- bt-host.c |9 + 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/bt-host.c b/bt-host.c index 964ac11..33b2761 100644 --- a/bt-host.c +++ b/bt-host.c @@ -80,13 +

[Qemu-devel] [PATCH 03/14] rename IOCanRWHandler to IOCanReadHandler

2010-03-10 Thread Juan Quintela
It was always only used for reads Signed-off-by: Juan Quintela --- qemu-char.c |4 ++-- qemu-char.h |7 +++ qemu-common.h |2 +- qemu-tool.c |2 +- vl.c |4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index

[Qemu-devel] [PATCH 02/14] remove useless cast

2010-03-10 Thread Juan Quintela
values are already pointers, no need to cast them to void * Signed-off-by: Juan Quintela --- migration-exec.c |3 +-- migration-fd.c |3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/migration-exec.c b/migration-exec.c index 6ff8449..5435827 100644 --- a/migration-

[Qemu-devel] [PATCH 01/14] Convert io handlers to QLIST

2010-03-10 Thread Juan Quintela
Signed-off-by: Juan Quintela --- vl.c | 35 ++- 1 files changed, 14 insertions(+), 21 deletions(-) diff --git a/vl.c b/vl.c index 10d8e34..83ff652 100644 --- a/vl.c +++ b/vl.c @@ -2597,10 +2597,12 @@ typedef struct IOHandlerRecord { void *opaque; /* t

[Qemu-devel] [PATCH v2 00/14] Clear fd handlers

2010-03-10 Thread Juan Quintela
in this v2 series: - a pony for malc: 23 files changed, 133 insertions(+), 215 deletions(-) - a pony for Anthony fd_read_poll is no more. - tap/qemu-char* poll users are gone. I just folded the poll function on top of the read one. Anyone knows of a different reason that legacy for havin

Re: [Qemu-devel] Re: Need a way disable gPXE boot

2010-03-10 Thread Richard W.M. Jones
On Tue, Mar 09, 2010 at 09:35:11PM -0600, Anthony Liguori wrote: > On 03/09/2010 08:11 AM, Richard W.M. Jones wrote: >> Did anyone attempt this? >> >> I noticed also with libguestfs that boot times have spiralled out of >> control again, and it seems to be down to the SeaBIOS change. SeaBIOS >> ac

Re: [Qemu-devel] Re: Need a way disable gPXE boot

2010-03-10 Thread Richard W.M. Jones
On Tue, Mar 09, 2010 at 09:03:41PM -0500, Kevin O'Connor wrote: > On Tue, Mar 09, 2010 at 02:11:20PM +, Richard W.M. Jones wrote: > > I noticed also with libguestfs that boot times have spiralled out of > > control again, and it seems to be down to the SeaBIOS change. SeaBIOS > > accounts for

[Qemu-devel] [PATCH] hw/usb-msd: fix some usb requests

2010-03-10 Thread Rtp
The usb-msd device emulation needs some small tweaks in the requests emulations. For instance, the reset/maxlun requests are class/interface specific so requests for them with the type class and recipient interface bits sets have to be handled. Signed-off-by: Arnaud Patard --- diff --git a/hw/us

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Avi Kivity
On 03/10/2010 06:38 AM, Cam Macdonell wrote: On Tue, Mar 9, 2010 at 5:03 PM, Paul Brook wrote: In a cross environment that becomes extremely hairy. For example the x86 architecture effectively has an implicit write barrier before every store, and an implicit read barrier before every load.

Re: [Qemu-devel] Re: [PATCH 0/3]: BLOCK_WATERMARK QMP event

2010-03-10 Thread Christoph Hellwig
On Wed, Mar 10, 2010 at 09:33:31AM +0100, Kevin Wolf wrote: > When should a low watermark trigger? Images only ever grow, so testing > if the highest allocated block goes below some watermark would never > work (except for some unlikely special cases like deleting a snapshot > after which no new cl

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Avi Kivity
On 03/09/2010 11:44 PM, Anthony Liguori wrote: Ah yes. For cross tcg environments you can map the memory using mmio callbacks instead of directly, and issue the appropriate barriers there. Not good enough unless you want to severely restrict the use of shared memory within the guest. For i

[Qemu-devel] Re: [PATCH] Inter-VM shared memory PCI device

2010-03-10 Thread Avi Kivity
On 03/09/2010 08:34 PM, Cam Macdonell wrote: On Tue, Mar 9, 2010 at 10:28 AM, Avi Kivity wrote: On 03/09/2010 05:27 PM, Cam Macdonell wrote: Registers are used for synchronization between guests sharing the same memory object when interrupts are supported (this re

  1   2   >