git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
x86/retpoline: Fill return stack buffer on vmexit
[pandora-kernel.git]
/
arch
/
x86
/
kvm
/
vmx.c
diff --git
a/arch/x86/kvm/vmx.c
b/arch/x86/kvm/vmx.c
index
34b68f5
..
00ad497
100644
(file)
--- a/
arch/x86/kvm/vmx.c
+++ b/
arch/x86/kvm/vmx.c
@@
-40,6
+40,7
@@
#include <asm/i387.h>
#include <asm/xcr.h>
#include <asm/perf_event.h>
#include <asm/i387.h>
#include <asm/xcr.h>
#include <asm/perf_event.h>
+#include <asm/nospec-branch.h>
#include "trace.h"
#include "trace.h"
@@
-6294,6
+6295,9
@@
static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
#endif
);
#endif
);
+ /* Eliminate branch target predictions from guest mode */
+ vmexit_fill_RSB();
+
vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP)
| (1 << VCPU_EXREG_RFLAGS)
| (1 << VCPU_EXREG_CPL)
vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP)
| (1 << VCPU_EXREG_RFLAGS)
| (1 << VCPU_EXREG_CPL)