Re: [PATCH] vfio-pci: Add KVM INTx acceleration

2012-10-16 Thread Michael S. Tsirkin
On Mon, Oct 15, 2012 at 02:28:15PM -0600, Alex Williamson wrote: This makes use of the new level irqfd support enabling bypass of qemu userspace both on INTx injection and unmask. This significantly boosts the performance of devices making use of legacy interrupts. Signed-off-by: Alex

[Patch]KVM: enabling per domain PLE

2012-10-16 Thread Hu, Xuekun
Setting the same PLE parameter arbitrarily for different workloads is not a good solution. The solution enables per domain PLE which gives user ability to set PLE parameter for different domain for better performance. Signed-off-by: Xuekun Hu xuekun...@intel.com ---

[Patch]QEMU: Add -ple-gap and -ple-window options for per domain PLE

2012-10-16 Thread Hu, Xuekun
QEMU: Add -ple-gap and -ple-window options for per domain PLE Signed-off-by: Xuekun Hu xuekun...@intel.com --- linux-headers/linux/kvm.h |3 +++ qemu-options.hx | 16 sysemu.h |2 ++ target-i386/kvm.c | 13 + vl.c

Re: [PATCH] kvm tools: fix help output for run command

2012-10-16 Thread Pekka Enberg
On Fri, 12 Oct 2012, William Dauchy wrote: This dummy patch remove tabs in help output. Introduced in commit: ae9ec23 kvm tools: generate command line options dynamically Signed-off-by: William Dauchy wdau...@gmail.com Applied, thanks William! -- To unsubscribe from this list: send the line

[PATCH] mm: compaction: Correct the nr_strict_isolated check for CMA

2012-10-16 Thread Mel Gorman
Thierry reported that the iron out patch for isolate_freepages_block() had problems due to the strict check being too strict with mm: compaction: Iron out isolate_freepages_block() and isolate_freepages_range() -fix1. It's possible that more pages than necessary are isolated but the check still

kvm-clock clocksource efficiency versus tsc...

2012-10-16 Thread Erik Brakkee
OS: Centos 6.2 KVM version: qemu-kvm-tools-0.12.1.2-2.209.el6_2.4.x86_64 qemu-kvm-0.12.1.2-2.209.el6_2.4.x86_64 uname -a: Linux myhost 2.6.32-220.7.1.el6.x86_64 #1 SMP Wed Mar 7 00:52:02 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux Hi, I have been performance testing a time tracing

Re: KVM call agenda for 2012-10-16

2012-10-16 Thread Alexander Graf
-boot and -bootindex On 15.10.2012, at 12:17, Juan Quintela quint...@redhat.com wrote: 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

Secure migration of LVM based guests over WAN

2012-10-16 Thread Lukas Laukamp
Hey all, I have a question about a solution for migrate LVM based guests directly over the network. So the situation: Two KVM hosts with libvirt, multiple LVM based guests Want to do: Migrate a LVM based guest directly to the other host over an secure connection I know that migration is

Re: [Patch]KVM: enabling per domain PLE

2012-10-16 Thread Avi Kivity
On 10/16/2012 08:53 AM, Hu, Xuekun wrote: Setting the same PLE parameter arbitrarily for different workloads is not a good solution. True. The solution enables per domain PLE which gives user ability to set PLE parameter for different domain for better performance. The problem with this

Re: Secure migration of LVM based guests over WAN

2012-10-16 Thread Avi Kivity
On 10/16/2012 11:12 AM, Lukas Laukamp wrote: Hey all, I have a question about a solution for migrate LVM based guests directly over the network. So the situation: Two KVM hosts with libvirt, multiple LVM based guests Want to do: Migrate a LVM based guest directly to the other host over an

Re: [PATCH 1/5] KVM: Provide mmu notifier retry test based on struct kvm

2012-10-16 Thread Avi Kivity
On 10/16/2012 05:59 AM, Paul Mackerras wrote: The mmu_notifier_retry() function, used to test whether any page invalidations are in progress, currently takes a vcpu pointer, though the code only needs the VM's struct kvm pointer. Forthcoming patches to the powerpc Book3S HV code will need to

Re: Secure migration of LVM based guests over WAN

2012-10-16 Thread Lukas Laukamp
Am 16.10.2012 11:40, schrieb Avi Kivity: On 10/16/2012 11:12 AM, Lukas Laukamp wrote: Hey all, I have a question about a solution for migrate LVM based guests directly over the network. So the situation: Two KVM hosts with libvirt, multiple LVM based guests Want to do: Migrate a LVM based

