|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH Linux v2 7/7] xen: Add new Xen pv-op pte_get_and_clear.
>> diff --git a/arch/x86/include/asm/paravirt.h
>> b/arch/x86/include/asm/paravirt.h
>> index 0591aa38fd85..0a3a286c46f0 100644
>> --- a/arch/x86/include/asm/paravirt.h
>> +++ b/arch/x86/include/asm/paravirt.h
>> @@ -373,6 +373,11 @@ static inline void set_pmd(pmd_t *pmdp, pmd_t pmd)
>> PVOP_VCALL2(pv_ops, mmu.set_pmd, pmdp, native_pmd_val(pmd));
>> }
>>
>> +static inline pte_t pte_get_and_clear(pte_t *ptep)
>> +{
>> + return (pte_t){PVOP_CALL1(pte_t, mmu.pte_get_and_clear, ptep)};
>> +}
>> +
>> static inline pmd_t __pmd(pmdval_t val)
>> {
>> return (pmd_t) { PVOP_ALT_CALLEE1(pmdval_t, pv_ops, mmu.make_pmd, val,
>> diff --git a/arch/x86/include/asm/paravirt_types.h
>> b/arch/x86/include/asm/paravirt_types.h
>> index b4c4a23e77a1..1bd4c19450b5 100644
>> --- a/arch/x86/include/asm/paravirt_types.h
>> +++ b/arch/x86/include/asm/paravirt_types.h
>> @@ -135,6 +135,7 @@ struct pv_mmu_ops {
>> /* Pagetable manipulation functions */
>> void (*set_pte)(pte_t *ptep, pte_t pteval);
>> void (*set_pmd)(pmd_t *pmdp, pmd_t pmdval);
>> + pte_t (*pte_get_and_clear)(pte_t *ptep);
>>
>> pte_t (*ptep_modify_prot_start)(struct vm_area_struct *vma, unsigned
>>long addr,
>> pte_t *ptep);
>> diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
>> index ac295ca6c92f..b0d7d6520984 100644
>> --- a/arch/x86/include/asm/pgtable.h
>> +++ b/arch/x86/include/asm/pgtable.h
>> @@ -58,6 +58,7 @@ extern pmdval_t early_pmd_flags;
>> #include <asm/paravirt.h>
>> #else /* !CONFIG_PARAVIRT_XXL */
>> #define set_pte(ptep, pte) native_set_pte(ptep, pte)
>> +#define pte_get_and_clear(ptep) native_ptep_get_and_clear(ptep)
>>
>> #define set_pte_atomic(ptep, pte) \
>> native_set_pte_atomic(ptep, pte)
>> @@ -1243,7 +1244,7 @@ bool ptep_clear_flush_young(struct vm_area_struct *vma,
>> static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long
>>addr,
>> pte_t *ptep)
>> {
>> - pte_t pte = native_ptep_get_and_clear(ptep);
>> ++ pte_t pte = pte_get_and_clear(ptep);
>
>This looks like a typo, on a path you didn't compile.
I don't understand what you mean here.
If `CONFIG_PARAVIRT_XXL` is not set then `pte_get_and_clear()` is replaced
with `native_ptep_get_and_clear()` by the preprocessor.
If `CONFIG_PARAVIRT_XXL` is set then we jump through the pv-op machinery
starting in arch/x86/include/asm/paravirt.h:pte_get_and_clear().
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |