Re: [Qemu-devel] classic emulator Vs QEMU-TCG

2010-12-17 Thread Stefano Bonifazi
On 12/16/2010 04:57 PM, Mulyadi Santosa wrote: With my limited C knowledge, I saw that as a instruction jump (to tb_ptr). The "code_gen_prologue" seems to me like a cast. casting each opcode in tb_ptr as uint8_t with maximum length=1024 Hi! Thank you for your reply! I've got an explanat

Re: [Qemu-devel] -snapshot

2010-12-17 Thread Kevin Wolf
Am 16.12.2010 19:16, schrieb Stefan Weil: > Am 16.12.2010 18:45, schrieb Stefan Hajnoczi: >> On Thu, Dec 16, 2010 at 4:34 PM, Amador Pahim wrote: >>> Thank you for your answer. Just one more question: If, while my >>> "snapshot" vms are running, the main disk is modified by a non >>> "snapshot" vm

Re: [Qemu-devel] classic emulator Vs QEMU-TCG

2010-12-17 Thread Mulyadi Santosa
On Fri, Dec 17, 2010 at 16:47, Stefano Bonifazi wrote: > On 12/16/2010 04:57 PM, Mulyadi Santosa wrote: >> >> With my limited C knowledge, I saw that as a instruction jump (to >> tb_ptr). The "code_gen_prologue" seems to me like a cast. casting >> each opcode in tb_ptr as uint8_t with maxi

Re: [Qemu-devel] [PATCH 3/3] raw-posix: add discard support

2010-12-17 Thread Kevin Wolf
Am 16.12.2010 19:36, schrieb Christoph Hellwig: > Add support to discard blocks in a raw image residing on an XFS filesystem > by calling the XFS_IOC_UNRESVSP64 ioctl to punch holes. Support for other > hole punching mechanisms can be added when they become available. > > Signed-off-by: Christoph

[Qemu-devel] Re: [PATCH] qemu-io: Add discard command

2010-12-17 Thread Kevin Wolf
Am 13.12.2010 10:36, schrieb Stefan Hajnoczi: > discard [-Cq] off len -- discards a number of bytes at a specified > offset > > discards a range of bytes from the given offset > > Example: > 'discard 512 1k' - discards 1 kilobyte from 512 bytes into the file > > Discards a segment of the cur

[Qemu-devel] [PATCH v5] raw-posix: add discard support

2010-12-17 Thread Christoph Hellwig
Add support to discard blocks in a raw image residing on an XFS filesystem by calling the XFS_IOC_UNRESVSP64 ioctl to punch holes. Support for other hole punching mechanisms can be added when they become available. Signed-off-by: Christoph Hellwig Index: qemu/block/raw-posix.c =

[Qemu-devel] Re: [PATCH v5] raw-posix: add discard support

2010-12-17 Thread Kevin Wolf
Am 17.12.2010 11:41, schrieb Christoph Hellwig: > Add support to discard blocks in a raw image residing on an XFS filesystem > by calling the XFS_IOC_UNRESVSP64 ioctl to punch holes. Support for other > hole punching mechanisms can be added when they become available. > > Signed-off-by: Christoph

[Qemu-devel] [PATCH] qemu-io: Fix typo in help texts

2010-12-17 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- qemu-io.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index 2318a28..65dee13 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -326,7 +326,7 @@ read_help(void) " -l, -- length for pattern verification (only wit

Re: [Qemu-devel] [PATCH] qemu-io: Fix typo in help texts

2010-12-17 Thread Christoph Hellwig
On Fri, Dec 17, 2010 at 11:56:24AM +0100, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf Looks good.

Re: [Qemu-devel] Re: [PATCH v3] qemu, qmp: convert do_inject_nmi() to QObject, QError

2010-12-17 Thread Luiz Capitulino
On Fri, 17 Dec 2010 14:20:15 +0800 Lai Jiangshan wrote: > On 12/16/2010 09:17 PM, Luiz Capitulino wrote: > > On Thu, 16 Dec 2010 15:11:50 +0200 > > Avi Kivity wrote: > >> > >> Why have an argument at all? Always nmi to all cpus. > > > > I think Avi's suggest is better, and I will use > "injec

[Qemu-devel] [PATCH 01/30] usb: update MAINTAINERS

2010-12-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- MAINTAINERS |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 59effc7..4b07192 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -329,8 +329,8 @@ F: hw/lsi53c895a.c F: hw/scsi* USB -M: qemu-devel@nongnu.org

[Qemu-devel] [PATCH 00/30] usb descriptor overhaul + more

2010-12-17 Thread Gerd Hoffmann
Hi, Here is a update of the usb descriptor patches and a bunch of improvements on top of that. This patch series features: * Update USB section in MAINTAINERS * A major overhaul for the usb descriptor handling for emulated devices. This is in preparation for USB 2.0 support enteri

[Qemu-devel] [PATCH 03/30] usb hid: use new descriptor infrastructure.

2010-12-17 Thread Gerd Hoffmann
Switch the usb hid drivers (keyboard, mouse, tablet) over to the new descriptor infrastructure. Signed-off-by: Gerd Hoffmann --- hw/usb-hid.c | 448 +++--- 1 files changed, 205 insertions(+), 243 deletions(-) diff --git a/hw/usb-hid.c b/hw/us

[Qemu-devel] [PATCH 04/30] usb serial: use new descriptor infrastructure.