Re: [Qemu-devel] KVM call agenda for 2012-10-16

2012-10-16 Thread Igor Mammedov
On Mon, 15 Oct 2012 18:27:51 +0200 Igor Mammedov imamm...@redhat.com wrote: CPU as DEVICE http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg00719.html latest known tree for testing: https://github.com/ehabkost/qemu-hacks/commits/work/cpu-devicestate-qdev-core may

Re: [PATCH 1/5] KVM: Provide mmu notifier retry test based on struct kvm

2012-10-16 Thread Alexander Graf
On 16.10.2012, at 11:44, Avi Kivity wrote: On 10/16/2012 05:59 AM, Paul Mackerras wrote: The mmu_notifier_retry() function, used to test whether any page invalidations are in progress, currently takes a vcpu pointer, though the code only needs the VM's struct kvm pointer. Forthcoming

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

2012-10-16 Thread Avi Kivity
On 10/16/2012 06:01 AM, 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 the

Re: Secure migration of LVM based guests over WAN

2012-10-16 Thread Avi Kivity
On 10/16/2012 11:48 AM, Lukas Laukamp wrote: Am 16.10.2012 11:40, schrieb Avi Kivity: On 10/16/2012 11:12 AM, Lukas Laukamp wrote: Hey all, I have a question about a solution for migrate LVM based guests directly over the network. So the situation: Two KVM hosts with libvirt, multiple LVM

Re: [PATCH 0/2] KVM: PPC: Support ioeventfd

2012-10-16 Thread Avi Kivity
On 10/15/2012 02:02 PM, Alexander Graf wrote: In order to support vhost, we need to be able to support ioeventfd. This patch set adds support for ioeventfd to PPC and makes it possible to do so without implementing irqfd along the way, as it requires an in-kernel irqchip which we don't have

Re: [PATCH 1/2] KVM: Distangle eventfd code from irqchip

2012-10-16 Thread Avi Kivity
On 10/15/2012 02:02 PM, Alexander Graf wrote: The current eventfd code assumes that when we have eventfd, we also have irqfd for in-kernel interrupt delivery. This is not necessarily true. On PPC we don't have an in-kernel irqchip yet, but we can still support easily support eventfd. Don't

Re: [PATCH 0/2] KVM: PPC: Support ioeventfd

2012-10-16 Thread Alexander Graf
On 16.10.2012, at 12:56, Avi Kivity wrote: On 10/15/2012 02:02 PM, Alexander Graf wrote: In order to support vhost, we need to be able to support ioeventfd. This patch set adds support for ioeventfd to PPC and makes it possible to do so without implementing irqfd along the way, as it

Re: [PATCH 0/2] KVM: PPC: Support ioeventfd

2012-10-16 Thread Avi Kivity
On 10/16/2012 12:59 PM, Alexander Graf wrote: On 16.10.2012, at 12:56, Avi Kivity wrote: On 10/15/2012 02:02 PM, Alexander Graf wrote: In order to support vhost, we need to be able to support ioeventfd. This patch set adds support for ioeventfd to PPC and makes it possible to do so

Re: [PATCH 1/2] KVM: Distangle eventfd code from irqchip

2012-10-16 Thread Alexander Graf
On 16.10.2012, at 12:57, Avi Kivity wrote: On 10/15/2012 02:02 PM, Alexander Graf wrote: The current eventfd code assumes that when we have eventfd, we also have irqfd for in-kernel interrupt delivery. This is not necessarily true. On PPC we don't have an in-kernel irqchip yet, but we can

Re: [PATCH 0/2] KVM: PPC: Support ioeventfd

2012-10-16 Thread Alexander Graf
On 16.10.2012, at 13:01, Avi Kivity wrote: On 10/16/2012 12:59 PM, Alexander Graf wrote: On 16.10.2012, at 12:56, Avi Kivity wrote: On 10/15/2012 02:02 PM, Alexander Graf wrote: In order to support vhost, we need to be able to support ioeventfd. This patch set adds support for

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

2012-10-16 Thread Paul Mackerras
On Tue, Oct 16, 2012 at 12:06:58PM +0200, Avi Kivity wrote: On 10/16/2012 06:01 AM, Paul Mackerras wrote: +4.78 KVM_PPC_GET_HTAB_FD + +Capability: KVM_CAP_PPC_HTAB_FD +Architectures: powerpc +Type: vm ioctl +Parameters: Pointer to struct kvm_get_htab_fd (in) +Returns: file

