[COMMIT master] ksm support

2009-10-05 Thread Avi Kivity
From: Izik Eidus iei...@redhat.com Call madvise(MADV_MERGEABLE) on the memory allocations to allow the kernel to merge them. Signed-off-by: Izik Eidus iei...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/exec.c b/exec.c index 5c9edf7..406d2cb 100644 --- a/exec.c +++ b/exec.c

[COMMIT master] Merge branch 'upstream-merge'

2009-10-05 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com * upstream-merge: (55 commits) target-ppc: log instructions start in TCG code target-mips: log instructions start in TCG code Win32: avoid a warning BSD user: suppress a warning BSD user: implement GUEST_BASE tcg/i386: generates dec/inc

[COMMIT master] KVM: fix LAPIC timer period overflow

2009-10-05 Thread Avi Kivity
From: Aurelien Jarno aurel...@aurel32.net Don't overflow when computing the 64-bit period from 32-bit registers. Fixes sourceforge bug #2826486. Signed-off-by: Aurelien Jarno aurel...@aurel32.net Cc: sta...@kernel.org Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] KVM: add support for change_pte mmu notifiers

2009-10-05 Thread Avi Kivity
From: Izik Eidus iei...@redhat.com this is needed for kvm if it want ksm to directly map pages into its shadow page tables. [marcelo: cast pfn assignment to u64] Signed-off-by: Izik Eidus iei...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] KVM: MMU: add SPTE_HOST_WRITEABLE flag to the shadow ptes

2009-10-05 Thread Avi Kivity
From: Izik Eidus iei...@redhat.com this flag notify that the host physical page we are pointing to from the spte is write protected, and therefore we cant change its access to be write unless we run get_user_pages(write = 1). (this is needed for change_pte support in kvm) Signed-off-by: Izik

[COMMIT master] KVM: Separate timer intialization into an indepedent function

2009-10-05 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Signed-off-by: Zachary Amsden zams...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index fedac9d..15d2ace 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3116,9 +3116,22 @@

[COMMIT master] KVM: Kill the confusing tsc_ref_khz and ref_freq variables

2009-10-05 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com They are globals, not clearly protected by any ordering or locking, and vulnerable to various startup races. Instead, for variable TSC machines, register the cpufreq notifier and get the TSC frequency directly from the cpufreq machinery. Not only is it

[COMMIT master] KVM: Fix hotplug of CPUs

2009-10-05 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Both VMX and SVM require per-cpu memory allocation, which is done at module init time, for only online cpus. Backend was not allocating enough structure for all possible CPUs, so new CPUs coming online could not be hardware enabled. Signed-off-by: Zachary

[COMMIT master] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

2009-10-05 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[COMMIT master] KVM: VMX: flush TLB with INVEPT on cpu migration

2009-10-05 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com It is possible that stale EPTP-tagged mappings are used, if a vcpu migrates to a different pcpu. Set KVM_REQ_TLB_FLUSH in vmx_vcpu_load, when switching pcpus, which will invalidate both VPID and EPT mappings on the next vm-entry. Signed-off-by: Marcelo

[COMMIT master] KVM: Fix printk name error in svm.c

2009-10-05 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Signed-off-by: Zachary Amsden zams...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 9a4daca..d1036ce 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -330,13 +330,14 @@

[COMMIT master] KVM: Prevent overflow in KVM_GET_SUPPORTED_CPUID

2009-10-05 Thread Avi Kivity
From: Avi Kivity a...@redhat.com The number of entries is multiplied by the entry size, which can overflow on 32-bit hosts. Bound the entry count instead. Reported-by: David Wagner d...@cs.berkeley.edu Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/x86.c

[COMMIT master] KVM: x86: Rework guest single-step flag injection and filtering

2009-10-05 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com Push TF and RF injection and filtering on guest single-stepping into the vender get/set_rflags callbacks. This makes the whole mechanism more robust wrt user space IOCTL order and instruction emulations. Signed-off-by: Jan Kiszka jan.kis...@siemens.com

[COMMIT master] KVM: x86: Refactor guest debug IOCTL handling

2009-10-05 Thread Avi Kivity
From: Jan Kiszka jan.kis...@web.de Much of so far vendor-specific code for setting up guest debug can actually be handled by the generic code. This also fixes a minor deficit in the SVM part /wrt processing KVM_GUESTDBG_ENABLE. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi