Re: [Qemu-devel] Problems with bridge Networking

2009-11-11 Thread Mark McLoughlin
On Thu, 2009-11-12 at 03:31 +, Armin Garcia wrote: > I have the next problem I configure the tun/tap and all great any error, > I have an IP from my dhcp, I can see my virtual machine (winxp) from my > other computers, but In my virtual machine I cant connect to internet, > I mean, whe

[Qemu-devel] [PATCH 04/20] pci: remove pci_addr_to_config() by open code

2009-11-11 Thread Isaku Yamahata
This patch removes pci_addr_to_config() and open code it as suggested by Michael S. Tsirkin . Signed-off-by: Isaku Yamahata --- hw/pci_host.c |9 ++--- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/hw/pci_host.c b/hw/pci_host.c index 4196ebc..93c94e8 100644 --- a/hw/pci_

[Qemu-devel] [PATCH 10/20] pci: kill unnecessary included in pci.c

2009-11-11 Thread Isaku Yamahata
including pci_host.h isn't needed by pci.c. This patch kills it. Signed-off-by: Isaku Yamahata --- hw/pci.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index e73f07c..67818b7 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -23,7 +23,6 @@ */ #include "h

[Qemu-devel] Handling Bios Interrupts

2009-11-11 Thread Aditya Agarwal
How or which section of the QEMU source is actually handling BIOS interrupt call, I have written a new user interrupt 0x79 in BIOS.BIN, but I need to ask QEMU to purposely invoke INT 0x79 call, where this ISR will write some byte info into BDA/BIOS DATA AREA.

[Qemu-devel] Posting to qemu-devel list

2009-11-11 Thread Aditya Agarwal
Please add my email id to post to the qemu-devel list. Best, Aditya

[Qemu-devel] [PATCH 20/20] pci: remove goto in pci_bridge_filter().

2009-11-11 Thread Isaku Yamahata
This patch removes ugly goto in pci_bridge_filter() by introducing subfunction, pci_bridge_filter_nomap(). Signed-off-by: Isaku Yamahata --- hw/pci.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index add919b..90bdf5e 100644 --- a/h

[Qemu-devel] [PATCH 13/20] pci: move typedef, PCIHostState, PCIExpressHost to qemu-common.h.

2009-11-11 Thread Isaku Yamahata
This patch moves two typedefs, PCIHostState and PCIExpressHost to qemu-common.h for consistency as PCIBus and PCIDevice are typedefed in qemu-common.h. Signed-off-by: Isaku Yamahata --- hw/pci_host.h |4 ++-- hw/pcie_host.h |4 ++-- qemu-common.h |2 ++ 3 files changed, 6 insertion

[Qemu-devel] [PATCH 17/20] pci: remove magic number, 256 in pci.c

2009-11-11 Thread Isaku Yamahata
This patch replaces magic number, 256, with ARRAY_SIZE(). Signed-off-by: Isaku Yamahata --- hw/pci.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 2eff7fe..dce445a 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -487,7 +487,8 @@ static PCIDevice *

[Qemu-devel] [PATCH 19/20] pci: pci bridge related clean up.

2009-11-11 Thread Isaku Yamahata
- fix bridge prefetchable memory accesser to check 64bit or not. - use pcibus_t consistently instead mixing pcibus_t and uint64_t. Signed-off-by: Isaku Yamahata --- hw/pci.c | 18 +++--- hw/pci.h |1 + 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/pci.c b/h

[Qemu-devel] [PATCH 14/20] pci: remove unused constants.

2009-11-11 Thread Isaku Yamahata
This patch removes unused constants committed by fb23162885f7fd8cf7334bed22c25ac32c7d8b9d. Signed-off-by: Isaku Yamahata --- hw/pci.h |9 - 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 988d2c0..72a476e 100644 --- a/hw/pci.h +++ b/hw/pci.h @

[Qemu-devel] [PATCH 16/20] pci: kill goto in pci_update_mappings()

2009-11-11 Thread Isaku Yamahata
This patch kills nasty goto in pci_update_mappings(). Signed-off-by: Isaku Yamahata --- hw/pci.c | 54 -- 1 files changed, 28 insertions(+), 26 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index cae3d53..2eff7fe 100644 --- a/hw/pci.c +++ b/