2010-12-17 Thread Gerd Hoffmann
Switch the usb serial drivers (serial, braille) over to the new descriptor infrastructure. Note that this removes the freely configurable vendor and product id properties. I think the only reason this was configurable is that the only difference between the serial and the braille device is the ve

[Qemu-devel] [PATCH 12/30] usb: move USB_REQ_SET_ADDRESS handling to common code

2010-12-17 Thread Gerd Hoffmann
USB_REQ_SET_ADDRESS handling is identical in *all* emulated devices. Move it to common code. Signed-off-by: Gerd Hoffmann --- hw/usb-bt.c |4 hw/usb-desc.c |6 ++ hw/usb-hid.c|4 hw/usb-hub.c|4 hw/usb-msd.c|4 hw/usb-net.c|5

[Qemu-devel] [PATCH 02/30] usb: data structs and helpers for usb descriptors.

2010-12-17 Thread Gerd Hoffmann
This patch adds hw/usb-desc.[ch] files. They carry data structures for various usb descriptors and helper functions to generate usb packets from the structures. The intention is to have a internal representation of the device desription which is more usable than the current char array blobs, so w

[Qemu-devel] [PATCH 10/30] usb storage: serial number support

2010-12-17 Thread Gerd Hoffmann
If a serial number is present for the drive fill it into the usb serialnumber string descriptor. Signed-off-by: Gerd Hoffmann --- hw/usb-msd.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/usb-msd.c b/hw/usb-msd.c index 20ab886..9aa 100644 --- a/hw/usb-msd.

[Qemu-devel] [PATCH 05/30] usb storage: use new descriptor infrastructure.

2010-12-17 Thread Gerd Hoffmann
Switch the usb storage driver over to the new descriptor infrastructure. Signed-off-by: Gerd Hoffmann --- hw/usb-msd.c | 167 ++ 1 files changed, 63 insertions(+), 104 deletions(-) diff --git a/hw/usb-msd.c b/hw/usb-msd.c index 0a95d8d..2

[Qemu-devel] [PATCH 13/30] usb: move USB_REQ_{GET, SET}_CONFIGURATION handling to common code

2010-12-17 Thread Gerd Hoffmann
This patch adds fields to the USBDevice struct for the current speed (hard-wired to full speed for now) and current device configuration. Also a init function is added which inializes these fields. This allows USB_REQ_{GET,SET}_CONFIGURATION handling to be moved to common code. For most drivers

[Qemu-devel] [PATCH 17/30] usb: add usb_wakeup() + wakeup callback to port ops

2010-12-17 Thread Gerd Hoffmann
Add wakeup callback to port ops for remote wakeup handling. Also add a usb_wakeup() function for devices which want trigger a remote wakeup. Signed-off-by: Gerd Hoffmann --- hw/usb.c |7 +++ hw/usb.h |2 ++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/usb.c b/hw/

[Qemu-devel] [PATCH 19/30] usb: hub: remote wakeup support.

2010-12-17 Thread Gerd Hoffmann
This patch makes the usb hub handle remote wakeup requests from devices properly by updating the port status register and forwarding the wakeup to the upstream port. Signed-off-by: Gerd Hoffmann --- hw/usb-hub.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a

[Qemu-devel] [PATCH 07/30] usb bluetooth: use new descriptor infrastructure.

2010-12-17 Thread Gerd Hoffmann
Switch the usb bluetooth driver over to the new descriptor infrastructure. Signed-off-by: Gerd Hoffmann --- hw/usb-bt.c | 473 +-- 1 files changed, 202 insertions(+), 271 deletions(-) diff --git a/hw/usb-bt.c b/hw/usb-bt.c index 56d1a6c..

[Qemu-devel] [PATCH 09/30] usb descriptors: add settable strings.

2010-12-17 Thread Gerd Hoffmann
This patch allows to set usb descriptor strings per device instance. Signed-off-by: Gerd Hoffmann --- hw/usb-bus.c |1 + hw/usb-desc.c | 52 hw/usb-desc.h |4 +++- hw/usb.h |9 + 4 files changed, 57 insertions(+), 9

[Qemu-devel] [PATCH 11/30] usb network: use new descriptor infrastructure.

2010-12-17 Thread Gerd Hoffmann
Switch the usb network driver over to the new descriptor infrastructure. Signed-off-by: Gerd Hoffmann --- hw/usb-net.c | 453 +++--- 1 files changed, 209 insertions(+), 244 deletions(-) diff --git a/hw/usb-net.c b/hw/usb-net.c index 58c672f..

[Qemu-devel] [PATCH 06/30] usb wacom: use new descriptor infrastructure.

2010-12-17 Thread Gerd Hoffmann
Switch the usb wavom driver over to the new descriptor infrastructure. Signed-off-by: Gerd Hoffmann --- hw/usb-wacom.c | 178 +++- 1 files changed, 73 insertions(+), 105 deletions(-) diff --git a/hw/usb-wacom.c b/hw/usb-wacom.c index 47f26cd.

[Qemu-devel] [PATCH 24/30] usb: add usb_desc_attach

2010-12-17 Thread Gerd Hoffmann
Add usb_desc_attach() which sets up the device according to the speed the usb port is able to handle. This function can be hooked into the handle_attach callback. Signed-off-by: Gerd Hoffmann --- hw/usb-desc.c | 36 +--- hw/usb-desc.h |1 + 2 files changed,