[PATCH v5 1/6] KVM: MMU: fix release noslot pfn

2012-10-16 Thread Xiao Guangrong
We can not directly call kvm_release_pfn_clean to release the pfn since we can meet noslot pfn which is used to cache mmio info into spte Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |3 +-- virt/kvm/kvm_main.c |4 +--- 2 files changed, 2

[PATCH v5 2/6] KVM: MMU: remove mmu_is_invalid

2012-10-16 Thread Xiao Guangrong
Remove mmu_is_invalid and use is_invalid_pfn instead Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |5 - arch/x86/kvm/paging_tmpl.h |4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/mmu.c

[PATCH v5 3/6] KVM: MMU: cleanup FNAME(page_fault)

2012-10-16 Thread Xiao Guangrong
Let it return emulate state instead of spte like __direct_map Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/paging_tmpl.h | 32 +--- 1 files changed, 13 insertions(+), 19 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h

[PATCH v5 4/6] KVM: MMU: move prefetch_invalid_gpte out of pagaing_tmp.h

2012-10-16 Thread Xiao Guangrong
The function does not depend on guest mmu mode, move it out from paging_tmpl.h Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 36 arch/x86/kvm/paging_tmpl.h | 26 +++--- 2 files changed,

[PATCH v5 5/6] KVM: MMU: introduce FNAME(prefetch_gpte)

2012-10-16 Thread Xiao Guangrong
The only difference between FNAME(update_pte) and FNAME(pte_prefetch) is that the former is allowed to prefetch gfn from dirty logged slot, so introduce a common function to prefetch spte Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/paging_tmpl.h | 55

[PATCH v5 6/6] KVM: do not treat noslot pfn as a error pfn

2012-10-16 Thread Xiao Guangrong
This patch filters noslot pfn out from error pfns based on Marcelo comment: noslot pfn is not a error pfn After this patch, - is_noslot_pfn indicates that the gfn is not in slot - is_error_pfn indicates that the gfn is in slot but the error is occurred when translate the gfn to pfn -

Re: [PATCH] mm: compaction: Correct the nr_strict_isolated check for CMA

2012-10-16 Thread Rik van Riel
On 10/16/2012 04:39 AM, Mel Gorman wrote: Thierry reported that the iron out patch for isolate_freepages_block() had problems due to the strict check being too strict with mm: compaction: Iron out isolate_freepages_block() and isolate_freepages_range() -fix1. It's possible that more pages than

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

2012-10-16 Thread Avi Kivity
On 10/16/2012 01:58 PM, Paul Mackerras wrote: On Tue, Oct 16, 2012 at 12:06:58PM +0200, Avi Kivity wrote: On 10/16/2012 06:01 AM, Paul Mackerras wrote: +4.78 KVM_PPC_GET_HTAB_FD + +Capability: KVM_CAP_PPC_HTAB_FD +Architectures: powerpc +Type: vm ioctl +Parameters: Pointer to struct

Re: [PATCH] mm: compaction: Correct the nr_strict_isolated check for CMA

2012-10-16 Thread Minchan Kim
On Tue, Oct 16, 2012 at 09:39:27AM +0100, Mel Gorman wrote: Thierry reported that the iron out patch for isolate_freepages_block() had problems due to the strict check being too strict with mm: compaction: Iron out isolate_freepages_block() and isolate_freepages_range() -fix1. It's possible

Re: Using PCI config space to indicate config location

2012-10-16 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Fri, Oct 12, 2012 at 08:21:50PM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: On Fri, Oct 12, 2012 at 08:59:36AM +1030, Rusty Russell wrote: For writes, the standard seems to be a commit latch. We could abuse the

Re: Using PCI config space to indicate config location

2012-10-16 Thread Michael S. Tsirkin
On Tue, Oct 16, 2012 at 11:45:41PM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: On Fri, Oct 12, 2012 at 08:21:50PM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: On Fri, Oct 12, 2012 at 08:59:36AM +1030, Rusty Russell wrote: For writes,

Re: [PATCH 0/2] KVM: PPC: Support ioeventfd

2012-10-16 Thread Avi Kivity
On 10/16/2012 01:06 PM, Alexander Graf wrote: On 16.10.2012, at 13:01, Avi Kivity wrote: On 10/16/2012 12:59 PM, Alexander Graf wrote: On 16.10.2012, at 12:56, Avi Kivity wrote: On 10/15/2012 02:02 PM, Alexander Graf wrote: In order to support vhost, we need to be able to support

