public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org, borntraeger@de.ibm.com,
	nsg@linux.ibm.com, nrb@linux.ibm.com, frankja@linux.ibm.com,
	seiden@linux.ibm.com, agordeev@linux.ibm.com, gor@linux.ibm.com,
	gerald.schaefer@linux.ibm.com, kvm@vger.kernel.org,
	linux-s390@vger.kernel.org
Subject: Re: [PATCH v3 06/11] s390/kvm: Stop using gmap_{en,dis}able()
Date: Mon, 21 Oct 2024 11:50:06 +0200	[thread overview]
Message-ID: <20241021095006.6950-B-hca@linux.ibm.com> (raw)
In-Reply-To: <20241015164326.124987-7-imbrenda@linux.ibm.com>

On Tue, Oct 15, 2024 at 06:43:21PM +0200, Claudio Imbrenda wrote:
> Stop using gmap_enable(), gmap_disable(), gmap_get_enabled().
> 
> The correct guest ASCE is passed as a parameter of sie64a(), there is
> no need to save the current gmap in lowcore.
> 
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> Acked-by: Steffen Eiden <seiden@linux.ibm.com>
> ---
>  arch/s390/kvm/kvm-s390.c | 7 +------
>  arch/s390/kvm/vsie.c     | 4 +---
>  2 files changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index cfe3f8182aa5..df778a4a011d 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -3719,7 +3719,6 @@ __u64 kvm_s390_get_cpu_timer(struct kvm_vcpu *vcpu)
>  void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
>  {
>  
> -	gmap_enable(vcpu->arch.enabled_gmap);
>  	kvm_s390_set_cpuflags(vcpu, CPUSTAT_RUNNING);
>  	if (vcpu->arch.cputm_enabled && !is_vcpu_idle(vcpu))
>  		__start_cpu_timer_accounting(vcpu);
> @@ -3732,8 +3731,6 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
>  	if (vcpu->arch.cputm_enabled && !is_vcpu_idle(vcpu))
>  		__stop_cpu_timer_accounting(vcpu);
>  	kvm_s390_clear_cpuflags(vcpu, CPUSTAT_RUNNING);
> -	vcpu->arch.enabled_gmap = gmap_get_enabled();
> -	gmap_disable(vcpu->arch.enabled_gmap);

I guess you want to get rid of enabled_gmap as well, since it becomes
unused with this patch:

diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h
index 603b56bfccd3..51201b4ac93a 100644
--- a/arch/s390/include/asm/kvm_host.h
+++ b/arch/s390/include/asm/kvm_host.h
@@ -750,8 +750,6 @@ struct kvm_vcpu_arch {
 	struct hrtimer    ckc_timer;
 	struct kvm_s390_pgm_info pgm;
 	struct gmap *gmap;
-	/* backup location for the currently enabled gmap when scheduled out */
-	struct gmap *enabled_gmap;
 	struct kvm_guestdbg_info_arch guestdbg;
 	unsigned long pfault_token;
 	unsigned long pfault_select;

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>

  reply	other threads:[~2024-10-21  9:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-15 16:43 [PATCH v3 00/11] s390/kvm: Handle guest-related program interrupts in KVM Claudio Imbrenda
2024-10-15 16:43 ` [PATCH v3 01/11] s390/entry: Remove __GMAP_ASCE and use _PIF_GUEST_FAULT again Claudio Imbrenda
2024-10-15 16:43 ` [PATCH v3 02/11] s390/kvm: Remove kvm_arch_fault_in_page() Claudio Imbrenda
2024-10-15 16:43 ` [PATCH v3 03/11] s390/mm/gmap: Refactor gmap_fault() and add support for pfault Claudio Imbrenda
2024-10-21  9:41   ` Heiko Carstens
2024-10-15 16:43 ` [PATCH v3 04/11] s390/mm/gmap: Fix __gmap_fault() return code Claudio Imbrenda
2024-10-15 16:43 ` [PATCH v3 05/11] s390/mm/fault: Handle guest-related program interrupts in KVM Claudio Imbrenda
2024-10-16 10:05   ` Heiko Carstens
2024-10-16 14:34     ` Claudio Imbrenda
2024-10-15 16:43 ` [PATCH v3 06/11] s390/kvm: Stop using gmap_{en,dis}able() Claudio Imbrenda
2024-10-21  9:50   ` Heiko Carstens [this message]
2024-10-21 11:45     ` Claudio Imbrenda
2024-10-15 16:43 ` [PATCH v3 07/11] s390/mm/gmap: Remove gmap_{en,dis}able() Claudio Imbrenda
2024-10-21  9:50   ` Heiko Carstens
2024-10-15 16:43 ` [PATCH v3 08/11] s390: Remove gmap pointer from lowcore Claudio Imbrenda
2024-10-21  9:50   ` Heiko Carstens
2024-10-15 16:43 ` [PATCH v3 09/11] s390/mm: Simplify get_fault_type() Claudio Imbrenda
2024-10-15 16:43 ` [PATCH v3 10/11] s390/mm: Get rid of fault type switch statements Claudio Imbrenda
2024-10-15 16:43 ` [PATCH v3 11/11] s390/mm: Convert to LOCK_MM_AND_FIND_VMA Claudio Imbrenda

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=20241021095006.6950-B-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=nsg@linux.ibm.com \
    --cc=seiden@linux.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox