From: Stephen Rothwell Date: Wed, 19 Jun 2013 04:39:28 +0000 (+1000) Subject: Merge remote-tracking branch 'kvm/linux-next' X-Git-Tag: next-20130619~34 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f1d1c403a294774b013330eeedf485c67648ef66;p=karo-tx-linux.git Merge remote-tracking branch 'kvm/linux-next' Conflicts: arch/s390/include/asm/pgtable.h --- f1d1c403a294774b013330eeedf485c67648ef66 diff --cc arch/s390/include/asm/pgtable.h index e8b6e5b8932c,1d0ad7d2d29a..90dd3a95e72e --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@@ -632,11 -628,10 +628,11 @@@ static inline void pgste_set_unlock(pte { #ifdef CONFIG_PGSTE asm( - " nihh %1,0xff7f\n" /* clear RCP_PCL_BIT */ + " nihh %1,0xff7f\n" /* clear PCL bit */ " stg %1,%0\n" : "=Q" (ptep[PTRS_PER_PTE]) - : "d" (pgste_val(pgste)), "Q" (ptep[PTRS_PER_PTE]) : "cc"); + : "d" (pgste_val(pgste)), "Q" (ptep[PTRS_PER_PTE]) + : "cc", "memory"); preempt_enable(); #endif } @@@ -712,19 -700,17 +708,19 @@@ static inline void pgste_set_key(pte_t { #ifdef CONFIG_PGSTE unsigned long address; - unsigned long okey, nkey; + unsigned long nkey; - if (!pte_present(entry)) + if (pte_val(entry) & _PAGE_INVALID) return; + VM_BUG_ON(!(pte_val(*ptep) & _PAGE_INVALID)); address = pte_val(entry) & PAGE_MASK; - okey = nkey = page_get_storage_key(address); - nkey &= ~(_PAGE_ACC_BITS | _PAGE_FP_BIT); - /* Set page access key and fetch protection bit from pgste */ - nkey |= (pgste_val(pgste) & (PGSTE_ACC_BITS | PGSTE_FP_BIT)) >> 56; - if (okey != nkey) - page_set_storage_key(address, nkey, 0); + /* + * Set page access key and fetch protection bit from pgste. + * The guest C/R information is still in the PGSTE, set real + * key C/R to 0. + */ - nkey = (pgste_val(pgste) & (RCP_ACC_BITS | RCP_FP_BIT)) >> 56; ++ nkey = (pgste_val(pgste) & (PGSTE_ACC_BITS | PGSTE_FP_BIT)) >> 56; + page_set_storage_key(address, nkey, 0); #endif }