13 Jan, 2012
1 commit
-
module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.Signed-off-by: Rusty Russell
27 Dec, 2011
39 commits
-
Signed-off-by: Avi Kivity
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
RDPMC is only privileged if CR4.PCE=0. check_rdpmc() already implements this,
so all we need to do is drop the Priv flag.Signed-off-by: Avi Kivity
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
Provide a CPUID leaf that describes the emulated PMU.
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
Intercept RDPMC and forward it to the PMU emulation code.
Signed-off-by: Avi Kivity
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
Intercept RDPMC and forward it to the PMU emulation code.
Signed-off-by: Avi Kivity
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
Add a helper function that emulates the RDPMC instruction operation.
Signed-off-by: Avi Kivity
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
Use perf_events to emulate an architectural PMU, version 2.
Based on PMU version 1 emulation by Avi Kivity.
[avi: adjust for cpuid.c]
[jan: fix anonymous field initialization for older gcc]Signed-off-by: Gleb Natapov
Signed-off-by: Jan Kiszka
Signed-off-by: Avi Kivity -
Needed to deliver performance monitoring interrupts.
Signed-off-by: Avi Kivity
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
Group 9: 0F C7
Rename em_grp9() to em_cmpxchg8b() and register it.
Signed-off-by: Takuya Yoshikawa
Signed-off-by: Avi Kivity -
Group 4: FE
Group 5: FFSigned-off-by: Takuya Yoshikawa
Signed-off-by: Avi Kivity -
Group 1A: 8F
Register em_pop() directly and remove em_grp1a().
Signed-off-by: Takuya Yoshikawa
Signed-off-by: Avi Kivity -
Drop bsp_vcpu pointer from kvm struct since its only use is incorrect
anyway.Signed-off-by: Gleb Natapov
Signed-off-by: Marcelo Tosatti -
Move the test for KVM_PIT_FLAGS_HPET_LEGACY into create_pit_timer
instead of replicating it on the caller site.Signed-off-by: Jan Kiszka
Signed-off-by: Marcelo Tosatti -
Works so far by change, but it is not guaranteed to stay like this.
Signed-off-by: Jan Kiszka
Signed-off-by: Marcelo Tosatti -
PMU virtualization needs to talk to Intel-specific bits of perf; these are
only available when CPU_SUP_INTEL=y.Fixes
arch/x86/built-in.o: In function `atomic_switch_perf_msrs':
vmx.c:(.text+0x6b1d4): undefined reference to `perf_guest_get_msrs'Reported-by: Ingo Molnar
Reported-by: Randy Dunlap
Signed-off-by: Avi Kivity
Signed-off-by: Marcelo Tosatti -
Switch to using memdup_user when possible. This makes code more
smaller and compact, and prevents errors.Signed-off-by: Sasha Levin
Signed-off-by: Avi Kivity -
Switch to kmemdup() in two places to shorten the code and avoid possible bugs.
Signed-off-by: Sasha Levin
Signed-off-by: Avi Kivity -
This was probably copy&pasted from the cr0 case, but it's unneeded here.
Signed-off-by: Jan Kiszka
Signed-off-by: Avi Kivity -
freed_pages is never evaluated, so remove it as well as the return code
kvm_mmu_remove_some_alloc_mmu_pages so far delivered to its only user.Signed-off-by: Jan Kiszka
Signed-off-by: Avi Kivity -
percpu_xxx funcs are duplicated with this_cpu_xxx funcs, so replace them
for further code clean up.And in preempt safe scenario, __this_cpu_xxx funcs has a bit better
performance since __this_cpu_xxx has no redundant preempt_disable()Signed-off-by: Alex Shi
Signed-off-by: Avi Kivity -
inline audit function and little cleanup
Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
The unsync code should be stable now, maybe it is the time to remove this
parameter to cleanup the code a little bitSigned-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
Move the mmu code in kvm_arch_vcpu_init() to kvm_mmu_create()
Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
KVM_EXIT_HYPERCALL is not used anymore, so remove the code
Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
The tracepoint is only used to audit mmu code, it should not be exposed to
user, let us replace it with jump-label.Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
This patch cleans and simplifies kvm_dev_ioctl_get_supported_cpuid by using a table
instead of duplicating code as Avi suggested.This patch also fixes a bug where kvm_dev_ioctl_get_supported_cpuid would return
-E2BIG when amount of entries passed was just right.Signed-off-by: Sasha Levin
Signed-off-by: Avi Kivity -
Intel latest cpu add 6 new features, refer http://software.intel.com/file/36945
The new feature cpuid listed as below:1. FMA CPUID.EAX=01H:ECX.FMA[bit 12]
2. MOVBE CPUID.EAX=01H:ECX.MOVBE[bit 22]
3. BMI1 CPUID.EAX=07H,ECX=0H:EBX.BMI1[bit 3]
4. AVX2 CPUID.EAX=07H,ECX=0H:EBX.AVX2[bit 5]
5. BMI2 CPUID.EAX=07H,ECX=0H:EBX.BMI2[bit 8]
6. LZCNT CPUID.EAX=80000001H:ECX.LZCNT[bit 5]This patch expose these features to guest.
Among them, FMA/MOVBE/LZCNT has already been defined, MOVBE/LZCNT has
already been exposed.This patch defines BMI1/AVX2/BMI2, and exposes FMA/BMI1/AVX2/BMI2 to guest.
Signed-off-by: Liu, Jinsong
Signed-off-by: Avi Kivity -
The cpuid code has grown; put it into a separate file.
Signed-off-by: Avi Kivity
-
INSB : 6C
INSW/INSD : 6D
OUTSB : 6E
OUTSW/OUTSD: 6FThe I/O port address is read from the DX register when we decode the
operand because we see the SrcDX/DstDX flag is set.Signed-off-by: Takuya Yoshikawa
Signed-off-by: Avi Kivity -
Introduce id_to_memslot to get memslot by slot id
Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
Introduce kvm_for_each_memslot to walk all valid memslot
Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
Introduce update_memslots to update slot which will be update to
kvm->memslotsSigned-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
Introduce KVM_MEM_SLOTS_NUM macro to instead of
KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTSSigned-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
BSF: 0F BC
BSR: 0F BDSigned-off-by: Takuya Yoshikawa
Signed-off-by: Marcelo Tosatti -
CMPXCHG: 0F B0, 0F B1
Signed-off-by: Takuya Yoshikawa
Signed-off-by: Marcelo Tosatti -
WRMSR: 0F 30
RDMSR: 0F 32Signed-off-by: Takuya Yoshikawa
Signed-off-by: Marcelo Tosatti -
MOV: 0F 22 (move to control registers)
MOV: 0F 23 (move to debug registers)Signed-off-by: Takuya Yoshikawa
Signed-off-by: Marcelo Tosatti -
CALL: E8
Signed-off-by: Takuya Yoshikawa
Signed-off-by: Marcelo Tosatti -
BT : 0F A3
BTS: 0F AB
BTR: 0F B3
BTC: 0F BBGroup 8: 0F BA
Signed-off-by: Takuya Yoshikawa
Signed-off-by: Marcelo Tosatti