Re: [PATCH] vfio-pci: Add KVM INTx acceleration

2012-10-16 Thread Alex Williamson
On Tue, 2012-10-16 at 08:39 +0200, Michael S. Tsirkin wrote: On Mon, Oct 15, 2012 at 02:28:15PM -0600, Alex Williamson wrote: This makes use of the new level irqfd support enabling bypass of qemu userspace both on INTx injection and unmask. This significantly boosts the performance of

Re: Using PCI config space to indicate config location

2012-10-16 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Tue, Oct 16, 2012 at 11:45:41PM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: I was assuming the implementation would keep two complete copies of the config space: writes go to the scratch version, which gets copied to the

Re: [PATCH] vfio-pci: Add KVM INTx acceleration

2012-10-16 Thread Michael S. Tsirkin
On Tue, Oct 16, 2012 at 07:51:43AM -0600, Alex Williamson wrote: On Tue, 2012-10-16 at 08:39 +0200, Michael S. Tsirkin wrote: On Mon, Oct 15, 2012 at 02:28:15PM -0600, Alex Williamson wrote: This makes use of the new level irqfd support enabling bypass of qemu userspace both on INTx

Re: [PATCH] vfio-pci: Add KVM INTx acceleration

2012-10-16 Thread Alex Williamson
On Tue, 2012-10-16 at 16:14 +0200, Michael S. Tsirkin wrote: On Tue, Oct 16, 2012 at 07:51:43AM -0600, Alex Williamson wrote: On Tue, 2012-10-16 at 08:39 +0200, Michael S. Tsirkin wrote: On Mon, Oct 15, 2012 at 02:28:15PM -0600, Alex Williamson wrote: This makes use of the new level

Re: [PATCH 0/2] KVM: PPC: Support ioeventfd

2012-10-16 Thread Alexander Graf
On 10/16/2012 03:47 PM, Avi Kivity wrote: On 10/16/2012 01:06 PM, Alexander Graf wrote: On 16.10.2012, at 13:01, Avi Kivity wrote: On 10/16/2012 12:59 PM, Alexander Graf wrote: On 16.10.2012, at 12:56, Avi Kivity wrote: On 10/15/2012 02:02 PM, Alexander Graf wrote: In order to support

KVM call minutes for 2012-10-16

2012-10-16 Thread Juan Quintela
2012-10-16 -- - cpu as dev making qdev available to all parts of qemu is the best solution (aliguory) how does linux-user people think about it? Eduardo will follow Objections: * conceptually it makes no sense to have devices on *-user * desire of linux-user to maintain the

Re: KVM ept flush

2012-10-16 Thread Avi Kivity
On 10/16/2012 01:57 PM, Rohan Sharma wrote: Is there a way to flush ept entries in qemu-kvm. No. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH] vfio-pci: Add KVM INTx acceleration

2012-10-16 Thread Michael S. Tsirkin
On Tue, Oct 16, 2012 at 08:48:04AM -0600, Alex Williamson wrote: On Tue, 2012-10-16 at 16:14 +0200, Michael S. Tsirkin wrote: On Tue, Oct 16, 2012 at 07:51:43AM -0600, Alex Williamson wrote: On Tue, 2012-10-16 at 08:39 +0200, Michael S. Tsirkin wrote: On Mon, Oct 15, 2012 at 02:28:15PM

Re: [PATCH] vfio-pci: Add KVM INTx acceleration

2012-10-16 Thread Alex Williamson
On Tue, 2012-10-16 at 17:08 +0200, Michael S. Tsirkin wrote: On Tue, Oct 16, 2012 at 08:48:04AM -0600, Alex Williamson wrote: On Tue, 2012-10-16 at 16:14 +0200, Michael S. Tsirkin wrote: On Tue, Oct 16, 2012 at 07:51:43AM -0600, Alex Williamson wrote: On Tue, 2012-10-16 at 08:39 +0200,

Re: [PATCH] vfio-pci: Add KVM INTx acceleration

2012-10-16 Thread Michael S. Tsirkin
On Tue, Oct 16, 2012 at 09:13:15AM -0600, Alex Williamson wrote: There's no chance we ship e.g. q35 by mistake without this API: since there is no way this specific assert can be missed in even basic testing: So I see it differently: As coded here: chipset authors get lazy

I/O errors in guest OS after repeated migration

