Re: [Qemu-devel] [PATCH 7/7] net: fix qemu_announce_self()

2009-11-12 Thread Mark McLoughlin
On Thu, 2009-11-12 at 20:29 +, Mark McLoughlin wrote: ... > +printf("qemu_announce_self_iter() mac = %p\n", mac); > + > +len = announce_self_create(buf, mac); > + > +printf("sending packet from %s\n", client->name); Ooops, some debugging leftovers. removed in my tree. Cheers, Mark

[Qemu-devel] Re: Add a qemu interface for sharing memory between guests.

2009-11-12 Thread Sivaram Kannan
Hi Cam, >>>Here are the two patches for KVM describing what I have done. I am >>>continuing to work on it and still mulling a move to virtio. These >>>don't apply against the current tree, but I can provide those patches >>>if you would like to see them. >>>http://patchwork.kernel.org/patch/38

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

2009-11-12 Thread Paolo Bonzini
On 11/12/2009 09:53 PM, Alexander Graf wrote: + /* Set DS to SS+SP - 0x10, so we can write our GDT descriptor there */ + mov %ss, %eax + shl $4, %eax + add %esp, %eax + sub $0x10, %eax + shr $4, %eax

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

2009-11-12 Thread Alexander Graf
On 13.11.2009, at 01:48, Glauber Costa wrote: On Thu, Nov 12, 2009 at 09:53:10PM +0100, 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 image

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

2009-11-12 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 Acked-by: Michael S. Tsirkin --- 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 4a29f44

[Qemu-devel] [PATCH V2 20/20] pci: convert goto into scope in bridge_filter

2009-11-12 Thread Isaku Yamahata
From: Michael S. Tsirkin goto into scope is evil. rearrange pci_bridge_filter so that we always go to end of function on error. Signed-off-by: Michael S. Tsirkin Acked-by: Isaku Yamahata --- hw/pci.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/pci.c

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

2009-11-12 Thread Isaku Yamahata
fix typo in pci_config_get_io_base(). Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin --- hw/pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 72b60a7..ec3acdf 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -629,7 +629,7 @@ static uint

[Qemu-devel] [PATCH V2 16/20] pci: split up up pci_update mappings

2009-11-12 Thread Isaku Yamahata
From: Michael S. Tsirkin Split bar address math into a separate function. In particular, this gets rid of an ugly forward goto into scope that we have there. Signed-off-by: Michael S. Tsirkin Acked-by: Isaku Yamahata --- hw/pci.c | 125 +---

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

2009-11-12 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 Acked-by: Michael S. Tsirkin --- hw/pci-hotplug.c |4 ++-- hw/pci.c |8 hw/pci.h |2 +- 3 files changed, 7 insertions(+), 7 del

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

2009-11-12 Thread Isaku Yamahata
including pci_host.h isn't needed by pci.c. This patch kills it. Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin --- hw/pci.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 5ebcba2..9c84cb2 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -2

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

2009-11-12 Thread Isaku Yamahata
This patch removes some comment which should go into commit log in pci.h. Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin --- 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 +

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

2009-11-12 Thread Isaku Yamahata
This patch converts r->size == 0 to !r_size. Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin --- hw/pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 2814c51..bb3236c 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -732,7 +732,7 @@ stat

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

2009-11-12 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 Acked-by: Michael S. Tsirkin --- hw/apb_pci.c |4 ++-- hw/grackle_pci.c |8 hw/pci_

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

2009-11-12 Thread Isaku Yamahata
This patch replaces magic number, 256, with ARRAY_SIZE(). Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin --- hw/pci.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 24345b0..72b60a7 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -487,

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

2009-11-12 Thread Isaku Yamahata
This patch removes unused constants committed by fb23162885f7fd8cf7334bed22c25ac32c7d8b9d. Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin --- 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 -

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

