1
0
Fork 0
alistair23-linux/arch
Brijesh Singh 618232e219 KVM: x86: Avoid guest page table walk when gpa_available is set
When a guest causes a page fault which requires emulation, the
vcpu->arch.gpa_available flag is set to indicate that cr2 contains a
valid GPA.

Currently, emulator_read_write_onepage() makes use of gpa_available flag
to avoid a guest page walk for a known MMIO regions. Lets not limit
the gpa_available optimization to just MMIO region. The patch extends
the check to avoid page walk whenever gpa_available flag is set.

Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
[Fix EPT=0 according to Wanpeng Li's fix, plus ensure VMX also uses the
 new code. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
[Moved "ret < 0" to the else brach, as per David's review. - Radim]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
2017-08-18 14:37:49 +02:00
..
alpha tty: Fix TIOCGPTPEER ioctl definition 2017-07-17 17:04:41 +02:00
arc dma-coherent: introduce interface for default DMA pool 2017-07-20 16:09:10 +02:00
arm KVM: arm: implements the kvm_arch_vcpu_in_kernel() 2017-08-08 10:57:43 +02:00
arm64 KVM: arm: implements the kvm_arch_vcpu_in_kernel() 2017-08-08 10:57:43 +02:00
blackfin Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-07-21 10:41:19 -07:00
c6x Merge branch 'work.uaccess-unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-15 11:17:52 -07:00
cris Kbuild updates for v4.13 (2nd) 2017-07-13 13:37:57 -07:00
frv FRV: tlbflush: move asmlinkage before return type 2017-07-12 16:26:04 -07:00
h8300 h8300: Add missing closing parenthesis in flat_get_addr_from_rp() 2017-07-16 09:24:06 -07:00
hexagon hexagon: move generic-y of exported headers to uapi/asm/Kbuild 2017-07-10 03:43:26 +09:00
ia64 Merge branch 'work.uaccess-unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-15 11:17:52 -07:00
m32r Merge branch 'work.uaccess-unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-15 11:17:52 -07:00
m68k blackfin, m68k: Fix flat_set_persistent() for unsigned long to u32 changes 2017-07-16 09:24:06 -07:00
metag metag: move generic-y of exported headers to uapi/asm/Kbuild 2017-07-10 03:43:30 +09:00
microblaze Merge branch 'work.uaccess-unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-15 11:17:52 -07:00
mips KVM: add spinlock optimization framework 2017-08-08 10:57:43 +02:00
mn10300 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-07-21 10:41:19 -07:00
nios2 nios2: move generic-y of exported headers to uapi/asm/Kbuild 2017-07-11 21:33:43 +09:00
openrisc openrisc: move generic-y of exported headers to uapi/asm/Kbuild 2017-07-11 21:33:50 +09:00
parisc parisc: Define CONFIG_CPU_BIG_ENDIAN 2017-07-31 17:51:27 +02:00
powerpc KVM: add spinlock optimization framework 2017-08-08 10:57:43 +02:00
s390 KVM: s390: implements the kvm_arch_vcpu_in_kernel() 2017-08-08 10:57:43 +02:00
score Merge branch 'uaccess.strlen' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-06 22:07:44 -07:00
sh TTY/Serial fixes for 4.13-rc2 2017-07-22 09:00:24 -07:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc 2017-08-04 10:17:45 -07:00
tile Merge branch 'work.uaccess-unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-15 11:17:52 -07:00
um Merge branch 'for-linus-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2017-07-15 10:49:33 -07:00
unicore32 unicore32: move generic-y of exported headers to uapi/asm/Kbuild 2017-07-11 21:33:52 +09:00
x86 KVM: x86: Avoid guest page table walk when gpa_available is set 2017-08-18 14:37:49 +02:00
xtensa tty: Fix TIOCGPTPEER ioctl definition 2017-07-17 17:04:41 +02:00
.gitignore
Kconfig include/linux/string.h: add the option of fortified string.h functions 2017-07-12 16:26:03 -07:00