[Qemu-devel] [PATCH 08/30] usb hub: use new descriptor infrastructure.

2010-12-17 Thread Gerd Hoffmann
Switch the usb hub driver over to the new descriptor infrastructure. It also removes the nr_ports variable and MAX_PORTS define and introduces a NUM_PORTS define instead. The numver of ports was (and still is) fixed at 8 anyway. Signed-off-by: Gerd Hoffmann --- hw/usb-hub.c | 141

[Qemu-devel] [PATCH 14/30] usb: move remote wakeup handling to common code

2010-12-17 Thread Gerd Hoffmann
This patch moves setting and clearing the remote_wakeup feature bit (via USB_REQ_{SET,CLEAR}_FEATURE) to common code. Also USB_REQ_GET_STATUS handling is moved to common code. Signed-off-by: Gerd Hoffmann --- hw/usb-bt.c | 21 +++-- hw/usb-desc.c | 26 +

[Qemu-devel] [PATCH 22/30] usb: add speed mask to ports

2010-12-17 Thread Gerd Hoffmann
Add a field to usb ports indicating the speed(s) they are able to handle. Signed-off-by: Gerd Hoffmann --- hw/usb-bus.c |3 ++- hw/usb-hub.c |3 ++- hw/usb-musb.c |3 ++- hw/usb-ohci.c |3 ++- hw/usb-uhci.c |3 ++- hw/usb.h |9 - 6 files changed, 18 inserti

[Qemu-devel] [PATCH 21/30] usb: hid: change serial number to "42".

2010-12-17 Thread Gerd Hoffmann
It would be nice to have some way to signal our hid devices support remote wakeup. There is a descriptor bit for that of course. Problem with using is one is that older qemu versions used to set the bit even though they did *not* support remote wakeup. Bummer. This patch changes the serial numb

[Qemu-devel] [PATCH 15/30] usb: create USBPortOps, move attach there.

2010-12-17 Thread Gerd Hoffmann
Create USBPortOps struct, move the attach function to that struct. Signed-off-by: Gerd Hoffmann --- hw/usb-bus.c |4 ++-- hw/usb-hub.c |6 +- hw/usb-musb.c |6 +- hw/usb-ohci.c |6 +- hw/usb-uhci.c |6 +- hw/usb.c |2 +- hw/usb.h |8 +--

[Qemu-devel] [PATCH 25/30] usb: add device qualifier support

2010-12-17 Thread Gerd Hoffmann
Add support for device_qualifier and other_speed_config descriptors. These are used to query the "other speed" configuration of usb 2.0 devices, i.e. in high-speed mode they return the full-speed configuration and visa versa. Signed-off-by: Gerd Hoffmann --- hw/usb-desc.c | 46

[Qemu-devel] [PATCH v6 4/4] docs: Document virtio PCI -device ioeventfd=on|off

2010-12-17 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- docs/qdev-device-use.txt |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/docs/qdev-device-use.txt b/docs/qdev-device-use.txt index f252c8e..f2f9b75 100644 --- a/docs/qdev-device-use.txt +++ b/docs/qdev-device-use.txt @@ -97,10 +97

[Qemu-devel] [PATCH 20/30] usb: hid: remote wakeup support.

2010-12-17 Thread Gerd Hoffmann
Add usb_wakeup() call to the hid driver so remote wakeup actually works. Signed-off-by: Gerd Hoffmann --- hw/usb-hid.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/usb-hid.c b/hw/usb-hid.c index 1c35960..60fa57f 100644 --- a/hw/usb-hid.c +++ b/hw/usb-hid.c @@ -429

[Qemu-devel] [PATCH 18/30] usb: uhci: remote wakeup support.

2010-12-17 Thread Gerd Hoffmann
Add support for remote wakeup to the UHCI adapter. Signed-off-by: Gerd Hoffmann --- hw/usb-uhci.c | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index debf7f7..60d5d57 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@

[Qemu-devel] [PATCH 26/30] usb storage: high speed support

2010-12-17 Thread Gerd Hoffmann
Add high speed support to the usb mass storage device. With this patch applied the linux kernel recognises the usb storage device as highspeed capable device and suggests to connect it to a highspeed port instead of the uhci. Tested with both uhci and (not-yet submitted) ehci. Signed-off-by: Ger

[Qemu-devel] [PATCH 16/30] usb: rework attach/detach workflow