2009-11-12 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 Acked-by: Michael S. Tsirkin --- hw/pci.c | 18 +++--- hw/pci.h |1 + 2 files changed, 12 insertions(+), 7 deletions

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

2009-11-12 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 Acked-by: Michael S. Tsirkin --- hw/pci_host.h |4 ++-- hw/pcie_host.h |4 ++-- qemu-common.h |2 ++

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

2009-11-12 Thread Isaku Yamahata
This patch removes unnecessary & 0xff in pci_dev_find_by_addr(). Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin --- 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 45ddcd1..eeb8dee 100644 --- a/hw/pci_hos

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

2009-11-12 Thread Isaku Yamahata
Here is the patch series V2 to clean up PCI express patches. Changes from v1: - replaced patches with ones proposed by Michael. - compilation fix. thanks, Isaku Yamahata (17): pci: fix pci_info_device(). pci: move pci_data_{read, write}() declaration from pci.h to pci_host.h pci: remov

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

2009-11-12 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 Acked-by: Michael S. Tsirkin --- hw/pci.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 4169

[Qemu-devel] [PATCH V2 03/20] pci: simplify (pci_/pcie_mmcfg_)data_read()

2009-11-12 Thread Isaku Yamahata
From: Michael S. Tsirkin Remove switch on length: we don't care about high bits for value, so just return all ones if no device. And add one assert(). Signed-off-by: Michael S. Tsirkin Acked-by: Isaku Yamahata --- hw/pci_host.c | 22 ++ hw/pcie_host.c | 26 +-

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

2009-11-12 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 Acked-by: Michael S. Tsirkin --- hw/pci_host.c |6 +++--- hw/pcie_host.c |7 --- 2 files changed

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

2009-11-12 Thread Isaku Yamahata
This patch replaces for loop by memset in pci_init_wmask(). Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin --- hw/pci.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 9c84cb2..2814c51 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -4

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

2009-11-12 Thread Isaku Yamahata
It printed wrong limit value of bridge. This patch fixes it. Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin --- 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,

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

2009-11-12 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 Acked-by: Michael S. Tsirkin --- hw/pci.h |2 -- hw

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

2009-11-12 Thread Jamie Lokier
Anthony Liguori wrote: > 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. Good sprintf/scanf/strtod implementations do guarantee

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

2009-11-12 Thread Jamie Lokier
Scott Tsai 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 machine has multiple CPUs It's enough to have

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

2009-11-12 Thread Glauber Costa
On Thu, Nov 12, 2009 at 09:53:10PM +0100, 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

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

2009-11-12 Thread Dor Laor
On 11/09/2009 05:53 AM, Fernando Luis Vázquez Cao wrote: 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 machi

Re: [Qemu-devel] [PATCH 1/9] QJSON: Introduce qobject_from_json_va()

2009-11-12 Thread Anthony Liguori
Luiz Capitulino wrote: Accepts a va_list, will be used by QError. Signed-off-by: Luiz Capitulino --- qjson.c | 14 ++ qjson.h |2 ++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/qjson.c b/qjson.c index 7270909..491b61e 100644 --- a/qjson.c +++ b/qjson.c @@

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

2009-11-12 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-12 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 --- v1 -> v2:

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

2009-11-12 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-12 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 v2

2009-11-12 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 ;-). v1 ->

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

2009-11-12 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 2/6] Introduce rom_rom

2009-11-12 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 --- v1 -> v2: - rename copy_rom -> rom_copy --- hw/loader.c | 38 +

[Qemu-devel] [PATCH 9/9] monitor: do_info_balloon(): use QError

2009-11-12 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- monitor.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/monitor.c b/monitor.c index a8fd552..76cb187 100644 --- a/monitor.c +++ b/monitor.c @@ -1717,10 +1717,11 @@ static void do_info_balloon(Monitor *mon, QObject **ret_data)

[Qemu-devel] [PATCH 8/9] qdev: Use QError for 'device not found' error