2012-10-16 Thread Guido Winkelmann
Hi, I'm experiencing I/O errors in a guest machine after migrating it from one host to another, and then back to the original host. After doing this, I find the following in the dmesg output of the guest machine: [ 345.390543] end_request: I/O error, dev vda, sector 273871 [ 345.391125]

Re: [PATCH] vfio-pci: Add KVM INTx acceleration

2012-10-16 Thread Alex Williamson
On Tue, 2012-10-16 at 17:23 +0200, Michael S. Tsirkin wrote: On Tue, Oct 16, 2012 at 09:13:15AM -0600, Alex Williamson wrote: There's no chance we ship e.g. q35 by mistake without this API: since there is no way this specific assert can be missed in even basic testing: So I see it

Re: [PATCH] vfio-pci: Add KVM INTx acceleration

2012-10-16 Thread Michael S. Tsirkin
On Tue, Oct 16, 2012 at 10:49:38AM -0600, Alex Williamson wrote: On Tue, 2012-10-16 at 17:23 +0200, Michael S. Tsirkin wrote: On Tue, Oct 16, 2012 at 09:13:15AM -0600, Alex Williamson wrote: There's no chance we ship e.g. q35 by mistake without this API: since there is no way this

Re: I/O errors in guest OS after repeated migration

2012-10-16 Thread Brian Jackson
On Tuesday, October 16, 2012 11:33:44 AM Guido Winkelmann wrote: Hi, I'm experiencing I/O errors in a guest machine after migrating it from one host to another, and then back to the original host. After doing this, I find the following in the dmesg output of the guest machine: [

[patch 08/15] x86: pvclock: generic pvclock vsyscall initialization

2012-10-16 Thread Marcelo Tosatti
Originally from Jeremy Fitzhardinge. Introduce generic, non hypervisor specific, pvclock initialization routines. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: vsyscall/arch/x86/kernel/pvclock.c === ---

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

2012-10-16 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com 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 13/15] KVM: x86: pass host_tsc to read_l1_tsc

2012-10-16 Thread Marcelo Tosatti
Allow the caller to pass host tsc value to kvm_x86_ops-read_l1_tsc(). Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: vsyscall/arch/x86/include/asm/kvm_host.h === --- vsyscall.orig/arch/x86/include/asm/kvm_host.h +++

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

2012-10-16 Thread Marcelo Tosatti
KVM added a global variable to guarantee monotonicity in the guest. It is necessary because the time between 1. ktime_get_ts(timespec); 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. The

[patch 14/15] time: export time information for KVM pvclock

2012-10-16 Thread Marcelo Tosatti
As suggested by John, export time data similarly to how its by vsyscall support. This allows KVM to retrieve necessary information to implement vsyscall support in KVM guests. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: vsyscall/include/linux/pvclock_gtod.h

[patch 03/15] x86: pvclock: remove pvclock_shadow_time

2012-10-16 Thread Marcelo Tosatti
Originally from Jeremy Fitzhardinge. We can copy the information directly from struct pvclock_vcpu_time_info, remove pvclock_shadow_time. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: vsyscall/arch/x86/kernel/pvclock.c

[patch 05/15] x86: pvclock: fix flags usage race

2012-10-16 Thread Marcelo Tosatti
Validity of values returned by pvclock (including flags) is guaranteed by version checks. That is, read of src-flags outside version check protection can refer to a different paravirt clock update by the hypervisor. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index:

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

2012-10-16 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 mtosa...@redhat.com Index: vsyscall/arch/x86/vdso/vclock_gettime.c

[patch 09/15] x86: kvm guest: pvclock vsyscall support

2012-10-16 Thread Marcelo Tosatti
Allow hypervisor to update userspace visible copy of pvclock data. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: vsyscall/arch/x86/kernel/kvmclock.c === --- vsyscall.orig/arch/x86/kernel/kvmclock.c +++

[patch 07/15] sched: add notifier for cross-cpu migrations

2012-10-16 Thread Marcelo Tosatti
Originally from Jeremy Fitzhardinge. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: vsyscall/include/linux/sched.h === --- vsyscall.orig/include/linux/sched.h +++ vsyscall/include/linux/sched.h @@ -107,6 +107,14 @@ extern

[patch 12/15] KVM: x86: introduce facility to support vsyscall pvclock, via MSR

2012-10-16 Thread Marcelo Tosatti
Allow a guest to register a second location for the VCPU time info structure for each vcpu (as described by MSR_KVM_SYSTEM_TIME_NEW). This is intended to allow the guest kernel to map this information into a usermode accessible page, so that usermode can efficiently calculate system time from the

