Re: [PATCH 1/2] s390x: uv: Add destroy page call

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

 



On Fri, Sep 04, 2020 at 01:38:53PM +0200, Janosch Frank wrote:
> >>   * Requests the Ultravisor to encrypt a guest page and make it
> >>   * accessible to the host for paging (export).
> >> diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
> >> index 373542ca1113..cfb0017f33a7 100644
> >> --- a/arch/s390/mm/gmap.c
> >> +++ b/arch/s390/mm/gmap.c
> >> @@ -2679,7 +2679,7 @@ static int __s390_reset_acc(pte_t *ptep, unsigned long addr,
> >>  	pte_t pte = READ_ONCE(*ptep);
> >>  
> >>  	if (pte_present(pte))
> >> -		WARN_ON_ONCE(uv_convert_from_secure(pte_val(pte) & PAGE_MASK));
> >> +		WARN_ON_ONCE(uv_destroy_page(pte_val(pte) & PAGE_MASK));
> > 
> > Why not put the WARN_ON_ONCE() into uv_destroy_page() and make that
> > function return void?
> > 
> If you prefer that, I'll change the patch.

Seems to be better to me. Otherwise you start to sprinkle WARN_ONs all
over the code, _if_ there would be more callers.

> I think we'd need a proper print of the return codes of the UVC anyway,
> the warn isn't very helpful if you want to debug after the fact.

Maybe a new debug feature? Well, but that's something that hasn't do
anything with this code.



[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