Re: [PATCH] vhost-blk: Add vhost-blk support v5

2012-11-19 Thread Asias He
On 11/20/2012 04:26 AM, Michael S. Tsirkin wrote: > On Mon, Nov 19, 2012 at 04:53:42PM +0800, Asias He wrote: >> vhost-blk is an in-kernel virito-blk device accelerator. >> >> Due to lack of proper in-kernel AIO interface, this version converts >> guest's I/O request to bio and use submit_bio() to

[PATCH 4/4] AER-QEMU: Bring down the guest when KVM detects a PCI device error

2012-11-19 Thread Pandarathil, Vijaymohan R
- When KVM_RUN ioctl returns with an exit reason requesting a shutdown of the guest due to a PCI device error detected by AER, shutdown the guest immediately. Signed-off-by: Vijay Mohan Pandarathil --- kvm-all.c | 6 ++ linux-headers/linux/kvm.h | 1 + 2 files changed, 7 inse

[PATCH 3/4] AER-KVM: Integration of KVM with AER for PCI pass-thru devices

2012-11-19 Thread Pandarathil, Vijaymohan R
- Register a notifier function to be called whenever a PCIe error is detected by the AER subsystem. - The notifier function bumps up a global count to keep track of the error notifications. - Before guest entry, each vcpu checks if there has been any new notifications sin

[PATCH 0/4] AER-KVM: Error containment of PCI pass-thru devices assigned to KVM guests

2012-11-19 Thread Pandarathil, Vijaymohan R
Add support for error containment when a PCI pass-thru device assigned to a KVM guest encounters an error. This is for PCIe devices/drivers that support AER functionality. When the OS is notified of an error in a device either through the firmware first approach or through an interrupt handled by t

[PATCH 1/4] AER-PCI: Add infrastructure for notification of errors to other subsystems

2012-11-19 Thread Pandarathil, Vijaymohan R
- Adds infrastructure support for error notifications from AER subsystem to other subsystems. The generic notifier_chain functionality is used. - When the AER rootport driver detects an uncorrected error, invoke the callbacks registered for notifications as well as mark the device as tainted. -

[PATCH 2/4] AER-GHES: Add support for error notification in firmware first approach of AER

2012-11-19 Thread Pandarathil, Vijaymohan R
- When an uncorrected recoverable error is reported via an NMI in the firmware first model of AER, invoke the callbacks registered for notifications as well as mark the device as tainted. - Add a new function ghes_mark_dev_err() leveraged from ghes_do_proc() to identify the dev

[PATCH] vfio powerpc: enabled and supported on powernv platform

2012-11-19 Thread Alexey Kardashevskiy
VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent part includes IOMMU initialization and handling. This patch initializes IOMMU groups based on the IOMMU config

Re: [PATCH v4 0/2] x86: clear vmcss on all cpus when doing kdump if necessary

2012-11-19 Thread Marcelo Tosatti
On Fri, Nov 16, 2012 at 06:12:58PM +0800, zhangyanfei wrote: > Hello Marcelo, > > Any thoughts? I thought a function call was OK, but its better to have all code in vmx.c. Please have an atomic notifier in kexec.c (registered by KVM module via atomic_notifier_chain_register etc). Other than that

[PATCH] kvm tools: disable LTO by default

2012-11-19 Thread Sasha Levin
A bug only seen with LTO enabled was reported by Ron Minnich. Since the issue appears to be a linker issue, we disable LTO by default until it's more stable. We can still run LTO builds by setting LTO=1. Reported-by: Ron Minnich Signed-off-by: Sasha Levin --- tools/kvm/Makefile | 8 +--- 1

Re: [PATCH 4/4] KVM: PPC: Book3S HV: Provide a method for userspace to read and write the HPT