2009-11-12 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- hw/qdev.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index d19d531..875ca50 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -29,6 +29,7 @@ #include "qdev.h" #include "sysemu.h" #include "monitor.h" +#include "q

[Qemu-devel] [PATCH 7/9] monitor: QError support

2009-11-12 Thread Luiz Capitulino
This commit adds QError support in the Monitor. A QError member is added to the Monitor struct. This new member stores error information and is also used to check if an error has occurred when the called handlers returns. Additionally, a new macro called qemu_error_new() is introduced. It should

[Qemu-devel] [PATCH 6/9] QJSON: Fix compile error

2009-11-12 Thread Luiz Capitulino
Add QTYPE_QERROR handling in the to_json() switch, otherwise GCC will complain. We just abort(), as QError design is not finished yet. Signed-off-by: Luiz Capitulino --- qjson.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/qjson.c b/qjson.c index 491b61e..ca4fe7c 1

[Qemu-devel] [PATCH 5/9] Introduce QError

2009-11-12 Thread Luiz Capitulino
QError is a high-level data type which represents an exception in QEMU, it stores the following error information: - class Error class name (eg. "ServiceUnavailable") - descriptionA detailed error description, which may contain references to run-time error data - file

[Qemu-devel] [PATCH 4/9] Add qstring_append_chr() unit-test