2010-12-17 Thread Gerd Hoffmann
Add separate detach callback to USBPortOps, split uhci/ohci/musb/usbhub attach functions into two. Move common code to the usb_attach() function, only the hardware-specific bits remain in the attach/detach callbacks. Keep track of the port it is attached to for each usb device. [ v3: fix tyops i

[Qemu-devel] [PATCH 23/30] usb: add attach callback

2010-12-17 Thread Gerd Hoffmann
Add handle_attach() callback to USBDeviceInfo which is called by the generic package handler when the device is attached to the usb bus (i.e. plugged into a port). Signed-off-by: Gerd Hoffmann --- hw/usb.c |7 ++- hw/usb.h |5 + 2 files changed, 11 insertions(+), 1 deletions(-)

[Qemu-devel] [PATCH v6 1/4] virtio-pci: Rename bugs field to flags

2010-12-17 Thread Stefan Hajnoczi
The VirtIOPCIProxy bugs field is currently used to enable workarounds for older guests. Rename it to flags so that other per-device behavior can be tracked. A later patch uses the flags field to remember whether ioeventfd should be used for virtqueue host notification. Signed-off-by: Stefan Hajn

[Qemu-devel] [PATCH 29/30] usb: keep track of physical port address.

2010-12-17 Thread Gerd Hoffmann
Add a path string to USBPort. Add usb_port_location() function to set the physical location of the usb port. Update all drivers implementing usb ports to call it. Update the monitor commands to print it. Wind it up in qdev. Signed-off-by: Gerd Hoffmann --- hw/usb-bus.c | 25 ++

[Qemu-devel] [PATCH 30/30] usb: add port property.

2010-12-17 Thread Gerd Hoffmann
This allows to explictily set the physical port where you want to plug the usb device. Example: -device usb-tablet,bus=usb.0,port=2 With explicit port addressing qemu can and will not automagically add USB Hubs. This means that: (a) You can plug two devices of your choice into the two uhci

[Qemu-devel] [PATCH v6 0/4] virtio: Use ioeventfd for virtqueue notify

2010-12-17 Thread Stefan Hajnoczi
See below for the v6 changelog. Virtqueue notify is currently handled synchronously in userspace virtio. This prevents the vcpu from executing guest code while hardware emulation code handles the notify. On systems that support KVM, the ioeventfd mechanism can be used to make virtqueue notify a

[Qemu-devel] [PATCH v6 2/4] virtio-pci: Use ioeventfd for virtqueue notify

2010-12-17 Thread Stefan Hajnoczi
Virtqueue notify is currently handled synchronously in userspace virtio. This prevents the vcpu from executing guest code while hardware emulation code handles the notify. On systems that support KVM, the ioeventfd mechanism can be used to make virtqueue notify a lightweight exit by deferring har

[Qemu-devel] [Bug 680758] Re: balloon only resizes by 2M

2010-12-17 Thread a1bert
the same here: host debian squeeze: qemu-kvm-0.12.5 guest: windows 2008 server balloon driver: 6.1.7600.16385 10.8.2010 ~# virsh -c qemu:///system dominfo 9 | grep Used Used memory:2064384 kB ~# virsh -c qemu:///system setmem 9 512000 ~# virsh -c qemu:///system dominfo 9 | grep Used U

Re: [Qemu-devel] [PATCH 1/1] spice: add chardev

2010-12-17 Thread Alon Levy
On Thu, Dec 16, 2010 at 05:53:10PM +0100, Gerd Hoffmann wrote: > Hi, > > >>>+//#define SPICE_QEMU_CHAR_USE_IOCTL > >> > >>Why is this disabled? > >>Does it depend on the chardev patches from Amit? > >> > > > >There was a long discussion that concluded we don't want IOCTL's at all, > >and that th

[Qemu-devel] [PATCH v6 3/4] virtio-pci: Don't use ioeventfd on old kernels

2010-12-17 Thread Stefan Hajnoczi
There used to be a limit of 6 KVM io bus devices inside the kernel. On such a kernel, don't use ioeventfd for virtqueue host notification since the limit is reached too easily. This ensures that existing vhost-net setups (which always use ioeventfd) have ioeventfds available so they can continue

[Qemu-devel] Re: [PATCH v6 0/5] qed: Add QEMU Enhanced Disk format

2010-12-17 Thread Kevin Wolf
Am 06.12.2010 17:07, schrieb Stefan Hajnoczi: > For a changelog against v5, see below. > > QEMU Enhanced Disk format is a disk image format that forgoes features > found in qcow2 in favor of better levels of performance and data > integrity. Due to its simpler on-disk layout, it is possible to sa

[Qemu-devel] [PATCH 27/30] usb storage: fix status reporting

2010-12-17 Thread Gerd Hoffmann
Change usb_msd_send_status() to take a pointer to the status packet instead of writing the status to s->usb_buf which might not point to the correct location. Signed-off-by: Gerd Hoffmann --- hw/usb-msd.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/usb

[Qemu-devel] [PATCH 28/30] usb storage: handle long responses

2010-12-17 Thread Gerd Hoffmann
The scsi layer may return us more data than the guests wants to have. Handle this by just ignoring the extra bytes and calling the {read,write}_data callback to finish the request. Seen happening in real life with some extended inquiry command. With this patch applied the linux kernel stops reseti

[Qemu-devel] Re: [PATCH v2] ide: Register vm change state handler once only

2010-12-17 Thread Kevin Wolf
Am 16.12.2010 16:54, schrieb Stefan Hajnoczi: > We register the vm change state handler in a PCI BAR map() function. > This function can be called multiple times throughout the lifetime of a > PCI IDE device. This results in duplicate vm change state handlers > being register, none of which are ev

[Qemu-devel] Re: [PATCH v6 0/5] qed: Add QEMU Enhanced Disk format

2010-12-17 Thread Stefan Hajnoczi
On Fri, Dec 17, 2010 at 02:08:16PM +0100, Kevin Wolf wrote: > Am 06.12.2010 17:07, schrieb Stefan Hajnoczi: > > For a changelog against v5, see below. > > > > QEMU Enhanced Disk format is a disk image format that forgoes features > > found in qcow2 in favor of better levels of performance and data

[Qemu-devel] [PATCH] spice: add chardev (v2)

2010-12-17 Thread Alon Levy
Adding a chardev backend for spice, for usage by spice vdagent in conjunction with a properly named virtio-serial device. Example usage: qemu -device virtio-serial -chardev spicevmc,name=vdagent,id=vdagent -devic This is equivalent to the old: qemu -device virtio-serial -device spicevmc,subtype

[Qemu-devel] booting demo kernel with -kernel

2010-12-17 Thread Toan Pham
Hi, Qemu has been a great tool to boot the linux kernel using a parameter like below. However, I have now been experiencing with os-development and noticed that qemu can not boot a demo kernel that is compiled as elf format and reallocated to 0x10. One example is a demo kernel found as osdev

Re: [Qemu-devel] Re: [PATCH] win32: Fix CRLF problem in make_device_config.sh

2010-12-17 Thread Andreas Färber
Am 16.12.2010 um 23:42 schrieb Paolo Bonzini: On 12/16/2010 10:52 PM, Stefan Weil wrote: QEMU source code with CRLF line endings which is quite common on windows hosts fails with current make_device_config.sh. The awk script gets the name of the included file with \r, so instead of pci.mak it

Re: [Qemu-devel] [PATCH] spice: add chardev (v2)

2010-12-17 Thread Alon Levy
On Fri, Dec 17, 2010 at 03:22:13PM +0200, Alon Levy wrote: > Adding a chardev backend for spice, for usage by spice vdagent in > conjunction with a properly named virtio-serial device. > > Example usage: > qemu -device virtio-serial -chardev spicevmc,name=vdagent,id=vdagent -devic > > This is eq

[Qemu-devel] [PATCH] spice: add chardev (v3)

2010-12-17 Thread Alon Levy
Adding a chardev backend for spice, for usage by spice vdagent in conjunction with a properly named virtio-serial device. Example usage: qemu -device virtio-serial -chardev spicevmc,name=vdagent,id=vdagent -devic This is equivalent to the old: qemu -device virtio-serial -device spicevmc,subtype

Re: [Qemu-devel] Re: [PATCH] win32: Fix CRLF problem in make_device_config.sh

2010-12-17 Thread Paolo Bonzini
On 12/17/2010 02:34 PM, Andreas Färber wrote: Fix this by removing any \r at end of line. Why isn't cygwin (or whatever you're using) removing it? I believe Cygwin had an option to choose the line ending style once during setup. By default it uses Unix-style line endings. If someone edits so

