Re: [AMD iommu] pci Failed to assign device hostdev0 : Device or resource busy

2011-12-12 Thread Don Dutile
On 12/12/2011 06:15 AM, Andreas Hartmann wrote: Hello! I've got a few questions to a problem, which already was analyzed here sometime ago: http://markmail.org/message/dspovwvzp3wtdrf6#query:+page:1+mid:i2oph4xwfmiknt3y+state:results My situation is a bit different. I do have two PCI cards (a

Re: [Android-virt] [PATCH v5 10/13] ARM: KVM: Guest wait-for-interrupts (WFI) support

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 12:44 PM, Avi Kivity a...@redhat.com wrote: On 12/12/2011 06:20 PM, Christoffer Dall wrote: +/** + * kvm_handle_wfi - handle a wait-for-interrupts instruction executed by a guest + * @vcpu:    the vcpu pointer + * @run:     the kvm_run structure pointer + *

Re: [Android-virt] [PATCH v5 11/13] ARM: KVM: Support SMP hosts

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 12:56 PM, Avi Kivity a...@redhat.com wrote: On 12/12/2011 07:37 PM, Christoffer Dall wrote: This looks overly complicated with two levels of locks.  x86 gets by with no locks, and a much more complicated interrupt architecture. My recommendation is:  

Re: [PATCH v5 12/13] ARM: KVM: Fix guest view of MPIDR

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 12:44 PM, Marc Zyngier marc.zyng...@arm.com wrote: On 12/12/11 17:39, Christoffer Dall wrote: On Mon, Dec 12, 2011 at 9:32 AM, Avi Kivity a...@redhat.com wrote: On 12/11/2011 12:25 PM, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com A guest may need to

Re: [PATCH v5 08/13] ARM: KVM: Handle guest faults in KVM

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 10:05 AM, Avi Kivity a...@redhat.com wrote: On 12/11/2011 12:25 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu Handles the guest faults in KVM by mapping in corresponding user pages in the 2nd stage page tables. Introduces new ARM-specific

Re: [PATCH 2/2] kvm tools: Add ability to assert/deassert IRQs using 'kvm debug'

2011-12-12 Thread Pekka Enberg
On Mon, 2011-12-12 at 11:19 +0200, Sasha Levin wrote: Add options to assert and deassert IRQs using 'kvm debug'. For example, to assert IRQ4 in guest 'my_instance': vm debug -n my_instance --assert_irq 4 Signed-off-by: Sasha Levin levinsasha...@gmail.com Why is this useful? How does

[PATCH] KVM: PPC: e500: include linux/export.h

2011-12-12 Thread Scott Wood
This is required for THIS_MODULE. We recently stopped acquiring it via some other header. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/kvm/e500.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c

[PATCH v3 01/14] KVM: PPC: Make wakeups work again for Book3S HV guests

2011-12-12 Thread Paul Mackerras
When commit f43fdc15fa (KVM: PPC: booke: Improve timer register emulation) factored out some code in arch/powerpc/kvm/powerpc.c into a new helper function, kvm_vcpu_kick(), an error crept in which causes Book3s HV guest vcpus to stall. This fixes it. On POWER7 machines, guest vcpus are grouped

[PATCH v3 02/14] KVM: PPC: Move kvm_vcpu_ioctl_[gs]et_one_reg down to platform-specific code

2011-12-12 Thread Paul Mackerras
This moves the get/set_one_reg implementation down from powerpc.c into booke.c, book3s_pr.c and book3s_hv.c. This avoids #ifdefs in C code, but more importantly, it fixes a bug on Book3s HV where we were accessing beyond the end of the kvm_vcpu struct (via the to_book3s() macro) and corrupting

[PATCH v3 08/14] KVM: PPC: Allow use of small pages to back Book3S HV guests

2011-12-12 Thread Paul Mackerras
This relaxes the requirement that the guest memory be provided as 16MB huge pages, allowing it to be provided as normal memory, i.e. in pages of PAGE_SIZE bytes (4k or 64k). To allow this, we index the kvm-arch.slot_phys[] arrays with a small page index, even if huge pages are being used, and use

[PATCH v3 04/14] KVM: PPC: Keep page physical addresses in per-slot arrays

2011-12-12 Thread Paul Mackerras
This allocates an array for each memory slot that is added to store the physical addresses of the pages in the slot. This array is vmalloc'd and accessed in kvmppc_h_enter using real_vmalloc_addr(). This allows us to remove the ram_pginfo field from the kvm_arch struct, and removes the 64GB guest

[PATCH v3 14/14] KVM: PPC: Allow for read-only pages backing a Book3S HV guest

2011-12-12 Thread Paul Mackerras
With this, if a guest does an H_ENTER with a read/write HPTE on a page which is currently read-only, we make the actual HPTE inserted be a read-only version of the HPTE. We now intercept protection faults as well as HPTE not found faults, and for a protection fault we work out whether it should

[PATCH v3 06/14] KVM: PPC: Make the H_ENTER hcall more reliable

2011-12-12 Thread Paul Mackerras
At present, our implementation of H_ENTER only makes one try at locking each slot that it looks at, and doesn't even retry the ldarx/stdcx. atomic update sequence that it uses to attempt to lock the slot. Thus it can return the H_PTEG_FULL error unnecessarily, particularly when the H_EXACT flag

[PATCH v3 11/14] KVM: PPC: Implement MMIO emulation support for Book3S HV guests

2011-12-12 Thread Paul Mackerras
This provides the low-level support for MMIO emulation in Book3S HV guests. When the guest tries to map a page which is not covered by any memslot, that page is taken to be an MMIO emulation page. Instead of inserting a valid HPTE, we insert an HPTE that has the valid bit clear but another

[PATCH v3 07/14] KVM: PPC: Only get pages when actually needed, not in prepare_memory_region()

2011-12-12 Thread Paul Mackerras
This removes the code from kvmppc_core_prepare_memory_region() that looked up the VMA for the region being added and called hva_to_page to get the pfns for the memory. We have no guarantee that there will be anything mapped there at the time of the KVM_SET_USER_MEMORY_REGION ioctl call; userspace

[PATCH v3 05/14] KVM: PPC: Add an interface for pinning guest pages in Book3s HV guests

2011-12-12 Thread Paul Mackerras
This adds two new functions, kvmppc_pin_guest_page() and kvmppc_unpin_guest_page(), and uses them to pin the guest pages where the guest has registered areas of memory for the hypervisor to update, (i.e. the per-cpu virtual processor areas, SLB shadow buffers and dispatch trace logs) and then

[PATCH v3 09/14] KVM: PPC: Allow I/O mappings in memory slots

2011-12-12 Thread Paul Mackerras
This provides for the case where userspace maps an I/O device into the address range of a memory slot using a VM_PFNMAP mapping. In that case, we work out the pfn from vma-vm_pgoff, and record the cache enable bits from vma-vm_page_prot in two low-order bits in the slot_phys array entries. Then,

[PATCH v3 12/14] KVM: Add barriers to allow mmu_notifier_retry to be used locklessly

2011-12-12 Thread Paul Mackerras
This adds an smp_wmb in kvm_mmu_notifier_invalidate_range_end() and an smp_rmb in mmu_notifier_retry() so that mmu_notifier_retry() will give the correct answer when called without kvm-mmu_lock being held. PowerPC Book3S HV KVM wants to use a bitlock per guest page rather than a single global

[PATCH v3 03/14] KVM: PPC: Keep a record of HV guest view of hashed page table entries

2011-12-12 Thread Paul Mackerras
This adds an array that parallels the guest hashed page table (HPT), that is, it has one entry per HPTE, used to store the guest's view of the second doubleword of the corresponding HPTE. The first doubleword in the HPTE is the same as the guest's idea of it, so we don't need to store a copy, but

[PATCH v3 00/14] KVM: PPC: Update Book3S HV memory handling

2011-12-12 Thread Paul Mackerras
This series of patches updates the Book3S-HV KVM code that manages the guest hashed page table (HPT) to enable several things: * MMIO emulation and MMIO pass-through * Use of small pages (4kB or 64kB, depending on config) to back the guest memory * Pageable guest memory - i.e. backing pages

[PATCH v3 10/14] KVM: PPC: Maintain a doubly-linked list of guest HPTEs for each gfn

2011-12-12 Thread Paul Mackerras
This expands the reverse mapping array to contain two links for each HPTE which are used to link together HPTEs that correspond to the same guest logical page. Each circular list of HPTEs is pointed to by the rmap array entry for the guest logical page, pointed to by the relevant memslot. Links

[PATCH v3 13/14] KVM: PPC: Implement MMU notifiers for Book3S HV guests

2011-12-12 Thread Paul Mackerras
This adds the infrastructure to enable us to page out pages underneath a Book3S HV guest, on processors that support virtualized partition memory, that is, POWER7. Instead of pinning all the guest's pages, we now look in the host userspace Linux page tables to find the mapping for a given guest

KVM call agenda for Tuesday 13

2011-12-12 Thread Juan Quintela
Hi Please send in any agenda items you are interested in covering. Thanks, Juan. -- 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

Re: [Qemu-devel] KVM call agenda for Tuesday 13

2011-12-12 Thread Anthony Liguori
On 12/12/2011 05:16 PM, Juan Quintela wrote: Hi Please send in any agenda items you are interested in covering. - QOM merge plan I'd also like to do a code walk through of QOM at the first call of the new year. Regards, Anthony Liguori Thanks, Juan. -- To unsubscribe from this

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-12-12 Thread Amos Kong
On 12/12/2011 01:12 PM, Rusty Russell wrote: On Mon, 12 Dec 2011 11:06:53 +0800, Amos Kong ak...@redhat.com wrote: On 12/12/11 06:27, Benjamin Herrenschmidt wrote: On Sun, 2011-12-11 at 14:25 +0200, Michael S. Tsirkin wrote: Forwarding some results by Amos, who run multiple netperf streams in

Re: [AMD iommu] pci Failed to assign device hostdev0 : Device or resource busy

2011-12-12 Thread Andreas Hartmann
Am Mon, 12 Dec 2011 13:36:36 -0500 schrieb Don Dutile ddut...@redhat.com: On 12/12/2011 06:15 AM, Andreas Hartmann wrote: Hello! I've got a few questions to a problem, which already was analyzed here sometime ago:

What does LP stands for?

2011-12-12 Thread Zhen-Hua Li
Hi all, I saw a line from some document: KVM  supports 4096 LPs ,What does LP stands for? Thanks -- 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

[Qemu-devel] [PATCH v3 0/3] ivshmem: add a new PIO BAR4(Doorbell) besides MMIO BAR0 to reduce notification time

2011-12-12 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com This patch series, adds a PIO BAR4 for guest notifying qemu. And the new notification way of PIO BAR4 reduces 30% time in comparison with the original MMIO BAR0 way. Meantime, this patch adds a memory API named kvm_set_ioeventfd_pio_long which is about

[Qemu-devel] [PATCH v3 2/3] ivshmem: add a new PIO BAR4(Doorbell) to reduce notification time

2011-12-12 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com This patch adds a PIO BAR4 for guest notifying qemu to reduce notification time. And the new notification way of PIO BAR4 reduces 30% time in comparison with the original MMIO BAR0 way. Also, this patch introduces a new feature named IVSHMEM_PIO_NOTIFY

[Qemu-devel] [PATCH v3 3/3] ivshmem: update the spec

2011-12-12 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com Signed-off-by: Hongyong Zang zanghongy...@huawei.com --- docs/specs/ivshmem_device_spec.txt |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/specs/ivshmem_device_spec.txt b/docs/specs/ivshmem_device_spec.txt index

[Qemu-devel] [PATCH v3 1/3] memory: add a memory API about ioeventfd for PIO long

2011-12-12 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com The new memory API, named kvm_set_ioeventfd_pio_long, is about ioeventfd for PIO long. Signed-off-by: Hongyong Zang zanghongy...@huawei.com --- kvm-all.c | 23 +++ kvm-stub.c |5 + kvm.h |1 + memory.c | 20

Re: [RFC PATCH] kvm tools, qcow: Add support for growing refcount blocks

2011-12-12 Thread lan,Tianyu
Thanks for your review. On 一, 2011-12-12 at 17:55 +0800, Kevin Wolf wrote: Am 12.12.2011 03:03, schrieb Lan Tianyu: This patch enables allocating new refcount blocks and so then kvm tools could expand qcow2 image much larger. Signed-off-by: Lan Tianyu tianyu@intel.com ---

Re: [RFC PATCH] kvm tools, qcow: Add support for growing refcount blocks

2011-12-12 Thread lan,Tianyu
On 一, 2011-12-12 at 18:58 +0800, Pekka Enberg wrote: On Mon, 12 Dec 2011, Kevin Wolf wrote: @@ -667,14 +722,11 @@ static struct qcow_refcount_block *qcow_read_refcount_block(struct qcow *q, u64 rft_idx = clust_idx (header-cluster_bits - QCOW_REFCOUNT_BLOCK_SHIFT); if (rft_idx

Re: [RFC PATCH] kvm tools, qcow: Add support for growing refcount blocks

2011-12-12 Thread lan,Tianyu
On 一, 2011-12-12 at 19:15 +0800, Kevin Wolf wrote: Am 12.12.2011 11:58, schrieb Pekka Enberg: On Mon, 12 Dec 2011, Kevin Wolf wrote: @@ -667,14 +722,11 @@ static struct qcow_refcount_block *qcow_read_refcount_block(struct qcow *q, u64 rft_idx = clust_idx (header-cluster_bits -

Re: [PATCH 2/2] kvm tools: Add ability to assert/deassert IRQs using 'kvm debug'

2011-12-12 Thread Sasha Levin
On Mon, 2011-12-12 at 23:33 +0200, Pekka Enberg wrote: On Mon, 2011-12-12 at 11:19 +0200, Sasha Levin wrote: Add options to assert and deassert IRQs using 'kvm debug'. For example, to assert IRQ4 in guest 'my_instance': vm debug -n my_instance --assert_irq 4 Signed-off-by: Sasha

[PATCH V3 0/2] kvm tools: Prepare kvmtool for another architecture

2011-12-12 Thread Matt Evans
The last remaining patches from the preparation series, with changes: - Map from hugetlbfs does plain statfs (without odd error checking), checks result of ftruncate() - Remove typo whereby kvm_cpu__emulate_mmio() calls self. Cheers, Matt Matt Evans (2): kvm tools: Add ability to map

[PATCH V3 1/2] kvm tools: Add ability to map guest RAM from hugetlbfs

2011-12-12 Thread Matt Evans
Add a --hugetlbfs commandline option to give a path to hugetlbfs-map guest memory (down in kvm__arch_init()). For x86, guest memory is a normal ANON mmap() if this option is not provided, otherwise a hugetlbfs mmap. This maps directly from a hugetlbfs temp file rather than using something like

[PATCH V3 2/2] kvm tools: Create arch-specific kvm_cpu__emulate_{mm}io()

2011-12-12 Thread Matt Evans
Different architectures will deal with MMIO exits differently. For example, KVM_EXIT_IO is x86-specific, and I/O cycles are often synthesised by steering into windows in PCI bridges on other architectures. This patch calls arch-specific kvm_cpu__emulate_io() and kvm_cpu__emulate_mmio() from the

Re: [PATCH V2 04/23] kvm tools: Get correct 64-bit types on PPC64 and link appropriately

2011-12-12 Thread Matt Evans
Hi Pekka, On 09/12/11 17:53, Matt Evans wrote: kvmtool's types.h includes asm/types.h, which by default on PPC64 brings in int-l64.h; define __SANE_USERSPACE_TYPES__ to get LL64 types. This patch also adds CFLAGS to the final link, so that any -m64 is obeyed when linking, too. Just noticed

Re: [PATCH] kvm tools: mmap guest kernel instead of reading it into memory

2011-12-12 Thread Sasha Levin
On Mon, 2011-12-12 at 20:10 +0200, Avi Kivity wrote: On 12/12/2011 04:47 PM, Sasha Levin wrote: This patch mmaps guest kernel into it's own memory slot instead of reading it into the memory. - } else { - /* First RAM range from zero to the PCI gap: */ + /*

[PATCH V2 0/2] kvm tools: PPC64 basic support

2011-12-12 Thread Matt Evans
These two patches build on the previous split out arch-specific work. The first adds a PPC64 build, basic CPU support, guest RAM mapping (using hugepages), flat kernel loading and all required arch-specific definitions structures. With patches to date, this should build PPC but not necessarily

[PATCH V2 2/2] kvm tools: Make virtio-pci's ioeventfd__add_event() fall back gracefully if ioeventfds unavailable

2011-12-12 Thread Matt Evans
Some KVM implementations (e.g. PPC) don't yet support ioeventfds, so don't bomb out/die. virtio-pci is able to function if it instead uses normal IO port notification. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/Makefile|2 +- tools/kvm/include/kvm/ioeventfd.h |

[PATCH V2 1/2] kvm tools: Add initial SPAPR PPC64 architecture support

2011-12-12 Thread Matt Evans
This patch adds a new arch directory, powerpc, basic file structure, register setup and where necessary stubs out arch-specific functions (e.g. interrupts, runloop exits) that later patches will provide. The target is an SPAPR-compliant PPC64 machine (i.e. pSeries); there is no support for PPC32

[PATCH V2 0/6] Add initial SPAPR PPC64 architecture support

2011-12-12 Thread Matt Evans
This series adds support for a PPC64 platform, SPAPR, on top of the previous more general PPC64 CPU support. This platform is paravirtualised, with most of the MMU hypercalls being dealt with in the kernel. Userland needs to describe the environment to the machine with a device tree, cope with

[PATCH V2 1/6] kvm tools: Generate SPAPR PPC64 guest device tree

2011-12-12 Thread Matt Evans
The generated DT is the bare minimum structure required for SPAPR (on which subsequent patches for VIO, XICS, PCI etc. will build); root node, cpus, memory. Some aspects are currently hardwired for simplicity, for example advertised page sizes, HPT size, SLB size, VMX/DFP, etc. Future support of

[PATCH V2 2/6] kvm tools: Add SPAPR PPC64 hcall rtascall structure

2011-12-12 Thread Matt Evans
This patch adds the basic structure for HV calls, their registration and some of the simpler calls. A similar layout for RTAS calls is also added, again with some of the simpler RTAS calls used by the guest. The SPAPR RTAS stub is generated inline. Also, nodes for RTAS are added to the device

[PATCH V2 6/6] kvm tools: Add PPC64 kvm_cpu__emulate_io()

2011-12-12 Thread Matt Evans
This is the final piece of the puzzle for PPC SPAPR PCI; this function splits MMIO accesses into the two PHB windows directs things to MMIO/IO emulation as appropriate. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/Makefile |1 +

[PATCH V2 5/6] kvm tools: Add PPC64 PCI Host Bridge

2011-12-12 Thread Matt Evans
This provides the PCI bridge, definitions for the address layout of the windows and wires in IRQs. Once PCI devices are all registered, they are enumerated and DT nodes generated for each. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/powerpc/include/kvm/kvm-arch.h |3 +

[PATCH V2 4/6] kvm tools: Add PPC64 XICS interrupt controller support

2011-12-12 Thread Matt Evans
This patch adds XICS emulation code (heavily borrowed from QEMU), and wires this into kvm_cpu__irq() to fire a CPU IRQ via KVM. A device tree entry is also added. IPIs work, xics_alloc_irqnum() is added to allocate an external IRQ (which will later be used by the PHB PCI code) and finally,

[PATCH V2 3/6] kvm tools: Add SPAPR PPC64 HV console

2011-12-12 Thread Matt Evans
This adds the console code, plus VIO HV terminal nodes are added to the device tree so the guest kernel will pick it up. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/Makefile |1 + tools/kvm/powerpc/kvm.c | 33 tools/kvm/powerpc/spapr_hvcons.c

Re: [PATCH V2 1/2] kvm tools: Add initial SPAPR PPC64 architecture support

2011-12-12 Thread Pekka Enberg
On Tue, Dec 13, 2011 at 9:00 AM, Matt Evans m...@ozlabs.org wrote: This patch adds a new arch directory, powerpc, basic file structure, register setup and where necessary stubs out arch-specific functions (e.g. interrupts, runloop exits) that later patches will provide.  The target is an

Re: [patch 01/12] [PATCH] kvm-s390: add parameter for KVM_CREATE_VM

2011-12-12 Thread Avi Kivity
On 12/10/2011 02:35 PM, Carsten Otte wrote: This patch introduces a new config option for user controlled kernel virtual machines. It introduces an optional parameter to KVM_CREATE_VM in order to create a user controlled virtual machine. The parameter is passed to kvm_arch_init_vm for all

Re: [patch 00/12] Ucontrol patchset V5

2011-12-12 Thread Avi Kivity
On 12/10/2011 02:35 PM, Carsten Otte wrote: Hi Avi, Hi Marcelo, this iteration of the patchset has two changes: - Handling of null PTEs is fixed (thanks Heiko) - Typo in comment is fixed (thanks Joachim) Please add links to the documentation of the SIE thingie. -- error compiling

Re: [patch 04/12] [PATCH] kvm-s390-ucontrol: export SIE control block to user

2011-12-12 Thread Avi Kivity
On 12/10/2011 01:25 PM, Carsten Otte wrote: On 09.12.2011 17:06, Alexander Graf wrote: Same as this. It's an s390 specific hack, so it should be identified as such. Naming is fine either way with me. Sasha Levin and Avi seemed to prefer not to have _S390 in it. I've reconsidered and now

[PATCH 1/2] kvm tools: Clean up 'kvm debug'

2011-12-12 Thread Sasha Levin
Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-debug.c | 13 +++-- tools/kvm/builtin-run.c |7 --- tools/kvm/include/kvm/builtin-debug.h | 13 + 3 files changed, 20 insertions(+), 13 deletions(-) diff --git

[PATCH 2/2] kvm tools: Add ability to assert/deassert IRQs using 'kvm debug'

2011-12-12 Thread Sasha Levin
Add options to assert and deassert IRQs using 'kvm debug'. For example, to assert IRQ4 in guest 'my_instance': vm debug -n my_instance --assert_irq 4 Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-debug.c | 19 +++

Re: [patch 01/12] [PATCH] kvm-s390: add parameter for KVM_CREATE_VM

2011-12-12 Thread Carsten Otte
On 12.12.2011 10:13, Avi Kivity wrote: Old kernels don't expose KVM_VM_REGULAR, so if people follow the recommendations, their userspace won't build. Normal guests must be 0. We can pretend we planned this all along by making the argument a flags mask, and claiming bit 0 for UCONTROL. That's

Re: [patch 00/12] Ucontrol patchset V5

2011-12-12 Thread Carsten Otte
On 12.12.2011 10:15, Avi Kivity wrote: Please add links to the documentation of the SIE thingie. The format of the SIE control block is documented here: http://www.vm.ibm.com/pubs/cpdacb/SIEBK.HTML The native behavior of SSKE, ISKE and RRBE is documented in the Principles of Operation: for

Re: [patch 04/12] [PATCH] kvm-s390-ucontrol: export SIE control block to user

2011-12-12 Thread Carsten Otte
On 12.12.2011 10:17, Avi Kivity wrote: I've reconsidered and now want the s390 back. Sorry about that. git-filter-branch can make the sedding painless. So pain involved, I can operate sed s/old/new/g just fine ;-). Will change it for the next version. -- To unsubscribe from this list: send

Re: [patch 00/12] Ucontrol patchset V5

2011-12-12 Thread Avi Kivity
On 12/12/2011 11:44 AM, Carsten Otte wrote: On 12.12.2011 10:15, Avi Kivity wrote: Please add links to the documentation of the SIE thingie. The format of the SIE control block is documented here: http://www.vm.ibm.com/pubs/cpdacb/SIEBK.HTML The native behavior of SSKE, ISKE and RRBE is

Re: [patch 00/12] Ucontrol patchset V5

2011-12-12 Thread Carsten Otte
On 12.12.2011 10:49, Avi Kivity wrote: Do you have it in a tablet form factor? Never trust a machine you can lift :-). -- 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 PATCH] kvm tools, qcow: Add support for growing refcount blocks

2011-12-12 Thread Kevin Wolf
Am 12.12.2011 03:03, schrieb Lan Tianyu: This patch enables allocating new refcount blocks and so then kvm tools could expand qcow2 image much larger. Signed-off-by: Lan Tianyu tianyu@intel.com --- tools/kvm/disk/qcow.c | 105 +--- 1 files

Re: [patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-12 Thread Martin Schwidefsky
On Sat, 10 Dec 2011 13:35:39 +0100 Carsten Otte co...@de.ibm.com wrote: --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -393,6 +393,33 @@ out_unmap: } EXPORT_SYMBOL_GPL(gmap_map_segment); +static pmd_t *__pmdp_for_addr(struct mm_struct *mm, unsigned long addr) +{ +

Re: [RFC PATCH] kvm tools, qcow: Add support for growing refcount blocks

2011-12-12 Thread Pekka Enberg
On Mon, 12 Dec 2011, Kevin Wolf wrote: @@ -667,14 +722,11 @@ static struct qcow_refcount_block *qcow_read_refcount_block(struct qcow *q, u64 rft_idx = clust_idx (header-cluster_bits - QCOW_REFCOUNT_BLOCK_SHIFT); if (rft_idx = rft-rf_size) - return NULL; +

Re: [Android-virt] [PATCH v5 05/13] ARM: KVM: Inject IRQs and FIQs from userspace

2011-12-12 Thread Marc Zyngier
On 11/12/11 20:07, Christoffer Dall wrote: On Dec 11, 2011, at 2:48 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 11 December 2011 19:30, Christoffer Dall c.d...@virtualopensystems.com wrote: On Sun, Dec 11, 2011 at 11:03 AM, Peter Maydell peter.mayd...@linaro.org wrote: Removing

Re: [RFC PATCH] kvm tools, qcow: Add support for growing refcount blocks

2011-12-12 Thread Kevin Wolf
Am 12.12.2011 11:58, schrieb Pekka Enberg: On Mon, 12 Dec 2011, Kevin Wolf wrote: @@ -667,14 +722,11 @@ static struct qcow_refcount_block *qcow_read_refcount_block(struct qcow *q, u64 rft_idx = clust_idx (header-cluster_bits - QCOW_REFCOUNT_BLOCK_SHIFT); if (rft_idx =

Re: [RFC PATCH] kvm tools, qcow: Add support for growing refcount blocks

2011-12-12 Thread Kevin Wolf
Am 12.12.2011 12:15, schrieb Kevin Wolf: Am 12.12.2011 11:58, schrieb Pekka Enberg: On Mon, 12 Dec 2011, Kevin Wolf wrote: @@ -667,14 +722,11 @@ static struct qcow_refcount_block *qcow_read_refcount_block(struct qcow *q, u64 rft_idx = clust_idx (header-cluster_bits -

[AMD iommu] pci Failed to assign device hostdev0 : Device or resource busy

2011-12-12 Thread Andreas Hartmann
Hello! I've got a few questions to a problem, which already was analyzed here sometime ago: http://markmail.org/message/dspovwvzp3wtdrf6#query:+page:1+mid:i2oph4xwfmiknt3y+state:results My situation is a bit different. I do have two PCI cards (a Linksys wlan card and an intel e100 card). Each of

Re: [PATCH 0/10] nEPT: Nested EPT support for Nested VMX

2011-12-12 Thread Nadav Har'El
On Sun, Nov 13, 2011, Avi Kivity wrote about Re: [PATCH 0/10] nEPT: Nested EPT support for Nested VMX: I also believed that the fault injection part was also correct: I thought that the code already knows when to handle the fault in L2 (when the address is missing in cr3), in L1 (when the

Re: [Android-virt] [PATCH v5 05/13] ARM: KVM: Inject IRQs and FIQs from userspace

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 6:06 AM, Marc Zyngier marc.zyng...@arm.com wrote: On 11/12/11 20:07, Christoffer Dall wrote: On Dec 11, 2011, at 2:48 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 11 December 2011 19:30, Christoffer Dall c.d...@virtualopensystems.com wrote: On Sun, Dec 11,

Re: [PATCH v3] kvm: make vcpu life cycle separated from kvm instance

2011-12-12 Thread Gleb Natapov
On Mon, Dec 12, 2011 at 10:41:23AM +0800, Liu Ping Fan wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com Currently, vcpu can be destructed only when kvm instance destroyed. Change this to vcpu's destruction taken when its refcnt is zero, and then vcpu MUST and CAN be destroyed before

Re: [PATCH 0/10] nEPT: Nested EPT support for Nested VMX

2011-12-12 Thread Avi Kivity
On 12/12/2011 01:37 PM, Nadav Har'El wrote: On Sun, Nov 13, 2011, Avi Kivity wrote about Re: [PATCH 0/10] nEPT: Nested EPT support for Nested VMX: I also believed that the fault injection part was also correct: I thought that the code already knows when to handle the fault in L2 (when

Re: [PATCH v5 05/13] ARM: KVM: Inject IRQs and FIQs from userspace

2011-12-12 Thread Avi Kivity
On 12/11/2011 12:24 PM, Christoffer Dall wrote: 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

[PATCH] KVM, CPU hotplug: Avoid wraparound in pvclock_get_nsec_offset

2011-12-12 Thread Vasilis Liaskovitis
Hotplugging a vCPU with kvmclock enabled can cause a guest stall/hang. When the stall happens, pvclock_clocksource_read() is called for the new vCPU and pvclock_get_nsec_offset calculates native_read_tsc() - shadow-tsc_timestamp. shadow-tsc_timestamp contains a value larger than native_read_tsc(),

Re: [PATCH v5 07/13] ARM: KVM: Emulation framework and CP15 emulation

2011-12-12 Thread Avi Kivity
On 12/11/2011 12:25 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu 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

Re: [PATCH v5 09/13] ARM: KVM: Handle I/O aborts

2011-12-12 Thread Avi Kivity
On 12/11/2011 12:25 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu 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

Re: [PATCH] KVM, CPU hotplug: Avoid wraparound in pvclock_get_nsec_offset

2011-12-12 Thread Jan Kiszka
On 2011-12-12 14:37, Vasilis Liaskovitis wrote: Hotplugging a vCPU with kvmclock enabled can cause a guest stall/hang. When the stall happens, pvclock_clocksource_read() is called for the new vCPU and pvclock_get_nsec_offset calculates native_read_tsc() - shadow-tsc_timestamp.

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

2011-12-12 Thread Avi Kivity
On 12/11/2011 12:25 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu 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

Re: [PATCH v5 11/13] ARM: KVM: Support SMP hosts

2011-12-12 Thread Avi Kivity
On 12/11/2011 12:25 PM, Christoffer Dall wrote: In order to support KVM on a SMP host, it is necessary to initialize the hypervisor on all CPUs, mostly by making sure each CPU gets its own hypervisor stack and runs the HYP init code. We also take care of some missing locking of modifications

Re: [PATCH v5 12/13] ARM: KVM: Fix guest view of MPIDR

2011-12-12 Thread Avi Kivity
On 12/11/2011 12:25 PM, Christoffer Dall wrote: From: Marc Zyngier marc.zyng...@arm.com A guest may need to know which CPU it has booted on (and Linux does). Now that we can run KVM on a SMP host, QEMU may be running on any s/QEMU/userspace/ CPU. In that case, directly reading MPIDR will

Re: [Android-virt] [PATCH v5 05/13] ARM: KVM: Inject IRQs and FIQs from userspace

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 8:28 AM, Avi Kivity a...@redhat.com wrote: On 12/11/2011 12:24 PM, Christoffer Dall wrote: 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

Re: [PATCH v5 04/13] ARM: KVM: Memory virtualization setup

2011-12-12 Thread Avi Kivity
On 12/11/2011 12:24 PM, Christoffer Dall wrote: 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

[PATCH] kvm tools: mmap guest kernel instead of reading it into memory

2011-12-12 Thread Sasha Levin
This patch mmaps guest kernel into it's own memory slot instead of reading it into the memory. The advantages are: - Smaller memory footprint (same effect as KSM if running multiple guests) - Faster loading of larger kernels. Suggested-by: Sweeney, Andrew John ajsw...@sandia.gov Signed-off-by:

Re: [Android-virt] [PATCH v5 05/13] ARM: KVM: Inject IRQs and FIQs from userspace

2011-12-12 Thread Avi Kivity
On 12/12/2011 04:38 PM, Christoffer Dall wrote: Why don't they match? The assignment of lines to actual pins differs, but essentially it's the same thing (otherwise we'd use a different ioctl). because there is no notion of gsi and irq_source_id on ARM. gsi = number of irq line, just

Re: [PATCH] kvm tools: mmap guest kernel instead of reading it into memory

2011-12-12 Thread Pekka Enberg
On Mon, Dec 12, 2011 at 4:47 PM, Sasha Levin levinsasha...@gmail.com wrote: This patch mmaps guest kernel into it's own memory slot instead of reading it into the memory. The advantages are:  - Smaller memory footprint (same effect as KSM if running multiple guests) KSM isn't free so it's

Re: [Android-virt] [PATCH v5 09/13] ARM: KVM: Handle I/O aborts

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 8:54 AM, Avi Kivity a...@redhat.com wrote: On 12/11/2011 12:25 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu When the guest accesses I/O memory this will create data abort exceptions and they are handled by decoding the HSR information

Re: [PATCH] KVM, CPU hotplug: Avoid wraparound in pvclock_get_nsec_offset

2011-12-12 Thread Vasilis Liaskovitis
On Mon, Dec 12, 2011 at 02:53:29PM +0100, Jan Kiszka wrote: Can't comment on the semantics, but your patch is whitespace damaged and doesn't follow kernel coding style. But I assume it's not for application yet, right? right. It fixes the hang for me, but I am not sure it's the best

Re: [PATCH v5 08/13] ARM: KVM: Handle guest faults in KVM

2011-12-12 Thread Avi Kivity
On 12/11/2011 12:25 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu 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

Re: [Android-virt] [PATCH v5 04/13] ARM: KVM: Memory virtualization setup

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 9:40 AM, Avi Kivity a...@redhat.com wrote: On 12/11/2011 12:24 PM, Christoffer Dall wrote: 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

Re: [Android-virt] [PATCH v5 05/13] ARM: KVM: Inject IRQs and FIQs from userspace

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 9:50 AM, Avi Kivity a...@redhat.com wrote: On 12/12/2011 04:38 PM, Christoffer Dall wrote: Why don't they match?  The assignment of lines to actual pins differs, but essentially it's the same thing (otherwise we'd use a different ioctl). because there is no

Re: [Android-virt] [PATCH v5 04/13] ARM: KVM: Memory virtualization setup

2011-12-12 Thread Avi Kivity
On 12/12/2011 05:09 PM, Christoffer Dall wrote: On Mon, Dec 12, 2011 at 9:40 AM, Avi Kivity a...@redhat.com wrote: On 12/11/2011 12:24 PM, Christoffer Dall wrote: This commit introduces the framework for guest memory management through the use of 2nd stage translation. Each VM has a pointer

Re: [Android-virt] [PATCH v5 05/13] ARM: KVM: Inject IRQs and FIQs from userspace

2011-12-12 Thread Avi Kivity
On 12/12/2011 05:11 PM, Christoffer Dall wrote: If I should re-use the existing one, should I simply move it outside of __KVM_HAVE_IOAPIC? Protect it with __KVM_HAVE_IRQ_LINE so we don't leak unused tracepoints for other archs. ok. I used to be scared of touching your arch

Re: [Android-virt] [PATCH v5 04/13] ARM: KVM: Memory virtualization setup

2011-12-12 Thread Peter Maydell
On 12 December 2011 15:15, Avi Kivity a...@redhat.com wrote: We need to differentiate in how Linux-as-a-guest acts and how the cpu is supposed to work.  A guest operating system can theoretically assign the ASID x to process A running on vcpu 0, and the same ASID x to process B running on vcpu

Re: [PATCH] kvm tools: mmap guest kernel instead of reading it into memory

2011-12-12 Thread Sasha Levin
On Mon, 2011-12-12 at 16:54 +0200, Pekka Enberg wrote: On Mon, Dec 12, 2011 at 4:47 PM, Sasha Levin levinsasha...@gmail.com wrote: This patch mmaps guest kernel into it's own memory slot instead of reading it into the memory. The advantages are: - Smaller memory footprint (same effect

Re: [Android-virt] [PATCH v5 04/13] ARM: KVM: Memory virtualization setup

2011-12-12 Thread Avi Kivity
On 12/12/2011 05:25 PM, Peter Maydell wrote: On 12 December 2011 15:15, Avi Kivity a...@redhat.com wrote: We need to differentiate in how Linux-as-a-guest acts and how the cpu is supposed to work. A guest operating system can theoretically assign the ASID x to process A running on vcpu 0,

Re: [PATCH] kvm tools: mmap guest kernel instead of reading it into memory

2011-12-12 Thread Pekka Enberg
On Mon, Dec 12, 2011 at 4:47 PM, Sasha Levin levinsasha...@gmail.com wrote: +       /* mmap the actual kernel */ +       kvm-bz_fd = dup(fd_kernel); +       kvm-bz_len = st.st_size; +       setup_end = ALIGN(setup_size - PAGE_SIZE, PAGE_SIZE); /* Need it aligned to PAGE_SIZE */ +      