[patch 00/15] pvclock vsyscall support + KVM hypervisor support

2012-10-16 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 (including an mfence, that measurement). NOTE:

[patch 10/15] x86: vsyscall: pass mode to gettime backend

2012-10-16 Thread Marcelo Tosatti
Required by next patch. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: vsyscall/arch/x86/vdso/vclock_gettime.c === --- vsyscall.orig/arch/x86/vdso/vclock_gettime.c +++ vsyscall/arch/x86/vdso/vclock_gettime.c @@ -80,7

[patch 02/15] x86: pvclock: make sure rdtsc doesnt speculate out of region

2012-10-16 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 mtosa...@redhat.com Index: vsyscall/arch/x86/kernel/pvclock.c === ---

[patch 04/15] x86: pvclock: create helper for pvclock data retrieval

2012-10-16 Thread Marcelo Tosatti
Originally from Jeremy Fitzhardinge. So code can be reused. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: vsyscall/arch/x86/kernel/pvclock.c === --- vsyscall.orig/arch/x86/kernel/pvclock.c +++

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

2012-10-16 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. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: vsyscall/arch/x86/kvm/x86.c === ---

Re: KVM ept flush

2012-10-16 Thread Rohan Sharma
Thanks for the reply. I have one more question. If I do munmap of the RAM allocated in qemu, will the changes be reflected in KVM Ept. I guess there is some mmu notifier which ensures that entries of EPT are synced with the host entries. On Tue, Oct 16, 2012 at 8:27 PM, Avi Kivity a...@redhat.com

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

2012-10-16 Thread Anthony Liguori
Avi Kivity a...@redhat.com writes: On 10/16/2012 01:58 PM, Paul Mackerras wrote: On Tue, Oct 16, 2012 at 12:06:58PM +0200, Avi Kivity wrote: On 10/16/2012 06:01 AM, Paul Mackerras wrote: +4.78 KVM_PPC_GET_HTAB_FD + +Capability: KVM_CAP_PPC_HTAB_FD +Architectures: powerpc +Type: vm

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

2012-10-16 Thread Paul Mackerras
On Tue, Oct 16, 2012 at 03:06:33PM +0200, Avi Kivity wrote: On 10/16/2012 01:58 PM, Paul Mackerras wrote: On Tue, Oct 16, 2012 at 12:06:58PM +0200, Avi Kivity wrote: Does/should the fd support O_NONBLOCK and poll? (=waiting for an entry to change). No. This forces userspace to

[PATCH RFC V2 1/5] Alter the amount of steal time reported by the guest.

2012-10-16 Thread Michael Wolf
Modify the amount of stealtime that the kernel reports via the /proc interface. Steal time will now be broken down into steal_time and consigned_time. Consigned_time will represent the amount of time that is expected to be lost due to overcommitment of the physical cpu or by using cpu capping.

[PATCH RFC V2 3/5] Add the code to send the consigned time from the host to the guest

2012-10-16 Thread Michael Wolf
Add the code to send the consigned time from the host to the guest Signed-off-by: Michael Wolf m...@linux.vnet.ibm.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/include/asm/kvm_para.h |3 ++- arch/x86/include/asm/paravirt.h |4 ++-- arch/x86/kernel/kvm.c |3 ++-

[PATCH RFC V2 5/5] Add an ioctl to communicate the consign limit to the host.

2012-10-16 Thread Michael Wolf
Add an ioctl to communicate the consign limit to the host. Signed-off-by: Michael Wolf m...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c |6 ++ include/linux/kvm.h |2 ++ include/linux/kvm_host.h |2 ++ virt/kvm/kvm_main.c |7 +++ 4 files changed, 17

[PATCH] Added call parameter to track whether invocation originated with guest or elsewhere

2012-10-16 Thread Will Auld
Signed-off-by: Will Auld will.a...@intel.com --- Resending to full list Marcelo, This patch is what I believe you ask for as foundational for later patches to address IA32_TSC_ADJUST. Thanks, Will arch/x86/include/asm/kvm_host.h | 8 arch/x86/kvm/svm.c | 18

[PATCH RFC V2 4/5] Add a timer to allow the separation of consigned from steal time.

2012-10-16 Thread Michael Wolf
Add a timer to the host. This will define the period. During a period the first n ticks will go into the consigned bucket. Any other ticks that occur within the period will be placed in the stealtime bucket. Signed-off-by: Michael Wolf m...@linux.vnet.ibm.com ---