2012-11-19 Thread Paul Mackerras
On Mon, Nov 19, 2012 at 01:53:44PM +0100, Alexander Graf wrote: > > +static inline unsigned long slb_pgsize_encoding(unsigned long psize) > > +{ > > + unsigned long senc = 0; > > + > > + if (psize > 0x1000) { > > + senc = SLB_VSID_L; > > + if (psize == 0x1) > > +

[PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-19 Thread Xiao Guangrong
The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry all the instructions except it accesses on error pfn. For example, some cases are nested-write-protect - if the page we want to write is used as PDE but it chains to itself. Under this

Re: [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs

2012-11-19 Thread Paul Mackerras
On Mon, Nov 19, 2012 at 01:36:42PM +0100, Alexander Graf wrote: > > Aren't atomic reads expensive? Doing one on every guest HPTE modification > (when nobody is listening) sounds quite excessive. Wouldn't it be cheaper to > just always update the bit? As Scott said, it's just an ordinary load.

[PATCH 2/3] KVM: x86: let reexecute_instruction work for tdp

2012-11-19 Thread Xiao Guangrong
Currently, reexecute_instruction refused to retry all instructions. If nested npt is used, the emulation may be caused by shadow page, it can be fixed by dropping the shadow page Signed-off-by: Xiao Guangrong --- arch/x86/kvm/x86.c | 14 -- 1 files changed, 8 insertions(+), 6 delet

[PATCH 1/3] KVM: x86: clean up reexecute_instruction

2012-11-19 Thread Xiao Guangrong
Little cleanup for reexecute_instruction, also use gpa_to_gfn in retry_instruction Signed-off-by: Xiao Guangrong --- arch/x86/kvm/x86.c | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 52ae8b5..7be8452 100644 --- a

[PATCH 0/3] KVM: x86: improve reexecute_instruction

2012-11-19 Thread Xiao Guangrong
The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry all the instructions except it accesses on error pfn. For example, these cases can not be detected: - for tdp used currently, it refused to retry all instructions. If nested npt is us

[patch 00/18] pvclock vsyscall support + KVM hypervisor support (v5)

2012-11-19 Thread Marcelo Tosatti
This patchset, based on earlier work by Jeremy Fitzhardinge, implements paravirtual clock vsyscall support. It should be possible to implement Xen support relatively easily. It reduces clock_gettime from 500 cycles to 200 cycles on my testbox. v5: - reduce preempt disable window in kvm_get_wallc

[patch 13/18] time: export time information for KVM pvclock

2012-11-19 Thread Marcelo Tosatti
As suggested by John, export time data similarly to how its done by vsyscall support. This allows KVM to retrieve necessary information to implement vsyscall support in KVM guests. Acked-by: John Stultz Signed-off-by: Marcelo Tosatti Index: vsyscall/include/linux/pvclock_gtod.h

[patch 18/18] KVM: x86: update pvclock area conditionally, on cpu migration

2012-11-19 Thread Marcelo Tosatti
As requested by Glauber, do not update kvmclock area on vcpu->pcpu migration, in case the host has stable TSC. This is to reduce cacheline bouncing. Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/kvm/x86.c === --- vsysca

[patch 04/18] x86: pvclock: remove pvclock_shadow_time

2012-11-19 Thread Marcelo Tosatti
Originally from Jeremy Fitzhardinge. We can copy the information directly from "struct pvclock_vcpu_time_info", remove pvclock_shadow_time. Reviewed-by: Glauber Costa Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/kernel/pvclock.c =

[patch 02/18] x86: kvmclock: allocate pvclock shared memory area

2012-11-19 Thread Marcelo Tosatti
We want to expose the pvclock shared memory areas, which the hypervisor periodically updates, to userspace. For a linear mapping from userspace, it is necessary that entire page sized regions are used for array of pvclock structures. There is no such guarantee with per cpu areas, therefore move

[patch 15/18] KVM: x86: implement PVCLOCK_TSC_STABLE_BIT pvclock flag

2012-11-19 Thread Marcelo Tosatti
KVM added a global variable to guarantee monotonicity in the guest. One of the reasons for that is that the time between 1. ktime_get_ts(×pec); 2. rdtscll(tsc); Is variable. That is, given a host with stable TSC, suppose that two VCPUs read the same time via ktime_get_ts() above.

[patch 14/18] KVM: x86: notifier for clocksource changes

2012-11-19 Thread Marcelo Tosatti
Register a notifier for clocksource change event. In case the host switches to clock other than TSC, disable master clock usage. Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/kvm/x86.c === --- vsyscall.orig/arch/x86/kvm/x8

[patch 09/18] x86: pvclock: generic pvclock vsyscall initialization

2012-11-19 Thread Marcelo Tosatti
Originally from Jeremy Fitzhardinge. Introduce generic, non hypervisor specific, pvclock initialization routines. Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/kernel/pvclock.c === --- vsyscall.orig/arch/x86/kernel/pvclo

[patch 16/18] KVM: x86: add kvm_arch_vcpu_postcreate callback, move TSC initialization

2012-11-19 Thread Marcelo Tosatti
TSC initialization will soon make use of online_vcpus. Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/ia64/kvm/kvm-ia64.c === --- vsyscall.orig/arch/ia64/kvm/kvm-ia64.c +++ vsyscall/arch/ia64/kvm/kvm-ia64.c @@ -1330,6 +1330,11

[patch 08/18] sched: add notifier for cross-cpu migrations

2012-11-19 Thread Marcelo Tosatti
Originally from Jeremy Fitzhardinge. Signed-off-by: Marcelo Tosatti Index: vsyscall/include/linux/sched.h === --- vsyscall.orig/include/linux/sched.h +++ vsyscall/include/linux/sched.h @@ -107,6 +107,14 @@ extern unsigned long this_

[patch 07/18] x86: pvclock: add note about rdtsc barriers

2012-11-19 Thread Marcelo Tosatti
As noted by Gleb, not advertising SSE2 support implies no RDTSC barriers. Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/include/asm/pvclock.h === --- vsyscall.orig/arch/x86/include/asm/pvclock.h +++ vsyscall/arch/x86/inclu

[patch 05/18] x86: pvclock: create helper for pvclock data retrieval

2012-11-19 Thread Marcelo Tosatti
Originally from Jeremy Fitzhardinge. So code can be reused. Acked-by: Glauber Costa Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/kernel/pvclock.c === --- vsyscall.orig/arch/x86/kernel/pvclock.c +++ vsyscall/arch/x86/ker

[patch 17/18] KVM: x86: require matched TSC offsets for master clock

2012-11-19 Thread Marcelo Tosatti
With master clock, a pvclock clock read calculates: ret = system_timestamp + [ (rdtsc + tsc_offset) - tsc_timestamp ] Where 'rdtsc' is the host TSC. system_timestamp and tsc_timestamp are unique, one tuple per VM: the "master clock". Given a host with synchronized TSCs, its obvious that guest

[patch 01/18] KVM: x86: retain pvclock guest stopped bit in guest memory

2012-11-19 Thread Marcelo Tosatti
Otherwise its possible for an unrelated KVM_REQ_UPDATE_CLOCK (such as due to CPU migration) to clear the bit. Noticed by Paolo Bonzini. Reviewed-by: Gleb Natapov Reviewed-by: Glauber Costa Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/kvm/x86.c ==

[patch 12/18] KVM: x86: pass host_tsc to read_l1_tsc

2012-11-19 Thread Marcelo Tosatti
Allow the caller to pass host tsc value to kvm_x86_ops->read_l1_tsc(). Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/include/asm/kvm_host.h === --- vsyscall.orig/arch/x86/include/asm/kvm_host.h +++ vsyscall/arch/x86/includ

[patch 06/18] x86: pvclock: introduce helper to read flags

2012-11-19 Thread Marcelo Tosatti
Acked-by: Glauber Costa Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/kernel/pvclock.c === --- vsyscall.orig/arch/x86/kernel/pvclock.c +++ vsyscall/arch/x86/kernel/pvclock.c @@ -45,6 +45,19 @@ void pvclock_resume(void)

[patch 11/18] x86: vdso: pvclock gettime support

2012-11-19 Thread Marcelo Tosatti
Improve performance of time system calls when using Linux pvclock, by reading time info from fixmap visible copy of pvclock data. Originally from Jeremy Fitzhardinge. Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/vdso/vclock_gettime.c =

[patch 03/18] x86: pvclock: make sure rdtsc doesnt speculate out of region

2012-11-19 Thread Marcelo Tosatti
Originally from Jeremy Fitzhardinge. pvclock_get_time_values, which contains the memory barriers will be removed by next patch. Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/kernel/pvclock.c === --- vsyscall.orig/arch/x86

Re: [PATCH] vhost-blk: Add vhost-blk support v5

2012-11-19 Thread Michael S. Tsirkin
On Mon, Nov 19, 2012 at 04:53:42PM +0800, Asias He wrote: > vhost-blk is an in-kernel virito-blk device accelerator. > > Due to lack of proper in-kernel AIO interface, this version converts > guest's I/O request to bio and use submit_bio() to submit I/O directly. > So this version any supports raw

Re: [PATCH 1/1] vhost: Remove duplicate inclusion of linux/vhost.h

2012-11-19 Thread David Miller
From: "Michael S. Tsirkin" Date: Mon, 19 Nov 2012 21:49:55 +0200 > On Mon, Nov 19, 2012 at 02:18:13PM -0500, David Miller wrote: >> From: Sachin Kamat >> Date: Mon, 19 Nov 2012 16:58:28 +0530 >> >> > linux/vhost.h was included twice. >> > >> > Signed-off-by: Sachin Kamat >> >> Michael, are y

Re: [PATCH 1/1] vhost: Remove duplicate inclusion of linux/vhost.h

2012-11-19 Thread Michael S. Tsirkin
On Mon, Nov 19, 2012 at 02:18:13PM -0500, David Miller wrote: > From: Sachin Kamat > Date: Mon, 19 Nov 2012 16:58:28 +0530 > > > linux/vhost.h was included twice. > > > > Signed-off-by: Sachin Kamat > > Michael, are you gonna take this? > > Thanks. Pls pick it up. Acked-by: Michael S. Tsirk

Re: [PATCH 1/1] vhost: Remove duplicate inclusion of linux/vhost.h

2012-11-19 Thread David Miller
From: Sachin Kamat Date: Mon, 19 Nov 2012 16:58:28 +0530 > linux/vhost.h was included twice. > > Signed-off-by: Sachin Kamat Michael, are you gonna take this? Thanks. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More m

Re: [rfc net-next v6 2/3] virtio_net: multiqueue support

2012-11-19 Thread Ben Hutchings
On Sun, 2012-11-18 at 11:13 +0200, Michael S. Tsirkin wrote: > On Sat, Nov 17, 2012 at 12:35:29AM +, Ben Hutchings wrote: > > On Tue, 2012-11-13 at 08:40 +0200, Michael S. Tsirkin wrote: > > > On Mon, Nov 05, 2012 at 11:38:39AM +1030, Rusty Russell wrote: > > > > > @@ -924,11 +1032,10 @@ static

[PATCH 160/493] uio: remove use of __devinit

2012-11-19 Thread Bill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton Cc: "Hans J. Koch" ) Cc: kvm@vger.kernel.org --- drivers/uio/uio_aec.c | 2 +- drivers/uio/uio_cif.c | 2 +- drivers/uio/uio_netx.c| 2 +- drivers/uio/uio_pci_gener

Re: [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs

2012-11-19 Thread Alexander Graf
On 19.11.2012, at 18:20, Scott Wood wrote: > On 11/19/2012 06:36:42 AM, Alexander Graf wrote: >> On 14.11.2012, at 05:32, Paul Mackerras wrote: >> > +/* >> > + * Note modification of an HPTE; set the HPTE modified bit >> > + * if it wasn't modified before and anyone is interested. >> > + */ >> >

Re: [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs

2012-11-19 Thread Scott Wood
On 11/19/2012 06:36:42 AM, Alexander Graf wrote: On 14.11.2012, at 05:32, Paul Mackerras wrote: > +/* > + * Note modification of an HPTE; set the HPTE modified bit > + * if it wasn't modified before and anyone is interested. > + */ > +static inline void note_hpte_modification(struct kvm *kvm, >

Re: [Qemu-devel] Ubuntu/Debian Installer + Virtio-SCSI -> Bad ram pointer

2012-11-19 Thread Stefan Hajnoczi
On Thu, Nov 8, 2012 at 4:26 PM, Peter Lieven wrote: > Has anyone any other idea what the cause could be or where to start? Hi Peter, I suggested posting the source tree you are building. Since you have applied patches yourself no one else is able to follow along with the gdb output or reproduce

Re: [PATCH v4 07/14] KVM: ARM: Inject IRQs and FIQs from userspace

2012-11-19 Thread Will Deacon
On Mon, Nov 19, 2012 at 04:09:06PM +, Christoffer Dall wrote: > On Mon, Nov 19, 2012 at 10:26 AM, Will Deacon wrote: > > On Mon, Nov 19, 2012 at 03:04:38PM +, Christoffer Dall wrote: > In all seriousness, I will unite myself with an alcoholic beverage one > of these evenings and try to see

Re: [PATCH v4 07/14] KVM: ARM: Inject IRQs and FIQs from userspace

2012-11-19 Thread Christoffer Dall
On Mon, Nov 19, 2012 at 10:26 AM, Will Deacon wrote: > On Mon, Nov 19, 2012 at 03:04:38PM +, Christoffer Dall wrote: >> On Mon, Nov 19, 2012 at 9:55 AM, Will Deacon wrote: >> > On Sat, Nov 10, 2012 at 03:42:59PM +, Christoffer Dall wrote: >> >> +int kvm_vm_ioctl_irq_line(struct kvm *kvm,

Re: [kvmarm] [PATCH v4 09/14] KVM: ARM: Emulation framework and CP15 emulation

2012-11-19 Thread Peter Maydell
On 19 November 2012 15:01, Will Deacon wrote: > On Sat, Nov 10, 2012 at 03:43:13PM +, Christoffer Dall wrote: >> +/* >> + * A15-specific CP15 registers. >> + * Important: Must be sorted ascending by CRn, CRM, Op1, Op2 >> + */ >> +static const struct coproc_reg a15_regs[] = { >> + /* MPID

Re: [PATCH v4 05/14] KVM: ARM: Hypervisor inititalization

2012-11-19 Thread Cyril Chemparathy
On 11/19/2012 09:51 AM, Will Deacon wrote: Typo in subject, use one of initiali[sz]ation instead. On Sat, Nov 10, 2012 at 03:42:45PM +, Christoffer Dall wrote: Sets up KVM code to handle all exceptions taken to Hyp mode. When the kernel is booted in Hyp mode, calling "hvc #0xff" with r0 p

Re: [PATCH v4 07/14] KVM: ARM: Inject IRQs and FIQs from userspace

2012-11-19 Thread Will Deacon
On Mon, Nov 19, 2012 at 03:04:38PM +, Christoffer Dall wrote: > On Mon, Nov 19, 2012 at 9:55 AM, Will Deacon wrote: > > On Sat, Nov 10, 2012 at 03:42:59PM +, Christoffer Dall wrote: > >> +int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level > >> *irq_level) > >> +{ > >> +

pci_enable_msix() fails with ENOMEM/EINVAL

2012-11-19 Thread Alex Lyakas
Greetings all, I am running Ubuntu-Precise 3.2.0-29-generic #46, with stock KVM ("QEMU emulator version 1.0 (qemu-kvm-1.0)") on a Dell R510 server. I have one dual-port Intel's NIC 82599, of which I spawn 32 VFs from each port. I spawn virtual machines with KVM, each VM has 4 VFs attached (two

Re: [PATCH v4 14/14] KVM: ARM: Handle I/O aborts

2012-11-19 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:43:49PM +, Christoffer Dall wrote: > 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 per

Re: [PATCH v4 13/14] KVM: ARM: Handle guest faults in KVM

2012-11-19 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:43:42PM +, Christoffer Dall wrote: > Handles the guest faults in KVM by mapping in corresponding user pages > in the 2nd stage page tables. > > We invalidate the instruction cache by MVA whenever we map a page to the > guest (no, we cannot only do it when we have an

Re: [PATCH v4 06/14] KVM: ARM: Memory virtualization setup

2012-11-19 Thread Christoffer Dall
On Mon, Nov 19, 2012 at 9:53 AM, Will Deacon wrote: > On Sat, Nov 10, 2012 at 03:42:52PM +, 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 table (the pgd field in str

Re: [PATCH v4 07/14] KVM: ARM: Inject IRQs and FIQs from userspace

2012-11-19 Thread Christoffer Dall
On Mon, Nov 19, 2012 at 9:55 AM, Will Deacon wrote: > On Sat, Nov 10, 2012 at 03:42:59PM +, Christoffer Dall wrote: >> From: Christoffer Dall >> >> All interrupt injection is now based on the VM ioctl KVM_IRQ_LINE. This >> works semantically well for the GIC as we in fact raise/lower a line

Re: [PATCH v4 11/14] KVM: ARM: Demux CCSIDR in the userspace API

2012-11-19 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:43:28PM +, Christoffer Dall wrote: > The Cache Size Selection Register (CSSELR) selects the current Cache > Size ID Register (CCSIDR). You write which cache you are interested > in to CSSELR, and read the information out of CCSIDR. > > Which cache numbers are valid

Re: [PATCH v4 10/14] KVM: ARM: User space API for getting/setting co-proc registers

2012-11-19 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:43:21PM +, Christoffer Dall wrote: > The following three ioctls are implemented: > - KVM_GET_REG_LIST > - KVM_GET_ONE_REG > - KVM_SET_ONE_REG [...] > diff --git a/Documentation/virtual/kvm/api.txt > b/Documentation/virtual/kvm/api.txt > index 845ceda..9671cd2

Re: [PATCH v4 09/14] KVM: ARM: Emulation framework and CP15 emulation

2012-11-19 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:43:13PM +, Christoffer Dall wrote: > 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 contain

Re: [PATCH v4 08/14] KVM: ARM: World-switch implementation

2012-11-19 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:43:06PM +, Christoffer Dall wrote: > Provides complete world-switch implementation to switch to other guests > running in non-secure modes. Includes Hyp exception handlers that > capture necessary exception information and stores the information on > the VCPU and KVM

Re: [PATCH v4 07/14] KVM: ARM: Inject IRQs and FIQs from userspace

2012-11-19 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:42:59PM +, Christoffer Dall wrote: > From: Christoffer Dall > > All interrupt injection is now based on the VM ioctl KVM_IRQ_LINE. This > works semantically well for the GIC as we in fact raise/lower a line on > a machine component (the gic). The IOCTL uses the fo

Re: [PATCH v4 06/14] KVM: ARM: Memory virtualization setup

2012-11-19 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:42:52PM +, 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 table (the pgd field in struct kvm_arch) which is > used for the 2nd stage translatio

Re: [PATCH v4 05/14] KVM: ARM: Hypervisor inititalization

2012-11-19 Thread Will Deacon
Typo in subject, use one of initiali[sz]ation instead. On Sat, Nov 10, 2012 at 03:42:45PM +, Christoffer Dall wrote: > Sets up KVM code to handle all exceptions taken to Hyp mode. > > When the kernel is booted in Hyp mode, calling "hvc #0xff" with r0 pointing to > the new vectors, the HVBAR

Re: [kvmarm] [PATCH v3 06/14] KVM: ARM: Memory virtualization setup

2012-11-19 Thread Christoffer Dall
On Mon, Nov 19, 2012 at 6:29 AM, Sundaram, Senthilkumar wrote: > What is the use of MMU Notifiers in the absence of Shadow Page Table? > > Thanks > Senthil MMU notifiers are used to manage the stage-2 page tables in the event of swapping or KSM. Please don't top-top post to this list. -Christoff

Re: [PATCH v4 04/14] KVM: ARM: Initial skeleton to compile KVM support

2012-11-19 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:42:38PM +, Christoffer Dall wrote: > Targets KVM support for Cortex A-15 processors. > > Contains all the framework components, make files, header files, some > tracing functionality, and basic user space API. > > Only supported core is Cortex-A15 for now. > > Most

Re: [PATCH v4 02/14] ARM: Section based HYP idmap

2012-11-19 Thread Rob Herring
On 11/10/2012 09:42 AM, Christoffer Dall wrote: > Add a method (hyp_idmap_setup) to populate a hyp pgd with an > identity mapping of the code contained in the .hyp.idmap.text > section. > > Offer a method to drop this identity mapping through > hyp_idmap_teardown. > > Make all the above depend on

Re: [PATCH v4 03/14] ARM: Factor out cpuid implementor and part number

2012-11-19 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:42:31PM +, Christoffer Dall wrote: > Decoding the implementor and part number of the CPU id in the CPU ID > register is needed by KVM, so we factor it out to share the code. > > Reviewed-by: Marcelo Tosatti > Signed-off-by: Christoffer Dall [...] > diff --git a/a

Re: [PATCH v4 02/14] ARM: Section based HYP idmap

2012-11-19 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:42:24PM +, Christoffer Dall wrote: > Add a method (hyp_idmap_setup) to populate a hyp pgd with an > identity mapping of the code contained in the .hyp.idmap.text > section. > > Offer a method to drop this identity mapping through > hyp_idmap_teardown. > > Make all t

Re: [PATCH v4 01/14] ARM: Add page table and page defines needed by KVM

2012-11-19 Thread Will Deacon
On Sat, Nov 10, 2012 at 03:42:17PM +, Christoffer Dall wrote: > KVM uses the stage-2 page tables and the Hyp page table format, > so we define the fields and page protection flags needed by KVM. > > The nomenclature is this: > - page_hyp:PL2 code/data mappings > - page_hyp_device: PL

Re: [PATCH 2/3] s390: Virtual channel subsystem support.

2012-11-19 Thread Alexander Graf
On 31.10.2012, at 17:24, Cornelia Huck wrote: > Provide a mechanism for qemu to provide fully virtual subchannels to > the guest. In the KVM case, this relies on the kernel's css support > for I/O and machine check interrupt handling. The !KVM case handles > interrupts on its own. > > Signed-off

Re: [PATCH 1/4] KVM: PPC: Book3S HV: Restructure HPT entry creation code

2012-11-19 Thread Alexander Graf
On 14.11.2012, at 05:31, Paul Mackerras wrote: > This restructures the code that creates HPT (hashed page table) > entries so that it can be called in situations where we don't have a > struct vcpu pointer, only a struct kvm pointer. It also fixes a bug > where kvmppc_map_vrma() would corrupt th

Re: [PATCH 4/4] KVM: PPC: Book3S HV: Provide a method for userspace to read and write the HPT

2012-11-19 Thread Alexander Graf
On 14.11.2012, at 05:33, Paul Mackerras wrote: > A new ioctl, KVM_PPC_GET_HTAB_FD, returns a file descriptor. Reads on > this fd return the contents of the HPT (hashed page table), writes > create and/or remove entries in the HPT. There is a new capability, > KVM_CAP_PPC_HTAB_FD, to indicate th

Re: [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs

2012-11-19 Thread Alexander Graf
On 14.11.2012, at 05:32, Paul Mackerras wrote: > This uses a bit in our record of the guest view of the HPTE to record > when the HPTE gets modified. We use a reserved bit for this, and ensure > that this bit is always cleared in HPTE values returned to the guest. > The recording of modified HPT

KVM call agenda for 2012-11-20

2012-11-19 Thread Juan Quintela
Hi Please send in any agenda topics you are interested in. Later, 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: [RFC PATCH 05/16] kvm tools: don't bother including linux/compiler.h

2012-11-19 Thread Pekka Enberg
Hi Will, On Mon, 19 Nov 2012, Will Deacon wrote: > > > I'm struggling to reproduce this with my tree. Can you confirm whether or > > > not you have commit 29fc7c5a4f51 ("rbtree: include linux/compiler.h for > > > definition of __always_inline") in your *kernel* sources please? > > > > No, I don't

[PATCH 1/1] vhost: Remove duplicate inclusion of linux/vhost.h

2012-11-19 Thread Sachin Kamat
linux/vhost.h was included twice. Signed-off-by: Sachin Kamat --- drivers/vhost/tcm_vhost.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c index 73bbc46..798792b 100644 --- a/drivers/vhost/tcm_vhost.c +++ b/drivers/v

RE: [kvmarm] [PATCH v3 06/14] KVM: ARM: Memory virtualization setup

2012-11-19 Thread Sundaram, Senthilkumar
What is the use of MMU Notifiers in the absence of Shadow Page Table? Thanks Senthil > -Original Message- > From: kvmarm-boun...@lists.cs.columbia.edu [mailto:kvmarm- > boun...@lists.cs.columbia.edu] On Behalf Of Christoffer Dall > Sent: Monday, October 22, 2012 12:20 PM > To: kvm@vger.ker

Re: [RFC PATCH 05/16] kvm tools: don't bother including linux/compiler.h

2012-11-19 Thread Will Deacon
On Fri, Nov 16, 2012 at 10:01:01PM +, Pekka Enberg wrote: > On Fri, 16 Nov 2012, Will Deacon wrote: > > > I'm seeing the following breakage with this patch applied: > > > > > > [penberg@tux kvm]$ make > > > CC hw/rtc.o > > > CC ioport.o > > > CC kvm-cpu.o > > > CC

Re: [PATCH 1/2] Add code to track call origin for msr assignment.

2012-11-19 Thread Gleb Natapov
On Thu, Nov 15, 2012 at 12:25:45PM -0800, Will Auld wrote: > In order to track who initiated the call (host or guest) to modify an msr > value I have changed function call parameters along the call path. The > specific change is to add a struct pointer parameter that points to (index, > data, calle

[PATCH] vhost-blk: Add vhost-blk support v5

2012-11-19 Thread Asias He
vhost-blk is an in-kernel virito-blk device accelerator. Due to lack of proper in-kernel AIO interface, this version converts guest's I/O request to bio and use submit_bio() to submit I/O directly. So this version any supports raw block device as guest's disk image, e.g. /dev/sda, /dev/ram0. We ca

qemu-kvm-1.2.0: double free or corruption

2012-11-19 Thread Nikola Ciprich
Hi, on one of our servers, windows 2008 KVM suddenly crashed. I see following in libvirt log: *** glibc detected *** /usr/bin/qemu-kvm: double free or corruption (!prev): 0x7fc634008cd0 *** === Backtrace: = /lib64/libc.so.6(+0x75916)[0x7fc9026f4916] /lib64/libc.so.6(+0x78443)[0x7f