Re: [PATCH v7 06/12] s390/mm: Add huge page dirty sync support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17.07.2018 14:44, Janosch Frank wrote:
> To do dirty loging with huge pages, we protect huge pmds in the
> gmap. When they are written to, we unprotect them and mark them dirty.
> 
> We introduce the function gmap_test_and_clear_dirty_segment which
> handles dirty sync for huge pages.

This function is now named differently.

> 
> Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
> ---

[..]

> +void gmap_sync_dirty_log_pmd(struct gmap *gmap, unsigned long dirty_bitmap[4],
> +			     unsigned long gaddr, unsigned long vmaddr);
>  #endif /* _ASM_S390_GMAP_H */
> diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
> index 087e0282f165..21378cb5a962 100644
> --- a/arch/s390/include/asm/pgtable.h
> +++ b/arch/s390/include/asm/pgtable.h
> @@ -1103,7 +1103,8 @@ int ptep_shadow_pte(struct mm_struct *mm, unsigned long saddr,
>  		    pte_t *sptep, pte_t *tptep, pte_t pte);
>  void ptep_unshadow_pte(struct mm_struct *mm, unsigned long saddr, pte_t *ptep);
>  
> -bool test_and_clear_guest_dirty(struct mm_struct *mm, unsigned long address);
> +bool test_and_clear_uc(struct mm_struct *mm, unsigned long address,
> +		       pte_t *ptep);

I think it should be named ptep_test_and_clear_uc() as we explicitly
pass in a ptep now.

>  int set_guest_storage_key(struct mm_struct *mm, unsigned long addr,
>  			  unsigned char key, bool nq);
>  int cond_set_guest_storage_key(struct mm_struct *mm, unsigned long addr,
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 3b7a5151b6a5..4cff5e31ca36 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -511,19 +511,30 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
>  }
>  

[...]

Apart from that, nothing jumped at me :)

Acked-by: David Hildenbrand <david@xxxxxxxxxx>

-- 

Thanks,

David / dhildenb



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux