[Qemu-devel] Re: [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-05 Thread Rusty Russell
On Thu, 6 May 2010 06:28:14 am Michael S. Tsirkin wrote: > Rusty, > this is a simplified form of a patch you posted in the past. > I have a vhost patch that, using this feature, shows external > to host bandwidth grow from 5 to 7 GB/s, by avoiding > an interrupt in the window after previous interru

[Qemu-devel] [PATCH] msix: allow byte and word reading from mmio

2010-05-05 Thread Bernhard Kohl
It's legal that the guest reads a single byte or word from mmio. Signed-off-by: Bernhard Kohl --- hw/msix.c | 20 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index 2ca0900..773bbbd 100644 --- a/hw/msix.c +++ b/hw/msix.c @@ -117,10

Re: [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Neil Brown
On Wed, 5 May 2010 14:28:41 +0930 Rusty Russell wrote: > On Wed, 5 May 2010 05:47:05 am Jamie Lokier wrote: > > Jens Axboe wrote: > > > On Tue, May 04 2010, Rusty Russell wrote: > > > > ISTR someone mentioning a desire for such an API years ago, so CC'ing > > > > the > > > > usual I/O suspects..

[Qemu-devel] Re: question on virtio

2010-05-05 Thread Michael S. Tsirkin
On Wed, May 05, 2010 at 02:40:15PM -0500, Anthony Liguori wrote: > On 05/05/2010 06:09 AM, Michael S. Tsirkin wrote: >> Hi! >> I see this in virtio_ring.c: >> >> /* Put entry in available array (but don't update avail->idx * >> until they do sync). */ >> >> Why is it done this way?

[Qemu-devel] Re: sparc64 lazy conditional codes evaluation

2010-05-05 Thread Igor Kovalenko
On Wed, May 5, 2010 at 12:21 AM, Blue Swirl wrote: > On 5/3/10, Igor Kovalenko wrote: >> On Mon, May 3, 2010 at 11:54 PM, Blue Swirl wrote: >>  > On 5/3/10, Igor Kovalenko wrote: >>  >> On Mon, May 3, 2010 at 11:24 PM, Blue Swirl wrote: >>  >>  > On 5/3/10, Igor Kovalenko wrote: >>  >>  >> Hi

[Qemu-devel] Re: [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-05 Thread Dor Laor
On 05/05/2010 11:58 PM, Michael S. Tsirkin wrote: Generally, the Host end of the virtio ring doesn't need to see where Guest is up to in consuming the ring. However, to completely understand what's going on from the outside, this information must be exposed. For example, host can reduce the numb

[Qemu-devel] eepro100: missing gpxe-eepro100-80862449.rom?

2010-05-05 Thread Sebastian Herbszt
eepro100_register_devices() references three option roms: - gpxe-eepro100-80861209.rom - gpxe-eepro100-80861229.rom - gpxe-eepro100-80862449.rom The last one seems to be missing because it's not in the pc-bios directory. Sebastian

[Qemu-devel] [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-05 Thread Michael S. Tsirkin
Generally, the Host end of the virtio ring doesn't need to see where Guest is up to in consuming the ring. However, to completely understand what's going on from the outside, this information must be exposed. For example, host can reduce the number of interrupts by detecting that the guest is curr

[Qemu-devel] [PATCH 1/2] char: Handle resize.

2010-05-05 Thread Amit Shah
From: Kusanagi Kouichi Signed-off-by: Kusanagi Kouichi Signed-off-by: Amit Shah --- qemu-char.c | 34 ++ qemu-char.h |3 +++ 2 files changed, 37 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index ac65a1c..ce24483 100644 --- a/qemu-

Re: [Qemu-devel] [PATCH 2/2] Count "logo" keys as modifier keys

2010-05-05 Thread Anthony Liguori
On 05/04/2010 11:17 PM, Brad Jorsch wrote: These are often mapped to Meta on Linux. And I for one use Meta-Tab as the equivalent of Windows's Alt-Tab, so not having it marked as a modifier leaves the guest thinking it's permanently pressed. Signed-off-by: Brad Jorsch Seems reasonable. Reg

[Qemu-devel] [PATCH 2/2] virtio-console: Notify guest of console size resize

2010-05-05 Thread Amit Shah
From: Kusanagi Kouichi When we receive a CHR_EVENT_RESIZE notification, let the guest know of the console size update. Signed-off-by: Kusanagi Kouichi Signed-off-by: Amit Shah --- hw/virtio-console.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/virtio-console.

Re: [Qemu-devel] Re: [RFC] [PATCH] add ahci support into qemu

2010-05-05 Thread Stuart Brady
On Tue, May 04, 2010 at 10:51:37PM +0200, Sebastian Herbszt wrote: > >diff --git a/hw/pci_ids.h b/hw/pci_ids.h > >index fe7a121..4d4de93 100644 > >--- a/hw/pci_ids.h > >+++ b/hw/pci_ids.h > >@@ -97,3 +97,4 @@ > >#define PCI_DEVICE_ID_INTEL_82371AB 0x7111 > >#define PCI_DEVICE_ID_INTEL_82371AB_

[Qemu-devel] [PATCH] virtio-serial: Send per-console port resize notifications to guest

2010-05-05 Thread Amit Shah
From: Kusanagi Kouichi Add a new API, virtio_serial_resize_console(port, rows, cols), to notify the guest of console size updates. This works for both, !MULTIPORT and MULTIPORT cases. For the former case, we send updates via virtio config changes, whereas in the latter, the config changes are de

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Anthony Liguori
On 05/05/2010 02:16 PM, Gerd Hoffmann wrote: On 05/05/10 20:49, Anthony Liguori wrote: On 05/05/2010 01:43 PM, Gerd Hoffmann wrote: On 05/05/10 15:53, Anthony Liguori wrote: This patch adds optional control flow in a pretty crufty way to *some* backends but not all. This just adds a bunch of c

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Gerd Hoffmann
On 05/05/10 20:49, Anthony Liguori wrote: On 05/05/2010 01:43 PM, Gerd Hoffmann wrote: On 05/05/10 15:53, Anthony Liguori wrote: This patch adds optional control flow in a pretty crufty way to *some* backends but not all. This just adds a bunch of complexity that will certainly introduce bugs.

[Qemu-devel] Re: vgabios + qemu: issues and plans.

2010-05-05 Thread Sebastian Herbszt
Gerd Hoffmann wrote: Hi, Today we have two vgabios versions in qemu: The standard one (vgabios.bin) and the cirrus one (vgabios-cirrus.bin). The cirrus vgabios is a PCI ROM. We can (and do) load it into the ROM PCI bar. The vgabios checks the pci config space to figure where the linear

[Qemu-devel] [PATCH 09/12] linux-user: Put the stack guard page at the top.

2010-05-05 Thread Richard Henderson
There are no supported stack-grows-up targets. We were putting the guard page at the highest address, i.e. the bottom of the stack. Use the maximum of host and guest page size for the guard size. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 29 - 1 f

[Qemu-devel] [PATCH v2 0/2]: QMP: Commands doc

2010-05-05 Thread Luiz Capitulino
changelog - v1 -> v2 - Rebased - Addressed Markus's comments - Changed indentation style - Minor fixes and clarifications

[Qemu-devel] [PATCH 11/12] linux-user: Extract load_elf_image from load_elf_interp.

2010-05-05 Thread Richard Henderson
Moving toward a single copy of the elf binary loading code. Fill in the details of the loaded image into a struct image_info. Adjust create_elf_tables to read from such structures instead of from a collection of passed arguments. Don't return error values from load_elf_interp; always exit(-1) wit

[Qemu-devel] Re: [patch uq/master 0/9] enable smp > 1 and related fixes

2010-05-05 Thread Anthony Liguori
On 05/04/2010 07:45 AM, Marcelo Tosatti wrote: -- 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-info.html How does this work without an in-kernel apic (or does uq/

[Qemu-devel] Re: question on virtio

2010-05-05 Thread Anthony Liguori
On 05/05/2010 06:09 AM, Michael S. Tsirkin wrote: Hi! I see this in virtio_ring.c: /* Put entry in available array (but don't update avail->idx * until they do sync). */ Why is it done this way? It seems that updating the index straight away would be simpler, while this migh

[Qemu-devel] Fate of the read-only block drivers?

2010-05-05 Thread Christoph Hellwig
Currently we have four very simple, read-only block drivers in the tree: - cloop: This one is known buggy for non-trivial use and didn't get any chance but the usual API changes and cleanup sweeps since it was commited in 2004. - dmg: This one is really grotty an

[Qemu-devel] [PATCH 1/2] QMP: Introduce commands doc

2010-05-05 Thread Luiz Capitulino
One of the most important missing feature in QMP today is its supported commands documentation. The plan is to make it part of self-description support, however self-description is a big task we have been postponing for a long time now and still don't know when it's going to be done. In order not

[Qemu-devel] [PATCH 2/2] Monitor: Drop QMP documentation from code

2010-05-05 Thread Luiz Capitulino
Previous commit added the QMP/qmp-commands.txt file, which is a copy of this information. While it's good to keep it near code, maintaining two copies of the same information is too hard and has little benefit as we don't expect client writers to consult the code to find how to use a QMP command.

Re: [Qemu-devel] [PATCH] block: Avoid unchecked casts for AIOCBs

2010-05-05 Thread Christoph Hellwig
On Wed, May 05, 2010 at 11:51:58AM +0200, Kevin Wolf wrote: > Use container_of for one direction and &acb->common for the other one. > > Signed-off-by: Kevin Wolf Looks good, Reviewed-by: Christoph Hellwig

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Anthony Liguori
On 05/05/2010 01:40 PM, Gerd Hoffmann wrote: + return s->chr_write_nb(s, buf, len); +} I really dislike the idea of adding another function for this. Having a explicit function for non-blocking mode IMHO is much better. It makes things more clear when reading the code. Previous approach wa

[Qemu-devel] [PATCH 06/12] linux-user: Clean up byte-swapping in elfload.c.

2010-05-05 Thread Richard Henderson
Remove ifdefs from code by defining empty inline functions when byte swapping isn't needed. Push loops over swapping arrays of structures into the swapping functions. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 119 -- 1 files cha

[Qemu-devel] [PATCH 01/12] linux-user: Handle filesz < memsz for any PT_LOAD segment.

2010-05-05 Thread Richard Henderson
I caught padzero not properly initializing the .bss segment on a statically linked Alpha program. Rather than a minimal patch, replace the gross code with a single mmap+memset. Share more code between load_elf_interp and load_elf_binary. Legally, an ELF program need not have just a single .bss;

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Gerd Hoffmann
On 05/05/10 15:53, Anthony Liguori wrote: This patch adds optional control flow in a pretty crufty way to *some* backends but not all. This just adds a bunch of complexity that will certainly introduce bugs. Amit plans to add support to the others as well. Beside that there is a clearly defin

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Anthony Liguori
On 05/05/2010 01:43 PM, Gerd Hoffmann wrote: On 05/05/10 15:53, Anthony Liguori wrote: This patch adds optional control flow in a pretty crufty way to *some* backends but not all. This just adds a bunch of complexity that will certainly introduce bugs. Amit plans to add support to the others a

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Gerd Hoffmann
+ return s->chr_write_nb(s, buf, len); +} I really dislike the idea of adding another function for this. Having a explicit function for non-blocking mode IMHO is much better. It makes things more clear when reading the code. Previous approach was to check for O_NONBLOCK (extra syscall) and

[Qemu-devel] [PATCH 03/12] linux-user: Reindent elfload.c.

2010-05-05 Thread Richard Henderson
Nothing excepting whitespace changes here. This reduces the number of changes elsewhere in the patch series. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 1028 +- 1 files changed, 518 insertions(+), 510 deletions(-) diff --git a/li

[Qemu-devel] [PATCH 04/12] linux-user: Reduce lseek+reads while loading elf files.

2010-05-05 Thread Richard Henderson
Define BPRM_BUF_SIZE to 1k and read that amount initially. If the data we want from the binary is in this buffer, use it instead of reading from the file again. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 104 --- linux-user/linuxlo

Re: [Qemu-devel] [PATCH] ide: Fix ide_dma_cancel

2010-05-05 Thread Christoph Hellwig
On Wed, May 05, 2010 at 11:54:56AM +0200, Kevin Wolf wrote: > When cancelling a request, bdrv_aio_cancel may decide that it waits for > completion of a request rather than for cancellation. IDE therefore can't > abandon its DMA status before calling bdrv_aio_cancel; otherwise the callback > of a co

[Qemu-devel] [PATCH 08/12] linux-user: Improve consistency checking in elf headers.

2010-05-05 Thread Richard Henderson
Validate more fields of the elf header. Extract those checks into two common functions to be used in both load_elf_interp and load_elf_binary. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 57 +- 1 files changed, 33 insertions(+),

[Qemu-devel] Qemu - samba share help

2010-05-05 Thread Arpit Patel
Hi All, I am trying to share files between host OS and guest OS, both are Ubuntu. Here is the command line that I am using to start guest OS *qemu -kernel kernelimage -initrd initrd.img /dev/zero -append "cmdline" -smb /tmp* * * After which I tried to *mount* /tmp on guest OS, using IP address of

Re: [Qemu-devel] [PATCH 5/6] parallels: use pread

2010-05-05 Thread Christoph Hellwig
On Wed, May 05, 2010 at 04:19:30PM +0200, Kevin Wolf wrote: > position should be a signed int64_t, otherwise the condition is always true. Indeed, I'll update the patch.

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

2010-05-05 Thread Cam Macdonell
For completeness, just a one-line change to use the merged version of kvm_set_irqfd() --- Makefile.target |3 + hw/ivshmem.c| 727 +++ qemu-char.c |6 + qemu-char.h |3 + qemu-doc.texi | 25 ++ 5 files changed, 764

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Reinhard Max
Hi, I've attached a revised version of the patch against git as of this morning. It has even more FIXMEs in it than the previous version, because of the changes that went into QEMU since 0.11.0 and I think I'll have to leave those to you guys who are more familiar with QEMUs internals than

[Qemu-devel] [PATCH 07/12] linux-user: Load symbols from the interpreter.

2010-05-05 Thread Richard Henderson
First, adjust load_symbols to accept a load_bias parameter. At the same time, read the entire section header table in one go, use pread instead f lseek+read for the symbol and string tables, and properly free allocated structures on error exit paths. Second, adjust load_elf_interp to compute load

[Qemu-devel] [PATCH 05/12] linux-user: Define ELF_DATA generically.

2010-05-05 Thread Richard Henderson
The only consideration on this value is the target endianness. The existing defines were incorrect for alpha and sh4eb. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 30 ++ 1 files changed, 6 insertions(+), 24 deletions(-) diff --git a/linux-user/elfl

[Qemu-devel] [PATCH 12/12] linux-user: Re-use load_elf_image for the main binary.

2010-05-05 Thread Richard Henderson
This requires moving the PT_INTERP extraction and GUEST_BASE handling into load_elf_image. Key this off a non-null pointer argument to receive the interpreter name. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 380 ++ 1 files chang

Re: [Qemu-devel] simple block driver cleanups

2010-05-05 Thread Christoph Hellwig
On Wed, May 05, 2010 at 04:28:08PM +0200, Kevin Wolf wrote: > For cloop I trust your test, and for bochs I did a very basic test > myself (however, I doubt that anyone uses this driver, considering how > hard it is to create such an image...). For parallels I still need to > find out how to create

[Qemu-devel] [PATCH 10/12] linux-user: Remove partial support for a.out interpreters.

2010-05-05 Thread Richard Henderson
At the bottom of the a.out support was the unimplemented load_aout_interp function. There were other portions of the support that didn't look right; when I went to look in the Linux kernel for clarification, I found that the support for such interpreters has been removed from binfmt_elf. There doe

[Qemu-devel] [PATCH 02/12] Add more DT_* and AT_* constants to qemu's copy of elf.h.

2010-05-05 Thread Richard Henderson
Moving some PPC AT_* constants from elfload.c at the same time. Signed-off-by: Richard Henderson --- elf.h| 44 linux-user/elfload.c |9 - 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/elf.h b/elf.h inde

[Qemu-devel] [PATCH 00/12] Cleanup linux-user/elfload.c, v2

2010-05-05 Thread Richard Henderson
Changes v1->v2: * Drop VDSO loading for the moment; let's concentrate on getting the basic elf loading in shape first. * Fix SH4-EB ELF_DATA definition * Re-base after pbrook's guest_base changes for the main executable. r~ Richard Henderson (12): linux-user: Handle filesz < memsz

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Daniel P. Berrange
On Wed, May 05, 2010 at 10:53:00AM +0200, Gerd Hoffmann wrote: > Hi, > > >>When going for multiple listening sockets in qemu we have to figure > >>how we'll handle this in a number of places as there is no single > >>listening address any more. > > > >Well, that's what my patch is about. > > Su

Re: [Qemu-devel] [PATCH, RFC] block: separate raw images from the file protocol

2010-05-05 Thread Stefan Weil
Am 05.05.2010 14:45, schrieb Kevin Wolf: Am 04.05.2010 22:58, schrieb Stefan Weil: This patch (commit 84a12e6648444f517055138a7d7f25a22d7e1029) breaks QEMU for Win32: QEMU can no longer access \\.\PhysicalDrive0 - a feature I use quite often. Found by git bisect, tested like this: qemu \\.\P

[Qemu-devel] [PATCH] char: Flush read buffer in mux_chr_can_read

2010-05-05 Thread Jan Kiszka
Move the buffer flush from mux_chr_read to mux_chr_can_read. While the latter is called periodically, the former will only be invoked when new characters arrive at the back-end. This caused problems to front-end drivers whenever they were unable to read data immediately, e.g. virtio-console attache

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Daniel P. Berrange
On Tue, May 04, 2010 at 04:50:34PM -0500, Anthony Liguori wrote: > On 05/04/2010 04:47 PM, Gerd Hoffmann wrote: > >On 05/04/10 18:23, Anthony Liguori wrote: > >>On 05/04/2010 08:49 AM, Reinhard Max wrote: > >>>Hi, > >>> > >>>I am maintaining the tightvnc package for openSUSE and was recently > >>>c

Re: [Qemu-devel] [PATCH 1/2] qemu-error: Introduce get_errno_name()

2010-05-05 Thread Luiz Capitulino
On Tue, 04 May 2010 16:56:19 -0500 Anthony Liguori wrote: > On 05/04/2010 03:30 PM, Luiz Capitulino wrote: > > > > StateVmSaveFailed is not like CommandFailed, there are five errors > > in do_savevm() and StateVmSaveFailed happens to be one of them. > > > > But I understand what you mean and

Re: [Qemu-devel] simple block driver cleanups

2010-05-05 Thread Kevin Wolf
Am 04.05.2010 15:22, schrieb Christoph Hellwig: > On Tue, May 04, 2010 at 02:38:07PM +0200, Kevin Wolf wrote: >> Am 04.05.2010 12:43, schrieb Christoph Hellwig: >>> This series cleans up the simple read-only block drivers to use the >>> qemu block device API to access their backing devices, making

Re: [Qemu-devel] [PATCH 5/6] parallels: use pread

2010-05-05 Thread Kevin Wolf
Am 04.05.2010 12:45, schrieb Christoph Hellwig: > Use pread instead of lseek + read in preparation of using the qemu > block API. > > Signed-off-by: Christoph Hellwig > > Index: qemu-kevin/block/parallels.c > === > --- qemu-kevin.or

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Paul Brook
> On 05/05/2010 08:34 AM, Paul Brook wrote: > >> I really dislike the idea of adding another function for this. Can you > >> explain why you need this functionality for virtio-console and why this > >> functionality isn't needed for everything else? > > > > This functionality should (in principle

[Qemu-devel] Re: [PATCH v7 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Amit Shah
On (Wed) May 05 2010 [08:54:48], Anthony Liguori wrote: > On 05/05/2010 08:23 AM, Amit Shah wrote: >> On (Wed) May 05 2010 [08:15:19], Anthony Liguori wrote: >> >>> On 05/04/2010 04:39 PM, Amit Shah wrote: >>> On writing errors, we just returned -1 even if some bytes were already >>>

[Qemu-devel] [PATCH v2 5/5] lsi: Handle removal of selected devices

2010-05-05 Thread Jan Kiszka
We must not store references to selected devices as they may be hot-removed. Instead, look up the device based on its tag right before using it. If the device disappeared, throw an interrupt and disconnect. Signed-off-by: Jan Kiszka --- Changes in v2: - Fixed incorrect tag->id conversion (missi

[Qemu-devel] Re: [PATCH v7 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-05 Thread Anthony Liguori
On 05/05/2010 08:25 AM, Amit Shah wrote: On (Wed) May 05 2010 [08:13:58], Anthony Liguori wrote: On 05/04/2010 04:39 PM, Amit Shah wrote: Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signe

[Qemu-devel] Re: [PATCH v7 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Anthony Liguori
On 05/05/2010 08:23 AM, Amit Shah wrote: On (Wed) May 05 2010 [08:15:19], Anthony Liguori wrote: On 05/04/2010 04:39 PM, Amit Shah wrote: On writing errors, we just returned -1 even if some bytes were already written out. Ensure we return the number of bytes written before we return t

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Anthony Liguori
On 05/05/2010 08:34 AM, Paul Brook wrote: I really dislike the idea of adding another function for this. Can you explain why you need this functionality for virtio-console and why this functionality isn't needed for everything else? This functionality should (in principle) be used by all

[Qemu-devel] vgabios + qemu: issues and plans.

2010-05-05 Thread Gerd Hoffmann
Hi, Today we have two vgabios versions in qemu: The standard one (vgabios.bin) and the cirrus one (vgabios-cirrus.bin). The cirrus vgabios is a PCI ROM. We can (and do) load it into the ROM PCI bar. The vgabios checks the pci config space to figure where the linear framebuffer (for vesa

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Paul Brook
> I really dislike the idea of adding another function for this. Can you > explain why you need this functionality for virtio-console and why this > functionality isn't needed for everything else? This functionality should (in principle) be used by all serial port implementations. Physical seri

[Qemu-devel] Re: [PATCH v7 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-05 Thread Amit Shah
On (Wed) May 05 2010 [08:13:58], Anthony Liguori wrote: > On 05/04/2010 04:39 PM, Amit Shah wrote: >> Instead of passing each handler in the qemu_add_handlers() function, >> create a struct of handlers that can be passed to the function instead. >> >> Signed-off-by: Amit Shah >> -qemu_chr

[Qemu-devel] Re: [PATCH v7 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Amit Shah
On (Wed) May 05 2010 [08:15:19], Anthony Liguori wrote: > On 05/04/2010 04:39 PM, Amit Shah wrote: >> On writing errors, we just returned -1 even if some bytes were already >> written out. Ensure we return the number of bytes written before we >> return the error (on a subsequent call to qemu_chr_w

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Amit Shah
On (Wed) May 05 2010 [08:16:37], Anthony Liguori wrote: > On 05/04/2010 04:39 PM, Amit Shah wrote: >> For char devices whose backing files are open in non-blocking mode, >> non-blocking writes can now be made using qemu_chr_write_nb(). >> >> For non-blocking chardevs, we can return -EAGAIN to calle

[Qemu-devel] Re: [PATCH] [RESEND] Make char muxer more robust wrt small FIFOs

2010-05-05 Thread Alexander Graf
Am 05.05.2010 um 10:08 schrieb Jan Kiszka : Jan Kiszka wrote: Alex, does this help as well? diff --git a/qemu-char.c b/qemu-char.c index ac65a1c..2b115a4 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -404,6 +404,8 @@ static int mux_chr_can_read(void *opaque) MuxDriver *d = chr->opaque;

Re: [Qemu-devel] [PATCH 1/6] bochs: use pread

2010-05-05 Thread Anthony Liguori
On 05/04/2010 05:44 AM, Christoph Hellwig wrote: Use pread instead of lseek + read in preparation of using the qemu block API. Signed-off-by: Christoph Hellwig Looks good to me. Reviewed-by: Anthony Liguori Regards, Anthony Liguori Index: qemu-kevin/block/bochs.c

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Anthony Liguori
On 05/04/2010 04:39 PM, Amit Shah wrote: For char devices whose backing files are open in non-blocking mode, non-blocking writes can now be made using qemu_chr_write_nb(). For non-blocking chardevs, we can return -EAGAIN to callers of qemu_chr_write_nb(). When the backend is ready to accept more

[Qemu-devel] Re: [PATCH v7 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Anthony Liguori
On 05/04/2010 04:39 PM, Amit Shah wrote: On writing errors, we just returned -1 even if some bytes were already written out. Ensure we return the number of bytes written before we return the error (on a subsequent call to qemu_chr_write()). Signed-off-by: Amit Shah --- qemu-char.c | 12 +

[Qemu-devel] Re: [PATCH v7 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-05 Thread Anthony Liguori
On 05/04/2010 04:39 PM, Amit Shah wrote: Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shah --- gdbstub.c|9 +++-- hw/debugcon.c|2 +- hw/escc.c

[Qemu-devel] [PATCH 3/3] vnc: rich cursor support.

2010-05-05 Thread Gerd Hoffmann
Uses VNC_ENCODING_RICH_CURSOR. Adding XCURSOR support should be possible without much trouble. Shouldn't be needed though as RICH_CURSOR is a superset of XCURSOR. Signed-off-by: Gerd Hoffmann --- vnc.c| 67 +++--- vnc.h|

[Qemu-devel] [PATCH 1/3] cursor: add cursor functions.

2010-05-05 Thread Gerd Hoffmann
Add a new cursor type to console.h and a bunch of functions to deal with cursors the (new) cursor.c file. Signed-off-by: Gerd Hoffmann --- Makefile.objs |3 +- console.h | 24 ++- cursor.c | 208 + 3 files changed, 232 i

[Qemu-devel] [PATCH 2/3] use new cursor struct + functions for vmware vga and sdl.

2010-05-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/vmware_vga.c | 40 +++- sdl.c | 52 +--- 2 files changed, 48 insertions(+), 44 deletions(-) diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c index e709369..bf2a699

[Qemu-devel] [PATCH 0/3] local cursor patches.

2010-05-05 Thread Gerd Hoffmann
Hi, Local cursor bits, rehashed after discussions with anthony. cheers, Gerd

Re: [Qemu-devel] [PATCH, RFC] block: separate raw images from the file protocol

2010-05-05 Thread Kevin Wolf
Am 04.05.2010 22:58, schrieb Stefan Weil: > Am 08.04.2010 11:50, schrieb Kevin Wolf: >> Am 07.04.2010 22:30, schrieb Christoph Hellwig: >> >>> We're running into various problems because the "raw" file access, which >>> is used internally by the various image formats is entangled with the >>> "

[Qemu-devel] Re: [PATCH v7 0/6]

2010-05-05 Thread Juan Quintela
Amit Shah wrote: > Hello, > > This series lets interested callers ask for an -EAGAIN return from the > chardev backends (only unix and tcp sockets as of now) to implement > their own flow control. > > A new call, qemu_chr_write_nb() is added, that will fallback to > qemu_chr_write() if the backend

[Qemu-devel] question on virtio

2010-05-05 Thread Michael S. Tsirkin
Hi! I see this in virtio_ring.c: /* Put entry in available array (but don't update avail->idx * until they do sync). */ Why is it done this way? It seems that updating the index straight away would be simpler, while this might allow the host to specilatively look up the buffer

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Gerd Hoffmann
Hi, You'll run into qmp for sure when forward-porting the patches to the latest qemu bits. It is the machine-readable version of the monitor protocol (in qemu 0.12+). I guess that's the qemu_opt_set() calls at the end of inet_listen_opts()? See docs in QMP/*, the changes in monitor.c and q

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Reinhard Max
Hi, On Wed, 5 May 2010 at 10:53, Gerd Hoffmann wrote: Noticed that it probably should get a few helper functions to handle FdLists to avoid the quite simliar open-coded loop-over-all-fds loops all over the place. indeed, thanks for the hint. I now have functions to create a new list element

[Qemu-devel] [PATCH] ide: Fix ide_dma_cancel

2010-05-05 Thread Kevin Wolf
When cancelling a request, bdrv_aio_cancel may decide that it waits for completion of a request rather than for cancellation. IDE therefore can't abandon its DMA status before calling bdrv_aio_cancel; otherwise the callback of a completed request would use invalid data. Signed-off-by: Kevin Wolf

[Qemu-devel] [PATCH] block: Avoid unchecked casts for AIOCBs

2010-05-05 Thread Kevin Wolf
Use container_of for one direction and &acb->common for the other one. Signed-off-by: Kevin Wolf --- block.c |3 ++- block/blkdebug.c |4 ++-- block/qcow.c |2 +- block/qcow2.c|2 +- block/vdi.c |2 +- 5 files changed, 7 insertions(+), 6 deletions(-) di

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Gerd Hoffmann
Hi, When going for multiple listening sockets in qemu we have to figure how we'll handle this in a number of places as there is no single listening address any more. Well, that's what my patch is about. Sure. Did you take a look at it? Briefly, yes. Overall it looks sensible to me. D

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Daniel P. Berrange
On Tue, May 04, 2010 at 03:49:50PM +0200, Reinhard Max wrote: > Hi, > > I am maintaining the tightvnc package for openSUSE and was recently > confronted with an alleged vnc problem with QWMU that turned out to be > a shortcoming in QEMU's code for handling TCP server sockets, which is > used by

[Qemu-devel] [Commit 20d97356] Fix OpenBSD build

2010-05-05 Thread Kevin Wolf
Hi Blue Swirl, did I miss the patch posted for this commit? I can't find it on the mailing list. I think the BlockDriver declarations should really stay at the end of the source file of each driver. What about using a different way to get rid of the static forward declaration, namely using bdrv_f

[Qemu-devel] Re: [PATCH] [RESEND] Make char muxer more robust wrt small FIFOs

2010-05-05 Thread Jan Kiszka
Jan Kiszka wrote: > Alex, does this help as well? > > diff --git a/qemu-char.c b/qemu-char.c > index ac65a1c..2b115a4 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -404,6 +404,8 @@ static int mux_chr_can_read(void *opaque) > MuxDriver *d = chr->opaque; > int m = d->focus; > > +

[Qemu-devel] Re: VNC heap corruption when display width is not a multiple of 16

2010-05-05 Thread Andrew Lutomirski
On Tue, May 4, 2010 at 6:12 PM, Andrew Lutomirski wrote: > Hi all- > > The patch below (obviously only for testing) demonstrates the problem > and prevents the crash, but it introduces a black line 8 pixels wide > on the right when running at 1400x1050.  I'm not sure what's going on > -- either I

[Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Rusty Russell
On Wed, 5 May 2010 04:24:59 am Christoph Hellwig wrote: > On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: > > I took a stub at documenting CMD and FLUSH request types in virtio > > block. Christoph, could you look over this please? > > > > I note that the interface seems full

[Qemu-devel] Re: [PATCH] [RESEND] Make char muxer more robust wrt small FIFOs

2010-05-05 Thread Jan Kiszka
Jan Kiszka wrote: > Anthony Liguori wrote: >> On 05/04/2010 11:01 AM, Alexander Graf wrote: >>> Am 04.05.2010 um 16:34 schrieb Anthony Liguori : >>> On 05/04/2010 09:30 AM, Alexander Graf wrote: > Am 04.05.2010 um 15:44 schrieb Anthony Liguori : > >> On 04/20/2010 11:56 AM, Alexand

Re: [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Rusty Russell
On Wed, 5 May 2010 05:47:05 am Jamie Lokier wrote: > Jens Axboe wrote: > > On Tue, May 04 2010, Rusty Russell wrote: > > > ISTR someone mentioning a desire for such an API years ago, so CC'ing the > > > usual I/O suspects... > > > > It would be nice to have a more fuller API for this, but the real

[Qemu-devel] [PATCH 2/2] Count "logo" keys as modifier keys

2010-05-05 Thread Brad Jorsch
These are often mapped to Meta on Linux. And I for one use Meta-Tab as the equivalent of Windows's Alt-Tab, so not having it marked as a modifier leaves the guest thinking it's permanently pressed. Signed-off-by: Brad Jorsch --- sdl.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)

[Qemu-devel] [PATCH 0/2] Release modifier keys (including Meta) on loss of focus

2010-05-05 Thread Brad Jorsch
I got tired of my guests thinking that the logo key was being constantly held down whenever I used Meta-Tab to switch away from the qemu window. It turns out that both the "clear modifiers on focus loss" feature in the SDL front-end was broken and Meta (i.e. the "logo" keys) wasn't being considere

[Qemu-devel] [PATCH 1/2] Fix clearing modifiers on focus loss

2010-05-05 Thread Brad Jorsch
It seems there is an intention to clear all modifier keys (in the SDL front-end) when the window loses focus, but it seems that it doesn't work right. Let's just explicitly do it when we lose input focus. Signed-off-by: Brad Jorsch --- sdl.c |3 +++ 1 files changed, 3 insertions(+), 0 deleti

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Reinhard Max
On Tue, 4 May 2010 at 23:47, Gerd Hoffmann wrote: My tigervnc (tightvnc successor) has IPv6 support and handles this just fine. Well, as I wrote, the code is not just used for vnc, but also for server sockets that (if I got that right) could be connected from telnet or netcat implementations

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Reinhard Max
On Tue, 4 May 2010 at 16:50, Anthony Liguori wrote: Personally, I'm inclined to agree that this is a client problem. That would be a violation of the "be liberal in what you accept and conservative in what you produce" principle and there are plenty of scenarios where even a client that Does

[Qemu-devel] VNC heap corruption when display width is not a multiple of 16

2010-05-05 Thread Andrew Lutomirski
Hi all- qemu-kvm quite reliably crashes when running with a VNC viewer connected at 1400x1050. (The crash happens when changing resolution *from* 1400x1050 or disconnecting and reconnecting a client.) The problem is that vnc_refresh_server_surface overruns server->data and corrupts heap metadat

[Qemu-devel] Re: [PATCH] pflash_cfi01: add device ID read command

2010-05-05 Thread Michael Walle
Ping for this patch. Anything wrong with it? Am Saturday 01 May 2010 19:34:06 schrieb Michael Walle: > Add support to read manufacturer and device ID. For everything else (eg. > lock bits) 0 is returned. > > Signed-off-by: Michael Walle > --- > hw/pflash_cfi01.c | 20 > 1

Re: [Qemu-devel] [PATCH 1/2] QMP: Introduce commands doc

2010-05-05 Thread Luiz Capitulino
On Mon, 03 May 2010 18:24:11 +0200 Markus Armbruster wrote: > > + > > +Example: > > + > > +{ "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } } > > + > > +Notes: > > + > > +(1) The 'query-migrate' command should be used to check migration's > > progress > > +and final result (this

Re: [Qemu-devel] [PATCH 1/2] qemu-error: Introduce get_errno_name()

2010-05-05 Thread Anthony Liguori
On 05/04/2010 03:30 PM, Luiz Capitulino wrote: StateVmSaveFailed is not like CommandFailed, there are five errors in do_savevm() and StateVmSaveFailed happens to be one of them. But I understand what you mean and I have considered doing something like it, one of the problems though is that

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Anthony Liguori
On 05/04/2010 04:47 PM, Gerd Hoffmann wrote: On 05/04/10 18:23, Anthony Liguori wrote: On 05/04/2010 08:49 AM, Reinhard Max wrote: Hi, I am maintaining the tightvnc package for openSUSE and was recently confronted with an alleged vnc problem with QWMU that turned out to be a shortcoming in QEM

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Gerd Hoffmann
On 05/04/10 18:23, Anthony Liguori wrote: On 05/04/2010 08:49 AM, Reinhard Max wrote: Hi, I am maintaining the tightvnc package for openSUSE and was recently confronted with an alleged vnc problem with QWMU that turned out to be a shortcoming in QEMU's code for handling TCP server sockets, whic

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Anthony Liguori
On 05/04/2010 03:44 PM, Reinhard Max wrote: Hi, On Tue, 4 May 2010 at 11:23, Anthony Liguori wrote: 0.11.0 is pretty old. Please update your patch against the latest git. Ok, will do. I'm not sure we're doing the wrong thing right now. Well, I think it just can't be correct, that an IPv

  1   2   >