Re: [Qemu-devel] net packet storms with multiple NICs

2009-11-11 Thread Michael Tokarev
Paul Brook wrote: I immediately reproduced the problem locally. It turns out that kvm reflects packets coming from one guest NIC on another guest NIC, and since both are connected to the same bridge we're getting endless packet storm. To a level when kvm process becomes 100% busy and does not r

Re: [Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-11 Thread Jamie Lokier
Anthony Liguori wrote: > Avi Kivity wrote: > >On 11/10/2009 04:36 PM, Anthony Liguori wrote: > >> > >>>A stats vq might solve this more cleanly? > >> > >>actual and target are both really just stats. Had we implemented > >>those with a vq, I'd be inclined to agree with you but since they're > >>

[Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Michael S. Tsirkin
On Wed, Nov 11, 2009 at 01:34:12AM +, Paul Brook wrote: > On Monday 26 October 2009, Michael S. Tsirkin wrote: > > wmb must be at least a compiler barrier, even without SMP. > > Why? Because virtio code might run on a separate thread from guest. If compiler reorders writes, guest might see in

Re: [Qemu-devel] [sneak preview] major scsi overhaul

2009-11-11 Thread Gerd Hoffmann
On 11/11/09 05:06, Paul Brook wrote: On Friday 06 November 2009, Gerd Hoffmann wrote: Hi, http://repo.or.cz/w/qemu/kraxel.git/shortlog/refs/heads/scsi.v6 What is in there? (3) New interface for HBA<=> SCSIDevice interaction: * building on the new SCSIRequest struct. * the

[Qemu-devel] Re: ANN: QEMU Monitor Protocol git tree

2009-11-11 Thread Michael S. Tsirkin
On Thu, Sep 24, 2009 at 10:14:58AM -0300, Luiz Capitulino wrote: > On Thu, 24 Sep 2009 16:07:28 +0300 > Avi Kivity wrote: > > > On 09/24/2009 04:05 PM, Luiz Capitulino wrote: > > >>>I think the easiest way to have this would be to add a > > >>> monitor command to disable capabilities. Like a

[Qemu-devel] Re: ANN: QEMU Monitor Protocol git tree

2009-11-11 Thread Michael S. Tsirkin
On Thu, Sep 24, 2009 at 03:28:40PM +0200, Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Thu, 24 Sep 2009 00:37:53 +0200 > > Markus Armbruster wrote: > > > >> Luiz Capitulino writes: > >> > >> [...] > >> > 2.2 Server Greeting > >> > --- > >> > > >> > Right when con

Re: [Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-11 Thread Daniel P. Berrange
On Wed, Nov 11, 2009 at 09:24:09AM +, Jamie Lokier wrote: > Anthony Liguori wrote: > > Avi Kivity wrote: > > >On 11/10/2009 04:36 PM, Anthony Liguori wrote: > > >> > > >>>A stats vq might solve this more cleanly? > > >> > > >>actual and target are both really just stats. Had we implemented >

[Qemu-devel] Re: [PATCH 0/2] Build fixes

2009-11-11 Thread Juan Quintela
Paul Brook wrote: > On Thursday 05 November 2009, Juan Quintela wrote: >> Daniel Jacobowitz wrote: >> > On Thu, Nov 05, 2009 at 05:17:46PM +0100, Juan Quintela wrote: >> >> How are you compiling? >> >> It works for me compiling in-tree with make -j3 (only 2 cores) >> > >> > I can reliably reprodu

Re: [Qemu-devel] [PATCH 2/9] S/390 CPU emulation

2009-11-11 Thread Ulrich Hecht
On Tuesday 10 November 2009, Aurelien Jarno wrote: > I have tested it by removing all the block around tb_add_jump in > cpu_exec.c. I have a speed loss of about 2.5x in the boot time of an > x86_64 image. I just tried it with qemu-system-x86_64, and with that I can observe a noticable performance

[Qemu-devel] Re: [sneak preview] major scsi overhaul

2009-11-11 Thread Gerd Hoffmann
On 11/07/09 00:09, Gerd Hoffmann wrote: Hi, http://repo.or.cz/w/qemu/kraxel.git/shortlog/refs/heads/scsi.v6 Pushed an update, same branch. What needs to be done? (1) Better patch descriptions. (2) Submit patches to the list for review. Still to do. Also: - fold incremental fixes into

[Qemu-devel] [PATCH] configure: use correct cflags in compiler checks

2009-11-11 Thread Michael S. Tsirkin
linux-user build on fedora 11 breaks because fallocate is broken on that system if -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 are specified, which is what QEMU uses. We do have a configure check to catch this and disable fallocate, however, it turns out that default QEMU_CFLAGS/LDFLAGS were assigned in

Re: [Qemu-devel] Re: [sneak preview] major scsi overhaul

2009-11-11 Thread Hannes Reinecke
Gerd Hoffmann wrote: > On 11/07/09 00:09, Gerd Hoffmann wrote: >> Hi, >> >> http://repo.or.cz/w/qemu/kraxel.git/shortlog/refs/heads/scsi.v6 > > Pushed an update, same branch. > >> What needs to be done? >> >> (1) Better patch descriptions. >> (2) Submit patches to the list for review. > > Stil

[Qemu-devel] [PATCH] pci: move apb specific stuff to apb_pci.c

2009-11-11 Thread Michael S. Tsirkin
pci code had a TODO to move apb specific pci bridge initialization to apb_pci. Implement this and remove the TODO. Signed-off-by: Michael S. Tsirkin --- hw/apb_pci.c | 22 ++ hw/pci.c | 26 ++ hw/pci.h |1 + 3 files changed, 29 insertio

[Qemu-devel] Re: [PATCH] configure: use correct cflags in compiler checks

2009-11-11 Thread Michael S. Tsirkin
On Wed, Nov 11, 2009 at 01:49:06PM +0100, Juan Quintela wrote: > "Michael S. Tsirkin" wrote: > > Hi > > > @@ -1585,7 +1605,7 @@ int main(void) > > return 0; > > } > > EOF > > -if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then > > +if compile_prog "$ARCH_CFLAGS" "" ; then > > s/$ARCH

[Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Paul Brook
On Wednesday 11 November 2009, Michael S. Tsirkin wrote: > On Wed, Nov 11, 2009 at 01:34:12AM +, Paul Brook wrote: > > On Monday 26 October 2009, Michael S. Tsirkin wrote: > > > wmb must be at least a compiler barrier, even without SMP. > > > > Why? > > Because virtio code might run on a separ

Re: [Qemu-devel] [PATCH 0/2] port over extboot from kvm

2009-11-11 Thread Hannes Reinecke
Anthony Liguori wrote: > Gerd Hoffmann wrote: >> On 11/09/09 17:06, Paul Brook wrote: >>> On Tuesday 08 September 2009, Anthony Liguori wrote: Gerd Hoffmann wrote: > $subject says pretty much everything. > > extboot.[cS] are a straight copy from the kvm tree. The windup in > v

Re: [Qemu-devel] Re: [sneak preview] major scsi overhaul

2009-11-11 Thread Gerd Hoffmann
On 11/11/09 12:52, Hannes Reinecke wrote: I still don't quite agree with the new scsi callback, which has just the SCSIRequest as an argument. So when supporting more command queueing we have no idea to which (internal) request structure the SCSIRequest belongs, and still have to do a lookup. Whi

[Qemu-devel] [PATCH] pci: pci.h cleanup: move out stuff not in pci.c

2009-11-11 Thread Michael S. Tsirkin
pci.h declares some functions/macros which aren't defined in pci.h. Clean up, moving things to appropriate headers, and update all users. Signed-off-by: Michael S. Tsirkin --- hw/apb_pci.c |1 + hw/apb_pci.h |9 + hw/lsi53c895a.c |2 ++ hw/mips_malta.c |2 ++

[Qemu-devel] [PATCHv2] configure: use correct cflags in compiler checks

2009-11-11 Thread Michael S. Tsirkin
linux-user build on fedora 11 breaks because fallocate is broken on that system if -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 are specified, which is what QEMU uses. We do have a configure check to catch this and disable fallocate, however, it turns out that default QEMU_CFLAGS/LDFLAGS were assigned in

[Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Michael S. Tsirkin
On Wed, Nov 11, 2009 at 01:01:03PM +, Paul Brook wrote: > On Wednesday 11 November 2009, Michael S. Tsirkin wrote: > > On Wed, Nov 11, 2009 at 01:34:12AM +, Paul Brook wrote: > > > On Monday 26 October 2009, Michael S. Tsirkin wrote: > > > > wmb must be at least a compiler barrier, even wit

Re: [Qemu-devel] [PATCH 0/2] port over extboot from kvm

2009-11-11 Thread Anthony Liguori
Hannes Reinecke wrote: But why? Why do we have to emulate the entire HBA for the BIOS? The HBA is emulated, too, and just uses the bdrv interface internally anyway. So IMHO it makes far more sense to skip the HBA emulation in the BIOS completely and just use the bdrv interface directly here.

Re: [Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-11 Thread Adam Litke
On Wed, 2009-11-11 at 10:12 +, Daniel P. Berrange wrote: > This all suggests that we should only update the stats from the guest > when something on the host actually asks for them by issuing the QEMU > monitor command. We don't want any kind of continuous polling of stats > at any frequency, i

Re: [Qemu-devel] Re: [sneak preview] major scsi overhaul

2009-11-11 Thread Hannes Reinecke
Gerd Hoffmann wrote: > On 11/11/09 12:52, Hannes Reinecke wrote: >> I still don't quite agree with the new scsi callback, which has >> just the SCSIRequest as an argument. So when supporting more command >> queueing we have no idea to which (internal) request structure >> the SCSIRequest belongs, a

Re: [Qemu-devel] ppc64 target broken

2009-11-11 Thread Laurent Vivier
qemu-system-ppc is also broken. A bisect gives me: c169998802505c244b8bcad562633f29de7d74a4 is first bad commit commit c169998802505c244b8bcad562633f29de7d74a4 Author: Glauber Costa Date: Thu Nov 5 16:05:15 2009 -0200 v3: don't call reset functions on cpu initialization There is

[Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Michael S. Tsirkin
On Wed, Nov 11, 2009 at 01:01:03PM +, Paul Brook wrote: > A "compiler memory barrier" provides absolutely no guarantees in a > multithreaded environment. Claims including words "absolutely no" have absolutely no chance to be correct. -- MST

[Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Paul Brook
> > > > > wmb must be at least a compiler barrier, even without SMP. > > > > > > > > Why? > > > > > > Because virtio code might run on a separate thread from guest. > > > If compiler reorders writes, guest might see inconsistent data. > > > > If you've got threads running in parallel (which may be

Re: [Qemu-devel] [PATCH 0/2] port over extboot from kvm

2009-11-11 Thread Paul Brook
On Wednesday 11 November 2009, Anthony Liguori wrote: > Hannes Reinecke wrote: > > But why? Why do we have to emulate the entire HBA for the BIOS? > > The HBA is emulated, too, and just uses the bdrv interface > > internally anyway. > > So IMHO it makes far more sense to skip the HBA emulation in >

[Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Michael S. Tsirkin
On Wed, Nov 11, 2009 at 01:45:35PM +, Paul Brook wrote: > If you don't need real barriers, then why does the kvm code have them? We need real barriers but AFAIK kvm does not have them :( IOW: virtio is currently broken with kvm, and my patch did not fix this. The comment that I added says as m

Re: [Qemu-devel] [sneak preview] major scsi overhaul

2009-11-11 Thread Paul Brook
> The current qemu code *does* cache the response. scsi-disk caps the > buffer at 128k (which is big enough for any request I've seen in my > testing). scsi-generic has no cap. That cap is important. For scsi-generic you probably don't have a choice because of the way the kernel interface works

[Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Paul Brook
On Wednesday 11 November 2009, Michael S. Tsirkin wrote: > On Wed, Nov 11, 2009 at 01:45:35PM +, Paul Brook wrote: > > If you don't need real barriers, then why does the kvm code have them? > > We need real barriers but AFAIK kvm does not have them :( > IOW: virtio is currently broken with kvm

[Qemu-devel] [RFC] KVM Fault Tolerance: Kemari for KVM

2009-11-11 Thread Fernando Luis Vázquez Cao
Hi all, It has been a while coming, but we have finally started work on Kemari's port to KVM. For those not familiar with it, Kemari provides the basic building block to create a virtualization-based fault tolerant machine: a virtual machine synchronization mechanism. Traditional high availabili

[Qemu-devel] [PATCH] qemu-kvm: clear only essential parts of VirtIOBlockReq on object allocation - RESUBMIT

2009-11-11 Thread Saul Tamari
This patch reduces the size of memory being cleared on every virtio-blk IO. Improve number of IOPS when using avirtio-blk device. On every virtio-blk IO command passed to QEMU, virtio_blk_alloc_request() allocates and clears (with qemu_mallocz()) a VirtIOBlockReq object. The sizeof(VirtIOBlockReq

Re: [Qemu-devel] [PATCH V2 2/3] usb-gotemp: new module emulating a USB thermometer

2009-11-11 Thread Greg KH
On Wed, Nov 11, 2009 at 01:15:45AM +0100, Alexander Graf wrote: > > On 11.11.2009, at 01:09, Anthony Liguori wrote: > > > Scott Tsai wrote: > >> On Wed, Nov 11, 2009 at 1:06 AM, Luiz Capitulino >> > wrote: > >> > I'd certainly like to make this code useful for something other > than

[Qemu-devel] Multiple Nics on a VLAN

2009-11-11 Thread Shesha Sreenivasamurthy
Hi All, I'm using the following command to have two nics in multicast on the same vlan. I see a storm of ARP requests. Does any one have any suggestions? qemu.bin.kvm84 -hda /live_disks/clone-disk.img -snapshot -serial telnet:SERVER:5,nowait,server -monitor tcp:SERVER:51000,server,nowait,nodel

[Qemu-devel] PATCH for "xorg JP106 evdev keyboard" underscore & backslash

2009-11-11 Thread sanmaiwashi
diff -uNr qemu-kvm-0.10.6/x_keymap.c qemu-kvm-0.10.6.patched/x_keymap.c --- qemu-kvm-0.10.6/x_keymap.c 2009-08-02 18:00:28.0 +0900 +++ qemu-kvm-0.10.6.patched/x_keymap.c 2009-08-22 05:04:07.0 +0900 @@ -94,7 +94,7 @@ */ static const uint8_t evdev_keycode_to_pc_keycode[61] = {

[Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Michael S. Tsirkin
On Wed, Nov 11, 2009 at 02:16:00PM +, Paul Brook wrote: > On Wednesday 11 November 2009, Michael S. Tsirkin wrote: > > On Wed, Nov 11, 2009 at 01:45:35PM +, Paul Brook wrote: > > > If you don't need real barriers, then why does the kvm code have them? > > > > We need real barriers but AFAI

Re: [Qemu-devel] Re: [sneak preview] major scsi overhaul

2009-11-11 Thread Gerd Hoffmann
On 11/11/09 14:30, Hannes Reinecke wrote: Gerd Hoffmann wrote: How about sticking a 'void *hba_private' element into SCSIRequest instead? Would work for me, too. Pushed (scsi.v7 now). cheers, Gerd

Re: [Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-11 Thread Avi Kivity
On 11/11/2009 03:26 PM, Adam Litke wrote: On Wed, 2009-11-11 at 10:12 +, Daniel P. Berrange wrote: This all suggests that we should only update the stats from the guest when something on the host actually asks for them by issuing the QEMU monitor command. We don't want any kind of contin

[Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-11 Thread Adam Litke
On Wed, 2009-11-11 at 13:13 +1030, Rusty Russell wrote: > > It's not laziness, it's consistency. How is actual different than free > > memory or any other stat? > > Because it's a COLLECTION of stats. For example, swap in should be < swap > out. Now, the current Linux implementation of all_vm_

Re: [Qemu-devel] [sneak preview] major scsi overhaul

2009-11-11 Thread Gerd Hoffmann
On 11/11/09 15:13, Paul Brook wrote: The current qemu code *does* cache the response. scsi-disk caps the buffer at 128k (which is big enough for any request I've seen in my testing). scsi-generic has no cap. That cap is important. For scsi-generic you probably don't have a choice because of t

Re: [Qemu-devel] load-store experiment...

2009-11-11 Thread Laurent Desnogues
On Wed, Nov 11, 2009 at 8:51 AM, Chad wrote: > (this is mostly to get some ideas going rather than trying to get anything > upstream... yet!) > > This version of tcg_out_mov for i386's tcg-target.c filters out the > > mov %ebx, %edx > mov %ebx, [some index] > mov %edx, %ebx The question is: what

Re: [Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Paul Brook
On Wednesday 11 November 2009, Michael S. Tsirkin wrote: > On Wed, Nov 11, 2009 at 02:16:00PM +, Paul Brook wrote: > > On Wednesday 11 November 2009, Michael S. Tsirkin wrote: > > > On Wed, Nov 11, 2009 at 01:45:35PM +, Paul Brook wrote: > > > > If you don't need real barriers, then why doe

Re: [Qemu-devel] [sneak preview] major scsi overhaul

2009-11-11 Thread Paul Brook
>> That cap is important. >> For scsi-generic you probably don't have a choice because of the way the >> kernel interface works. > >Exactly. And why is the cap important for scsi-disk if scsi-generic >does fine without? With scsi-generic you're at the mercy of what the kernel API gives you, and i

[Qemu-devel] [PATCH 05/11] Add unit test for QFloat

2009-11-11 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- Makefile |1 + check-qfloat.c | 81 configure |1 + 3 files changed, 83 insertions(+), 0 deletions(-) create mode 100644 check-qfloat.c diff --git a/Makefile b/Makefile index 8d94fda

[Qemu-devel] [PATCH 06/11] Add a QBool type

2009-11-11 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- Makefile |2 +- qbool.c | 76 + qbool.h | 29 +++ qobject.h |1 + 4 files changed, 107 insertions(+), 1 deletions(-) create mode 100644 qbool.c create mode 100644

[Qemu-devel] [PATCH 11/11] Add a unit test for JSON support

2009-11-11 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- Makefile |1 + check-qjson.c | 608 + configure |2 +- 3 files changed, 610 insertions(+), 1 deletions(-) create mode 100644 check-qjson.c diff --git a/Makefile b/Makefile index 3818c51.

Re: [Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Scott Tsai
On Wed, Nov 11, 2009 at 10:08 PM, Michael S. Tsirkin wrote: > On Wed, Nov 11, 2009 at 01:45:35PM +, Paul Brook wrote: >> If you don't need real barriers, then why does the kvm code have them? > > We need real barriers but AFAIK kvm does not have them :( > IOW: virtio is currently broken with k

[Qemu-devel] [PATCH 09/11] Add a JSON parser

2009-11-11 Thread Anthony Liguori
This is the third and final stage of the JSON parser. It parses lexical tokens performing grammar validation and creating the final QObject representation. It uses a recursive decent parser. Signed-off-by: Anthony Liguori --- Makefile |2 +- json-parser.c | 560 ++

[Qemu-devel] [PATCH 03/11] Allow strings to grow in size

2009-11-11 Thread Anthony Liguori
This lets us use QString for building larger strings Signed-off-by: Anthony Liguori --- qstring.c | 37 - qstring.h |4 2 files changed, 40 insertions(+), 1 deletions(-) diff --git a/qstring.c b/qstring.c index 6d411da..441a9e6 100644 --- a/qstring

[Qemu-devel] [PATCH 08/11] Add a JSON message boundary identifier

2009-11-11 Thread Anthony Liguori
The second stage of our JSON parser is a simple state machine that identifies individual JSON values by counting the levels of nesting of tokens. It does not perform grammar validation. We use this to emit a full JSON value to the parser. Signed-off-by: Anthony Liguori --- Makefile|

[Qemu-devel] [PATCH 01/11] Properly escape QDECREF macro arguments

2009-11-11 Thread Anthony Liguori
QDECREF does not properly escape the macro arguments which can lead to unexpected syntax errors. Signed-off-by: Anthony Liguori --- qobject.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qobject.h b/qobject.h index 4cc9287..76f669f 100644 --- a/qobject.h +++ b/qobjec

[Qemu-devel] [PATCH 02/11] Add operations to qlist to allow it to be used as a stack

2009-11-11 Thread Anthony Liguori
This makes lists no longer invariant. It's a very useful bit of functionality though. To deal with the fact that lists are no longer invariant, introduce a deep copy mechanism for lists. Signed-off-by: Anthony Liguori --- qlist.c | 56

[Qemu-devel] [PATCH 04/11] Add a QFloat datatype

2009-11-11 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- Makefile |3 +- qfloat.c | 76 + qfloat.h | 29 +++ qobject.h |1 + 4 files changed, 108 insertions(+), 1 deletions(-) create mode 100644 qfloat.c create mode 100644

[Qemu-devel] [PATCH 10/11] Add a QObject JSON wrapper

2009-11-11 Thread Anthony Liguori
This provides a QObject interface for creating QObjects from a JSON expression. Signed-off-by: Anthony Liguori --- Makefile |2 +- qjson.c | 60 qjson.h | 23 +++ 3 files changed, 84 insertions(+), 1 delet

[Qemu-devel] [PATCH 07/11] Add a lexer for JSON

2009-11-11 Thread Anthony Liguori
Our JSON parser is a three stage parser. The first stage tokenizes the stream into a set of lexical tokens. Since the lexical grammar is regular, we can use a finite state machine to model it. The state machine will emit tokens as they are identified. Signed-off-by: Anthony Liguori --- Makefi

[Qemu-devel] Re: arm, mips and mipsel broken

2009-11-11 Thread Blue Swirl
On Wed, Nov 11, 2009 at 1:54 AM, Juan Quintela wrote: > Blue Swirl wrote: >> On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno >> wrote: >>> Please note that at least qemu-system-arm, qemu-system-mips and >>> qemu-system-mipsel are broken by this commit: >> >> Given that none of the devices touc

[Qemu-devel] Re: arm, mips and mipsel broken

2009-11-11 Thread Blue Swirl
On Wed, Nov 11, 2009 at 7:47 PM, Blue Swirl wrote: > On Wed, Nov 11, 2009 at 1:54 AM, Juan Quintela wrote: >> Blue Swirl wrote: >>> On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno >>> wrote: Please note that at least qemu-system-arm, qemu-system-mips and qemu-system-mipsel are broke

[Qemu-devel] [PATCH 4/6] Move common option rom code to header file

2009-11-11 Thread Alexander Graf
We will have a linux boot option rom soon, so let's take all functionality that might be useful for both to a header file that both roms can include. That way we only have to write fw_cfg access code once. Signed-off-by: Alexander Graf --- pc-bios/optionrom/multiboot.S | 79 +-

[Qemu-devel] [PATCH 1/6] Make fw_cfg interface 32-bit aware

2009-11-11 Thread Alexander Graf
The fw_cfg interface can only handle up to 16 bits of data for its streams. While that isn't too much of a problem when handling integers, we would like to stream full kernel images over that interface! So let's extend it to 32 bit length variables. Signed-off-by: Alexander Graf --- hw/fw_cfg.c

[Qemu-devel] [PATCH 6/6] Add linuxboot to BLOBS

2009-11-11 Thread Alexander Graf
We should install linuxboot.bin too, so let's add it to the to-be-installed blobs. Signed-off-by: Alexander Graf --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 30f1c9d..a6647c2 100644 --- a/Makefile +++ b/Makefile @@ -256,7 +256,7

[Qemu-devel] [PATCH 2/6] Introduce copy_rom

2009-11-11 Thread Alexander Graf
We have several rom helpers currently, but none of them can get us code that spans several roms into a pointer. This patch introduces a function that copies over rom contents. Signed-off-by: Alexander Graf --- hw/loader.c | 38 ++ hw/loader.h |1 + 2 fi

[Qemu-devel] [PATCH 3/6] Convert multiboot to fw_cfg backed data storage

2009-11-11 Thread Alexander Graf
Right now we load the guest kernel to RAM, fire off the BIOS, hope it doesn't clobber memory and run an option rom that jumps into the kernel. That breaks with SeaBIOS, as that clears memory. So let's read all kernel, module etc. data using the fw_cfg interface when in the int19 handler. This pat

[Qemu-devel] [PATCH 5/6] Convert linux bootrom to external rom and fw_cfg

2009-11-11 Thread Alexander Graf
We already have a working multiboot implementation that uses fw_cfg to get its kernel module etc. data in int19 runtime now. So what's missing is a working linux boot option rom. While at it I figured it would be a good idea to take the opcode generator out of pc.c and instead use a proper option

[Qemu-devel] [PATCH 0/6] Fix -kernel with SeaBIOS

2009-11-11 Thread Alexander Graf
SeaBIOS clears RAM between we write our -kernel image to RAM and the int19 handler gets triggered. So in order to work around that, I sat down and implemented Avi's suggestion of "downloading" all blobs in runtime from the fw_cfg interface Thanks to glommer who talked me into doing it ;-). Alexa

Re: [Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 01:18:11AM +0800, Scott Tsai wrote: > On Wed, Nov 11, 2009 at 10:08 PM, Michael S. Tsirkin wrote: > > On Wed, Nov 11, 2009 at 01:45:35PM +, Paul Brook wrote: > >> If you don't need real barriers, then why does the kvm code have them? > > > > We need real barriers but AF

Re: [Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 01:18:11AM +0800, Scott Tsai wrote: > On Wed, Nov 11, 2009 at 10:08 PM, Michael S. Tsirkin wrote: > > On Wed, Nov 11, 2009 at 01:45:35PM +, Paul Brook wrote: > >> If you don't need real barriers, then why does the kvm code have them? > > > > We need real barriers but AF

[Qemu-devel] Re: [PATCH 10/11] Add a QObject JSON wrapper

2009-11-11 Thread Luiz Capitulino
On Wed, 11 Nov 2009 11:29:02 -0600 Anthony Liguori wrote: > This provides a QObject interface for creating QObjects from a JSON > expression. > > Signed-off-by: Anthony Liguori > --- > Makefile |2 +- > qjson.c | 60 > qjson.

Re: [Qemu-devel] [PATCH] Add support for multiple simultaneously used keyboard devices.

2009-11-11 Thread Filip Navara
On Mon, Nov 9, 2009 at 3:35 PM, Anthony Liguori wrote: > Filip Navara wrote: > >> The support for multiple keyboard devices is essential for emulating >> embedded boards where multiple input devices are present (eg. keypad and >> rotary encoder) which are implemented using separate QEMU devices. >

Re: [Qemu-devel] arm, mips and mipsel broken

2009-11-11 Thread Paul Brook
On Tuesday 10 November 2009, Aurelien Jarno wrote: > On Tue, Nov 10, 2009 at 11:19:40PM +0200, Blue Swirl wrote: > > On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno wrote: > > > Please note that at least qemu-system-arm, qemu-system-mips and > > > qemu-system-mipsel are broken by this commit: >

Re: [Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Scott Tsai
On Thu, Nov 12, 2009 at 2:09 AM, Michael S. Tsirkin wrote: >> I do have a newbie question, when exactly would vrtio have to handle >> concurrent access from multiple threads? >> My current reading of the code suggests: >> 1. when CONFIG_IOTHREAD is true >> 2. when CONFIG_KVM is true and the guest

Re: [Qemu-devel] arm, mips and mipsel broken

2009-11-11 Thread Glauber Costa
On Tue, Nov 10, 2009 at 11:19:40PM +0200, Blue Swirl wrote: > On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno wrote: > > Please note that at least qemu-system-arm, qemu-system-mips and > > qemu-system-mipsel are broken by this commit: > > Given that none of the devices touched by the commit shou

[Qemu-devel] [PATCH 1/3] QDict: Introduce qdict_iter()

2009-11-11 Thread Anthony Liguori
From: Luiz Capitulino This adds iterator support to QDict, it will be used by the (to be introduced) QError module. Signed-off-by: Luiz Capitulino Signed-off-by: Anthony Liguori --- qdict.c | 19 +++ qdict.h |3 +++ 2 files changed, 22 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH 3/3] Add test suite for json marshalling

2009-11-11 Thread Anthony Liguori
By reusing the qjson test suite. After checking that we can demarshal, marshal again and compared to the expected decoded value. This doesn't work so well for floats because they cannot be accurately represented in decimal but we try our best. Signed-off-by: Anthony Liguori --- check-qjson.c |

[Qemu-devel] [PATCH 2/3] Provide marshalling mechanism for json

2009-11-11 Thread Anthony Liguori
This introduces qobject_to_json which will convert a QObject to a JSON string representation. Signed-off-by: Anthony Liguori --- qjson.c | 178 +++ qjson.h |3 + 2 files changed, 181 insertions(+), 0 deletions(-) diff --git a/qjso

Re: [Qemu-devel] Re: [PATCH 10/11] Add a QObject JSON wrapper

2009-11-11 Thread Anthony Liguori
Luiz Capitulino wrote: I think we should abort() on error, assuming the only way to fail is a bad syntax. We'll be using qobject_from_jsonf() to parse incoming QMP traffic. We definitely don't want to abort when we receive invalid input on the QMP port. Best to just close the session

Re: [Qemu-devel] Re: [PATCH 10/11] Add a QObject JSON wrapper

2009-11-11 Thread Luiz Capitulino
On Wed, 11 Nov 2009 13:39:29 -0600 Anthony Liguori wrote: > Luiz Capitulino wrote: > > I think we should abort() on error, assuming the only way to fail > > is a bad syntax. > > > > We'll be using qobject_from_jsonf() to parse incoming QMP traffic. We > definitely don't want to abort when

Re: [Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments

2009-11-11 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:37:26AM +0800, Scott Tsai wrote: > On Thu, Nov 12, 2009 at 2:09 AM, Michael S. Tsirkin wrote: > >> I do have a newbie question, when exactly would vrtio have to handle > >> concurrent access from multiple threads? > >> My current reading of the code suggests: > >> 1. whe

Re: [Qemu-devel] arm, mips and mipsel broken

2009-11-11 Thread Blue Swirl
On Wed, Nov 11, 2009 at 8:57 PM, Glauber Costa wrote: > On Tue, Nov 10, 2009 at 11:19:40PM +0200, Blue Swirl wrote: >> On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno >> wrote: >> > Please note that at least qemu-system-arm, qemu-system-mips and >> > qemu-system-mipsel are broken by this commit

Re: [Qemu-devel] arm, mips and mipsel broken

2009-11-11 Thread Blue Swirl
On Wed, Nov 11, 2009 at 8:28 PM, Paul Brook wrote: > On Tuesday 10 November 2009, Aurelien Jarno wrote: >> On Tue, Nov 10, 2009 at 11:19:40PM +0200, Blue Swirl wrote: >> > On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno > wrote: >> > > Please note that at least qemu-system-arm, qemu-system-mips

Re: [Qemu-devel] [RFC 0/8]: QError v2

2009-11-11 Thread Anthony Liguori
Luiz Capitulino wrote: Hi, I can't remember seeing updated versions of a RFC series, but this should prevent Anthony's scripts from merging these patches. This new QError version has two major changes: the static error table has been dropped and I'm using symbolic names instead of error code

[Qemu-devel] virtio-rng

2009-11-11 Thread Ian Molton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi folks, I'm writing a virtio-rng host-side driver for qemu-kvm, and I've got something up and running that works, and will pass data gathered from a char device on the host through to the virtio-rng driver on a guest copy of linux. Ultimately it'll

[Qemu-devel] Re: [PATCH 1/6] Make fw_cfg interface 32-bit aware

2009-11-11 Thread Anthony Liguori
Alexander Graf wrote: The fw_cfg interface can only handle up to 16 bits of data for its streams. While that isn't too much of a problem when handling integers, we would like to stream full kernel images over that interface! So let's extend it to 32 bit length variables. Signed-off-by: Alexande

[Qemu-devel] Re: [PATCH 2/6] Introduce copy_rom

2009-11-11 Thread Anthony Liguori
Alexander Graf wrote: We have several rom helpers currently, but none of them can get us code that spans several roms into a pointer. This patch introduces a function that copies over rom contents. Signed-off-by: Alexander Graf --- hw/loader.c | 38 ++ hw

Re: [Qemu-devel] arm, mips and mipsel broken

2009-11-11 Thread Paul Brook
> > This is latent breakage introduced by 45a50b1. > > See commits 97fe84f5 (makes breakage obvious) and f2d7497 (fixed ARM). > > MIPS still needs fixing. > > I can't find 97fe84f5 or f2d7497, what commits are those? http://git.savannah.gnu.org/cgit/qemu.git/commit/?id=97fe84f5 http://git.savanna

[Qemu-devel] Re: [PATCH 1/6] Make fw_cfg interface 32-bit aware

2009-11-11 Thread Alexander Graf
Anthony Liguori wrote: > Alexander Graf wrote: >> The fw_cfg interface can only handle up to 16 bits of data for its >> streams. >> While that isn't too much of a problem when handling integers, we would >> like to stream full kernel images over that interface! >> >> So let's extend it to 32 bit le

[Qemu-devel] Re: [PATCH 1/6] Make fw_cfg interface 32-bit aware

2009-11-11 Thread Anthony Liguori
Alexander Graf wrote: Anthony Liguori wrote: Alexander Graf wrote: The fw_cfg interface can only handle up to 16 bits of data for its streams. While that isn't too much of a problem when handling integers, we would like to stream full kernel images over that interface! So let's extend

Re: [Qemu-devel] virtio-rng

2009-11-11 Thread Paul Brook
> I'm writing a virtio-rng host-side driver for qemu-kvm, and I've got > something up and running that works, and will pass data gathered from a > char device on the host through to the virtio-rng driver on a guest copy > of linux. Why do you need a special device? Isn't a regular serial data stre

[Qemu-devel] [PATCH] fdc: Fix vmsave/restore regression

2009-11-11 Thread Jan Kiszka
This partly reverts 2be3783328: First, the conversion neglected to update the opaque translation in fdc_pre_save/fdc_post_load which causes memory corruptions on vmsave/restore. And second, we can't apply a common translation here as DeviceState->fdctrl_t is different for sysbus and ISA. Signed-of

[Qemu-devel] Re: [PATCH] fdc: Fix vmsave/restore regression

2009-11-11 Thread Juan Quintela
Jan Kiszka wrote: > This partly reverts 2be3783328: First, the conversion neglected to > update the opaque translation in fdc_pre_save/fdc_post_load which causes > memory corruptions on vmsave/restore. And second, we can't apply a > common translation here as DeviceState->fdctrl_t is different for

Re: [Qemu-devel] [PATCH] EHCI emulation module for review

2009-11-11 Thread Michael Trimarchi
Hi, I'm working on this patch and I have some trouble after a data IN transaction. I submit the urb but I don't receive any async completation. 88011e512140 2614190796 S Ii:2:008:7 -115:128 16 < husb: data submit. ep 0x87 len 16 aurb 0xcf3850 So the state machine is blocked Any hints?

Re: [Qemu-devel] [RFC 0/8]: QError v2

2009-11-11 Thread Luiz Capitulino
On Wed, 11 Nov 2009 15:20:30 -0600 Anthony Liguori wrote: > Luiz Capitulino wrote: > > Hi, > > > > I can't remember seeing updated versions of a RFC series, but this should > > prevent Anthony's scripts from merging these patches. > > > > This new QError version has two major changes: the stat

[Qemu-devel] [PATCH 0/3] Fix migration (take 2)

2009-11-11 Thread Juan Quintela
Hi With this three patches (on top of the one already in staging) I am able to get migration working with today qemu/master. - fdc: vmstate+reset qdev change made to use an vmstate that expected an fdctrl_t variable and received a fdctrl_isabus_t variable. You can guess what happened. - qemu

[Qemu-devel] [PATCH 1/3] fdc: fix vmstate variable passed

2009-11-11 Thread Juan Quintela
When code was transformed to use qdev_reset/vmstate registration, vmstate was passed a variable of the wrong type Signed-off-by: Juan Quintela --- hw/fdc.c | 33 + 1 files changed, 29 insertions(+), 4 deletions(-) diff --git a/hw/fdc.c b/hw/fdc.c index d2bfa71.

[Qemu-devel] [PATCH 2/3] qemu_system_reset: we need to call it before loadvm/migration

2009-11-11 Thread Juan Quintela
Signed-off-by: Juan Quintela --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index bf91ee1..fff8e8d 100644 --- a/vl.c +++ b/vl.c @@ -4044,7 +4044,6 @@ static void main_loop(void) qemu_system_ready = 1; qemu_cond_broadcast(&qemu_system_cond

[Qemu-devel] [PATCH 3/3] pci: fix the conversion of config field from array to pointer

2009-11-11 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/pci.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 2ab1117..a326930 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -273,9 +273,9 @@ static int get_pci_config_device(QEMUFile *f, void *pv, size_t size) /* just

[Qemu-devel] Re: [PATCH 2/6] Introduce copy_rom

2009-11-11 Thread Alexander Graf
On 11.11.2009, at 22:57, Anthony Liguori wrote: Alexander Graf wrote: We have several rom helpers currently, but none of them can get us code that spans several roms into a pointer. This patch introduces a function that copies over rom contents. Signed-off-by: Alexander Graf --- hw/loader.c

[Qemu-devel] Re: [PATCH 1/6] Make fw_cfg interface 32-bit aware

2009-11-11 Thread Alexander Graf
On 11.11.2009, at 23:22, Anthony Liguori wrote: Alexander Graf wrote: Anthony Liguori wrote: Alexander Graf wrote: The fw_cfg interface can only handle up to 16 bits of data for its streams. While that isn't too much of a problem when handling integers, we would like to stream full kern

[Qemu-devel] Re: [PATCH 1/6] Make fw_cfg interface 32-bit aware

2009-11-11 Thread Anthony Liguori
Alexander Graf wrote: Juan, I'd really love to learn some new voodoo :-). This whole new qdev whatever based save format was supposed to make things like this easy, right? I would've known what to do with the old code ... I think Juan's mentioned something about writing a doc explaining how t

[Qemu-devel] qemu-thread doesn't compile on OS X

2009-11-11 Thread C.W. Betts
When I tried to compile qemu git with --enable-io-thread on Mac OS X 10.6.2, it botches on qemu-thread: CCqemu-thread.o /Users/cwbetts/makestuff/qemu/qemu-thread.c: In function ‘qemu_mutex_timedlock’: /Users/cwbetts/makestuff/qemu/qemu-thread.c:66: warning: implicit declaration of function

[Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-11 Thread Rusty Russell
On Thu, 12 Nov 2009 01:38:34 am Adam Litke wrote: > > But it raises the question: what stats are generally useful cross-OS? > > Should > > we be supplying numbers like "unused" (free) "instantly discardable" (ie. > > clean), "discardable to disk" (ie. file-backed), "discardable to swap" > > (ie.

  1   2   >