Re: [PATCH] Permit -mem-path without sync mmu

2011-08-08 Thread David Gibson
On Fri, Aug 05, 2011 at 12:30:53PM -0300, Marcelo Tosatti wrote: On Fri, Aug 05, 2011 at 08:16:42AM +0200, Jan Kiszka wrote: On 2011-08-05 06:02, David Gibson wrote: At present, an explicit test disallows use of -mem-path when kvm is enabled but KVM_CAP_SYNC_MMU is not set. In

Re: kvm PCI assignment VFIO ramblings

2011-08-08 Thread David Gibson
On Fri, Aug 05, 2011 at 09:10:09AM -0600, Alex Williamson wrote: On Fri, 2011-08-05 at 20:42 +1000, Benjamin Herrenschmidt wrote: Right. In fact to try to clarify the problem for everybody, I think we can distinguish two different classes of constraints that can influence the grouping of

Re: [PATCH] [NEW] cgroup test * general smoke_test + module dependend subtests (memory test included) * library for future use in other tests (kvm)

2011-08-08 Thread Jiri Zupka
I go through this and let you know. - Original Message - From: root r...@dhcp-26-193.brq.redhat.com cgroup.py: * structure for different cgroup subtests * contains basic cgroup-memory test cgroup_common.py: * library for cgroup handling (intended to be used from kvm test in the

Re: [RFC PATCH]vhost-blk: In-kernel accelerator for virtio block device

2011-08-08 Thread Liu Yuan
On 08/08/2011 01:04 PM, Badari Pulavarty wrote: On 8/7/2011 6:35 PM, Liu Yuan wrote: On 08/06/2011 02:02 AM, Badari Pulavarty wrote: On 8/5/2011 4:04 AM, Liu Yuan wrote: On 08/05/2011 05:58 AM, Badari Pulavarty wrote: Hi Liu Yuan, I started testing your patches. I applied your kernel patch

Re: [PATCH] Permit -mem-path without sync mmu

2011-08-08 Thread Avi Kivity
On 08/08/2011 09:03 AM, David Gibson wrote: Second, if userspace qemu passing hugepages to kvm can cause (host) kernel memory corruption, that is clearly a host kernel bug. So am I correct in thinking this is basically just a safety feature if qemu is run on a buggy kernel. Seems so, yes.

Re: kvm PCI assignment VFIO ramblings

2011-08-08 Thread Avi Kivity
On 08/03/2011 05:04 AM, David Gibson wrote: I still don't understand the distinction you're making. We're saying the group is owned by a given user or guest in the sense that no-one else may use anything in the group (including host drivers). At that point none, some or all of the devices in

[PATCH] Adds cgroup handling library

2011-08-08 Thread Lukas Doktor
[new] cgroup_common.py * library for handling cgroups Signed-off-by: Lukas Doktor ldok...@redhat.com --- client/tests/cgroup/cgroup.py|5 +- client/tests/cgroup/cgroup_common.py | 327 ++ 2 files changed, 331 insertions(+), 1 deletions(-) create mode

Missing cgroup_common.py

2011-08-08 Thread Lukas Doktor
Hi, I'm sorry for missing cgroup_common.py in previous patchset. I forgot to add it to git. You can find it in attached patch. Regards, Lukáš -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [RFC] postcopy livemigration proposal

2011-08-08 Thread Dor Laor
On 08/08/2011 06:24 AM, Isaku Yamahata wrote: This mail is on Yabusame: Postcopy Live Migration for Qemu/KVM on which we'll give a talk at KVM-forum. The purpose of this mail is to letting developers know it in advance so that we can get better feedback on its design/implementation approach

Re: [Qemu-devel] [RFC] postcopy livemigration proposal

2011-08-08 Thread Stefan Hajnoczi
On Mon, Aug 8, 2011 at 4:24 AM, Isaku Yamahata yamah...@valinux.co.jp wrote: This mail is on Yabusame: Postcopy Live Migration for Qemu/KVM on which we'll give a talk at KVM-forum. I'm curious if this approach is compatible with asynchronous page faults? The idea there was to tell the guest

Re: [RFC] postcopy livemigration proposal

2011-08-08 Thread Yaniv Kaul
On 08/08/2011 12:20, Dor Laor wrote: On 08/08/2011 06:24 AM, Isaku Yamahata wrote: This mail is on Yabusame: Postcopy Live Migration for Qemu/KVM on which we'll give a talk at KVM-forum. The purpose of this mail is to letting developers know it in advance so that we can get better feedback on

Re: [Qemu-devel] [RFC] postcopy livemigration proposal

2011-08-08 Thread Isaku Yamahata
On Mon, Aug 08, 2011 at 10:38:35AM +0100, Stefan Hajnoczi wrote: On Mon, Aug 8, 2011 at 4:24 AM, Isaku Yamahata yamah...@valinux.co.jp wrote: This mail is on Yabusame: Postcopy Live Migration for Qemu/KVM on which we'll give a talk at KVM-forum. I'm curious if this approach is compatible

Re: percpu crash on NetBurst

2011-08-08 Thread Tejun Heo
Hello, Avi. On Sun, Aug 07, 2011 at 06:32:35PM +0300, Avi Kivity wrote: qemu, under some conditions (-cpu host or -cpu kvm64), erroneously passes family=15 as the virtual cpuid. This causes a BUG() in percpu code during late boot: [ cut here ] kernel BUG at

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Michael S. Tsirkin
On Fri, Aug 05, 2011 at 08:52:25AM -0500, Anthony Liguori wrote: On 08/04/2011 08:05 AM, Avi Kivity wrote: From: Michael S. Tsirkinm...@redhat.com We originally did get config on map, so that following write accesses are done on an updated config. New memory API doesn't give us a callback

Re: [RFC] postcopy livemigration proposal

2011-08-08 Thread Nadav Har'El
* What's is postcopy livemigration It is is yet another live migration mechanism for Qemu/KVM, which implements the migration technique known as postcopy or lazy migration. Just after the migrate command is invoked, the execution host of a VM is instantaneously switched to a destination host.

[PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Avi Kivity
In certain circumstances, posix-aio-compat can incur a lot of latency: - threads are created by vcpu threads, so if vcpu affinity is set, aio threads inherit vcpu affinity. This can cause many aio threads to compete for one cpu. - we can create up to max_threads (64) aio threads in one

Re: [RFC] postcopy livemigration proposal

2011-08-08 Thread Dor Laor
On 08/08/2011 01:59 PM, Nadav Har'El wrote: * What's is postcopy livemigration It is is yet another live migration mechanism for Qemu/KVM, which implements the migration technique known as postcopy or lazy migration. Just after the migrate command is invoked, the execution host of a VM is

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Anthony Liguori
On 08/08/2011 06:37 AM, Avi Kivity wrote: In certain circumstances, posix-aio-compat can incur a lot of latency: - threads are created by vcpu threads, so if vcpu affinity is set, aio threads inherit vcpu affinity. This can cause many aio threads to compete for one cpu. - we can

Re: [RFC] postcopy livemigration proposal

2011-08-08 Thread Avi Kivity
On 08/08/2011 06:24 AM, Isaku Yamahata wrote: This mail is on Yabusame: Postcopy Live Migration for Qemu/KVM on which we'll give a talk at KVM-forum. The purpose of this mail is to letting developers know it in advance so that we can get better feedback on its design/implementation approach

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Avi Kivity
On 08/08/2011 03:34 PM, Anthony Liguori wrote: On 08/08/2011 06:37 AM, Avi Kivity wrote: In certain circumstances, posix-aio-compat can incur a lot of latency: - threads are created by vcpu threads, so if vcpu affinity is set, aio threads inherit vcpu affinity. This can cause many aio

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Anthony Liguori
On 08/08/2011 05:36 AM, Michael S. Tsirkin wrote: Thinking more closely, I don't think this right. Updating on map ensured that the config was refreshed after each time the bar was mapped. In the very least, the config needs to be refreshed during reset because the guest may write to the guest

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Avi Kivity
On 08/08/2011 03:45 PM, Anthony Liguori wrote: Actually, you never need to call config_get() AFAICT. It's called in every read/write access. So I think the code you changed is extraneous now. Ok; I'll drop this patch and report (and just remove the code in virtio_map()). -- error

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Frediano Ziglio
2011/8/8 Avi Kivity a...@redhat.com: In certain circumstances, posix-aio-compat can incur a lot of latency:  - threads are created by vcpu threads, so if vcpu affinity is set,   aio threads inherit vcpu affinity.  This can cause many aio threads   to compete for one cpu.  - we can create up

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Avi Kivity
On 08/08/2011 03:49 PM, Frediano Ziglio wrote: 2011/8/8 Avi Kivitya...@redhat.com: In certain circumstances, posix-aio-compat can incur a lot of latency: - threads are created by vcpu threads, so if vcpu affinity is set, aio threads inherit vcpu affinity. This can cause many aio

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Michael S. Tsirkin
On Mon, Aug 08, 2011 at 07:45:19AM -0500, Anthony Liguori wrote: On 08/08/2011 05:36 AM, Michael S. Tsirkin wrote: Thinking more closely, I don't think this right. Updating on map ensured that the config was refreshed after each time the bar was mapped. In the very least, the config needs

[PATCH] Introduce short names for fixed width integer types

2011-08-08 Thread Avi Kivity
QEMU deals with a lot of fixed width integer types; their names (uint64_t etc) are clumsy to use and take up a lot of space. Following Linux, introduce shorter names, for example U64 for uint64_t. Signed-off-by: Avi Kivity a...@redhat.com --- qemu-common.h |9 + 1 files changed, 9

Re: [Qemu-devel] [PATCH] Introduce short names for fixed width integer types

2011-08-08 Thread Anthony Liguori
On 08/08/2011 07:56 AM, Avi Kivity wrote: QEMU deals with a lot of fixed width integer types; their names (uint64_t etc) are clumsy to use and take up a lot of space. Following Linux, introduce shorter names, for example U64 for uint64_t. Except Linux uses lower case letters. I personally

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Anthony Liguori
On 08/08/2011 07:56 AM, Michael S. Tsirkin wrote: On Mon, Aug 08, 2011 at 07:45:19AM -0500, Anthony Liguori wrote: On 08/08/2011 05:36 AM, Michael S. Tsirkin wrote: Thinking more closely, I don't think this right. Updating on map ensured that the config was refreshed after each time the bar

[PATCH] kvm: balloon: test multiple devices

2011-08-08 Thread Amit Shah
Multiple balloon devices should not be allowed. Check if the qemu we're running under has the right fixes. Signed-off-by: Amit Shah amit.s...@redhat.com --- client/tests/kvm/tests/balloon_check.py | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git

[PATCH v4 01/39] memory: rename PORTIO_END to PORTIO_END_OF_LIST

2011-08-08 Thread Avi Kivity
For consistency with other _END_OF_LIST macros. Signed-off-by: Avi Kivity a...@redhat.com --- memory.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/memory.h b/memory.h index 4e518b2..da00a3b 100644 --- a/memory.h +++ b/memory.h @@ -133,7 +133,7 @@ struct

[PATCH v4 00/39] Memory API, batch 2: PCI devices

2011-08-08 Thread Avi Kivity
This is a mostly mindless conversion of all QEMU PCI devices to the memory API. After this patchset is applied, it is no longer possible to create a PCI device using the old API. An immediate benefit is that PCI BARs that overlap each other are now handled correctly: currently, the sequence

[PATCH v4 22/39] intel-hda: convert to memory API

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/intel-hda.c | 35 +++ 1 files changed, 19 insertions(+), 16 deletions(-) diff --git a/hw/intel-hda.c

[PATCH v4 13/39] rtl8139: convert to memory API

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/rtl8139.c | 72 ++--- 1 files changed, 38 insertions(+), 34 deletions(-) diff --git

[PATCH v4 21/39] ahci: convert to memory API

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/ide/ahci.c | 31 +-- hw/ide/ahci.h |2 +- hw/ide/ich.c |3 +-- 3 files changed, 15 insertions(+), 21

[PATCH v4 15/39] e1000: convert to memory API

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/e1000.c | 114 +-- 1 files changed, 48 insertions(+), 66 deletions(-) diff --git a/hw/e1000.c

[PATCH v4 38/39] pci: rename pci_register_bar_region() to pci_register_bar()

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/ac97.c |5 ++--- hw/cirrus_vga.c |5 ++--- hw/e1000.c|5 ++--- hw/eepro100.c |7 +++ hw/es1370.c |2

[PATCH v4 24/39] ppc: convert to memory API

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/cuda.c |6 ++- hw/escc.c | 42 +-- hw/escc.h |2 +- hw/heathrow_pic.c | 29

[PATCH v4 20/39] virtio-pci: convert to memory API

2011-08-08 Thread Avi Kivity
except msix. [jan: fix build] Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/virtio-pci.c | 71 +-- hw/virtio-pci.h |2 +- 2 files

[PATCH v4 25/39] ne2000: convert to memory API

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Signed-off-by: Avi Kivity a...@redhat.com --- hw/ne2000-isa.c | 13 ++--- hw/ne2000.c | 77 +- hw/ne2000.h |8 + 3 files changed, 58 insertions(+), 40 deletions(-) diff

[PATCH v4 32/39] xen-platform: convert to memory API

2011-08-08 Thread Avi Kivity
Since this device bypasses PCI and registers I/O ports directly with the system bus, it needs further attention. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/xen_platform.c | 83

[PATCH v4 02/39] pci: add API to get a BAR's mapped address

2011-08-08 Thread Avi Kivity
Some (hacky) devices that have a back-channel to read this address back outside the normal configuration mechanisms, such as VMware svga. Reviewed-by: Richard Henderson r...@twiddle.net Signed-off-by: Avi Kivity a...@redhat.com --- hw/pci.c |5 + hw/pci.h |1 + 2 files changed, 6

[PATCH v4 33/39] msix: convert to memory API

2011-08-08 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. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/ivshmem.c| 11 +

[PATCH v4 34/39] pci: remove pci_register_bar_simple()

2011-08-08 Thread Avi Kivity
Superceded by pci_register_bar_region(). Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/pci.c | 17 - hw/pci.h |3 --- 2 files changed, 0 insertions(+), 20 deletions(-) diff

[PATCH v4 39/39] pci: remove support for pre memory API BARs

2011-08-08 Thread Avi Kivity
Not used anymore. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/pci.c | 33 ++--- 1 files changed, 2 insertions(+), 31 deletions(-) diff --git a/hw/pci.c b/hw/pci.c

[PATCH v4 23/39] lsi53c895a: convert to memory API

2011-08-08 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. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/lsi53c895a.c |

[PATCH v4 36/39] pci: remove pci_register_bar()

2011-08-08 Thread Avi Kivity
Superceded by pci_register_bar_region(). The implementations are folded together. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/pci.c | 42 +- hw/pci.h |

[PATCH v4 37/39] pci: fold BAR mapping function into its caller

2011-08-08 Thread Avi Kivity
There is only one function, so no need for a function pointer. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/pci.c | 25 + hw/pci.h |1 - 2 files changed, 9

[PATCH v4 30/39] ehci: convert to memory API

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/usb-ehci.c | 36 +--- 1 files changed, 9 insertions(+), 27 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c

[PATCH v4 35/39] pci: convert pci rom to memory API

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- 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

[PATCH v4 31/39] uhci: convert to memory API

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/usb-uhci.c | 42 -- 1 files changed, 28 insertions(+), 14 deletions(-) diff --git a/hw/usb-uhci.c

[PATCH v4 18/39] ide: convert to memory API

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/ide/cmd646.c | 208 +++ hw/ide/pci.c| 25 --- hw/ide/pci.h| 19 -

[PATCH v4 28/39] isa-mmio: convert to memory API

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/isa.h |2 ++ hw/isa_mmio.c | 29 ++--- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/hw/isa.h

[PATCH v4 26/39] pcnet: convert to memory API

2011-08-08 Thread Avi Kivity
Also related chips. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/lance.c | 31 ++- hw/pcnet-pci.c | 74 +--

[PATCH v4 29/39] sun4u: convert to memory API

2011-08-08 Thread Avi Kivity
fixes memory leak on repeated BAR map/unmap Reviewed-by: Richard Henderson r...@twiddle.net Signed-off-by: Avi Kivity a...@redhat.com --- hw/sun4u.c | 55 +-- 1 files changed, 25 insertions(+), 30 deletions(-) diff --git a/hw/sun4u.c

[PATCH v4 27/39] i6300esb: convert to memory API

2011-08-08 Thread Avi Kivity
Also add missing destructor. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/wdt_i6300esb.c | 43 +-- 1 files changed, 29 insertions(+), 14 deletions(-)

[PATCH v4 19/39] ivshmem: convert to memory API

2011-08-08 Thread Avi Kivity
excluding msix. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/ivshmem.c | 148 -- 1 files changed, 50 insertions(+), 98 deletions(-) diff

[PATCH v4 16/39] eepro100: convert to memory API

2011-08-08 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. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/eepro100.c | 182

[PATCH v4 17/39] es1370: convert to memory API

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/es1370.c | 43 +-- 1 files changed, 25 insertions(+), 18 deletions(-) diff --git a/hw/es1370.c b/hw/es1370.c

[PATCH v4 14/39] ac97: convert to memory API

2011-08-08 Thread Avi Kivity
fixes BAR sizing as well. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/ac97.c | 89 +++- 1 files changed, 52 insertions(+), 37

[PATCH v4 06/39] cirrus: simplify bitblt BAR access functions

2011-08-08 Thread Avi Kivity
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/cirrus_vga.c | 81

[PATCH v4 04/39] vga: convert vga and its derivatives to the memory API

2011-08-08 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. We no longer need to sync the dirty bitmap of the cirrus mapped memory banks, since the memory API takes care of that for us. [jan:

[PATCH v4 09/39] cirrus: simplify linear framebuffer access functions

2011-08-08 Thread Avi Kivity
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/cirrus_vga.c | 74

[PATCH v4 08/39] vga: simplify vga window mmio access functions

2011-08-08 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. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity

[PATCH v4 12/39] pci: allow I/O BARs to be registered with pci_register_bar_region()

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/pci.c | 43 +++ hw/pci.h |1 + hw/pci_internals.h |3 ++- 3 files changed, 26

[PATCH v4 11/39] pci: pass I/O address space to new PCI bus

2011-08-08 Thread Avi Kivity
This lets us register BARs in the I/O address space. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/apb_pci.c |1 + hw/bonito.c|1 + hw/grackle_pci.c |8 ++--

[PATCH v4 05/39] cirrus: simplify mmio BAR access functions

2011-08-08 Thread Avi Kivity
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. Reviewed-by: Richard Henderson r...@twiddle.net Signed-off-by: Avi Kivity a...@redhat.com --- hw/cirrus_vga.c | 78 +- 1 files changed, 8

[PATCH v4 10/39] Integrate I/O memory regions into qemu

2011-08-08 Thread Avi Kivity
get_system_io() returns the root I/O memory region. Reviewed-by: Richard Henderson r...@twiddle.net Signed-off-by: Avi Kivity a...@redhat.com --- exec-memory.h |5 + exec.c| 10 ++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/exec-memory.h

[PATCH v4 07/39] cirrus: simplify vga window mmio access functions

2011-08-08 Thread Avi Kivity
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/cirrus_vga.c | 79

[PATCH v4 03/39] vmsvga: don't remember pci BAR address in callback any more

2011-08-08 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. Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- hw/vmware_vga.c | 12 ++-- 1 files

Re: [Qemu-devel] [PATCH] Introduce short names for fixed width integer types

2011-08-08 Thread Avi Kivity
On 08/08/2011 04:00 PM, Anthony Liguori wrote: On 08/08/2011 07:56 AM, Avi Kivity wrote: QEMU deals with a lot of fixed width integer types; their names (uint64_t etc) are clumsy to use and take up a lot of space. Following Linux, introduce shorter names, for example U64 for uint64_t. Except

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Michael S. Tsirkin
On Mon, Aug 08, 2011 at 08:02:08AM -0500, Anthony Liguori wrote: On 08/08/2011 07:56 AM, Michael S. Tsirkin wrote: On Mon, Aug 08, 2011 at 07:45:19AM -0500, Anthony Liguori wrote: On 08/08/2011 05:36 AM, Michael S. Tsirkin wrote: Thinking more closely, I don't think this right. Updating on

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Anthony Liguori
On 08/08/2011 08:14 AM, Michael S. Tsirkin wrote: Probably not noticeable because guests don't do the RMW in practice. We also send the config over on migration. That's probably a bug as well ... It's probably unnecessary, but I don't think it's a bug.. Regards, Anthony Liguori -- To

Re: [Qemu-devel] [PATCH] Introduce short names for fixed width integer types

2011-08-08 Thread Anthony Liguori
On 08/08/2011 08:12 AM, Avi Kivity wrote: On 08/08/2011 04:00 PM, Anthony Liguori wrote: On 08/08/2011 07:56 AM, Avi Kivity wrote: QEMU deals with a lot of fixed width integer types; their names (uint64_t etc) are clumsy to use and take up a lot of space. Following Linux, introduce shorter

Re: [Qemu-devel] [PATCH] Introduce short names for fixed width integer types

2011-08-08 Thread Peter Maydell
On 8 August 2011 13:56, Avi Kivity a...@redhat.com wrote: QEMU deals with a lot of fixed width integer types; their names (uint64_t etc) are clumsy to use and take up a lot of space. Following Linux, introduce shorter names, for example U64 for uint64_t. Strongly disagree. uint64_t c are

Re: [Qemu-devel] [PATCH] Introduce short names for fixed width integer types

2011-08-08 Thread Avi Kivity
On 08/08/2011 04:17 PM, Anthony Liguori wrote: This is one of the few areas that we're actually consistent with today. Introducing a new set of types will just create inconsistency. Most importantly, these are standard types. Every modern library and C program should be using them. TBH,

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Frediano Ziglio
2011/8/8 Avi Kivity a...@redhat.com: On 08/08/2011 03:49 PM, Frediano Ziglio wrote: 2011/8/8 Avi Kivitya...@redhat.com:  In certain circumstances, posix-aio-compat can incur a lot of latency:    - threads are created by vcpu threads, so if vcpu affinity is set,     aio threads inherit

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Avi Kivity
On 08/08/2011 04:21 PM, Frediano Ziglio wrote: The entire qemu process may be affined to a subset of the host cpus; we don't want to break that. For example: taskset 0xf0 qemu (qemu) info cpus pin individual vcpu threads to host cpus Just call sched_getaffinity at

Re: [Qemu-devel] [PATCH] Introduce short names for fixed width integer types

2011-08-08 Thread Kevin Wolf
Am 08.08.2011 15:00, schrieb Anthony Liguori: On 08/08/2011 07:56 AM, Avi Kivity wrote: QEMU deals with a lot of fixed width integer types; their names (uint64_t etc) are clumsy to use and take up a lot of space. Following Linux, introduce shorter names, for example U64 for uint64_t.

Re: [Qemu-devel] [RFC] postcopy livemigration proposal

2011-08-08 Thread Dor Laor
On 08/08/2011 03:32 PM, Anthony Liguori wrote: On 08/08/2011 04:20 AM, Dor Laor wrote: On 08/08/2011 06:24 AM, Isaku Yamahata wrote: This mail is on Yabusame: Postcopy Live Migration for Qemu/KVM on which we'll give a talk at KVM-forum. The purpose of this mail is to letting developers know it

Re: [Qemu-devel] [PATCH v4 01/39] memory: rename PORTIO_END to PORTIO_END_OF_LIST

2011-08-08 Thread Anthony Liguori
On 08/08/2011 08:08 AM, Avi Kivity wrote: For consistency with other _END_OF_LIST macros. Signed-off-by: Avi Kivitya...@redhat.com Reviewed-by: Anthony Liguori aligu...@us.ibm.com Regards, Anthony Liguori --- memory.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

Re: [PATCH v4 00/39] Memory API, batch 2: PCI devices

2011-08-08 Thread Michael S. Tsirkin
On Mon, Aug 08, 2011 at 04:08:53PM +0300, Avi Kivity wrote: This is a mostly mindless conversion of all QEMU PCI devices to the memory API. After this patchset is applied, it is no longer possible to create a PCI device using the old API. An immediate benefit is that PCI BARs that

Re: [Qemu-devel] [PATCH v4 20/39] virtio-pci: convert to memory API

2011-08-08 Thread Anthony Liguori
On 08/08/2011 08:09 AM, Avi Kivity wrote: except msix. [jan: fix build] This actually breaks the build: CClibhw64/virtio-pci.o cc1: warnings being treated as errors /home/anthony/git/qemu/hw/virtio-pci.c: In function ‘virtio_write_config’: /home/anthony/git/qemu/hw/virtio-pci.c:496:19:

[PATCH v4.1 20/39] virtio-pci: convert to memory API

2011-08-08 Thread Avi Kivity
except msix. [jan: fix build] Reviewed-by: Richard Henderson r...@twiddle.net Reviewed-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Avi Kivity a...@redhat.com --- v4.1: drop unused variable hw/virtio-pci.c | 70 --

Re: [Qemu-devel] [RFC] postcopy livemigration proposal

2011-08-08 Thread Anthony Liguori
On 08/08/2011 10:11 AM, Dor Laor wrote: On 08/08/2011 03:32 PM, Anthony Liguori wrote: On 08/08/2011 04:20 AM, Dor Laor wrote: That's terrific (nice video also)! Orit and myself had the exact same idea too (now we can't patent it..). Advantages: - No down time due to memory copying. But

Re: [Qemu-devel] [RFC] postcopy livemigration proposal

2011-08-08 Thread Avi Kivity
On 08/08/2011 06:29 PM, Anthony Liguori wrote: - Efficient, reduce needed traffic no need to re-send pages. It's not quite that simple. Post-copy needs to introduce a protocol capable of requesting pages. Just another subsection.. (kidding), still it shouldn't be too complicated, just an

Re: [Qemu-devel] [RFC] postcopy livemigration proposal

2011-08-08 Thread Anthony Liguori
On 08/08/2011 10:36 AM, Avi Kivity wrote: On 08/08/2011 06:29 PM, Anthony Liguori wrote: - Efficient, reduce needed traffic no need to re-send pages. It's not quite that simple. Post-copy needs to introduce a protocol capable of requesting pages. Just another subsection.. (kidding), still

Re: [Qemu-devel] [PATCH v4 00/39] Memory API, batch 2: PCI devices

2011-08-08 Thread Anthony Liguori
On 08/08/2011 08:08 AM, Avi Kivity wrote: This is a mostly mindless conversion of all QEMU PCI devices to the memory API. After this patchset is applied, it is no longer possible to create a PCI device using the old API. An immediate benefit is that PCI BARs that overlap each other are now

[PATCH 1/3] memory: reclaim resources when a memory region is destroyed for good

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- memory.c | 24 memory.h |1 + 2 files changed, 25 insertions(+), 0 deletions(-) diff --git a/memory.c b/memory.c index be891c6..5e3d966 100644 --- a/memory.c +++ b/memory.c @@ -661,6 +661,25 @@ void

[PATCH 2/3] memory: add API for creating ROM/device regions

2011-08-08 Thread Avi Kivity
ROM/device regions act as mapped RAM for reads, can I/O memory for writes. This allow emulation of flash devices. Signed-off-by: Avi Kivity a...@redhat.com --- memory.c | 46 -- memory.h | 34 ++ 2 files changed, 78

[PATCH 3/3] memory: correct documentation typos

2011-08-08 Thread Avi Kivity
Noted by Drew Jones. Signed-off-by: Avi Kivity a...@redhat.com --- docs/memory.txt |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/memory.txt b/docs/memory.txt index 4460c06..3fc1683 100644 --- a/docs/memory.txt +++ b/docs/memory.txt @@ -15,7 +15,7 @@ The

[PATCH 0/3] Memory API updates

2011-08-08 Thread Avi Kivity
The following patches fix a resource leak, add a ROM/device API (for flash devices which act like memory when read, and as an mmio device when written), and correct typos in the documentation. Avi Kivity (3): memory: reclaim resources when a memory region is destroyed for good memory: add API

[PATCH 16/24] sh_pci: convert to memory API

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- hw/sh_pci.c | 63 +++--- 1 files changed, 42 insertions(+), 21 deletions(-) diff --git a/hw/sh_pci.c b/hw/sh_pci.c index cd86501..76061bb 100644 --- a/hw/sh_pci.c +++ b/hw/sh_pci.c @@ -33,13

[PATCH 08/24] tusb6010: move declarations to new file tusb6010.h

2011-08-08 Thread Avi Kivity
Avoid #include hell. Signed-off-by: Avi Kivity a...@redhat.com --- hw/devices.h |7 --- hw/nseries.c |1 + hw/tusb6010.c |2 +- hw/tusb6010.h | 10 ++ 4 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 hw/tusb6010.h diff --git a/hw/devices.h

[PATCH 15/24] sysbus: add a variant of sysbus_init_mmio_cb with an unmap callback

2011-08-08 Thread Avi Kivity
sysbus_init_mmio_cb() uses the destructive IO_MEM_UNASSIGNED to remove a region. Provide an alternative that calls an unmap callback, so the removal may be done non-destructively. Signed-off-by: Avi Kivity a...@redhat.com --- hw/sysbus.c | 15 +++ hw/sysbus.h |3 +++ 2 files

[PATCH 03/24] arm_gic: convert to memory API

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- hw/arm_gic.c | 22 -- hw/armv7m_nvic.c |3 ++- hw/mpcore.c | 37 + hw/realview_gic.c | 38 +- 4 files changed, 44 insertions(+), 56

[PATCH 14/24] stellaris_enet: convert to memory API

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- hw/stellaris_enet.c | 29 - 1 files changed, 12 insertions(+), 17 deletions(-) diff --git a/hw/stellaris_enet.c b/hw/stellaris_enet.c index 1291931..9f1f37a 100644 --- a/hw/stellaris_enet.c +++ b/hw/stellaris_enet.c @@

[PATCH 04/24] arm_sysctl: convert to memory API

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- hw/arm_sysctl.c | 27 ++- 1 files changed, 10 insertions(+), 17 deletions(-) diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c index fd0c8bc..1838401 100644 --- a/hw/arm_sysctl.c +++ b/hw/arm_sysctl.c @@ -17,6 +17,7 @@

[PATCH 18/24] versatile_pci: convert to memory API

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- hw/versatile_pci.c | 94 --- 1 files changed, 44 insertions(+), 50 deletions(-) diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c index e1d5c0b..43edf77 100644 --- a/hw/versatile_pci.c +++

[PATCH 07/24] gt64xxx.c: convert to memory API

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- hw/gt64xxx.c | 36 +++- 1 files changed, 15 insertions(+), 21 deletions(-) diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c index d541558..6af9782 100644 --- a/hw/gt64xxx.c +++ b/hw/gt64xxx.c @@ -227,7 +227,7 @@ #define

[PATCH 09/24] omap_gpmc/nseries/tusb6010: convert to memory API

2011-08-08 Thread Avi Kivity
Somewhat clumsy since it needs a variable sized region. Signed-off-by: Avi Kivity a...@redhat.com --- hw/omap.h |3 ++- hw/omap_gpmc.c | 53 + hw/tusb6010.c | 30 +- hw/tusb6010.h |7 +-- 4

  1   2   >