All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, borntraeger@de.ibm.com,
	gor@linux.ibm.com, imbrenda@linux.ibm.com, kvm@vger.kernel.org,
	david@redhat.com
Subject: Re: [PATCH 1/2] s390x: uv: Add destroy page call
Date: Fri, 4 Sep 2020 12:39:39 +0200	[thread overview]
Message-ID: <20200904103939.GE6075@osiris> (raw)
In-Reply-To: <20200903131435.2535-2-frankja@linux.ibm.com>

On Thu, Sep 03, 2020 at 09:14:34AM -0400, Janosch Frank wrote:
> +int uv_destroy_page(unsigned long paddr)
> +{
> +	struct uv_cb_cfs uvcb = {
> +		.header.cmd = UVC_CMD_DESTR_SEC_STOR,
> +		.header.len = sizeof(uvcb),
> +		.paddr = paddr
> +	};
> +
> +	if (uv_call(0, (u64)&uvcb))
> +		return -EINVAL;
> +	return 0;
> +}
> +
> +
>  /*
>   * 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?

  reply	other threads:[~2020-09-04 10:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 13:14 [PATCH 0/2] s390x: pv: Fixes and improvements Janosch Frank
2020-09-03 13:14 ` [PATCH 1/2] s390x: uv: Add destroy page call Janosch Frank
2020-09-04 10:39   ` Heiko Carstens [this message]
2020-09-04 11:38     ` Janosch Frank
2020-09-04 12:10       ` Heiko Carstens
2020-09-07  9:50         ` Janosch Frank
2020-09-03 13:14 ` [PATCH 2/2] s390x: Add 3f program exception handler Janosch Frank
2020-09-03 14:20   ` Christian Borntraeger
2020-09-04 10:35   ` Heiko Carstens
2020-09-04 11:33     ` Janosch Frank
2020-09-04 12:14       ` Heiko Carstens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200904103939.GE6075@osiris \
    --to=hca@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.