[PATCH 22/28] Issue warning when deprecated drive parameter boot=on|off is used

2012-10-31 Thread Marcelo Tosatti
-kvm original commit message: We do not want to maintain this option forever. It will be removed after a grace period of a few releases. So warn the user that this option has no effect and will become invalid soon. Signed-off-by: Marcelo Tosatti --- blockdev.c|6 ++ qemu-config.c

[PATCH 02/28] i386: kvm: kvm_arch_get_supported_cpuid: clean up has_kvm_features check

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost Instead of a function-specific has_kvm_features variable, simply use a "found" variable that will be checked in case we have to use the legacy get_para_features() interface. No behavior change, just code cleanup. Signed-off-by: Eduardo Habkost Signed-off-b

[PATCH 18/28] cirrus_vga: allow configurable vram size

2012-10-31 Thread Marcelo Tosatti
Allow RAM size to be configurable for cirrus, to allow migration compatibility from qemu-kvm. Acked-by: Gerd Hoffmann Signed-off-by: Marcelo Tosatti --- hw/cirrus_vga.c | 21 - 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/hw/cirrus_vga.c b/hw

[PATCH 07/28] i386: kvm: kvm_arch_get_supported_cpuid: replace if+switch with single 'if'

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost Additional fixups will be added, and making them a single 'if/else if' chain makes it clearer than two nested switch statements. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c | 23 +-- 1 files

[PATCH 03/28] i386: kvm: kvm_arch_get_supported_cpuid: use 'entry' variable

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost The reg switch will be moved to a separate function, so store the entry pointer in a variable. No behavior change, just code movement. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c |9 + 1 files changed, 5 insertions

[PATCH 08/28] i386: kvm: set CPUID_EXT_HYPERVISOR on kvm_arch_get_supported_cpuid()

2012-10-31 Thread Marcelo Tosatti
() set it, to let the rest of the code automatically know that the flag can be safely set by QEMU. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c inde

[PATCH 28/28] update-linux-headers.sh: Handle new kernel uapi/ directories

2012-10-31 Thread Marcelo Tosatti
. Signed-off-by: Peter Maydell Signed-off-by: Marcelo Tosatti --- scripts/update-linux-headers.sh |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 67be2ef..4c7b566 100755 --- a/scripts/update-linux

[PATCH 23/28] Issue warning when deprecated -tdf option is used

