- 01 Aug, 2010 40 commits
-
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Avi Kivity authored
All vcpu ioctls need to be locked, so instead of locking each one specifically we lock at the generic dispatcher. This patch only updates generic ioctls and leaves arch specific ioctls alone. Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Xiao Guangrong authored
fix: arch/x86/kvm/x86.c: In function ‘handle_emulation_failure’: arch/x86/kvm/x86.c:3844: warning: unused variable ‘ctxt’ Signed-off-by:
Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Xiao Guangrong authored
sp->gfns[] contain unaliased gfns, but gpte might contain pointer to aliased region. Signed-off-by:
Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Xiao Guangrong authored
Remove rmap before clear spte otherwise it will trigger BUG_ON() in some functions such as rmap_write_protect(). Signed-off-by:
Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Xiao Guangrong authored
Use kmem_cache_free to free objects allocated by kmem_cache_alloc. Signed-off-by:
Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Alex Williamson authored
Remove this check in an effort to allow kvm guests to run without root privileges. This capability check doesn't seem to add any security since the device needs to have already been added via the assign device ioctl and the io actually occurs through the pci sysfs interface. Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Sheng Yang authored
Only modifying some bits of CR0/CR4 needs paging mode switch. Modify EFER.NXE bit would result in reserved bit updates. Signed-off-by:
Sheng Yang <sheng@linux.intel.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Sheng Yang authored
mmu.free() already set root_hpa to INVALID_PAGE, no need to do it again in the destory_kvm_mmu(). kvm_x86_ops->set_cr4() and set_efer() already assign cr4/efer to vcpu->arch.cr4/efer, no need to do it again later. Signed-off-by:
Sheng Yang <sheng@linux.intel.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Mohammed Gamal authored
This adds missing decoder flags for xor instructions (opcodes 0x34 - 0x35) Signed-off-by:
Mohammed Gamal <m.gamal005@gmail.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Mohammed Gamal authored
This adds missing decoder flags for sub instructions (opcodes 0x2c - 0x2d) Signed-off-by:
Mohammed Gamal <m.gamal005@gmail.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Mohammed Gamal authored
This adds test acc, imm instruction to the x86 emulator Signed-off-by:
Mohammed Gamal <m.gamal005@gmail.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Marcelo Tosatti authored
Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Dongxiao Xu authored
SDM suggests VMXON should be called before VMPTRLD, and VMXOFF should be called after doing VMCLEAR. Therefore in vmm coexistence case, we should firstly call VMXON before any VMCS operation, and then call VMXOFF after the operation is done. Signed-off-by:
Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Dongxiao Xu authored
Originally VMCLEAR/VMPTRLD is called on vcpu migration. To support hosted VMM coexistance, VMCLEAR is executed on vcpu schedule out, and VMPTRLD is executed on vcpu schedule in. This could also eliminate the IPI when doing VMCLEAR. Signed-off-by:
Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Dongxiao Xu authored
Do some preparations for vmm coexistence support. Signed-off-by:
Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Dongxiao Xu authored
Define vmcs_load() and kvm_cpu_vmxon() to avoid direct call of asm code. Also move VMXE bit operation out of kvm_cpu_vmxoff(). Signed-off-by:
Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Gui Jianfeng authored
There's no member "cr4_nxe" in struct kvm_mmu_page_role, it names "nxe" now. Update mmu document. Signed-off-by:
Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Avi Kivity authored
We drop the mmu lock between freeing memory and allocating the roots; this allows some other vcpu to sneak in and allocate memory. While the race is benign (resulting only in temporary overallocation, not oom) it is simple and easy to fix by moving the freeing close to the allocation. Signed-off-by:
Avi Kivity <avi@redhat.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Gleb Natapov authored
Do not kill VM when instruction emulation fails. Inject #UD and report failure to userspace instead. Userspace may choose to reenter guest if vcpu is in userspace (cpl == 3) in which case guest OS will kill offending process and continue running. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gui Jianfeng authored
Currently, kvm_mmu_zap_page() returning the number of freed children sp. This might confuse the caller, because caller don't know the actual freed number. Let's make kvm_mmu_zap_page() return the number of pages it actually freed. Signed-off-by:
Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gui Jianfeng authored
Fix a debug output error in walk_addr Signed-off-by:
Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gui Jianfeng authored
Sometime cmpxchg_gpte doesn't modify gpte, in such case, don't mark page table page as dirty. Signed-off-by:
Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Joerg Roedel authored
This patch enables setting of efer bit 13 which is allowed in all SVM capable processors. This is necessary for the SLES11 version of Xen 4.0 to boot with nested svm. Signed-off-by:
Joerg Roedel <joerg.roedel@amd.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Joerg Roedel authored
This patch adds a function to dump the vmcb into the kernel log and calls it after a failed vmrun to ease debugging. Signed-off-by:
Joerg Roedel <joerg.roedel@amd.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Avi Kivity authored
KVM_REQ_KICK poisons vcpu->requests by having a bit set during normal operation. This causes the fast path check for a clear vcpu->requests to fail all the time, triggering tons of atomic operations. Fix by replacing KVM_REQ_KICK with a vcpu->guest_mode atomic. Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gleb Natapov authored
Return exception as a result of instruction emulation and handle injection in KVM code. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gleb Natapov authored
Emulator shouldn't access vcpu directly. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gleb Natapov authored
Emulator shouldn't access vcpu directly. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gleb Natapov authored
emulate_sysexit() should use shadowed registers copy instead of looking into vcpu state directly. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gleb Natapov authored
Removes the need for set_flags() callback. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gleb Natapov authored
Return new RIP as part of instruction emulation result instead of updating KVM's RIP from x86 emulator code. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gleb Natapov authored
If emulation failed return immediately. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gleb Natapov authored
Return error to x86 emulator instead of injection exception behind its back. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gleb Natapov authored
It is not called directly outside of the file it's defined in anymore. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gleb Natapov authored
Currently emulator returns -1 when emulation failed or IO is needed. Caller tries to guess whether emulation failed by looking at other variables. Make it easier for caller to recognise error condition by always returning -1 in case of failure. For this new emulator internal return value X86EMUL_IO_NEEDED is introduced. It is used to distinguish between error condition (which returns X86EMUL_UNHANDLEABLE) and condition that requires IO exit to userspace to continue emulation. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Gleb Natapov authored
Fill in run->mmio details in (read|write)_emulated function just like pio does. There is no point in filling only vcpu fields there just to copy them into vcpu->run a little bit later. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-