[PATCH] lance: unbreak after memory API conversion

2011-08-08 Thread Avi Kivity
The conversion passed the wrong opaque pointer, causing a crash on first use. Pass the correct opaque. Signed-off-by: Avi Kivity --- hw/lance.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/lance.c b/hw/lance.c index 8e20360..d83e7f5 100644 --- a/hw/lance.c +++ b/h

Re: [Qemu-devel] [PATCH v4 26/39] pcnet: convert to memory API

2011-08-08 Thread Avi Kivity
On 08/09/2011 09:55 AM, Bob Breuer wrote: > static void lance_cleanup(VLANClientState *nc) > @@ -117,13 +116,11 @@ static int lance_init(SysBusDevice *dev) > SysBusPCNetState *d = FROM_SYSBUS(SysBusPCNetState, dev); > PCNetState *s =&d->state; > > -s->mmio_index = > -

Re: [Qemu-devel] [PATCH v4 26/39] pcnet: convert to memory API

2011-08-08 Thread Bob Breuer
Avi Kivity wrote: > Also related chips. > > Reviewed-by: Richard Henderson > Reviewed-by: Anthony Liguori > Signed-off-by: Avi Kivity > --- > hw/lance.c | 31 ++- > hw/pcnet-pci.c | 74 +-- > hw/pcnet.h |4

Re: [Qemu-devel] [PATCH 09/24] omap_gpmc/nseries/tusb6010: convert to memory API

2011-08-08 Thread Avi Kivity
On 08/08/2011 08:43 PM, Peter Maydell wrote: On 8 August 2011 18:06, Avi Kivity wrote: > Somewhat clumsy since it needs a variable sized region. > @@ -119,7 +120,7 @@ void omap_sdrc_reset(struct omap_sdrc_s *s); >struct omap_gpmc_s; >struct omap_gpmc_s *omap_gpmc_init(target_phys_addr

Re: coding standards for kvm tools?

2011-08-08 Thread Pekka Enberg
On Mon, 2011-08-08 at 16:59 -0700, David Evensky wrote: >> Is that a pointer to the coding standards used for the kvm tools? >> Thanks, >> \dae On Tue, Aug 9, 2011 at 8:50 AM, Sasha Levin wrote: > kvm tools basically follows the kernel coding style. > > Documentation for it can be found in /Docum

Re: coding standards for kvm tools?

2011-08-08 Thread Sasha Levin
On Mon, 2011-08-08 at 16:59 -0700, David Evensky wrote: > > Is that a pointer to the coding standards used for the kvm tools? > Thanks, > \dae kvm tools basically follows the kernel coding style. Documentation for it can be found in /Documentation/CodingStyle under your kernel tree (or here: htt

[PATCH v5 4/4] qmp/hmp: add block_set_io_throttle

2011-08-08 Thread Zhi Yong Wu
The patch introduce one new command block_set_io_throttle; For its usage syntax, if you have better idea, pls let me know. Signed-off-by: Zhi Yong Wu --- blockdev.c | 69 +++ blockdev.h |2 + hmp-commands.hx | 15

[PATCH v5 3/4] block: add block timer and block throttling algorithm

2011-08-08 Thread Zhi Yong Wu
Note: 1.) When bps/iops limits are specified to a small value such as 511 bytes/s, this VM will hang up. We are considering how to handle this senario. 2.) When "dd" command is issued in guest, if its option bs is set to a large value such as "bs=1024K", the result speed will slightly

[PATCH v5 2/4] block: add the block queue support

2011-08-08 Thread Zhi Yong Wu
The patch introduce one block queue for QEMU block layer. Signed-off-by: Zhi Yong Wu --- block/blk-queue.c | 141 + block/blk-queue.h | 73 +++ 2 files changed, 214 insertions(+), 0 deletions(-) create mode 100644 bl

[PATCH v5 1/4] block: add the command line support