2009-11-12 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- check-qstring.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/check-qstring.c b/check-qstring.c index ea4dfd0..412038a 100644 --- a/check-qstring.c +++ b/check-qstring.c @@ -55,6 +55,22 @@ START_TEST(qstring_get_str_te

[Qemu-devel] [PATCH 3/9] QString: Introduce qstring_append_int()

2009-11-12 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qstring.c |8 qstring.h |2 ++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/qstring.c b/qstring.c index e422bd9..ad17769 100644 --- a/qstring.c +++ b/qstring.c @@ -75,6 +75,14 @@ void qstring_append(QString *qstring, const cha

[Qemu-devel] [PATCH 2/9] QString: Introduce qstring_append_chr()

2009-11-12 Thread Luiz Capitulino
It appends a C char to a QString. Signed-off-by: Luiz Capitulino --- qstring.c | 24 +++- qstring.h |1 + 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/qstring.c b/qstring.c index 441a9e6..e422bd9 100644 --- a/qstring.c +++ b/qstring.c @@ -53,25 +53,39

[Qemu-devel] [PATCH 1/9] QJSON: Introduce qobject_from_json_va()

2009-11-12 Thread Luiz Capitulino
Accepts a va_list, will be used by QError. Signed-off-by: Luiz Capitulino --- qjson.c | 14 ++ qjson.h |2 ++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/qjson.c b/qjson.c index 7270909..491b61e 100644 --- a/qjson.c +++ b/qjson.c @@ -64,6 +64,20 @@ QObject *

[Qemu-devel] [PATCH 0/9]: QError v3

2009-11-12 Thread Luiz Capitulino
Hi, This is a new QError version which implements what has been suggested by Anthony in this email: http://lists.gnu.org/archive/html/qemu-devel/2009-11/msg00601.html Basically, the error table is back and qemu_error_new() calls are like this: qemu_error_new(QERR_DEVICE_NOT_FOUND, driver);

[Qemu-devel] [PATCH 3/7] net: create the VLANClientState for NICs early

2009-11-12 Thread Mark McLoughlin
Signed-off-by: Mark McLoughlin --- hw/dp8393x.c| 10 +- hw/e1000.c | 10 +- hw/eepro100.c | 10 +- hw/etraxfs_eth.c| 11 +-- hw/mcf_fec.c| 10 +- hw/mipsnet.c| 15 ++- hw/musicpal.c |

[Qemu-devel] [PATCH 4/7] net: kill off NICInfo/NICConf::vlan/netdev

2009-11-12 Thread Mark McLoughlin
No valid users left except the announce_self() code which currently crashes when used with -netdev. Note the assertion in the xen code. Need to figure out how to support the -netdev arg with xen. Signed-off-by: Mark McLoughlin --- hw/integratorcp.c|3 +- hw/mcf5208.c |3 +-

[Qemu-devel] [PATCH 2/7] qdev: add "net-client" property

2009-11-12 Thread Mark McLoughlin
Rather than having each NIC create it's own client, let's create the client early and pass it down to the NIC. One advantage is that we can add parameters which only the client knows about, without having the NIC know anything about it - e.g. NICs shouldn't know about netdev vs. vlan. Another adv

[Qemu-devel] [PATCH 7/7] net: fix qemu_announce_self()

2009-11-12 Thread Mark McLoughlin
Now that we have a sane way of iterating over NICs. Signed-off-by: Mark McLoughlin --- savevm.c | 43 ++- 1 files changed, 26 insertions(+), 17 deletions(-) diff --git a/savevm.c b/savevm.c index 039740c..3736588 100644 --- a/savevm.c +++ b/savevm.c @@

[Qemu-devel] [RFC PATCH 0/7] Fix qemu_announce_self() properly

2009-11-12 Thread Mark McLoughlin
Hi, The recent "fix" to qemu_announce_self() will segfault if you use -netdev. The real root cause of the regression was the removal of the assignment to NICInfo::vc that used to live in qdev_get_vlan_client(). Now that NICs are qdev-ified, we should just iterate over the qdev tre

[Qemu-devel] [PATCH 1/7] net: remove NICInfo::vc

2009-11-12 Thread Mark McLoughlin
Since 1cc33683, this field is not set for most devices, so just remove it and its remaining few uses. Signed-off-by: Mark McLoughlin --- hw/dp8393x.c | 10 +- hw/etraxfs_eth.c | 10 +- hw/mcf_fec.c | 10 +- hw/mipsnet.c | 10 +- hw/usb-net.c

[Qemu-devel] [PATCH 6/7] qdev: add qdev_prop_get_{macaddr, net_client}()

2009-11-12 Thread Mark McLoughlin
Probably the second worst idea in the world, ever. While iterating over all NICs in the system, we need to be able to query their 'net-client' and 'macaddr' properties. Signed-off-by: Mark McLoughlin --- hw/qdev-properties.c | 31 --- hw/qdev.h|3 ++

[Qemu-devel] [PATCH 5/7] qdev: add qdev_foreach()

2009-11-12 Thread Mark McLoughlin
No doubt this is the worst idea ever, but the requirement is simple - some way to iterate all NICs in the system. Signed-off-by: Mark McLoughlin --- hw/qdev.c | 20 hw/qdev.h |3 +++ 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c

[Qemu-devel] [PATCH] This patch adds a Priority and a Machine menu to the menu bar.

2009-11-12 Thread G 3
The Priority menu controls how much cpu time qemu receives, and the Machine menu has the Restart menu item for restarting the emulator. Signed-off-by: John Arbuckle --- cocoa.m | 91 + + 1 files changed, 79 insertions(+), 12 dele

[Qemu-devel] [PATCH] Makefile: Remove unneeded prerequisites

2009-11-12 Thread Stefan Weil
Thanks to f527c57935e22b56952d1ed1af36070b682ecf70 (fix parallel build), these prerequisites are redundant now and can be removed. Signed-off-by: Stefan Weil --- Makefile |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7be0a15..3d6a2b0 100644

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

2009-11-12 Thread Stefan Weil
Aurelien Jarno schrieb: > Please note that at least qemu-system-arm, qemu-system-mips and > qemu-system-mipsel are broken by this commit: > > commit c169998802505c244b8bcad562633f29de7d74a4 > Author: Glauber Costa > Date: Thu Nov 5 16:05:15 2009 -0200 > > v3: don't call reset functions on cpu init

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

2009-11-12 Thread Luiz Capitulino
On Thu, 12 Nov 2009 11:13:45 -0600 Anthony Liguori wrote: > Kevin Wolf wrote: > > Unfortunately. There are places where such comments could be a good > > specification on what an interface is actually meant to work like > > (particularly in error cases). Currently you often can't tell if the > >

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

2009-11-12 Thread Ian Molton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kevin Wolf wrote: > I think in general qemu is poorly commented. I think thats a bit of an understatement. in particular I'm finding the options code to be a nightmare. Hopefully I'll be fixing some of that in my upcomming submissions. -BEGIN PGP

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

2009-11-12 Thread Anthony Liguori
Kevin Wolf wrote: Unfortunately. There are places where such comments could be a good specification on what an interface is actually meant to work like (particularly in error cases). Currently you often can't tell if the implementation or the caller of a function is buggy. Not sure if they are r

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

2009-11-12 Thread Kevin Wolf
Am 12.11.2009 17:46, schrieb Anthony Liguori: > Kevin Wolf wrote: >> Am 11.11.2009 18:28, schrieb 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 d

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

2009-11-12 Thread Anthony Liguori
Kevin Wolf wrote: Am 11.11.2009 18:28, schrieb 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 --- qli

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

2009-11-12 Thread Kevin Wolf
Am 11.11.2009 18:28, schrieb 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 |

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

2009-11-12 Thread Michael Trimarchi
Hi, Michael Trimarchi wrote: 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

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

2009-11-12 Thread Anthony Liguori
Luiz Capitulino wrote: On Thu, 12 Nov 2009 08:44:03 -0600 Anthony Liguori wrote: Luiz Capitulino wrote: #define QERR_DEVICE_ALREADY_OPEN "{'class': 'DeviceAlreadyOpen', 'data' : {'bus_num': %d, 'addr': %d}" qemu_error_new(QERR_DEVICE_ALREADY_OPEN, bus_num, addr); Wha

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

2009-11-12 Thread Luiz Capitulino
On Thu, 12 Nov 2009 08:44:03 -0600 Anthony Liguori wrote: > Luiz Capitulino wrote: > > > >> #define QERR_DEVICE_ALREADY_OPEN "{'class': 'DeviceAlreadyOpen', 'data' > >> : {'bus_num': %d, 'addr': %d}" > >> > >> qemu_error_new(QERR_DEVICE_ALREADY_OPEN, bus_num, addr); > >> > > > > What about

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

2009-11-12 Thread Alexander Graf
Am 12.11.2009 um 15:53 schrieb Christoph Hellwig : Thanks Alexander, I hope this goes into qemu.git ASAP - without it it's totally unusable for my test setup, and it of course bit my silently when preparing a demo for a confernence where only reverting back to and older qemu helped.. Yeah,

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

2009-11-12 Thread Christoph Hellwig
Thanks Alexander, I hope this goes into qemu.git ASAP - without it it's totally unusable for my test setup, and it of course bit my silently when preparing a demo for a confernence where only reverting back to and older qemu helped..

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

2009-11-12 Thread Anthony Liguori
Luiz Capitulino wrote: #define QERR_DEVICE_ALREADY_OPEN "{'class': 'DeviceAlreadyOpen', 'data' : {'bus_num': %d, 'addr': %d}" qemu_error_new(QERR_DEVICE_ALREADY_OPEN, bus_num, addr); What about DeviceAlreadyOpen errors with a different argument list? Why would you have this? Tha

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

2009-11-12 Thread Juan Quintela
Jan Kiszka wrote: > Juan Quintela wrote: >> Jan Kiszka wrote: >>> *** NOTE *** >>> 'git shortlog|grep "reset + vmsd"' shows 10 such conversions. I only >>> briefly checked the first one, and it looks similar broken. Could >>> someone have a second look at them? Maybe it is also better to define a

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

2009-11-12 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] Re: [PATCH 16/20] pci: kill goto in pci_update_mappings()

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 10:12:07PM +0900, Isaku Yamahata wrote: > On Thu, Nov 12, 2009 at 02:06:22PM +0200, Michael S. Tsirkin wrote: > > On Thu, Nov 12, 2009 at 02:58:44PM +0900, Isaku Yamahata wrote: > > > This patch kills nasty goto in pci_update_mappings(). > > > > > > Signed-off-by: Isaku Yam

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 10:12:07PM +0900, Isaku Yamahata wrote: > On Thu, Nov 12, 2009 at 02:06:22PM +0200, Michael S. Tsirkin wrote: > > On Thu, Nov 12, 2009 at 02:58:44PM +0900, Isaku Yamahata wrote: > > > This patch kills nasty goto in pci_update_mappings(). > > > > > > Signed-off-by: Isaku Yam

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

2009-11-12 Thread Isaku Yamahata
On Thu, Nov 12, 2009 at 02:08:05PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 12, 2009 at 02:58:48PM +0900, Isaku Yamahata wrote: > > This patch removes ugly goto in pci_bridge_filter() by > > introducing subfunction, pci_bridge_filter_nomap(). > > > > Signed-off-by: Isaku Yamahata > > goto

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

2009-11-12 Thread Jan Kiszka
Juan Quintela wrote: > Jan Kiszka wrote: >> *** NOTE *** >> 'git shortlog|grep "reset + vmsd"' shows 10 such conversions. I only >> briefly checked the first one, and it looks similar broken. Could >> someone have a second look at them? Maybe it is also better to define a >> vmsd opaque in DeviceI

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

2009-11-12 Thread Isaku Yamahata
On Thu, Nov 12, 2009 at 02:06:22PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 12, 2009 at 02:58:44PM +0900, Isaku Yamahata wrote: > > This patch kills nasty goto in pci_update_mappings(). > > > > Signed-off-by: Isaku Yamahata > > --- > > hw/pci.c | 54 --

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

2009-11-12 Thread Juan Quintela
Jan Kiszka wrote: > > *** NOTE *** > 'git shortlog|grep "reset + vmsd"' shows 10 such conversions. I only > briefly checked the first one, and it looks similar broken. Could > someone have a second look at them? Maybe it is also better to define a > vmsd opaque in DeviceInfo, which would also allo

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:28PM +0900, Isaku Yamahata wrote: > 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 th

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

2009-11-12 Thread Isaku Yamahata
On Thu, Nov 12, 2009 at 12:45:08PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 12, 2009 at 02:58:35PM +0900, Isaku Yamahata wrote: > > 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 > > Ac

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:30PM +0900, Isaku Yamahata wrote: > 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 Y

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

2009-11-12 Thread Isaku Yamahata
On Thu, Nov 12, 2009 at 02:02:45PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 12, 2009 at 01:15:25PM +0200, Michael S. Tsirkin wrote: > > On Thu, Nov 12, 2009 at 01:01:09PM +0200, Michael S. Tsirkin wrote: > > > On Thu, Nov 12, 2009 at 02:58:31PM +0900, Isaku Yamahata wrote: > > > > simplify ug

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:48PM +0900, Isaku Yamahata wrote: > This patch removes ugly goto in pci_bridge_filter() by > introducing subfunction, pci_bridge_filter_nomap(). > > Signed-off-by: Isaku Yamahata goto on error is actually cleaner IMO. just *not into scope*. > --- > hw/pci.c | 16

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:44PM +0900, Isaku Yamahata wrote: > 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

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 01:15:25PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 12, 2009 at 01:01:09PM +0200, Michael S. Tsirkin wrote: > > On Thu, Nov 12, 2009 at 02:58:31PM +0900, Isaku Yamahata wrote: > > > simplify ugly switch by memcpy trick. > > > And add one assert(). > > > > > > Signed-o

[Qemu-devel] Seabios vs. -enable-kvm: Slow framebuffer console setup

2009-11-12 Thread Jan Kiszka
Hi, when booting qemu in kvm mode into a framebuffer console (vga=0x317 here), the mode switch is terribly slow under Seabios. -bios pcbios.bin does not show this behavior. Outputs done later look fine and reasonably fast. Anyone any thoughts on this? Jan -- Siemens AG, Corporate Technology, C

[Qemu-devel] [PATCH] megasas: LSI MegaRAID SAS HBA emulation

2009-11-12 Thread Hannes Reinecke
This patch adds an emulation for the LSI MegaRAID SAS HBA. It is build on top of kraxel's scsi.v7 tree. This is just a rough implementation, many of the more advanced topics (like Windows booting :-) are missing. Signed-off-by: Hannes Reinecke -- diff --git a/Makefile.hw b/Makefile.hw index 627

[Qemu-devel] Stack corruption problem with SeaBIOS/gPXE under QEMU

2009-11-12 Thread Naphtali Sprei
Hi, I've found a problem with the usage of SeaBIOS/gPXE in Qemu. The scenario is when failing to boot from network and falling back to booting from hard-disk (-boot nc). The cause of the problem is that both SeaBIOS and gPXE (in it's installation phase) uses same stack area, 0x7c00. The gPXE code

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 01:01:09PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 12, 2009 at 02:58:31PM +0900, Isaku Yamahata wrote: > > simplify ugly switch by memcpy trick. > > And add one assert(). > > > > Signed-off-by: Isaku Yamahata > > In fact, there's no reason to be so careful about >

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:33PM +0900, Isaku Yamahata wrote: > 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 Acked-by: Michael S. Tsirkin > ---

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:32PM +0900, Isaku Yamahata wrote: > This patch removes pci_addr_to_config() and open code it > as suggested by Michael S. Tsirkin . > > Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin > --- > hw/pci_host.c |9 ++--- > 1 files changed, 2 inserti

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:31PM +0900, Isaku Yamahata wrote: > simplify ugly switch by memcpy trick. > And add one assert(). > > Signed-off-by: Isaku Yamahata In fact, there's no reason to be so careful about zeroing out high bits as far as I can tell: in the end, the value is assigned to uin

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:47PM +0900, Isaku Yamahata wrote: > - 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 Acked-by: Michael S. Tsirkin > --- > hw/pci.c | 18 +++

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:36PM +0900, Isaku Yamahata wrote: > This patch renames pci_find_host_bus() to pci_find_root_bus() > as suggested by "Michael S. Tsirkin" . > > Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin > --- > hw/pci-hotplug.c |4 ++-- > hw/pci.c |

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:35PM +0900, Isaku Yamahata wrote: > 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 Acked-by: Michael S. Tsirkin As a separate note. I wonder whether we can handle h

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:46PM +0900, Isaku Yamahata wrote: > fix typo in pci_config_get_io_base(). > > Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin > --- > hw/pci.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/hw/pci.c b/hw/pci.c > index d

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:45PM +0900, Isaku Yamahata wrote: > This patch replaces magic number, 256, with ARRAY_SIZE(). > > Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin > --- > hw/pci.c |5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/hw/pci

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:43PM +0900, Isaku Yamahata wrote: > This patch converts r->size == 0 to !r_size. > > Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin > --- > hw/pci.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/hw/pci.c b/hw/pci.c >

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:42PM +0900, Isaku Yamahata wrote: > This patch removes unused constants committed by > fb23162885f7fd8cf7334bed22c25ac32c7d8b9d. > > Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin > --- > hw/pci.h |9 - > 1 files changed, 0 insertions(+),

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

2009-11-12 Thread Michael S. Tsirkin
On Thu, Nov 12, 2009 at 02:58:41PM +0900, Isaku Yamahata wrote: > 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 Acked-by: Michael S. Tsirkin > --- >

  1   2   >