Re: [Qemu-devel] [RFC v3 31/56] ac97: convert to memory API

2011-07-10 Thread Avi Kivity
> > Shouldn't it be possible to do something like: > > typedef struct OldMemoryRegionOps { > MemoryRegionOps parent_ops; > CPUReadMemoryFunc *readfn[3]; > CPUWriteMemoryFunc *writefn[3]; > void *opaque; > } OldMemoryRegionOps; > > That should allow old-style implementations to be converted witho

Re: [Qemu-devel] [PATCH 1/3] vmstate: add no_migrate flag to VMStateDescription

2011-07-10 Thread Gerd Hoffmann
register_device_unmigratable()? Right, but can we have some continuity at least between the two interfaces? At least make the vmstate flag 'unmigratable' or rename the function to qdev_set_no_migrate(). Will rename the flag. BTW, should this be a vmstate flag or a qdev flag? vmstate. sa

[Qemu-devel] [PATCH 2/2] qemu-io: Fix if scoping bug

2011-07-10 Thread Devin Nakamura
Fix a bug caused by lack of braces in if statement Lack of braces means that if(count & 0x1ff) is never reached Conflicts: qemu-io.c Signed-off-by: Devin Nakamura --- qemu-io.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index e484f4

[Qemu-devel] PCI with Xilinx virtex-ml507 board

