diff options
author | Feng Wu <feng.wu@intel.com> | 2014-04-01 17:46:34 +0800 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2014-04-14 17:50:34 -0300 |
commit | 97ec8c067d322d32effdc1701760d3babbc5595f (patch) | |
tree | 16892fd16ce9e3d60c68b01f7bf11a8821eb3295 /arch/x86/kvm/paging_tmpl.h | |
parent | 56d6efc2de5fcf76d3c7b33a7671bc04c53cb0e5 (diff) |
KVM: Add SMAP support when setting CR4
This patch adds SMAP handling logic when setting CR4 for guests
Thanks a lot to Paolo Bonzini for his suggestion to use the branchless
way to detect SMAP violation.
Signed-off-by: Feng Wu <feng.wu@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/paging_tmpl.h')
-rw-r--r-- | arch/x86/kvm/paging_tmpl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index b1e6c1bf68d3..123efd3ec29f 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -353,7 +353,7 @@ retry_walk: walker->ptes[walker->level - 1] = pte; } while (!is_last_gpte(mmu, walker->level, pte)); - if (unlikely(permission_fault(mmu, pte_access, access))) { + if (unlikely(permission_fault(vcpu, mmu, pte_access, access))) { errcode |= PFERR_PRESENT_MASK; goto error; } |