Re: [PATCH] kvm tools: mmap guest kernel instead of reading it into memory

2011-12-12 Thread Sasha Levin
On Mon, 2011-12-12 at 17:59 +0200, Pekka Enberg wrote: On Mon, Dec 12, 2011 at 4:47 PM, Sasha Levin levinsasha...@gmail.com wrote: + /* mmap the actual kernel */ + kvm-bz_fd = dup(fd_kernel); + kvm-bz_len = st.st_size; + setup_end = ALIGN(setup_size - PAGE_SIZE,

Re: [PATCH v5 07/13] ARM: KVM: Emulation framework and CP15 emulation

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 8:44 AM, Avi Kivity a...@redhat.com wrote: On 12/11/2011 12:25 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu 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

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

2011-12-12 Thread Christoffer Dall
On Mon, Dec 12, 2011 at 9:12 AM, Avi Kivity a...@redhat.com wrote: On 12/11/2011 12:25 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu When the guest executes a WFI instruction the operation is trapped to KVM, which emulates the instruction in software. There is no

Re: [Android-virt] [PATCH v5 05/13] ARM: KVM: Inject IRQs and FIQs from userspace

2011-12-12 Thread Peter Maydell
On 11 December 2011 23:01, Jan Kiszka jan.kis...@web.de wrote: Enabling in-kernel irqchips usually means switching worlds. So the semantics of these particular IRQ inject interface details may change without breaking anything. However, things might look different if there will be a need to

  1   2   >