Re: [Qemu-devel] classic emulator Vs QEMU-TCG

2010-12-17 Thread Stefano Bonifazi
On 12/16/2010 04:41 PM, Peter Maydell wrote: Some hints: * go and look up the C syntax for function pointers and casting things to function pointers Yup! See the reply to Mr. Santosa, thank you! * code_gen_prologue[] contains code which has been generated once on startup -- go and find the

Re: [Qemu-devel] classic emulator Vs QEMU-TCG

2010-12-17 Thread Andreas Färber
Hi, Am 17.12.2010 um 10:47 schrieb Stefano Bonifazi: I've got an explanation from a C guru :) ((long REGPARM (*)(void *))code_gen_prologue)(tb_ptr) - (long REGPARM (*)(void *)) is a type: a pointer pointing to a function, which takes one (void*) parameter. code_gen_prologue is an>

Re: [Qemu-devel] Re: [PATCHv8 00/16] boot order specification

2010-12-17 Thread Andreas Färber
Am 15.12.2010 um 00:02 schrieb Alexander Graf: On 14.12.2010, at 21:31, Benjamin Herrenschmidt wrote: The only working system emulation we have are Macs (G3 beige, G4, G5), so we can't just ignore Apple. Alex even made me stick to their odd 0x41 rtas-version property. ;) Hah :-) Nothing

[Qemu-devel] Re: [PATCH 1/2] block/qcow2.c: rename qcow_ functions to qcow2_

2010-12-17 Thread Kevin Wolf
Am 16.12.2010 17:05, schrieb jes.soren...@redhat.com: > From: Jes Sorensen > > It doesn't really make sense for functions in qcow2.c to be named > qcow_ so convert the names to match correctly. > > Signed-off-by: Jes Sorensen > --- > block/qcow2-cluster.c |6 +- > block/qcow2-snapshot.c |

[Qemu-devel] Re: [PATCH 2/2] Add proper -errno error return values to qcow2_open()

2010-12-17 Thread Kevin Wolf
Am 16.12.2010 17:05, schrieb jes.soren...@redhat.com: > From: Jes Sorensen > > In addition this adds missing braces to the function to be consistent > with the coding style. > > Signed-off-by: Jes Sorensen > --- > block/qcow2.c | 61 >

[Qemu-devel] Re: [PATCH 1/2] block/qcow2.c: rename qcow_ functions to qcow2_