2012-10-31 Thread Marcelo Tosatti
: Marcelo Tosatti --- qemu-options.hx |3 +++ vl.c|4 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 4403c9c..628bd44 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2898,6 +2898,9 @@ DEF("no-kvm-pit"

[PATCH 09/28] i386: kvm: set CPUID_EXT_TSC_DEADLINE_TIMER on kvm_arch_get_supported_cpuid()

2012-10-31 Thread Marcelo Tosatti
te' global variable). Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index aabac72..aae8af2 100644 --- a/target-i386/k

[PATCH 01/28] i386: kvm: kvm_arch_get_supported_cpuid: move R_EDX hack outside of for loop

2012-10-31 Thread Marcelo Tosatti
ernel version that does that. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c | 31 ++- 1 files changed, 18 insertions(+), 13 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 3aa62b2..b7490f9 100644 --- a/t

[PATCH 19/28] Use machine options to emulate -no-kvm-irqchip

2012-10-31 Thread Marcelo Tosatti
-off-by: Marcelo Tosatti --- qemu-options.hx |3 +++ vl.c|5 + 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index a67a255..d813755 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2888,6 +2888,9 @@ STEXI Enable FIPS

[PATCH 24/28] Emulate qemu-kvms -no-kvm option

2012-10-31 Thread Marcelo Tosatti
: Marcelo Tosatti --- qemu-options.hx |3 +++ vl.c|4 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 628bd44..fe8f15c 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2888,6 +2888,9 @@ STEXI Enable FIPS 140-2

[PATCH 21/28] Use global properties to emulate -no-kvm-pit-reinjection

2012-10-31 Thread Marcelo Tosatti
-off-by: Marcelo Tosatti --- qemu-options.hx |4 vl.c| 15 +++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 42e642c..4403c9c 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2888,6 +2888,10 @@ STEXI

[PATCH 12/28] i386: kvm: mask cpuid_ext4_features bits earlier

2012-10-31 Thread Marcelo Tosatti
From: Eduardo Habkost This way all the filtering by GET_SUPPORTED_CPUID is being done at the same place in the code. Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/kvm.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target-i386

[PATCH 27/28] target-i386: kvm_cpu_fill_host: use GET_SUPPORTED_CPUID

2012-10-31 Thread Marcelo Tosatti
tures that don't need support on the host CPU (e.g. x2apic); * "check" and "enforce" options were not detecting problems when the host CPU did support a feature, but the KVM kernel code didn't support it. Signed-off-by: Eduardo Habkost Signed-off-by: Marcel

[PATCH 26/28] target-i386: cpu: make -cpu host/check/enforce code KVM-specific

2012-10-31 Thread Marcelo Tosatti
M-specific, document them as such, and rename them to kvm_check_features_against_host() and kvm_cpu_fill_host(). Signed-off-by: Eduardo Habkost Signed-off-by: Marcelo Tosatti --- target-i386/cpu.c | 25 ++--- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/t

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

2012-10-30 Thread Marcelo Tosatti
On Tue, Oct 30, 2012 at 12:34:25PM +0400, Glauber Costa wrote: > On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: > > 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_t

Re: [patch 09/18] KVM: x86: introduce facility to support vsyscall pvclock, via MSR

2012-10-30 Thread Marcelo Tosatti
On Tue, Oct 30, 2012 at 11:39:32AM +0200, Avi Kivity wrote: > On 10/29/2012 08:40 PM, Marcelo Tosatti wrote: > > On Mon, Oct 29, 2012 at 10:44:41AM -0700, Jeremy Fitzhardinge wrote: > >> On 10/29/2012 07:45 AM, Glauber Costa wrote: > >> > On 10/24/2012 0

Re: [patch 12/18] x86: vdso: pvclock gettime support

2012-10-30 Thread Marcelo Tosatti
On Tue, Oct 30, 2012 at 11:49:39AM +0400, Glauber Costa wrote: > On 10/29/2012 10:42 PM, Marcelo Tosatti wrote: > > On Mon, Oct 29, 2012 at 06:59:35PM +0400, Glauber Costa wrote: > >> On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: > >>> Improve performance of time

Re: [PATCH 1/2] x86/kexec: VMCLEAR vmcss on all cpus if necessary

2012-10-30 Thread Marcelo Tosatti
On Fri, Oct 19, 2012 at 01:44:31PM +0800, Zhang Yanfei wrote: > This patch provides a way to VMCLEAR vmcss related to guests > on all cpus before executing the VMXOFF when doing kdump. This > is used to ensure the VMCSs in the vmcore updated and > non-corrupted. > > Signed-off-by: zhangyanfei > -

Re: [PULL 00/12] ppc patch queue 2012-10-30

2012-10-30 Thread Marcelo Tosatti
On Tue, Oct 30, 2012 at 11:02:13AM +0100, Alexander Graf wrote: > Hi Avi / Marcelo, > > This is my current patch queue for ppc. Please pull. > > Headline changes are: > > * Fix 440 target > * Fix uapi conflict Can you regenerate against queue branch? (btw i forgot to update fsl_hcalls.h..

Re: [PATCH v11] kvm: notify host when the guest is panicked

2012-10-30 Thread Marcelo Tosatti
On Thu, Oct 25, 2012 at 11:42:32AM +0800, Hu Tao wrote: > We can know the guest is panicked when the guest runs on xen. > But we do not have such feature on kvm. > > Another purpose of this feature is: management app(for example: > libvirt) can do auto dump when the guest is panicked. If managemen

Re: [Qemu-devel] [PATCH] update-linux-headers.sh: Handle new kernel uapi/ directories

2012-10-30 Thread Marcelo Tosatti
On Tue, Oct 30, 2012 at 07:33:16PM +0100, Jan Kiszka wrote: > On 2012-10-30 10:48, Peter Maydell wrote: > > Ping? > > > > (patchwork url http://patchwork.ozlabs.org/patch/193125/) > > Should obviously go in soon. > > Jan Applied to uq/master, thanks. -- To unsubscribe from this list: send the

[PATCH] acpi_piix4: fix migration of gpe fields

2012-10-30 Thread Marcelo Tosatti
Migrate 16 bytes for en/sts fields (which is the correct size), increase version to 3, and document how to support incoming migration from qemu-kvm 1.2. Signed-off-by: Marcelo Tosatti diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 15275cf..519269a 100644 --- a/hw/acpi_piix4.c +++ b/hw

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

2012-10-29 Thread Marcelo Tosatti
On Wed, Oct 17, 2012 at 04:40:32PM +0200, Avi Kivity wrote: > On 10/16/2012 02:08 PM, Xiao Guangrong wrote: > > Remove mmu_is_invalid and use is_invalid_pfn instead > > > Applied 2-5 to next; 6 depends on 1, so will wait until it is merged > upstream. Applied 6. -- To unsubscribe from this list

Re: [PATCH v7 00/17] target-i386: Add way to expose VMWare CPUID

2012-10-29 Thread Marcelo Tosatti
=displayKC&externalId=1009458 > > Changes from v6 to v7: > Subject changed from "Allow changing of Hypervisor CPUIDs." to > "target-i386: Add way to expose VMWare CPUID" > Split out 01/16 target-i386: Add missing kvm bits. > It is no longer related to

Re: [QEMU PATCH 0/3] Fix -cpu host and enforce/check to use GET_SUPPORTED_CPUID

2012-10-29 Thread Marcelo Tosatti
On Wed, Oct 24, 2012 at 07:44:04PM -0200, Eduardo Habkost wrote: > This depends on a previous series I have submitted: > Subject: [QEMU PATCH 00/15] QEMU KVM_GET_SUPPORTED_CPUID cleanups and fixes > Message-Id: <1349383747-19383-1-git-send-email-ehabk...@redhat.com> > http://article.gmane.org

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

2012-10-29 Thread Marcelo Tosatti
On Mon, Oct 29, 2012 at 07:04:59PM +0400, Glauber Costa wrote: > On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: > > Allow the caller to pass host tsc value to kvm_x86_ops->read_l1_tsc(). > > > > Signed-off-by: Marcelo Tosatti > > Would you mind explaining why? &g

Re: [patch 12/18] x86: vdso: pvclock gettime support

2012-10-29 Thread Marcelo Tosatti
On Mon, Oct 29, 2012 at 06:59:35PM +0400, Glauber Costa wrote: > On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: > > Improve performance of time system calls when using Linux pvclock, > > by reading time info from fixmap visible copy of pvclock data. > > > > Original

Re: [patch 11/18] x86: vsyscall: pass mode to gettime backend

2012-10-29 Thread Marcelo Tosatti
On Mon, Oct 29, 2012 at 06:47:57PM +0400, Glauber Costa wrote: > On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: > > Required by next patch. > > > > Signed-off-by: Marcelo Tosatti > I don't see where. + if (unlikely(!(flags & PVCLOCK_TSC_STABLE_BIT))) +

Re: [patch 09/18] KVM: x86: introduce facility to support vsyscall pvclock, via MSR

2012-10-29 Thread Marcelo Tosatti
On Mon, Oct 29, 2012 at 10:44:41AM -0700, Jeremy Fitzhardinge wrote: > On 10/29/2012 07:45 AM, Glauber Costa wrote: > > On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: > >> Allow a guest to register a second location for the VCPU time info > >> > >> stru

Re: [patch 08/18] x86: pvclock: generic pvclock vsyscall initialization

2012-10-29 Thread Marcelo Tosatti
On Mon, Oct 29, 2012 at 06:18:20PM +0400, Glauber Costa wrote: > On 10/24/2012 05:13 PM, Marcelo Tosatti wrote: > > Index: vsyscall/arch/x86/Kconfig > > === > > --- vsyscall.orig/arch/x86/Kconfig > > ++

acpi_piix4 migration issue

2012-10-28 Thread Marcelo Tosatti
qemu-kvm 1.2 -> qemu-1.3 migration fails with Unknown savevm section type 48 load of migration failed Due to a fix in acpi_piix4 in qemu-kvm (attached at the end of the message). The problem is that qemu-kvm correctly uses 2 bytes for sts and 2 bytes for en fields (which is their allocated si

Re: [PATCH v7 1/1] target-i386: Add missing kvm bits.

2012-10-26 Thread Marcelo Tosatti
On Fri, Oct 12, 2012 at 03:43:23PM -0400, Don Slutz wrote: > Currently "-cpu host,-kvmclock,-kvm_nopiodelay,-kvm_mmu" does not > turn off all bits in CPUID 0x4001 EAX. > > The missing ones are KVM_FEATURE_STEAL_TIME and > KVM_FEATURE_CLOCKSOURCE_STABLE_BIT. > > This adds the names kvm_steal_t

Re: [PATCH] KVM: ia64: remove unused variable in kvm_release_vm_pages()

2012-10-26 Thread Marcelo Tosatti
On Wed, Oct 17, 2012 at 11:03:42PM +0800, Wei Yongjun wrote: > From: Wei Yongjun > > The variable base_gfn is initialized but never used > otherwise, so remove the unused variable. > > dpatch engine is used to auto generate this patch. > (https://github.com/weiyj/dpatch) > > Signed-off-by: Wei

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

2012-10-26 Thread Marcelo Tosatti
On Tue, Oct 23, 2012 at 07:56:54PM +, Auld, Will wrote: > Having looked closer at the tacked of changing out the index and data fields > in some > function calls for a struct parameter with these and a originator field (host > or guest) > it is less attractive than I thought it would be. The

Re: kvm-clock clocksource efficiency versus tsc...

2012-10-26 Thread Marcelo Tosatti
On Tue, Oct 16, 2012 at 10:54:59AM +0200, Erik Brakkee wrote: > 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 x8

Re: [PATCH 00/15] QEMU KVM_GET_SUPPORTED_CPUID cleanups and fixes

2012-10-26 Thread Marcelo Tosatti
On Thu, Oct 04, 2012 at 05:48:52PM -0300, Eduardo Habkost wrote: > Most of this series are just cleanups that will help when making -cpu > check/enforce work properly, with some fixes. > > In addition to code movements, the main changes are: > - x2apic won't be enabled if in-kernel irqchip is dis

Re: [PULL stable-0.15] Stable-0.15 queue for qemu-kvm

2012-10-26 Thread Marcelo Tosatti
y patches before qemu-stable-0.15.git, > where I will be tagging v0.15.2 shortly. > > Cc: Marcelo Tosatti > Cc: Avi Kivity > > Cc: Anthony Liguori > Cc: Bruce Rogers > > The following changes since commit 725ba81ec6812d7eeb69be92639eb81151b5306e: > > Merge

Re: [Qemu-devel] [QEMU PATCH] i386: cpu: add missing CPUID[EAX=7, ECX=0] flag names

2012-10-26 Thread Marcelo Tosatti
On Tue, Oct 09, 2012 at 12:43:52PM -0400, Don Slutz wrote: > On 10/09/12 10:03, Eduardo Habkost wrote: > >This makes QEMU recognize the following CPU flag names: > > > > Flags| Corresponding KVM kernel commit > > -+ > > FSGSBASE

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

2012-10-24 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 Index: vsyscall/arch/x86/kvm/x86.c === --- vsyscall.orig/arch

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

2012-10-24 Thread Marcelo Tosatti
Originally from Jeremy Fitzhardinge. So code can be reused. 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 @@ -26,13

[patch 10/18] x86: kvm guest: pvclock vsyscall support

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

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

2012-10-24 Thread Marcelo Tosatti
s obvious that guest TSC must be matched for the above to guarantee monotonicity. Allow master clock usage only if guest TSCs are synchronized. Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/include/asm/kvm_host.h === --

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

2012-10-24 Thread Marcelo Tosatti
TSC without having to make a syscall. Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/include/asm/kvm_para.h === --- vsyscall.orig/arch/x86/include/asm/kvm_para.h +++ vsyscall/arch/x86/include/asm/kvm_para.h @@ -23,6 +23,7

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

2012-10-24 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 Index: vsyscall/arch/x86/include/

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

2012-10-24 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 02/18] x86: pvclock: make sure rdtsc doesnt speculate out of region

2012-10-24 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

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

2012-10-24 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

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

2012-10-24 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. Please review. >From my POV, this is ready to merge

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

2012-10-24 Thread Marcelo Tosatti
case, allowing the guest to read clock from userspace. Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/kvm/x86.c === --- vsyscall.orig/arch/x86/kvm/x86.c +++ vsyscall/arch/x86/kvm/x86.c @@ -46,6 +46,7 @@ #include #include

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

2012-10-24 Thread Marcelo Tosatti
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) atomic64_set

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

2012-10-24 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. Signed-off-by: Marcelo Tosatti Index: vsyscall/include/linux/pvclock_gtod.h

[patch 11/18] x86: vsyscall: pass mode to gettime backend

2012-10-24 Thread Marcelo Tosatti
Required by next patch. Signed-off-by: Marcelo Tosatti 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 +80,7 @@ notrace static

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

2012-10-24 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 13/18] KVM: x86: pass host_tsc to read_l1_tsc

2012-10-24 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/

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

2012-10-24 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 Index: vsyscall/arch/x86/kernel

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

2012-10-24 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

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

2012-10-24 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

[patch 2/2] kvm: x86: support pvclock userspace time msr

2012-10-24 Thread Marcelo Tosatti
Save/restore MSR if enabled, name cpuid bit. Signed-off-by: Marcelo Tosatti Index: qemu-kvm-vsyscall/target-i386/cpu.h === --- qemu-kvm-vsyscall.orig/target-i386/cpu.h +++ qemu-kvm-vsyscall/target-i386/cpu.h @@ -700,6 +700,8

[patch 1/2] kvm: sync kernel headers

2012-10-24 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti Index: qemu-kvm-vsyscall/linux-headers/asm-x86/kvm_para.h === --- qemu-kvm-vsyscall.orig/linux-headers/asm-x86/kvm_para.h +++ qemu-kvm-vsyscall/linux-headers/asm-x86/kvm_para.h @@ -22,6 +22,8

[patch 0/2] qemu support for pvclock vsyscall

2012-10-24 Thread Marcelo Tosatti
$SUBJECT -- 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: [PATCH] Added call parameter to track whether invocation originated with guest or elsewhere

2012-10-17 Thread Marcelo Tosatti
On Wed, Oct 17, 2012 at 12:35:33PM +0200, Avi Kivity wrote: > On 10/17/2012 04:10 AM, Will Auld wrote: > > Signed-off-by: Will Auld > > --- > > > > Resending to full list > > > > Marcelo, > > > > This patch is what I believe you ask for as foundational for later > > patches to address IA32_TSC_

[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 Index: vsyscall/arch/x86/kvm/x86.c === --- vsyscall.orig/arch

[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 Index: vsyscall/arch/x86/kernel/pvclock.c === --- vsyscall.orig/arch/x86/kernel/pvclock.c +++ vsyscall/arch/x86/kernel/pvclock.c @@ -26,13

[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 Index: vsyscall/arch/x86/kernel/pvclock.c === --- vsyscall.orig/arch

[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 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 +80,7 @@ notrace static

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

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

2012-10-16 Thread Marcelo Tosatti
TSC without having to make a syscall. Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/include/asm/kvm_para.h === --- vsyscall.orig/arch/x86/include/asm/kvm_para.h +++ vsyscall/arch/x86/include/asm/kvm_para.h @@ -23,6 +23,7

[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 Index: vsyscall/include/linux/sched.h === --- vsyscall.orig/include/linux/sched.h +++ vsyscall/include/linux/sched.h @@ -107,6 +107,14 @@ extern unsigned long

[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 Index: vsyscall/arch/x86/kernel/kvmclock.c === --- vsyscall.orig/arch/x86/kernel/kvmclock.c +++ vsyscall/arch/x86/kernel/kvmclock.c

[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 Index: vsyscall/arch/x86/vdso/vclock_gettime.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 Index: vsyscall/arch/x86/include/

[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 Index: vsyscall/arch/x86/kernel

[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 Index: vsyscall/include/linux/pvclock_gtod.h

[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 Index: vsyscall/arch/x86/include/asm/kvm_host.h === --- vsyscall.orig/arch/x86/include/asm/kvm_host.h +++ vsyscall/arch/

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

2012-10-16 Thread Marcelo Tosatti
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) atomic64_set

[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 Index: vsyscall/arch/x86/kernel/pvclock.c === --- vsyscall.orig/arch/x86/kernel

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

2012-10-16 Thread Marcelo Tosatti
data structure, then this problem disappears. Monotonicity is then guaranteed by the synchronicity of the host TSCs. Set TSC stable pvclock flag in that case, allowing the guest to read clock from userspace. Signed-off-by: Marcelo Tosatti Index: vsyscall/arch/x86/kvm/x86.c

Re: [PATCH v4 1/5] KVM: MMU: fix release noslot pfn

2012-10-14 Thread Marcelo Tosatti
On Fri, Oct 12, 2012 at 05:49:30PM +0800, Xiao Guangrong wrote: > On 10/11/2012 10:31 PM, Marcelo Tosatti wrote: > > On Thu, Oct 11, 2012 at 09:06:12PM +0800, Xiao Guangrong wrote: > >> On 10/10/2012 11:11 PM, Marcelo Tosatti wrote: > >> > >>> > >&g

Re: [PATCH v4 1/5] KVM: MMU: fix release noslot pfn

2012-10-11 Thread Marcelo Tosatti
On Thu, Oct 11, 2012 at 09:06:12PM +0800, Xiao Guangrong wrote: > On 10/10/2012 11:11 PM, Marcelo Tosatti wrote: > > > > > Why does is_error_pfn() return true for mmio spte? Its not an "error", > > after all. > > > > Please kill is_invalid_pfn and

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-10-11 Thread Marcelo Tosatti
ialization after live migration, I will provide some output > with explanation once I am able to again. At the moment, I have hosed my > system and need to figure out what's wrong and fix it first. Ok no problem. > Thanks, > > Will > > -Original Message- >

Re: [PATCH 2/3] s390/kvm: Add documentation for KVM_S390_INTERRUPT.

2012-10-10 Thread Marcelo Tosatti
On Wed, Oct 10, 2012 at 03:43:10PM -0300, Marcelo Tosatti wrote: > On Wed, Oct 10, 2012 at 06:37:57PM +0200, Cornelia Huck wrote: > > On Wed, 10 Oct 2012 13:27:09 -0300 > > Marcelo Tosatti wrote: > > > > > > +Archtectures: s390 > > > > > &

Re: [PATCH v2 00/14] KVM/ARM Implementation

2012-10-10 Thread Marcelo Tosatti
ost.h > create mode 100644 arch/arm/include/asm/kvm_mmu.h > create mode 100644 arch/arm/kvm/Kconfig > create mode 100644 arch/arm/kvm/Makefile > create mode 100644 arch/arm/kvm/arm.c > create mode 100644 arch/arm/kvm/coproc.c > create mode 100644 arch/arm/kvm/coproc.h > create mode 100644 arch/arm/kvm/coproc_a15.c > create mode 100644 arch/arm/kvm/emulate.c > create mode 100644 arch/arm/kvm/guest.c > create mode 100644 arch/arm/kvm/init.S > create mode 100644 arch/arm/kvm/interrupts.S > create mode 100644 arch/arm/kvm/interrupts_head.S > create mode 100644 arch/arm/kvm/mmu.c > create mode 100644 arch/arm/kvm/reset.c > create mode 100644 arch/arm/kvm/trace.h > -- > -- > 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 Reviewed-by: Marcelo Tosatti -- 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: [PATCH] virt/kvm: change kvm_assign_device() to print return value when iommu_attach_device() fails

2012-10-10 Thread Marcelo Tosatti
On Mon, Oct 08, 2012 at 06:36:11PM -0600, Shuah Khan wrote: > Change existing kernel error message to include return value from > iommu_attach_device() when it fails. This will help debug device > assignment failures more effectively. > > Signed-off-by: Shuah Khan Applied, thanks. -- To unsubsc

Re: [PATCH 2/3] s390/kvm: Add documentation for KVM_S390_INTERRUPT.

2012-10-10 Thread Marcelo Tosatti
On Wed, Oct 10, 2012 at 06:37:57PM +0200, Cornelia Huck wrote: > On Wed, 10 Oct 2012 13:27:09 -0300 > Marcelo Tosatti wrote: > > > > +Archtectures: s390 > > > > typo. > > > > +Note that the vcpu ioctl is asynchronous to vpcu execution. > > >

Re: [PATCH 3/3] KVM: Add KVM_VCPU_GET_REG_LIST/KVM_CAP_REG_LIST.

2012-10-10 Thread Marcelo Tosatti
On Wed, Sep 05, 2012 at 05:28:46PM +0930, Rusty Russell wrote: > This is a generic interface to find out what you can use > KVM_GET_ONE_REG/KVM_SET_ONE_REG on. Archs need to define > KVM_HAVE_REG_LIST and then kvm_arch_num_regs() and > kvm_arch_copy_reg_indices() functions. > > It's inspired by K

Re: [PATCH] virt/kvm: change kvm_assign_device() to print return value when iommu_attach_device() fails

2012-10-10 Thread Marcelo Tosatti
On Mon, Oct 08, 2012 at 06:36:11PM -0600, Shuah Khan wrote: > Change existing kernel error message to include return value from > iommu_attach_device() when it fails. This will help debug device > assignment failures more effectively. > > Signed-off-by: Shuah Khan > --- > virt/kvm/iommu.c |6

Re: [PATCH v4 5/5] KVM: MMU: introduce FNAME(prefetch_gpte)

2012-10-10 Thread Marcelo Tosatti
On Sun, Oct 07, 2012 at 08:05:11PM +0800, Xiao Guangrong wrote: > 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 > ---

Re: [PATCH 2/3] s390/kvm: Add documentation for KVM_S390_INTERRUPT.

2012-10-10 Thread Marcelo Tosatti
On Tue, Oct 02, 2012 at 04:25:37PM +0200, Christian Borntraeger wrote: > From: Cornelia Huck > > Signed-off-by: Cornelia Huck > Signed-off-by: Martin Schwidefsky > Signed-off-by: Christian Borntraeger > --- > Documentation/virtual/kvm/api.txt | 33 + > 1 file c

Re: [PATCH v4 1/5] KVM: MMU: fix release noslot pfn

2012-10-10 Thread Marcelo Tosatti
On Sun, Oct 07, 2012 at 08:01:34PM +0800, Xiao Guangrong wrote: > 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 > --- > arch/x86/kvm/mmu.c |3 +-- > virt/kvm/kvm

Re: [PATCH v6 05/16] target-i386: Use Hypervisor level in -machine pc,accel=kvm.

2012-10-10 Thread Marcelo Tosatti
On Wed, Oct 10, 2012 at 09:03:20AM -0400, Don Slutz wrote: > >>Did you mean 3 patch sets (or more)? Or just a different order? > >>-Don Slutz > >Different order. Patches should be logically related (think of what > >information the reviewer needs). Please write changelogs for > >every patch. >

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-10-10 Thread Marcelo Tosatti
i Kivity [mailto:a...@redhat.com] > Sent: Tuesday, October 09, 2012 5:12 AM > To: Marcelo Tosatti > Cc: Auld, Will; kvm@vger.kernel.org; Zhang, Xiantao > Subject: Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM > > On 10/08/2012 07:30 PM, Marcelo Tosatti wrote: > > >

Re: [PATCH v6 04/16] target-i386: Add x86_set_hyperv.

2012-10-09 Thread Marcelo Tosatti
On Tue, Oct 09, 2012 at 03:12:00PM -0400, Don Slutz wrote: > On 10/09/12 13:17, Marcelo Tosatti wrote: > >On Tue, Oct 09, 2012 at 01:34:09PM -0300, Marcelo Tosatti wrote: > >>On Mon, Sep 24, 2012 at 10:32:06AM -0400, Don Slutz wrote: > >>>This is used to set the cp

Re: [PATCH v6 05/16] target-i386: Use Hypervisor level in -machine pc,accel=kvm.

2012-10-09 Thread Marcelo Tosatti
On Tue, Oct 09, 2012 at 03:09:17PM -0400, Don Slutz wrote: > On 10/09/12 14:47, Marcelo Tosatti wrote: > >On Tue, Oct 09, 2012 at 03:27:26PM -0300, Marcelo Tosatti wrote: > >>On Tue, Oct 09, 2012 at 02:18:05PM -0300, Marcelo Tosatti wrote: > >>>On Mon, Sep 24, 2012

Re: [PATCH v6 14/16] target-i386: Add setting of Hypervisor leaf extra for known vmare4.

2012-10-09 Thread Marcelo Tosatti
On Mon, Sep 24, 2012 at 10:32:16AM -0400, Don Slutz wrote: > This was taken from: > http://article.gmane.org/gmane.comp.emulators.kvm.devel/22643 > > Signed-off-by: Don Slutz > --- > target-i386/cpu.c | 32 > 1 files changed, 32 insertions(+), 0 deletions(-)

Re: [PATCH v6 06/16] target-i386: Use Hypervisor level in -machine pc,accel=tcg.

2012-10-09 Thread Marcelo Tosatti
On Mon, Sep 24, 2012 at 10:32:08AM -0400, Don Slutz wrote: > Also known as Paravirtualization level. > > This change is based on: > > Microsoft Hypervisor CPUID Leaves: > > http://msdn.microsoft.com/en-us/library/windows/hardware/ff542428%28v=vs.85%29.aspx > > Linux kernel change starts with:

Re: [PATCH v6 08/16] target-i386: Add cpu object access routines for Hypervisor vendor.

2012-10-09 Thread Marcelo Tosatti
On Mon, Sep 24, 2012 at 10:32:10AM -0400, Don Slutz wrote: > These are modeled after x86_cpuid_set_vendor and x86_cpuid_get_vendor. > Since kvm's vendor is shorter, the test for correct size is removed and zero > padding is added. > > Set Microsoft's Vendor now that we can. Value defined in: >

Re: [PATCH v6 05/16] target-i386: Use Hypervisor level in -machine pc,accel=kvm.

2012-10-09 Thread Marcelo Tosatti
On Tue, Oct 09, 2012 at 03:27:26PM -0300, Marcelo Tosatti wrote: > On Tue, Oct 09, 2012 at 02:18:05PM -0300, Marcelo Tosatti wrote: > > On Mon, Sep 24, 2012 at 10:32:07AM -0400, Don Slutz wrote: > > > Also known as Paravirtualization level. > > > &g

Re: [PATCH v6 05/16] target-i386: Use Hypervisor level in -machine pc,accel=kvm.

2012-10-09 Thread Marcelo Tosatti
On Tue, Oct 09, 2012 at 02:18:05PM -0300, Marcelo Tosatti wrote: > On Mon, Sep 24, 2012 at 10:32:07AM -0400, Don Slutz wrote: > > Also known as Paravirtualization level. > > > > This change is based on: > > > > Microsoft Hypervisor CPUID Leaves: > > >

<    7   8   9   10   11   12   13   14   15   16   >