2011-08-08 Thread Zhi Yong Wu
Signed-off-by: Zhi Yong Wu --- Makefile.objs |2 +- blockdev.c | 39 +++ qemu-config.c | 24 qemu-option.c | 17 + qemu-option.h |1 + qemu-options.hx |1 + 6 files changed, 83 insertions(+

[PATCH v5 0/4] The intro of QEMU block I/O throttling

2011-08-08 Thread Zhi Yong Wu
The main goal of the patch is to effectively cap the disk I/O speed or counts of one single VM.It is only one draft, so it unavoidably has some drawbacks, if you catch them, please let me know. The patch will mainly introduce one block I/O throttling algorithm, one timer and one block queue for

kon...@kernel.org

2011-08-08 Thread Zrwci
msa.hinet.net 123.223.195.63<>

Re: [RFC] postcopy livemigration proposal

2011-08-08 Thread Isaku Yamahata
On Mon, Aug 08, 2011 at 03:38:54PM +0300, Avi Kivity 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 t

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

2011-08-08 Thread Isaku Yamahata
On Mon, Aug 08, 2011 at 10:47:09PM +0300, Dor Laor wrote: > On 08/08/2011 06:59 PM, Anthony Liguori wrote: >> 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

coding standards for kvm tools?

2011-08-08 Thread David Evensky
Is that a pointer to the coding standards used for the kvm tools? Thanks, \dae -- 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 http://vger.kernel.org/majordomo-info.html

[PATCH v4 10/10] ARM: KVM: Guest wait-for-interrupts (WFI) support

2011-08-08 Thread Christoffer Dall
When the guest executes a WFI instruction the operation is trapped to KVM, which emulates the instruction in software. There is no correlation between a guest executing a WFI instruction and actually puttin the hardware into a low-power mode, since a KVM guest is essentially a process and the WFI i

[PATCH v4 09/10] ARM: KVM: Handle I/O aborts

2011-08-08 Thread Christoffer Dall
When the guest accesses I/O memory this will create data abort exceptions and they are handled by decoding the HSR information (physical address, read/write, length, register) and forwarding reads and writes to QEMU which performs the device emulation. Certain classes of load/store operations do n

[PATCH v4 08/10] ARM: KVM: Handle guest faults in KVM

2011-08-08 Thread Christoffer Dall
Handles the guest faults in KVM by mapping in corresponding user pages in the 2nd stage page tables. Introduces new ARM-specific kernel memory types, PAGE_KVM_GUEST and pgprot_guest variables used to map 2nd stage memory for KVM guests. Signed-off-by: Christoffer Dall --- arch/arm/include/asm/p

[PATCH v4 07/10] ARM: KVM: Emulation framework and CP15 emulation

2011-08-08 Thread Christoffer Dall
Adds a new important function in the main KVM/ARM code called handle_exit() which is called from kvm_arch_vcpu_ioctl_run() on returns from guest execution. This function examines the Hyp-Syndrome-Register (HSR), which contains information telling KVM what caused the exit from the guest. Some of th

[PATCH v4 06/10] ARM: KVM: World-switch implementation

2011-08-08 Thread Christoffer Dall
Provides complete world-switch implementation to switch to other guests runinng in non-secure modes. Includes Hyp exception handlers that captures necessary exception information and stores the information on the VCPU and KVM structures. Switching to Hyp mode is done through a simple HVC instructi

[PATCH v4 05/10] ARM: KVM: Inject IRQs and FIQs from userspace

2011-08-08 Thread Christoffer Dall
Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioctl. This ioctl is used since the sematics are in fact two lines that can be either raised or lowered on the VCPU - the IRQ and FIQ lines. KVM needs to know which VCPU it must operate on and whether the FIQ or IRQ line is raised/lowe

[PATCH v4 04/10] ARM: KVM: Memory virtualization setup

2011-08-08 Thread Christoffer Dall
This commit introduces the framework for guest memory management through the use of 2nd stage translation. Each VM has a pointer to a level-1 tabled (the pgd field in struct kvm_arch) which is used for the 2nd stage translations. Entries are added when handling guest faults (later patch) and the ta

[PATCH v4 03/10] ARM: KVM: Add hypervisor inititalization

2011-08-08 Thread Christoffer Dall
Sets up the required registers to run code in HYP-mode from the kernel. No major controversies, but we should consider how to deal with SMP support for hypervisor stack page. By setting the HVBAR the kernel can execute code in Hyp-mode with the MMU disabled. The HVBAR initially points to initializ

[PATCH v4 02/10] ARM: KVM: Hypervisor identity mapping

2011-08-08 Thread Christoffer Dall
Adds support in the identity mapping feature that allows KVM to setup identity mapping for the Hyp mode with the AP[1] bit set as required by the specification and also supports freeing created sub pmd's after finished use. These two functions: - hyp_identity_mapping_add(pgd, addr, end); - hyp_i

[PATCH v4 01/10] ARM: KVM: Initial skeleton to compile KVM support

2011-08-08 Thread Christoffer Dall
Targets KVM support for Cortex A-15 processors. Contains no real functionality but all the framework components, make files, header files and some tracing functionality. Most functionality is in arch/arm/kvm/* or arch/arm/include/asm/kvm_*.h. Signed-off-by: Christoffer Dall --- arch/arm/Kconfi

[PATCH v4 00/10] KVM/ARM Implementation

2011-08-08 Thread Christoffer Dall
The following series implements KVM support for ARM processors, specifically on the Cortex A-15 platform. The patch series applies to the arm-lpae branch of ARM Ltd's kernel tree. This is Version 4 of the patch series, but the first two versions were reviewed outside of the KVM mailing list. Chang

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

2011-08-08 Thread Anthony Liguori
On 08/08/2011 04:40 AM, Yaniv Kaul wrote: On 08/08/2011 12:20, Dor Laor wrote: On 08/08/2011 06:24 AM, Isaku Yamahata wrote: Design/Implementation = The basic idea of postcopy livemigration is to use a sort of distributed shared memory between the migration source and dest

Re: [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue

2011-08-08 Thread Anthony Liguori
On 08/05/2011 03:55 PM, Marcelo Tosatti wrote: The following changes since commit 35d7ace74bd07e3d6983c1fd7cbfab4e11175689: qcow2: Fix L1 table size after bdrv_snapshot_goto (2011-08-05 07:15:47 -0500) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.

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

2011-08-08 Thread Dor Laor
On 08/08/2011 06:59 PM, Anthony Liguori wrote: 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 page

Re: KVM cpu limitations

2011-08-08 Thread John Paul Walters
On Jul 21, 2011, at 2:10 AM, Avi Kivity wrote: > On 07/21/2011 02:20 AM, John Paul Walters wrote: >> Hi, >> >> We have a 256 core SGI Ultraviolet machine running RHEL 6.1 with qemu-kvm >> 0.13, and we'd like to be able to start large guest VMs of up to 256 cores. >> I see that x86 guests are

Re: [PATCH v3] pci: correct pci config size default for cap version 2 endpoints

2011-08-08 Thread Chris Wright
* Don Dutile (ddut...@redhat.com) wrote: > On 07/24/2011 06:58 AM, Michael S. Tsirkin wrote: > >On Sun, Jul 24, 2011 at 11:41:10AM +0300, Michael S. Tsirkin wrote: > >>On Sun, Jul 24, 2011 at 11:12:44AM +0300, Michael S. Tsirkin wrote: > >>>On Fri, Jul 22, 2011 at 02:35:47PM -0700, Chris Wright wro

Re: [Qemu-devel] [PATCH 09/24] omap_gpmc/nseries/tusb6010: convert to memory API

2011-08-08 Thread Peter Maydell
On 8 August 2011 18:06, Avi Kivity wrote: > Somewhat clumsy since it needs a variable sized region. > @@ -119,7 +120,7 @@ void omap_sdrc_reset(struct omap_sdrc_s *s); >  struct omap_gpmc_s; >  struct omap_gpmc_s *omap_gpmc_init(target_phys_addr_t base, qemu_irq irq); >  void omap_gpmc_reset(struc

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

2011-08-08 Thread Badari Pulavarty
On 8/8/2011 12:31 AM, Liu Yuan wrote: 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

[PATCH 13/24] ppc4xx_sdram: convert to memory API

2011-08-08 Thread Avi Kivity
Clumsy due to the lack of clipping support, needed for changing exposed ram size. Signed-off-by: Avi Kivity --- hw/ppc405.h|9 ++--- hw/ppc405_boards.c | 18 +- hw/ppc405_uc.c | 12 hw/ppc440.c|7 +-- hw/ppc4xx.h|2

[PATCH 00/24] Memory API batch 4: more conversions

2011-08-08 Thread Avi Kivity
This patchset converts a few more devices (and boards) to the memory API. Nothing is really interesting except for the last patch, which brings proper PAM support (and better SMRAM emulation). It should also fix the regressions that were reported in some non-default pc configurations. The patchse

[PATCH 05/24] arm_timer: convert to memory API

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/arm_timer.c | 55 --- 1 files changed, 20 insertions(+), 35 deletions(-) diff --git a/hw/arm_timer.c b/hw/arm_timer.c index fd9448f..457736b 100644 --- a/hw/arm_timer.c +++ b/hw/arm_timer.c @@ -176,6 +176,7 @@

[PATCH 22/24] pci: add pci_address_space()

2011-08-08 Thread Avi Kivity
Returns the PCI address space. Useful for bridges that can obscure part of the PCI address space. 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/pci.c index dc7271a..4e495b4 100644 --- a/hw/pci

[PATCH 20/24] sysbus: remove sysbus_init_mmio_cb()

2011-08-08 Thread Avi Kivity
This problem with this function is that it is not reversible - it is impossible to know where things are registered and unregister them exactly. As there are no more users, we can remove it. Signed-off-by: Avi Kivity --- hw/sysbus.c | 12 hw/sysbus.h |2 -- 2 files changed, 0

[PATCH 01/24] apb_pci: convert to memory API

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/apb_pci.c | 84 + 1 files changed, 37 insertions(+), 47 deletions(-) diff --git a/hw/apb_pci.c b/hw/apb_pci.c index 1638226..6ee2068 100644 --- a/hw/apb_pci.c +++ b/hw/apb_pci.c @@ -31,7 +31,6 @@ #include

[PATCH 06/24] armv7m: convert to memory API

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/armv7m.c | 24 ++-- 1 files changed, 10 insertions(+), 14 deletions(-) diff --git a/hw/armv7m.c b/hw/armv7m.c index 83f3393..a932f16 100644 --- a/hw/armv7m.c +++ b/hw/armv7m.c @@ -106,31 +106,27 @@ static void bitband_writel(void *opaque, t

[PATCH 21/24] isa: add isa_address_space()

2011-08-08 Thread Avi Kivity
A helper that returns the address space used by ISA devices. Useful for getting rid of isa_mem_base, multiple ISA buses, or ISA buses behind bridges. Signed-off-by: Avi Kivity --- hw/isa-bus.c |6 ++ hw/isa.h |1 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/h

[PATCH 19/24] ppce500_pci: convert to sysbus_init_mmio_cb2()

2011-08-08 Thread Avi Kivity
Not a huge step forward, but at least we now have a 1:1 relationship between registration and unregistration. Signed-off-by: Avi Kivity --- hw/ppce500_pci.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c index 6a9f979..439

[PATCH 11/24] pcie_host: convert to memory API

2011-08-08 Thread Avi Kivity
Assuming that mmcfg size cannot change at runtime. Signed-off-by: Avi Kivity --- hw/pcie_host.c | 98 ++- hw/pcie_host.h | 12 +++--- 2 files changed, 31 insertions(+), 79 deletions(-) diff --git a/hw/pcie_host.c b/hw/pcie_host.c index f9f

[PATCH 02/24] apic: convert to memory API

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/apic.c | 25 ++--- 1 files changed, 10 insertions(+), 15 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 9febf40..7d0b0f6 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -80,6 +80,7 @@ typedef struct APICState APICState; struct APICState

[PATCH 23/24] vga: drop get_system_memory() from vga devices and derivatives

2011-08-08 Thread Avi Kivity
Instead, use the bus accessors, or get the address space directly from the board constructor. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 12 ++-- hw/mips_jazz.c |3 ++- hw/pc.c |3 ++- hw/pc.h |5 +++-- hw/qxl.c|2 +- hw/vga-isa-mm.c | 15

[PATCH 24/24] 440fx: fix PAM, PCI holes

2011-08-08 Thread Avi Kivity
The current implementation of PAM and the PCI holes is broken in several ways: - PCI BARs are not restricted to the PCI hole (a BAR may hide memory) - PCI devices do not respect PAM (if a PCI device maps a region while PAM maps the region to RAM, the request will be honored) This patch fi

[PATCH 12/24] ppc405_uc: convert to memory API

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/ppc405_uc.c | 116 --- 1 files changed, 51 insertions(+), 65 deletions(-) diff --git a/hw/ppc405_uc.c b/hw/ppc405_uc.c index 06a053b..9caece0 100644 --- a/hw/ppc405_uc.c +++ b/hw/ppc405_uc.c @@ -28,6 +28,7 @@

[PATCH 17/24] arm11mpcore: use sysbus_init_mmio_cb2

2011-08-08 Thread Avi Kivity
This tells the sysbus code it need not use IO_MEM_UNASSIGNED. Signed-off-by: Avi Kivity --- hw/arm11mpcore.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/hw/arm11mpcore.c b/hw/arm11mpcore.c index b47707f..7d60ef6 100644 --- a/hw/arm11mpcore.c +++ b/hw/arm11mpcor

[PATCH 10/24] onenand: convert to memory API

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/onenand.c | 69 +++-- 1 files changed, 37 insertions(+), 32 deletions(-) diff --git a/hw/onenand.c b/hw/onenand.c index b0cbebc..5b2f01e 100644 --- a/hw/onenand.c +++ b/hw/onenand.c @@ -23,6 +23,8 @@ #include

[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 --- hw/omap.h |3 ++- hw/omap_gpmc.c | 53 + hw/tusb6010.c | 30 +- hw/tusb6010.h |7 +-- 4 files changed, 49 i

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

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity --- 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 PCI_MAPPING_ENTRY(r

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

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity --- 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 +++ b/hw/versatile_pci.c @@

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

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity --- 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 @@ typedef struct {

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

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity --- 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 @@ -69,7 +69,7 @@ ty

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

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity --- 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 deletions(-) diff --

[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 --- hw/sysbus.c | 15 +++ hw/sysbus.h |3 +++ 2 files changed, 18 inser

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

2011-08-08 Thread Avi Kivity
Signed-off-by: Avi Kivity --- 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 +33,16 @@ typedef str

[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 --- 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 b/hw/devices.h index c

[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 3/3] memory: correct documentation typos

2011-08-08 Thread Avi Kivity
Noted by Drew Jones. Signed-off-by: Avi Kivity --- 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 memory model provid

[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 --- memory.c | 46 -- memory.h | 34 ++ 2 files changed, 78 insertions(+),

[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 --- 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 memory_region_transaction_commit(voi

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 handl

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

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 non

[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 Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- v4.1: drop unused variable hw/virtio-pci.c | 70 -- hw/virtio-pci.h |2 +- 2 files changed, 27 insertions(+), 45

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:

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 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 Kivity Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- memory.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/memory.h b/memory.h index 4e5

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 i

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_

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 > > > Just call sched_getaffinity at program start, save to a global

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

2011-08-08 Thread Frediano Ziglio
2011/8/8 Avi Kivity : > On 08/08/2011 03:49 PM, Frediano Ziglio wrote: >> >> 2011/8/8 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

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

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

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 nam

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 uns

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

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

[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 Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 79 +++--- 1 files changed, 11 in

[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 Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- hw/vmware_vga.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw

[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 Signed-off-by: Avi Kivity --- exec-memory.h |5 + exec.c| 10 ++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/exec-memory.h b/exec-memory.h index c439aba..334219f 1006

[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 Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 78 +- 1 files changed, 8 insertions(+), 70 deletions(-) d

[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 Reviewed-by: Anthony Liguori 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

[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 Reviewed-by: Anthony Liguori 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

[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 Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- hw/cirrus_vga.c |4 +- hw/

[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 Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 74 ++- 1 files changed, 8 in

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

[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 Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 81 +-- 1 files changed, 13 i

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

2011-08-08 Thread Avi Kivity
fixes BAR sizing as well. Reviewed-by: Richard Henderson Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- hw/ac97.c | 89 +++- 1 files changed, 52 insertions(+), 37 deletions(-) diff --git a/hw/ac97.c b/hw/ac97.c index 0b5989

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

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- hw/es1370.c | 43 +-- 1 files changed, 25 insertions(+), 18 deletions(-) diff --git a/hw/es1370.c b/hw/es1370.c index 1ed62b7..4e43c4a 100644 --- a/hw/es1370.c ++

[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 Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- hw/eepro100.c | 182 ---

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

2011-08-08 Thread Avi Kivity
Also add missing destructor. Reviewed-by: Richard Henderson Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- hw/wdt_i6300esb.c | 43 +-- 1 files changed, 29 insertions(+), 14 deletions(-) diff --git a/hw/wdt_i6300esb.c b/hw/wdt_i6300esb.c in

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

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

2011-08-08 Thread Avi Kivity
Also related chips. Reviewed-by: Richard Henderson Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- hw/lance.c | 31 ++- hw/pcnet-pci.c | 74 +-- hw/pcnet.h |4 ++- 3 files changed, 61 insertions(

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

2011-08-08 Thread Avi Kivity
excluding msix. Reviewed-by: Richard Henderson Reviewed-by: Anthony Liguori 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..

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

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- hw/isa.h |2 ++ hw/isa_mmio.c | 29 ++--- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/hw/isa.h b/hw/isa.h index d2b6126..f1f2181 100644 --- a/hw/isa.

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

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson Reviewed-by: Anthony Liguori 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| 6

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

2011-08-08 Thread Avi Kivity
Reviewed-by: Richard Henderson Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity --- hw/usb-uhci.c | 42 -- 1 files changed, 28 insertions(+), 14 deletions(-) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 824e3a5..ea38169 100644 --- a/hw/usb-uh

  1   2   >