Re: qemu> help documentation

2013-02-15 Thread Stefan Hajnoczi
On Thu, Feb 14, 2013 at 02:22:51PM +0100, Paolo Pedaletti wrote: > I have trouble to get full list of the output of > qemu> help > inside kvm when I switch to second console CTRL-ALT-2 > > I can't find the full list even inside source code (apt-get source > qemu-kvm) and neither inside binary file

Re: [PATCH v2 11/18] KVM/MIPS32: Routines to handle specific traps/exceptions while executing the guest.

2013-02-15 Thread Sanjay Lal
On Feb 6, 2013, at 8:20 AM, Gleb Natapov wrote: > On Wed, Nov 21, 2012 at 06:34:09PM -0800, Sanjay Lal wrote: >> +static gpa_t kvm_trap_emul_gva_to_gpa_cb(gva_t gva) >> +{ >> +gpa_t gpa; >> +uint32_t kseg = KSEGX(gva); >> + >> +if ((kseg == CKSEG0) || (kseg == CKSEG1)) > You seems to

Re: [Qemu-devel] [PATCH qom-cpu-next 0/6] QOM CPUState, part 8: CPU_COMMON continued

2013-02-15 Thread Andreas Färber
Am 14.02.2013 18:49, schrieb Andreas Färber: > Am 01.02.2013 13:38, schrieb Andreas Färber: >> Hello, >> >> This series moves more fields from CPU_COMMON / CPU*State to CPUState, >> allowing access from target-independent code. >> >> The final patch in this series will help solve some issues (in pa

PIO/MMIO access from guest

2013-02-15 Thread Gábor PÉK
Hi all, I would like to access the configuration registers of my passthrough device from an unmodified guest under KVM via MMIO/PIO directly. Is there any option to configure the guest in this way? I know that you can do this with the ioports=[''] option in case of Xen, but I could not find any su

Re: [PATCH 0/9] virtio: new API for addition of buffers, scatterlist changes

2013-02-15 Thread Paolo Bonzini
Il 14/02/2013 10:23, Paolo Bonzini ha scritto: >> > How about this as a first step? >> > >> > virtio_ring: virtqueue_add_sgs, to add multiple sgs. >> > >> > virtio_scsi and virtio_blk can really use these, to avoid their current >> > hack of copying the whole sg array. >> > >> > Signed-off-by: R

Re: [PATCH v2 07/18] KVM/MIPS32: MMU/TLB operations for the Guest.

2013-02-15 Thread Sanjay Lal
On Feb 6, 2013, at 7:08 AM, Gleb Natapov wrote: >> >> +static void kvm_mips_map_page(struct kvm *kvm, gfn_t gfn) >> +{ >> +pfn_t pfn; >> + >> +if (kvm->arch.guest_pmap[gfn] != KVM_INVALID_PAGE) >> +return; >> + >> +pfn =kvm_mips_gfn_to_pfn(kvm, gfn); > This call should be

Re: [PATCH v2 09/18] KVM/MIPS32: COP0 accesses profiling.

2013-02-15 Thread Sanjay Lal
On Feb 6, 2013, at 8:17 AM, Gleb Natapov wrote: > On Wed, Nov 21, 2012 at 06:34:07PM -0800, Sanjay Lal wrote: >> >> +int kvm_mips_dump_stats(struct kvm_vcpu *vcpu) >> +{ >> +int i, j __unused; >> +#ifdef CONFIG_KVM_MIPS_DEBUG_COP0_COUNTERS >> +printk("\nKVM VCPU[%d] COP0 Access Profile:\

Re: [PATCH v2 07/18] KVM/MIPS32: MMU/TLB operations for the Guest.

2013-02-15 Thread Gleb Natapov
On Fri, Feb 15, 2013 at 01:19:29PM -0500, Sanjay Lal wrote: > > On Feb 6, 2013, at 7:08 AM, Gleb Natapov wrote: > > >> > >> +static void kvm_mips_map_page(struct kvm *kvm, gfn_t gfn) > >> +{ > >> + pfn_t pfn; > >> + > >> + if (kvm->arch.guest_pmap[gfn] != KVM_INVALID_PAGE) > >> + retu

[PATCH] vfio: Protect vfio_dev_present against device_del

2013-02-15 Thread Alex Williamson
vfio_dev_present is meant to give us a wait_event callback so that we can block removing a device from vfio until it becomes unused. The root of this check depends on being able to get the iommu group from the device. Unfortunately if the BUS_NOTIFY_DEL_DEVICE notifier has fired then the device-g

[PATCH] vfio: whitelist pcieport

2013-02-15 Thread Alex Williamson
pcieport does nice things like manage AER and we know it doesn't do DMA or expose any user accessible devices on the host. It also keeps the Memory, I/O, and Busmaster bits enabled, which is pretty handy when trying to use anyting below it. Devices owned by pcieport cannot be given to users via v

[PATCH] vfio-pci: Manage user power state transitions

2013-02-15 Thread Alex Williamson
We give the user access to change the power state of the device but certain transitions result in an uninitialized state which the user cannot resolve. To fix this we need to mark the PowerState field of the PMCSR register read-only and effect the requested change on behalf of the user. This has

[PATCH 3.9-rc1 0/3] KVM/ARM core fixes for 3.9-rc1

2013-02-15 Thread Marc Zyngier
Here's a number of patches to cope with the churn that occured in kvm-next, and breaks the compilation in next-20130215. No big deal, just regular breakage... Tested on TC2. Marc Zyngier (3): ARM: KVM: fix kvm_arch_{prepare,commit}_memory_region ARM: KVM: Rename KVM_MEMORY_

[PATCH 3.9-rc1 3/3] ARM: KVM: fix compilation after removal of user_alloc from struct kvm_memory_slot

2013-02-15 Thread Marc Zyngier
Commit 7a905b1 (KVM: Remove user_alloc from struct kvm_memory_slot) broke KVM/ARM by removing the user_alloc field from a public structure. As we only used this field to alert the user that we didn't support this operation mode, there is no harm in discarding this bit of code without any remorse.

[PATCH 3.9-rc1 2/3] ARM: KVM: Rename KVM_MEMORY_SLOTS -> KVM_USER_MEM_SLOTS

2013-02-15 Thread Marc Zyngier
Commit bbacc0c (KVM: Rename KVM_MEMORY_SLOTS -> KVM_USER_MEM_SLOTS) broke KVM/ARM by changing a global #define. Apply the same change to fix the compilation breakage. Signed-off-by: Marc Zyngier --- arch/arm/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH 3.9-rc1 1/3] ARM: KVM: fix kvm_arch_{prepare,commit}_memory_region

2013-02-15 Thread Marc Zyngier
Commit f82a8cfe9 (KVM: struct kvm_memory_slot.user_alloc -> bool) broke the ARM KVM port by changing the prototype of two global functions. Apply the same change to fix the compilation breakage. Signed-off-by: Marc Zyngier --- arch/arm/kvm/arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

Re: randconfig errors

2013-02-15 Thread Christoffer Dall
On Fri, Feb 15, 2013 at 2:22 PM, Marc Zyngier wrote: > On 15/02/13 19:16, Christoffer Dall wrote: >> On Fri, Feb 15, 2013 at 1:47 PM, Marc Zyngier wrote: >>> On Fri, 15 Feb 2013 19:22:37 +0100, Marc Zyngier >>> wrote: On Fri, 15 Feb 2013 11:25:56 -0600, Rob Herring wrote: > Errors

Helping with KVM development

2013-02-15 Thread Brandon Dwiel
Hi, I'm a computer engineering PhD student and I have the opportunity to contribute something to KVM as a class project. I found a few interesting items on the KVM TODO list (http://www.linux-kvm.org/page/TODO) that I could do. If I choose to do this I would start immediately and have about 2 mon

Re: [PATCH 02/12] KVM: PPC: E500: Explicitly mark shadow maps invalid

2013-02-15 Thread Scott Wood
On 02/14/2013 06:16:18 PM, Alexander Graf wrote: When we invalidate shadow TLB maps on the host, we don't mark them as not valid. But we should. Fix this by removing the E500_TLB_VALID from their flags when invalidating. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/e500_tlb.c | 13 +++

Re: [PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller

2013-02-15 Thread Scott Wood
On 02/14/2013 06:01:08 PM, Paul Mackerras wrote: From: Benjamin Herrenschmidt This adds in-kernel emulation of the XICS (eXternal Interrupt Controller Specification) interrupt controller specified by PAPR, for both HV and PR KVM guests. This adds a new KVM_CREATE_IRQCHIP_ARGS ioctl, which is l

[PATCH v2] vfio-pci: Manage user power state transitions

2013-02-15 Thread Alex Williamson
We give the user access to change the power state of the device but certain transitions result in an uninitialized state which the user cannot resolve. To fix this we need to mark the PowerState field of the PMCSR register read-only and effect the requested change on behalf of the user. This has

Re: [PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller

2013-02-15 Thread Paul Mackerras
On Fri, Feb 15, 2013 at 02:05:41PM -0600, Scott Wood wrote: > On 02/14/2013 06:01:08 PM, Paul Mackerras wrote: > >From: Benjamin Herrenschmidt > > > >This adds in-kernel emulation of the XICS (eXternal Interrupt > >Controller Specification) interrupt controller specified by PAPR, for > >both HV an

Re: [PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller

2013-02-15 Thread Scott Wood
On 02/15/2013 05:18:31 PM, Paul Mackerras wrote: On Fri, Feb 15, 2013 at 02:05:41PM -0600, Scott Wood wrote: > On 02/14/2013 06:01:08 PM, Paul Mackerras wrote: > >From: Benjamin Herrenschmidt > > > >This adds in-kernel emulation of the XICS (eXternal Interrupt > >Controller Specification) interr

Re: [PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller

2013-02-15 Thread Paul Mackerras
On Fri, Feb 15, 2013 at 05:59:11PM -0600, Scott Wood wrote: > On 02/15/2013 05:18:31 PM, Paul Mackerras wrote: > >On Fri, Feb 15, 2013 at 02:05:41PM -0600, Scott Wood wrote: > >> On 02/14/2013 06:01:08 PM, Paul Mackerras wrote: > >> >From: Benjamin Herrenschmidt > >> > > >> >This adds in-kernel em

Re: [PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller

2013-02-15 Thread Scott Wood
On 02/15/2013 08:56:14 PM, Paul Mackerras wrote: I have no particular objection to the device control API per se, but I have two objections to using it as the primary interface to the XICS emulation. First, I dislike the magical side-effect where creating a device of a particular type (e.g. MPIC

Re: [PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller

2013-02-15 Thread Paul Mackerras
On Fri, Feb 15, 2013 at 09:57:06PM -0600, Scott Wood wrote: > On 02/15/2013 08:56:14 PM, Paul Mackerras wrote: > >I have no particular objection to the device control API per se, but > >I have two objections to using it as the primary interface to the XICS > >emulation. > > > >First, I dislike the