2010-12-17 Thread Jes Sorensen
On 12/17/10 15:20, Kevin Wolf wrote: >> offset = start_offset; >> while (offset < end_offset) { >> @@ -88,13 +88,13 @@ static int qcow_read_extensions(BlockDriverState *bs, >> uint64_t start_offset, >> #ifdef DEBUG_EXT >> /* Sanity check */ >> if (offset > s->cluster_s

Re: [Qemu-devel] [PATCH v2 2/6] qdev: reset qdev along with qdev tree

2010-12-17 Thread Peter Maydell
On 17 December 2010 00:24, Anthony Liguori wrote: > On 12/16/2010 05:48 PM, Michael S. Tsirkin wrote: >> Ugh, I keep forgetting about the non-qdev systems. >> Maybe it's a good way to finally make everyone to convert? If a system >> maintainer can't be bothered to convert to qdev we can declare th

[Qemu-devel] Re: [PATCH 2/2] Add proper -errno error return values to qcow2_open()

2010-12-17 Thread Jes Sorensen
On 12/17/10 15:27, Kevin Wolf wrote: > Am 16.12.2010 17:05, schrieb jes.soren...@redhat.com: >> From: Jes Sorensen >> >> In addition this adds missing braces to the function to be consistent >> with the coding style. >> >> Signed-off-by: Jes Sorensen >> --- >> block/qcow2.c | 61 >> ++

Re: [Qemu-devel] [PULL] virtio-9p patches - Request for pull

2010-12-17 Thread Anthony Liguori
On 12/02/2010 06:05 PM, Venkateswararao Jujjuri (JV) wrote: The following changes since commit 6a8657528d94fa1be78d1be0821a01a251fa2de9: Anthony Liguori (1): Fix build are available in the git repository at: git://repo.or.cz/qemu/aliguori/jvrao.git for-anthony Pulled. Than

Re: [Qemu-devel] [PULL 0/4]: Monitor queue

2010-12-17 Thread Anthony Liguori
On 12/06/2010 08:43 AM, Luiz Capitulino wrote: Anthony, QMP fixes pull request. The changes (since 2c90fe2b71df2534884bce96d90cbfcc93aeedb8) are available in the following repository: git://repo.or.cz/qemu/qmp-unstable.git for-anthony Pulled. Thanks. Regards, Anthony Liguori Lui

Re: [Qemu-devel] [PULL] pci, virtio, net, migration

2010-12-17 Thread Anthony Liguori
On 12/12/2010 05:25 AM, Michael S. Tsirkin wrote: The following changes since commit 962630f207a33b7de4316022884b5241e05491cd: Pass boot device list to firmware. (2010-12-11 21:32:48 +) Pulled. Thanks. Regards, Anthony Liguori are available in the git repository at: git://git

Re: [Qemu-devel] [PULL 00/14] Block patches

2010-12-17 Thread Anthony Liguori
On 12/09/2010 05:09 AM, Kevin Wolf wrote: The following changes since commit 138b38b61bf92d4e9588acf934e532499c94e185: ppc: kvm: fix signedness warning (2010-12-08 21:30:19 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Christian Brunner (1):

Re: [Qemu-devel] [PATCH 00/14] [PULL] ARM fixes, v2

2010-12-17 Thread Anthony Liguori
On 12/16/2010 12:07 PM, Peter Maydell wrote: On 7 December 2010 15:50, Peter Maydell wrote: The following changes since commit 2c90fe2b71df2534884bce96d90cbfcc93aeedb8: Kirill Batuzov (1): Speedup 'tb_find_slow' by using the same heuristic as during memory page lookup are availab

[Qemu-devel] [RFC][PATCH 3/3] mc146818rtc: Handle host clock warps

2010-12-17 Thread Jan Kiszka
Make use of the new warp notifier to update the RTC whenever rtc_clock is the host clock and that happens to jump backward. This avoids that the RTC stalls for the period the host clock was set back. Signed-off-by: Jan Kiszka --- hw/mc146818rtc.c | 17 + 1 files changed, 17 ins

[Qemu-devel] [RFC][PATCH 1/3] qemu-timer: Consolidate qemu_get_clock and qemu_get_clock_ns

2010-12-17 Thread Jan Kiszka
Both functions have a lot in common, push those bits into a shared helper. Signed-off-by: Jan Kiszka --- qemu-timer.c | 27 +-- 1 files changed, 13 insertions(+), 14 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 95814af..abad93b 100644 --- a/qemu-timer.c

Re: [Qemu-devel] [PATCH v2 2/6] qdev: reset qdev along with qdev tree

2010-12-17 Thread Anthony Liguori
On 12/17/2010 08:45 AM, Peter Maydell wrote: On 17 December 2010 00:24, Anthony Liguori wrote: On 12/16/2010 05:48 PM, Michael S. Tsirkin wrote: Ugh, I keep forgetting about the non-qdev systems. Maybe it's a good way to finally make everyone to convert? If a system maintainer can't

[Qemu-devel] [PATCH v2 0/2] qcow2 cleanups

2010-12-17 Thread Jes . Sorensen
From: Jes Sorensen Hi, These two patches tries to clean up the qcow2 code a little. First makes the function names consistent, ie. we shouldn't have qcow_ functions in the qcow2 code. Second tries to add proper errno return values to qcow2_open(). New in v2: Fix the bdrv_pread() handling as poi

[Qemu-devel] [PATCH 1/2] block/qcow2.c: rename qcow_ functions to qcow2_

2010-12-17 Thread Jes . Sorensen
From: Jes Sorensen It doesn't really make sense for functions in qcow2.c to be named qcow_ so convert the names to match correctly. Signed-off-by: Jes Sorensen --- block/qcow2-cluster.c |6 +- block/qcow2-snapshot.c |6 +- block/qcow2.c | 190 +---

[Qemu-devel] [RFC][PATCH 2/3] qemu-timer: Introduce warp callback

2010-12-17 Thread Jan Kiszka
QEMU_CLOCK_HOST is based on the system time which may jump backward in case the admin or NTP adjusts it. RTC emulations and other device models can suffer in this case as timers will stall for the period the clock was tuned back. This adds a detection mechanism that checks on every host clock read

[Qemu-devel] [RFC][PATCH 0/3] Let RTC follow backward jumps of host clock immediately

2010-12-17 Thread Jan Kiszka
By default, we base the mc146818 RTC on the host clock (CLOCK_REALTIME). This works fine if only the frequency of the host clock is tuned (e.g. by NTP) or if it is set to a future time. However, if the host is tuned backward, e.g. because NTP obtained the correct time after the guest was already st

Re: [Qemu-devel] [PATCH] spice: add chardev (v3)

2010-12-17 Thread Anthony Liguori
On 12/17/2010 07:39 AM, Alon Levy wrote: Adding a chardev backend for spice, for usage by spice vdagent in conjunction with a properly named virtio-serial device. Example usage: qemu -device virtio-serial -chardev spicevmc,name=vdagent,id=vdagent -devic This is equivalent to the old: qemu -

[Qemu-devel] [PATCH 2/2] Add proper -errno error return values to qcow2_open()

2010-12-17 Thread Jes . Sorensen
From: Jes Sorensen In addition this adds missing braces to the function to be consistent with the coding style. Signed-off-by: Jes Sorensen --- block/qcow2.c | 60 +++- 1 files changed, 42 insertions(+), 18 deletions(-) diff --git a/block/

[Qemu-devel] Re: [PATCH v2 0/2] qcow2 cleanups

2010-12-17 Thread Kevin Wolf
Am 17.12.2010 16:02, schrieb jes.soren...@redhat.com: > From: Jes Sorensen > > Hi, > > These two patches tries to clean up the qcow2 code a little. First > makes the function names consistent, ie. we shouldn't have qcow_ > functions in the qcow2 code. Second tries to add proper errno return > va

Re: [Qemu-devel] Re: [PATCH v3] qemu, qmp: convert do_inject_nmi() to QObject, QError

2010-12-17 Thread Avi Kivity
On 12/17/2010 01:22 PM, Luiz Capitulino wrote: > > I think Avi's suggest is better, and I will use > "inject-nmi" (without cpu-index argument) to send NMI to all cpus, > like physical GUI. If some one want to send NMI to a set of cpus, > he can use "inject-nmi" multiple times. His suggestion

[Qemu-devel] [PATCH V2] softfloat: Rename float*_is_nan() functions to float*_is_quiet_nan()

2010-12-17 Thread Peter Maydell
The softfloat functions float*_is_nan() were badly misnamed, because they return true only for quiet NaNs, not for all NaNs. Rename them to float*_is_quiet_nan() to more accurately reflect what they do. This change was produced by: perl -p -i -e 's/_is_nan/_is_quiet_nan/g' $(git grep -l is_nan) (

[Qemu-devel] [PATCH 2/3] docs: Describe zero data clusters in QED specification

2010-12-17 Thread Stefan Hajnoczi
Zero data clusters are a space-efficient way of storing zeroed regions of the image. Signed-off-by: Stefan Hajnoczi --- docs/specs/qed_spec.txt |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/docs/specs/qed_spec.txt b/docs/specs/qed_spec.txt index 1d5fa87..7982e05

[Qemu-devel] [PATCH 0/3] qed: Add support for zero clusters

2010-12-17 Thread Stefan Hajnoczi
This patch series adds zero data clusters to QED. Clusters can be marked as zero clusters to store zeroed regions in a space-efficient way. The patch never actually creates new zero clusters but includes the I/O path support code to handle them if they are used by an image file. Image streaming

[Qemu-devel] [PATCH 1/3] docs: Fix missing carets in QED specification

2010-12-17 Thread Stefan Hajnoczi
For some reason the carets ('^') in the QED specification disappeared. This patch puts them back. Signed-off-by: Stefan Hajnoczi --- docs/specs/qed_spec.txt |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/specs/qed_spec.txt b/docs/specs/qed_spec.txt index 446b5a2

[Qemu-devel] Re: [PATCH 11/21] ioport: insert event_tap_ioport() to ioport_write().

2010-12-17 Thread Yoshiaki Tamura
2010/12/17 Stefan Hajnoczi : > On Thu, Dec 16, 2010 at 9:50 AM, Yoshiaki Tamura > wrote: >> 2010/12/16 Michael S. Tsirkin : >>> On Thu, Dec 16, 2010 at 04:37:41PM +0900, Yoshiaki Tamura wrote: 2010/11/28 Yoshiaki Tamura : > 2010/11/28 Michael S. Tsirkin : >> On Thu, Nov 25, 2010 at

Re: [Qemu-devel] [PATCH V2] softfloat: Rename float*_is_nan() functions to float*_is_quiet_nan()

2010-12-17 Thread Andreas Färber
Hello Peter, Am 17.12.2010 um 16:56 schrieb Peter Maydell: The softfloat functions float*_is_nan() were badly misnamed, because they return true only for quiet NaNs, not for all NaNs. Rename them to float*_is_quiet_nan() to more accurately reflect what they do. This change was produced by: per

[Qemu-devel] Re: [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-12-17 Thread Yoshiaki Tamura
2010/12/17 Yoshiaki Tamura : > 2010/12/16 Michael S. Tsirkin : >> On Thu, Dec 16, 2010 at 11:28:46PM +0900, Yoshiaki Tamura wrote: >>> 2010/12/16 Michael S. Tsirkin : >>> > On Thu, Dec 16, 2010 at 04:36:16PM +0900, Yoshiaki Tamura wrote: >>> >> 2010/12/3 Yoshiaki Tamura : >>> >> > 2010/12/2 Michael

Re: [Qemu-devel] [PATCH V2] softfloat: Rename float*_is_nan() functions to float*_is_quiet_nan()

2010-12-17 Thread Peter Maydell
On 17 December 2010 16:19, Andreas Färber wrote: >> Can this patch be applied? (There are more ARM/softfloat patches >> in my queue which will break it again otherwise...) > > If we're engaging into refactoring the softfloat library, I still have a > large'ish patch lying around to fix signature m

[Qemu-devel] [PATCH] softfloat: Fix function signature mismatches by using POSIX integer types

2010-12-17 Thread Andreas Färber
Don't reinvent C99 types like uint8_t by typedef'ing uint8 etc. On BeOS and Haiku, system headers {be,os}/support/SupportDefs.h do define [u]int{8,16,32,64}, but they define [u]int32 as long, so assumptions that int32 and int can be used interchangeably must be avoided. Inspired by mmlr's original

[Qemu-devel] [PULL 00/38] Block patches

2010-12-17 Thread Kevin Wolf
The following changes since commit 9d861fa595c93f22d1d55b723a691531c36c9672: Merge remote branch 'arm/for-anthony' into staging (2010-12-17 08:25:17 -0600) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Alexander Graf (10): ide: split ide command i

[Qemu-devel] [PATCH 04/38] Introduce strtosz_suffix()

2010-12-17 Thread Kevin Wolf
From: Jes Sorensen This introduces strtosz_suffix() which allows the caller to specify a default suffix in case the non default of MB is wanted. strtosz() is kept as a wrapper for strtosz_suffix() which keeps it's current default of MB. Signed-off-by: Jes Sorensen Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH 33/38] qed: Table, L2 cache, and cluster functions

2010-12-17 Thread Kevin Wolf
From: Stefan Hajnoczi This patch adds code to look up data cluster offsets in the image via the L1/L2 tables. The L2 tables are writethrough cached in memory for performance (each read/write requires a lookup so it is essential to cache the tables). With cluster lookup code in place it is possi

[Qemu-devel] [PATCH 02/38] block: Introduce path_has_protocol() function

2010-12-17 Thread Kevin Wolf
From: Stefan Hajnoczi The bdrv_find_protocol() function returns NULL if an unknown protocol name is given. It returns the "file" protocol when the filename contains no protocol at all. This makes it difficult to distinguish between paths which contain a protocol and those which do not. Factor

[Qemu-devel] [PATCH 09/38] ide: move transfer_start after variable modification

2010-12-17 Thread Kevin Wolf
From: Alexander Graf We hook into transfer_start and immediately call the end function for ahci. This means that everything needs to be in place for the end function when we start the transfer, so let's move the function down to where all state is in place. Signed-off-by: Alexander Graf Signed-

[Qemu-devel] [PATCH 03/38] block: Fix the use of protocols in backing files

2010-12-17 Thread Kevin Wolf
From: Stefan Hajnoczi Backing filenames may contain a protocol. The code currently doesn't consider this case and produces filenames that embed ":". Don't combine filenames if the backing filename contains a protocol. Based on an earlier patch by Anthony Liguori . Signed-off-by: Stefan Hajnocz

[Qemu-devel] [PATCH 10/38] ide: add ncq identify data for ahci sata drives

2010-12-17 Thread Kevin Wolf
From: Roland Elek I modified ide_identify() to include the zero-based queue length value in word 75, and set bit 8 in word 76 to signal NCQ support in the identify data for AHCI SATA drives. Signed-off-by: Roland Elek Signed-off-by: Kevin Wolf --- hw/ide/core.c |7 +++ hw/ide/inte

[Qemu-devel] [PATCH 22/38] bdrv_img_create() use proper errno return values

2010-12-17 Thread Kevin Wolf
From: Jes Sorensen Kevin suggested to have bdrv_img_create() return proper -errno values on error. Signed-off-by: Jes Sorensen Signed-off-by: Kevin Wolf --- block.c | 23 ++- 1 files changed, 10 insertions(+), 13 deletions(-) diff --git a/block.c b/block.c index 0c14eee

[Qemu-devel] [PATCH 01/38] blockdev: check dinfo ptr before using

2010-12-17 Thread Kevin Wolf
From: Ryan Harper If a user decides to punish a guest by revoking its block device via drive_del, and subsequently also attempts to remove the pci device backing it, and the device is using blockdev_auto_del() then we get a segfault when we attempt to access dinfo->auto_del.[1] The fix is to che

[Qemu-devel] [PATCH 13/38] ahci: add ahci emulation

2010-12-17 Thread Kevin Wolf
From: Alexander Graf This patch adds an emulation layer for an ICH-9 AHCI controller. For now this controller does not do IDE legacy emulation. It is a pure AHCI controller. Signed-off-by: Alexander Graf Signed-off-by: Kevin Wolf --- Makefile.objs |1 + hw/ide/ahci.c | 1524 ++

  1   2   >