[Qemu-devel] [PATCH 18/20] pci: fix pci_config_get_io_base().

2009-11-11 Thread Isaku Yamahata
fix typo in pci_config_get_io_base(). Signed-off-by: Isaku Yamahata --- hw/pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index dce445a..d1b884a 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -629,7 +629,7 @@ static uint32_t pci_config_get_io_base(PC

[Qemu-devel] [PATCH 07/20] pci: remove pci_sub_bus() by open coding.

2009-11-11 Thread Isaku Yamahata
Because pci_sub_bus() is used only once so eliminate it by open coding as suggested by "Michael S. Tsirkin" . Signed-off-by: Isaku Yamahata --- hw/pci.c | 12 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 4169d4f..bdd4063 100644 --- a/hw/

[Qemu-devel] [PATCH 05/20] pci: rename pci_addr_to_dev(), pcie_mmcfg_addr_to_dev().

2009-11-11 Thread Isaku Yamahata
This patch renames pci_addr_to_dev(), pcie_mmcfg_addr_to_dev() to pci_dev_find_by_addr(), pcie_dev_find_by_mmcfg_addr() as "Michael S. Tsirkin" suggested. Signed-off-by: Isaku Yamahata --- hw/pci_host.c |6 +++--- hw/pcie_host.c |7 --- 2 files changed, 7 insertions(+), 6 deletions

[Qemu-devel] [PATCH 11/20] pci: clean up of pci_init_wmask().

2009-11-11 Thread Isaku Yamahata
This patch replaces for loop by memset in pci_init_wmask(). Signed-off-by: Isaku Yamahata --- hw/pci.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 67818b7..9698efb 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -426,15 +426,15 @@ static void p

[Qemu-devel] [PATCH 03/20] pci: simplify pci_data_read(), pcie_mmcfg_data_read().

2009-11-11 Thread Isaku Yamahata
simplify ugly switch by memcpy trick. And add one assert(). Signed-off-by: Isaku Yamahata --- hw/pci_host.c | 16 hw/pcie_host.c | 16 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/hw/pci_host.c b/hw/pci_host.c index f4518dc..4196ebc 10064

[Qemu-devel] [PATCH 08/20] pci: s/pci_find_host_bus/pci_find_root_bus/g

2009-11-11 Thread Isaku Yamahata
This patch renames pci_find_host_bus() to pci_find_root_bus() as suggested by "Michael S. Tsirkin" . Signed-off-by: Isaku Yamahata --- hw/pci-hotplug.c |4 ++-- hw/pci.c |8 hw/pci.h |2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/pci

[Qemu-devel] [PATCH 00/20] PCI express clean up patches.

2009-11-11 Thread Isaku Yamahata
Here is the patch series to clean up PCI express patches. Although there remained some issues to address, the PCI express patches was commited while I wasn't responsive last week. (Sorry for that) This patch series addresses the remained issues. They are mostly trivial fixes or cosmetics suggested

[Qemu-devel] [PATCH 12/20] pci: remove some unnecessary comment in pci.h

2009-11-11 Thread Isaku Yamahata
This patch removes some comment which should go into commit log in pci.h. Signed-off-by: Isaku Yamahata --- hw/pci.h | 11 ++- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index cd04189..988d2c0 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -382,17 +382,

[Qemu-devel] [PATCH 15/20] pci: clean up of pci_update_mappings()

2009-11-11 Thread Isaku Yamahata
This patch converts r->size == 0 to !r_size. Signed-off-by: Isaku Yamahata --- hw/pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 9698efb..cae3d53 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -732,7 +732,7 @@ static void pci_update_mappings(PC

[Qemu-devel] [PATCH 02/20] pci: move pci_data_{read, write}() declaration from pci.h to pci_host.h

2009-11-11 Thread Isaku Yamahata
Now pci host stuff has been moved from pci.[hc] to pci_host.[hc] so the declaration of pci_data_{read, write}() should be in pci_host.h This patch moves them from pci.h to pci_host.h for consistency. Signed-off-by: Isaku Yamahata --- hw/pci.h |2 -- hw/pci_host.h |3 +++ 2 files cha

[Qemu-devel] [PATCH 01/20] pci: fix pci_info_device().

2009-11-11 Thread Isaku Yamahata
It printed wrong limit value of bridge. This patch fixes it. Signed-off-by: Isaku Yamahata --- hw/pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 2ab1117..4169d4f 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -985,7 +985,7 @@ static void pci_in

[Qemu-devel] [PATCH 09/20] pci_host: remove unnecessary & 0xff.

2009-11-11 Thread Isaku Yamahata
This patch removes unnecessary & 0xff in pci_dev_find_by_addr(). Signed-off-by: Isaku Yamahata --- hw/pci_host.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/pci_host.c b/hw/pci_host.c index cd2ceb7..672d173 100644 --- a/hw/pci_host.c +++ b/hw/pci_host.c @@ -42

[Qemu-devel] [PATCH 06/20] pci: shorten pci_host_{conf, data}_register_xxx function a bit.

2009-11-11 Thread Isaku Yamahata
pci_host_data_register_io_memory and its variants are too long a bit. So shorten them. Now they are pci_host_{conf, data}_register_{mmio, mmio_noswap, ioport}() Signed-off-by: Isaku Yamahata --- hw/apb_pci.c |4 ++-- hw/grackle_pci.c |8 hw/pci_host.c|8 hw/

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

2009-11-11 Thread Chad
On Wed, Nov 11, 2009 at 7:41 AM, Laurent Desnogues < laurent.desnog...@gmail.com> wrote: > > > 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 TCG sequence produces this kind of code

[Qemu-devel] Re: [PATCH V6 28/32] pci: initialize pci config headers depending it pci header type.

2009-11-11 Thread Isaku Yamahata
On Tue, Nov 03, 2009 at 04:27:18PM +0200, Michael S. Tsirkin wrote: > On Fri, Oct 30, 2009 at 09:21:22PM +0900, Isaku Yamahata wrote: > > - Only sets default subsystem id for header type 00.(normal header type) > > because header type 01 doesn't have subsystem id, and uses the register > > for

[Qemu-devel] Problems with bridge Networking

2009-11-11 Thread Armin Garcia
Well Maybe I know for some of you its a very commented and boring subject, :( But Im very desesperate. I use ubuntu 9.04 and i emulate a winxp I have the next problem I configure the tun/tap and all great any error, I have an IP from my dhcp, I can see my virtual machine (winxp) from my other

[Qemu-devel] Re: [PATCH V6 19/32] pci: make pci configuration transaction more accurate.

2009-11-11 Thread Isaku Yamahata
On Tue, Nov 10, 2009 at 05:49:55PM +0200, Michael S. Tsirkin wrote: > On Fri, Oct 30, 2009 at 09:21:13PM +0900, Isaku Yamahata wrote: > > This patch sorts out/enhances pci code to track pci bus topology > > more accurately. > > - Track host bus bridge with pci domain number. Although the > > curr

[Qemu-devel] Re: [PATCH V6 18/32] pci: remove bus_num member from struct PCIBus.

2009-11-11 Thread Isaku Yamahata
On Tue, Nov 10, 2009 at 05:46:40PM +0200, Michael S. Tsirkin wrote: > On Tue, Nov 10, 2009 at 05:33:22PM +0200, Michael S. Tsirkin wrote: > > On Fri, Oct 30, 2009 at 09:21:12PM +0900, Isaku Yamahata wrote: > > > Since It can be retrieved from pci configuration space, > > > the member is unnecessary

[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.

[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: [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] 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 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] [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] [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 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 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

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

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?

[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] 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 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

[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

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 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

[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] 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

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

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] 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] 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] 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 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

[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

[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 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

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

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 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] [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. >

[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] 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] [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

[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 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 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 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 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 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] 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] 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] [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] [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 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 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 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 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 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 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.

[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 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 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 ++

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

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

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] 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] [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

[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] 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

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

[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

[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] 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

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] [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

[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] 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

  1   2   >