From: Thomas Huth <thuth@redhat.com>
To: Janosch Frank <frankja@linux.ibm.com>, kvm@vger.kernel.org
Cc: david@redhat.com, borntraeger@de.ibm.com, mihajlov@linux.ibm.com,
cohuck@redhat.com, linux-s390@vger.kernel.org
Subject: Re: [PATCH v2] KVM: s390: Add new reset vcpu API
Date: Wed, 4 Dec 2019 10:32:54 +0100 [thread overview]
Message-ID: <c22eefd7-2c99-ec8e-3b5c-fabb343230a9@redhat.com> (raw)
In-Reply-To: <20191203162055.3519-1-frankja@linux.ibm.com>
On 03/12/2019 17.20, Janosch Frank wrote:
> The architecture states that we need to reset local IRQs for all CPU
> resets. Because the old reset interface did not support the normal CPU
> reset we never did that.
>
> Now that we have a new interface, let's properly clear out local IRQs
> and let this commit be a reminder.
>
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
> arch/s390/kvm/kvm-s390.c | 13 +++++++++++++
> include/uapi/linux/kvm.h | 4 ++++
> 2 files changed, 17 insertions(+)
>
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index d9e6bf3d54f0..602214c5616c 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -529,6 +529,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
> case KVM_CAP_S390_CMMA_MIGRATION:
> case KVM_CAP_S390_AIS:
> case KVM_CAP_S390_AIS_MIGRATION:
> + case KVM_CAP_S390_VCPU_RESETS:
> r = 1;
> break;
> case KVM_CAP_S390_HPAGE_1M:
> @@ -3287,6 +3288,13 @@ static int kvm_arch_vcpu_ioctl_set_one_reg(struct kvm_vcpu *vcpu,
> return r;
> }
>
> +static int kvm_arch_vcpu_ioctl_normal_reset(struct kvm_vcpu *vcpu)
> +{
> + kvm_clear_async_pf_completion_queue(vcpu);
> + kvm_s390_clear_local_irqs(vcpu);
> + return 0;
> +}
> +
> static int kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu)
> {
> kvm_s390_vcpu_initial_reset(vcpu);
> @@ -4363,7 +4371,12 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
> r = kvm_arch_vcpu_ioctl_set_initial_psw(vcpu, psw);
> break;
> }
> + case KVM_S390_NORMAL_RESET:
> + r = kvm_arch_vcpu_ioctl_normal_reset(vcpu);
> + break;
> case KVM_S390_INITIAL_RESET:
> + /* fallthrough */
> + case KVM_S390_CLEAR_RESET:
> r = kvm_arch_vcpu_ioctl_initial_reset(vcpu);
> break;
Isn't clear reset supposed to do more than the initial reset? If so, I'd
rather expect it the other way round:
case KVM_S390_CLEAR_RESET:
/* fallthrough */
case KVM_S390_INITIAL_RESET:
r = kvm_arch_vcpu_ioctl_initial_reset(vcpu);
break;
... so you can later add the additional stuff before the "/* fallthrough
*/"?
Thomas
next prev parent reply other threads:[~2019-12-04 9:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 16:20 [PATCH v2] KVM: s390: Add new reset vcpu API Janosch Frank
2019-12-03 16:24 ` David Hildenbrand
2019-12-03 16:28 ` Cornelia Huck
2019-12-04 9:32 ` Thomas Huth [this message]
2019-12-04 10:06 ` Janosch Frank
2019-12-04 10:37 ` Thomas Huth
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=c22eefd7-2c99-ec8e-3b5c-fabb343230a9@redhat.com \
--to=thuth@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mihajlov@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