[PATCH RFC V2 0/5] Separate consigned (expected steal) from steal time.

2012-10-16 Thread Michael Wolf
In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time being reported in accounting tools such as top or vmstat. This can cause confusion for the end user. To ease the confusion this patch set adds the idea of consigned

[PATCH RFC V2 2/5] Expand the steal time msr to also contain the consigned time.

2012-10-16 Thread Michael Wolf
Add a consigned field. This field will hold the time lost due to capping or overcommit. The rest of the time will still show up in the steal-time field. Signed-off-by: Michael Wolf m...@linux.vnet.ibm.com --- arch/x86/include/asm/paravirt.h |4 ++-- arch/x86/kernel/kvm.c |7

RE: KVM_MAX_VCPUS

2012-10-16 Thread Wei, Bing (WeiBing, MCXS-SH)
For pCPU/core and VCPUS/logical cpu mapping, It should be 8 multiple. 254 is reasonable. Or something I miss? -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Vinod, Chegu Sent: Sunday, October 14, 2012 9:43 PM To: Gleb Natapov Cc: Sasha

[PATCH 1/2] KVM: VMX: report internal error for the unhandleable event

2012-10-16 Thread Xiao Guangrong
VM exits during Event Delivery is really unexpected if it is not caused by Exceptions/EPT-VIOLATION/TASK_SWITCH, we'd better to report an internal and freeze the guest, the VMM has the chance to check the guest Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/vmx.c

[PATCH 2/2] KVM: VMX: report internal error for MMIO #PF due to delivery event

2012-10-16 Thread Xiao Guangrong
The #PF with PFEC.RSV = 1 indicates that the guest is accessing MMIO, we can not fix it if it is caused by delivery event. Reporting internal error for this case Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/vmx.c | 26 -- 1 files

Re: [PATCH] kvm/powerpc: Handle errors in secondary thread grabbing

2012-10-16 Thread Michael Ellerman
On Tue, 2012-10-16 at 14:13 +1100, Paul Mackerras wrote: Michael, On Tue, Oct 16, 2012 at 11:15:50AM +1100, Michael Ellerman wrote: In the Book3s HV code, kvmppc_run_core() has logic to grab the secondary threads of the physical core. If for some reason a thread is stuck,

Re: [PATCH 0/8] Various Book3s HV fixes that haven't been picked up yet

2012-10-16 Thread Alexander Graf
On 16.10.2012, at 05:08, Paul Mackerras pau...@samba.org wrote: On Mon, Oct 15, 2012 at 02:00:54PM +0200, Alexander Graf wrote: Sorry, I can't accept patches that haven't shown up on kvm@vger. Please send this patch set again with CC to kvm@vger. Done; I didn't cc kvm-ppc this time

Re: [PATCH 1/5] KVM: Provide mmu notifier retry test based on struct kvm

2012-10-16 Thread Avi Kivity
On 10/16/2012 05:59 AM, Paul Mackerras wrote: The mmu_notifier_retry() function, used to test whether any page invalidations are in progress, currently takes a vcpu pointer, though the code only needs the VM's struct kvm pointer. Forthcoming patches to the powerpc Book3S HV code will need to

Re: [PATCH 1/5] KVM: Provide mmu notifier retry test based on struct kvm

2012-10-16 Thread Alexander Graf
On 16.10.2012, at 11:44, Avi Kivity wrote: On 10/16/2012 05:59 AM, Paul Mackerras wrote: The mmu_notifier_retry() function, used to test whether any page invalidations are in progress, currently takes a vcpu pointer, though the code only needs the VM's struct kvm pointer. Forthcoming

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

2012-10-16 Thread Avi Kivity
On 10/16/2012 06:01 AM, 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 the

Re: [PATCH 0/2] KVM: PPC: Support ioeventfd

2012-10-16 Thread Avi Kivity
On 10/15/2012 02:02 PM, Alexander Graf wrote: In order to support vhost, we need to be able to support ioeventfd. This patch set adds support for ioeventfd to PPC and makes it possible to do so without implementing irqfd along the way, as it requires an in-kernel irqchip which we don't have

Re: [PATCH 0/2] KVM: PPC: Support ioeventfd

2012-10-16 Thread Avi Kivity
On 10/16/2012 12:59 PM, Alexander Graf wrote: On 16.10.2012, at 12:56, Avi Kivity wrote: On 10/15/2012 02:02 PM, Alexander Graf wrote: In order to support vhost, we need to be able to support ioeventfd. This patch set adds support for ioeventfd to PPC and makes it possible to do so