2011-07-10 Thread Lê Đức Tài
Hi, It seems that virtex board doesn't have a PCI bus emulation. I have tried to create one using ppc4xx_pci_init() function but it doesn't work. Could you help me some ideas to create PCI bus for virtex board? Or if you have already implemented PCI for virtex (I think that PCI is necessary to in

[Qemu-devel] [Bug 808588] [NEW] Netperf tests cause i82551 network down

2011-07-10 Thread kongjianjun
Public bug reported: 1. boot up a guest with 82551 nic # qemu-kvm -net nic,model=i82551 ... 2. launch netperf server in the guest 3.on the host for b in 32 64 128 256 512 1024 1460 2048 4096 8192 9000 16384 32768 65495 65507 do ./netperf -t TCP_STREAM -f m -H -P 0 -l 10 -- -m $b done for b i

[Qemu-devel] [Bug 808588] Re: Netperf tests cause i82551 network down

2011-07-10 Thread kongjianjun
kvm version: qemu-kvm: commit 525e3df73e40290e95743d4c8f8b64d8d9cbe021 Date: Mon Jul 4 13:36:06 2011 +0300 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/808588 Title: Netperf tests cause i82551

[Qemu-devel] [Bug 808588] Re: Netperf tests cause i82551 network down

2011-07-10 Thread kongjianjun
** Attachment added: "qemu-debug-output.txt" https://bugs.launchpad.net/bugs/808588/+attachment/2201649/+files/qemu-debug-output.txt -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/808588 Title:

Re: [Qemu-devel] [RFC v3 31/56] ac97: convert to memory API

2011-07-10 Thread Anthony Liguori
On 07/10/2011 03:33 PM, malc wrote: On Sun, 10 Jul 2011, Avi Kivity wrote: fixes BAR sizing as well. I find this patch disgusting, the read and write handlers in particular. Shouldn't it be possible to do something like: typedef struct OldMemoryRegionOps { MemoryRegionOps parent_ops;

Re: [Qemu-devel] [RFC v3 31/56] ac97: convert to memory API

2011-07-10 Thread malc
On Sun, 10 Jul 2011, Avi Kivity wrote: > fixes BAR sizing as well. I find this patch disgusting, the read and write handlers in particular. [..snip..] -- mailto:av1...@comtv.ru

[Qemu-devel] [RFC v3 35/56] ide: convert to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/ide/cmd646.c | 208 +++ hw/ide/pci.c| 25 --- hw/ide/pci.h| 19 - hw/ide/piix.c | 64 + hw/ide/via.c| 65 + 5 files changed, 261 insertions(+), 120 d

[Qemu-devel] [RFC v3 32/56] e1000: convert to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/e1000.c | 114 +-- 1 files changed, 48 insertions(+), 66 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index 96d84f9..8e4830f 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -82,7 +82,8 @@ typedef struct E1

[Qemu-devel] [RFC v3 24/56] vga: simplify vga window mmio access functions

2011-07-10 Thread Avi Kivity
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. We have to keep vga_mem_{read,write}b() since they're used by cirrus. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c |4 +- hw/vga.c| 56 +++---

Re: [Qemu-devel] [SeaBIOS] SeaBIOS error with Juniper FreeBSD kernel

2011-07-10 Thread Sebastian Herbszt
Kevin O'Connor wrote: I investigated this a bit and I believe the Juniper OS has two SMBIOS bugs: it crashes when the table is in high memory, and when searching Are all versions based on FreeBSD 4.11? Are newer versions still affected? So, moving the SMBIOS back to the f-segment would fix th

[Qemu-devel] [RFC v3 48/56] ehci: convert to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/usb-ehci.c | 53 + 1 files changed, 29 insertions(+), 24 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index 91fb7de..bd7fdcb 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -371,8 +371,7 @@ struct

[Qemu-devel] [RFC v3 56/56] pci: rename pci_register_bar_region() to pci_register_bar()

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/ac97.c |4 ++-- hw/cirrus_vga.c |5 ++--- hw/e1000.c|5 ++--- hw/eepro100.c |7 +++ hw/es1370.c |2 +- hw/ide/cmd646.c | 14 +- hw/ide/ich.c |2 +- hw/ide/piix.c |3 +-- hw/ide/vi

[Qemu-devel] [RFC v3 49/56] uhci: convert to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/usb-uhci.c | 57 + 1 files changed, 45 insertions(+), 12 deletions(-) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 405fa7b..95ef260 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -132,6 +132,7 @@ ty

Re: [Qemu-devel] SeaBIOS error with Juniper FreeBSD kernel

2011-07-10 Thread Kevin O'Connor
On Fri, Jul 08, 2011 at 09:46:32AM +0200, Bjørn Mork wrote: > "Kevin O'Connor" writes: > > It's possible that the OS has an error in handling the SMBIOS when it > > is in high-memory (located above 1meg). (For example, older versions > > of Linux crash when the mptable is in high memory.) [...] >

[Qemu-devel] [RFC v3 30/56] rtl8139: convert to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/rtl8139.c | 172 +- 1 files changed, 51 insertions(+), 121 deletions(-) diff --git a/hw/rtl8139.c b/hw/rtl8139.c index 5214b8c..fa661fc 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -474,7 +474,6 @@ typed

[Qemu-devel] [RFC v3 41/56] lsi53c895a: convert to memory API

2011-07-10 Thread Avi Kivity
An optimization that fast-pathed DMA reads from the SCRIPTS memory was removed int the process. Likely it breaks with iommus anyway. Signed-off-by: Avi Kivity --- hw/lsi53c895a.c | 258 --- 1 files changed, 56 insertions(+), 202 deletions(-)

[Qemu-devel] [RFC v3 20/56] vga: convert vga and its derivatives to the memory API

2011-07-10 Thread Avi Kivity
Convert all vga memory to the memory API. Note we need to fall back to get_system_memory(), since the various buses don't pass the vga window as a memory region. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 345 +-- hw/qxl-render.c |2

[Qemu-devel] [RFC v3 25/56] cirrus: simplify linear framebuffer access functions

2011-07-10 Thread Avi Kivity
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 74 ++- 1 files changed, 8 insertions(+), 66 deletions(-) diff --git a/hw/cirrus_vga.c b/h

[Qemu-devel] [RFC v3 44/56] pcnet: convert to memory API

2011-07-10 Thread Avi Kivity
Also related chips. Signed-off-by: Avi Kivity --- hw/lance.c | 31 -- hw/pcnet-pci.c | 98 ++- hw/pcnet.h |4 ++- 3 files changed, 85 insertions(+), 48 deletions(-) diff --git a/hw/lance.c b/hw/lance.c index ddb

[Qemu-devel] [RFC v3 38/56] virtio-pci: convert to memory API

2011-07-10 Thread Avi Kivity
except msix. Signed-off-by: Avi Kivity --- hw/virtio-pci.c | 84 +- hw/virtio-pci.h |2 +- 2 files changed, 46 insertions(+), 40 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index b3e7ba5..20e6c5b 100644 --- a/hw/virtio-pc

[Qemu-devel] [RFC v3 46/56] isa-mmio: concert to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/isa.h |2 + hw/isa_mmio.c | 67 +++-- 2 files changed, 29 insertions(+), 40 deletions(-) diff --git a/hw/isa.h b/hw/isa.h index d2b6126..f1f2181 100644 --- a/hw/isa.h +++ b/hw/isa.h @@ -4,6 +4,7 @@ /

[Qemu-devel] [RFC v3 51/56] msix: convert to memory API

2011-07-10 Thread Avi Kivity
The msix table is defined as a subregion, to allow for a BAR that mixes device specific regions with the msix table. Signed-off-by: Avi Kivity --- hw/ivshmem.c| 11 + hw/msix.c | 64 +++ hw/msix.h |6 +--- hw/pci

[Qemu-devel] [RFC v3 47/56] sun4u: convert to memory API

2011-07-10 Thread Avi Kivity
fixes memory leak on repeated BAR map/unmap Signed-off-by: Avi Kivity --- hw/sun4u.c | 55 +-- 1 files changed, 25 insertions(+), 30 deletions(-) diff --git a/hw/sun4u.c b/hw/sun4u.c index d7dcaf0..74a06a8 100644 --- a/hw/sun4u.c +++ b/hw/su

[Qemu-devel] [RFC v3 29/56] pci: allow I/O BARs to be registered with pci_register_bar_region()

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/pci.c | 43 +++ hw/pci.h |1 + hw/pci_internals.h |3 ++- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 2659d96..980840f 100644 --- a/hw/pci.c +++ b/

[Qemu-devel] [RFC v3 55/56] pci: fold BAR mapping function into its caller

2011-07-10 Thread Avi Kivity
There is only one function, so no need for a function pointer. Signed-off-by: Avi Kivity --- hw/pci.c | 25 + hw/pci.h |1 - 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 2543ced..04b6372 100644 --- a/hw/pci.c +++ b/hw/pci

[Qemu-devel] [RFC v3 45/56] i6300esb: convert to memory API

2011-07-10 Thread Avi Kivity
Also add missing destructor. Signed-off-by: Avi Kivity --- hw/wdt_i6300esb.c | 59 1 files changed, 45 insertions(+), 14 deletions(-) diff --git a/hw/wdt_i6300esb.c b/hw/wdt_i6300esb.c index 53786ce..242a8fa 100644 --- a/hw/wdt_i6300esb.c +

[Qemu-devel] [RFC v3 39/56] ahci: convert to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/ide/ahci.c | 31 +-- hw/ide/ahci.h |2 +- hw/ide/ich.c |3 +-- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 1f008a3..e207ca0 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci

[Qemu-devel] [RFC v3 40/56] intel-hda: convert to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/intel-hda.c | 49 ++--- 1 files changed, 34 insertions(+), 15 deletions(-) diff --git a/hw/intel-hda.c b/hw/intel-hda.c index 0ce..0f5c6c4 100644 --- a/hw/intel-hda.c +++ b/hw/intel-hda.c @@ -177,7 +177,7 @@ struc

[Qemu-devel] [RFC v3 37/56] ivshmem: convert to memory API

2011-07-10 Thread Avi Kivity
excluding msix. Signed-off-by: Avi Kivity --- hw/ivshmem.c | 148 -- 1 files changed, 50 insertions(+), 98 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index 3055dd2..e028b19 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -56,11

[Qemu-devel] [RFC v3 42/56] ppc: convert to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/cuda.c |6 ++- hw/escc.c | 42 +-- hw/escc.h |2 +- hw/heathrow_pic.c | 29 -- hw/ide.h |2 +- hw/ide/macio.c| 50 ++-- hw/mac_dbdma.c|

[Qemu-devel] [RFC v3 27/56] exec.c: fix initialization of system I/O memory region

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- exec.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/exec.c b/exec.c index e949c91..10ed931 100644 --- a/exec.c +++ b/exec.c @@ -3820,7 +3820,7 @@ static void memory_map_init(void) set_system_memory_map(system_memory); system_i

[Qemu-devel] [RFC v3 09/56] exec.c: initialize memory map

2011-07-10 Thread Avi Kivity
Allocate the root memory region and initialize it. Signed-off-by: Avi Kivity --- exec.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index 4c45299..f274ec9 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,8 @@ #include "kvm.h" #includ

[Qemu-devel] [RFC v3 15/56] pci: add MemoryRegion based BAR management API

2011-07-10 Thread Avi Kivity
Allow registering a BAR using a MemoryRegion. Once all users are converted, pci_register_bar() and pci_register_bar_simple() will be removed. Signed-off-by: Avi Kivity --- hw/pci.c | 47 +++ hw/pci.h |3 +++ 2 files changed, 42 insertions(+), 8

[Qemu-devel] [RFC v3 54/56] pci: remove pci_register_bar()

2011-07-10 Thread Avi Kivity
Superceded by pci_register_bar_region(). The implementations are folded together. Signed-off-by: Avi Kivity --- hw/pci.c | 42 +- hw/pci.h |3 --- 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 8c7a418..25

[Qemu-devel] [RFC v3 14/56] pci: pass address space to pci bus when created

2011-07-10 Thread Avi Kivity
This is now done sloppily, via get_system_memory(). Eventually callers will be converted to stop using that. Signed-off-by: Avi Kivity --- hw/apb_pci.c |2 ++ hw/bonito.c|4 +++- hw/grackle_pci.c |5 +++-- hw/gt64xxx.c |4 +++- hw/pc.h|4 +++

[Qemu-devel] [RFC v3 28/56] pci: pass I/O address space to new PCI bus

2011-07-10 Thread Avi Kivity
This lets us register BARs in the I/O address space. Signed-off-by: Avi Kivity --- hw/apb_pci.c |1 + hw/bonito.c|1 + hw/grackle_pci.c |8 ++-- hw/gt64xxx.c |4 +++- hw/pc.h|4 +++- hw/pc_piix.c |6 +- hw/pci.c |

[Qemu-devel] [RFC v3 13/56] pc: move global memory map out of pc_init1() and into its callers

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/pc_piix.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index d83854c..f2d0476 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -68,7 +68,8 @@ static void ioapic_init(IsaIrqState *isa_irq_state)

[Qemu-devel] [RFC v3 34/56] es1370: convert to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/es1370.c | 62 -- 1 files changed, 43 insertions(+), 19 deletions(-) diff --git a/hw/es1370.c b/hw/es1370.c index 1ed62b7..a696eb2 100644 --- a/hw/es1370.c +++ b/hw/es1370.c @@ -268,6 +268,7 @@ struct chan

[Qemu-devel] [RFC v3 53/56] pci: convert pci rom to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/pci.c | 20 +++- hw/pci.h |3 ++- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 9db6fc8..8c7a418 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1858,11 +1858,6 @@ static uint8_t pci_find_capability_list(P

[Qemu-devel] [RFC v3 52/56] pci: remove pci_register_bar_simple()

2011-07-10 Thread Avi Kivity
Superceded by pci_register_bar_region(). Signed-off-by: Avi Kivity --- hw/pci.c | 16 hw/pci.h |2 -- 2 files changed, 0 insertions(+), 18 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 980840f..9db6fc8 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -923,13 +923,6 @@ void p

[Qemu-devel] [RFC v3 26/56] Integrate I/O memory regions into qemu

2011-07-10 Thread Avi Kivity
get_system_io() returns the root I/O memory region. Signed-off-by: Avi Kivity --- exec-memory.h |2 ++ exec.c| 10 ++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/exec-memory.h b/exec-memory.h index aad21b5..3acb15f 100644 --- a/exec-memory.h +++ b/exec-m

[Qemu-devel] [RFC v3 50/56] xen-platform: convert to memory API

2011-07-10 Thread Avi Kivity
Since this device bypasses PCI and registers I/O ports directly with the system bus, it needs further attention. Signed-off-by: Avi Kivity --- hw/xen_platform.c | 110 1 files changed, 76 insertions(+), 34 deletions(-) diff --git a/hw/xen_pl

[Qemu-devel] [RFC v3 36/56] memory: add ioeventfd support

2011-07-10 Thread Avi Kivity
As with the rest of the memory API, the caller associates an eventfd with an address, and the memory API takes care of registering or unregistering when the address is made visible or invisible to the guest. Signed-off-by: Avi Kivity --- memory.c | 218 ++

[Qemu-devel] [RFC v3 00/56] Memory API

2011-07-10 Thread Avi Kivity
New in this version: - use opaque instead of container_of() in memory callbacks - turns out those container_of()s were hindering reuse - I/O space access via memory API - PCI fully converted - except bridge, which actually benefits most from the conversion - ioeventfd support Caveats: - som

[Qemu-devel] [RFC v3 19/56] vmsvga: don't remember pci BAR address in callback any more

2011-07-10 Thread Avi Kivity
We're going to remove the callback, so we can't use it to save the address. Use the pci API instead. Signed-off-by: Avi Kivity --- hw/vmware_vga.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c index 354c221..190b005 100644

[Qemu-devel] [RFC v3 43/56] ne2000: convert to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/ne2000-isa.c | 14 +++--- hw/ne2000.c | 77 +- hw/ne2000.h |8 + 3 files changed, 59 insertions(+), 40 deletions(-) diff --git a/hw/ne2000-isa.c b/hw/ne2000-isa.c index e41dbba..ce7b365 1

[Qemu-devel] [RFC v3 01/56] Hierarchical memory region API

2011-07-10 Thread Avi Kivity
The memory API separates the attributes of a memory region (its size, how reads or writes are handled, dirty logging, and coalescing) from where it is mapped and whether it is enabled. This allows a device to configure a memory region once, then hand it off to its parent bus to map it according to

[Qemu-devel] [RFC v3 22/56] cirrus: simplify bitblt BAR access functions

2011-07-10 Thread Avi Kivity
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 81 +-- 1 files changed, 13 insertions(+), 68 deletions(-) diff --git a/hw/cirrus_vga.c b/

[Qemu-devel] [RFC v3 08/56] memory: I/O address space support

2011-07-10 Thread Avi Kivity
Allow registering I/O ports via the same mechanism as mmio ranges. Signed-off-by: Avi Kivity --- exec-memory.h |3 ++ memory.c | 60 - memory.h |2 + 3 files changed, 64 insertions(+), 1 deletions(-) diff --git a/exec-m

[Qemu-devel] [RFC v3 05/56] memory: abstract address space operations

2011-07-10 Thread Avi Kivity
Prepare for multiple address space support by abstracting away the details of registering a memory range with qemu's flat representation into an AddressSpace object. Note operations which are memory specific are not abstracted, since they will never be called on I/O address spaces anyway. Signed-

[Qemu-devel] [RFC v3 33/56] eepro100: convert to memory API

2011-07-10 Thread Avi Kivity
Note: the existing code aliases the flash BAR into the MMIO bar. This is probably a bug. This patch does not correct the problem. Signed-off-by: Avi Kivity --- hw/eepro100.c | 182 - 1 files changed, 37 insertions(+), 145 deletions(-) d

[Qemu-devel] [RFC v3 23/56] cirrus: simplify vga window mmio access functions

2011-07-10 Thread Avi Kivity
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 79 +++--- 1 files changed, 11 insertions(+), 68 deletions(-) diff --git a/hw/cirrus_vga.c b/h

[Qemu-devel] [RFC v3 17/56] usb-ohci: convert to MemoryRegion

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/usb-ohci.c | 42 +- 1 files changed, 17 insertions(+), 25 deletions(-) diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index 1c29b9f..36885cb 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -62,7 +62,7 @@ typedef struct OHCI

[Qemu-devel] [RFC v3 04/56] Internal interfaces for memory API

2011-07-10 Thread Avi Kivity
get_system_memory() provides the root of the memory hierarchy. This interface is intended to be private between memory.c and exec.c. If this file is included elsewhere, it should be regarded as a bug (or TODO item). However, it will be temporarily needed for the conversion to hierarchical memory

[Qemu-devel] [RFC v3 10/56] ioport: register ranges by byte aligned addresses always

2011-07-10 Thread Avi Kivity
The I/O port space is byte addressable, even for word and long accesses. An example is the VMware svga card, which has long ports on offsets 0, 1, and 2. Signed-off-by: Avi Kivity --- ioport.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ioport.c b/ioport.c index

[Qemu-devel] [RFC v3 06/56] memory: rename MemoryRegion::has_ram_addr to ::terminates

2011-07-10 Thread Avi Kivity
I/O regions will not have ram_addrs, so this is a better name. Signed-off-by: Avi Kivity --- memory.c | 18 +- memory.h |2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/memory.c b/memory.c index 7187223..5fda4a0 100644 --- a/memory.c +++ b/memory.c @@

[Qemu-devel] [RFC v3 02/56] memory: implement dirty tracking

2011-07-10 Thread Avi Kivity
Currently dirty tracking is implemented by passing through all calls to the underlying cpu_physical_memory_*() calls. Signed-off-by: Avi Kivity --- memory.c | 39 +++ memory.h |1 + 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/memory.c

[Qemu-devel] [RFC v3 07/56] memory: late initialization of ram_addr

2011-07-10 Thread Avi Kivity
For non-RAM memory regions, we cannot tell whether this is an I/O region or an MMIO region. Since the qemu backing registration is different for the two, we have to defer initialization until we know which address space we are in. These shenanigans will be removed once the backing registration is

[Qemu-devel] [RFC v3 12/56] pc: convert pc_memory_init() to memory API

2011-07-10 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/pc.c | 59 --- hw/pc.h |1 + 2 files changed, 41 insertions(+), 19 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 369566a..1c9d89a 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -41,6 +41,7 @@ #include "sys

[Qemu-devel] [RFC v3 31/56] ac97: convert to memory API

2011-07-10 Thread Avi Kivity
fixes BAR sizing as well. Signed-off-by: Avi Kivity --- hw/ac97.c | 126 ++-- 1 files changed, 88 insertions(+), 38 deletions(-) diff --git a/hw/ac97.c b/hw/ac97.c index 0b59896..72a0667 100644 --- a/hw/ac97.c +++ b/hw/ac97.c @@ -160,8 +1

[Qemu-devel] [RFC v3 11/56] pc: grab system_memory

2011-07-10 Thread Avi Kivity
While eventually this should come from the machine initialization function, take a short cut to avoid converting all machines now. Signed-off-by: Avi Kivity --- hw/pc.c |3 ++- hw/pc.h |4 +++- hw/pc_piix.c |8 +++- 3 files changed, 12 insertions(+), 3 deletions(-) dif

[Qemu-devel] [RFC v3 21/56] cirrus: simplify mmio BAR access functions

2011-07-10 Thread Avi Kivity
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 78 +- 1 files changed, 8 insertions(+), 70 deletions(-) diff --git a/hw/cirrus_vga.c b/hw

[Qemu-devel] [RFC v3 16/56] sysbus: add MemoryRegion based memory management API

2011-07-10 Thread Avi Kivity
Allow registering sysbus device memory using a MemoryRegion. Once all users are converted, sysbus_init_mmio() and sysbus_init_mmio_cb() will be removed. Signed-off-by: Avi Kivity --- hw/sysbus.c | 27 --- hw/sysbus.h |3 +++ 2 files changed, 27 insertions(+), 3 del

[Qemu-devel] [RFC v3 03/56] memory: merge adjacent segments of a single memory region

2011-07-10 Thread Avi Kivity
Simple implementations of memory routers, for example the Cirrus VGA memory banks or the 440FX PAM registers can generate adjacent memory regions which are contiguous. Detect these and merge them; this saves kvm memory slots and shortens lookup times. Signed-off-by: Avi Kivity --- memory.c |

[Qemu-devel] [RFC v3 18/56] pci: add API to get a BAR's mapped address

2011-07-10 Thread Avi Kivity
This is a hack, for devices that have a back-channel to read this address back outside the normal configuration mechanisms, such as VMware svga. Signed-off-by: Avi Kivity --- hw/pci.c |5 + hw/pci.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pc

[Qemu-devel] pthread code crash??

2011-07-10 Thread Jun Koi
hi, i am doing some experiments with Qemu. this is to add a new pthread into Qemu code, like below: ... pthread_t pt; pthread_attr_t thread_attr; pthread_attr_init(&thread_attr); pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED); pthread_create(&pt, &

[Qemu-devel] [PATCH v6] showing a splash picture when start

2011-07-10 Thread Wayne Xia
Added options to let qemu transfer two configuration files to bios: "bootsplash.bmp" and "etc/boot-menu-wait", which could be specified by command -boot splash=P,splash-time=T P is jpg/bmp file name or an absolute path, T have a max value of 0x, unit is ms. With these two options, if u

[Qemu-devel] [RFC] vl: make --no-shutdown persist

2011-07-10 Thread Alon Levy
If --no-shutdown is specified it only applies for a single shutdown , so the second shutdown does trigger an exit of qemu. This patch changes that to keep on not shuting down. --- vl.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index fcd7395..fb694cb 1006