x86: pkey: introduce write_pkru() for KVM
[deliverable/linux.git] / arch / x86 / include / asm / pgtable.h
index 1ff49ec29ecede42b78c49132e431ea4ed193026..97f3242e133ccc9c2866baade8ca4f82ade65f04 100644 (file)
@@ -107,6 +107,12 @@ static inline u32 read_pkru(void)
        return 0;
 }
 
+static inline void write_pkru(u32 pkru)
+{
+       if (boot_cpu_has(X86_FEATURE_OSPKE))
+               __write_pkru(pkru);
+}
+
 static inline int pte_young(pte_t pte)
 {
        return pte_flags(pte) & _PAGE_ACCESSED;
This page took 0.038642 seconds and 5 git commands to generate.