Re: [PATCH 1/2] KVM: Distangle eventfd code from irqchip

2012-10-16 Thread Alexander Graf
On 16.10.2012, at 12:57, Avi Kivity wrote: On 10/15/2012 02:02 PM, Alexander Graf wrote: The current eventfd code assumes that when we have eventfd, we also have irqfd for in-kernel interrupt delivery. This is not necessarily true. On PPC we don't have an in-kernel irqchip yet, but we can

Re: [PATCH 0/2] KVM: PPC: Support ioeventfd

2012-10-16 Thread Alexander Graf
On 16.10.2012, at 13:01, Avi Kivity wrote: On 10/16/2012 12:59 PM, Alexander Graf wrote: On 16.10.2012, at 12:56, Avi Kivity wrote: On 10/15/2012 02:02 PM, Alexander Graf wrote: In order to support vhost, we need to be able to support ioeventfd. This patch set adds support for

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

2012-10-16 Thread Paul Mackerras
On Tue, Oct 16, 2012 at 12:06:58PM +0200, Avi Kivity wrote: On 10/16/2012 06:01 AM, Paul Mackerras wrote: +4.78 KVM_PPC_GET_HTAB_FD + +Capability: KVM_CAP_PPC_HTAB_FD +Architectures: powerpc +Type: vm ioctl +Parameters: Pointer to struct kvm_get_htab_fd (in) +Returns: file

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

2012-10-16 Thread Avi Kivity
On 10/16/2012 01:58 PM, Paul Mackerras wrote: On Tue, Oct 16, 2012 at 12:06:58PM +0200, Avi Kivity wrote: On 10/16/2012 06:01 AM, Paul Mackerras wrote: +4.78 KVM_PPC_GET_HTAB_FD + +Capability: KVM_CAP_PPC_HTAB_FD +Architectures: powerpc +Type: vm ioctl +Parameters: Pointer to struct

Re: [PATCH 0/2] KVM: PPC: Support ioeventfd

2012-10-16 Thread Avi Kivity
On 10/16/2012 01:06 PM, Alexander Graf wrote: On 16.10.2012, at 13:01, Avi Kivity wrote: On 10/16/2012 12:59 PM, Alexander Graf wrote: On 16.10.2012, at 12:56, Avi Kivity wrote: On 10/15/2012 02:02 PM, Alexander Graf wrote: In order to support vhost, we need to be able to support

Re: [PATCH 0/2] KVM: PPC: Support ioeventfd

2012-10-16 Thread Alexander Graf
On 10/16/2012 03:47 PM, Avi Kivity wrote: On 10/16/2012 01:06 PM, Alexander Graf wrote: On 16.10.2012, at 13:01, Avi Kivity wrote: On 10/16/2012 12:59 PM, Alexander Graf wrote: On 16.10.2012, at 12:56, Avi Kivity wrote: On 10/15/2012 02:02 PM, Alexander Graf wrote: In order to support

Re: [PATCH] kvm/powerpc: Handle errors in secondary thread grabbing

2012-10-16 Thread Benjamin Herrenschmidt
On Tue, 2012-10-16 at 17:00 +1100, Michael Ellerman wrote: Thanks for looking at this - but in fact this is fixed by my patch entitled KVM: PPC: Book3S HV: Fix some races in starting secondary threads submitted back on August 28. OK thanks. It seems that patch didn't make 3.7 ? I don't

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

2012-10-16 Thread Anthony Liguori
Avi Kivity a...@redhat.com writes: On 10/16/2012 01:58 PM, Paul Mackerras wrote: On Tue, Oct 16, 2012 at 12:06:58PM +0200, Avi Kivity wrote: On 10/16/2012 06:01 AM, Paul Mackerras wrote: +4.78 KVM_PPC_GET_HTAB_FD + +Capability: KVM_CAP_PPC_HTAB_FD +Architectures: powerpc +Type: vm

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

2012-10-16 Thread Paul Mackerras
On Tue, Oct 16, 2012 at 03:06:33PM +0200, Avi Kivity wrote: On 10/16/2012 01:58 PM, Paul Mackerras wrote: On Tue, Oct 16, 2012 at 12:06:58PM +0200, Avi Kivity wrote: Does/should the fd support O_NONBLOCK and poll? (=waiting for an entry to change). No. This forces userspace to