From: Janosch Frank <frankja@linux.ibm.com>
To: David Hildenbrand <david@redhat.com>, kvm@vger.kernel.org
Cc: thuth@redhat.com, borntraeger@de.ibm.com, mihajlov@linux.ibm.com,
cohuck@redhat.com, linux-s390@vger.kernel.org
Subject: Re: [PATCH] KVM: s390: Add new reset vcpu API
Date: Fri, 29 Nov 2019 15:38:05 +0100 [thread overview]
Message-ID: <dedd1d55-bebb-059e-c8c9-7c2771afa157@linux.ibm.com> (raw)
In-Reply-To: <227a8fce-7e14-030e-b0a4-17e4521eed98@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 2489 bytes --]
On 11/29/19 3:33 PM, David Hildenbrand wrote:
> On 29.11.19 15:33, Janosch Frank wrote:
>> On 11/29/19 3:31 PM, David Hildenbrand wrote:
>>> On 29.11.19 15:21, 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 | 25 ++++++++++++++++++++++++-
>>>> include/uapi/linux/kvm.h | 7 +++++++
>>>> 2 files changed, 31 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
>>>> index d9e6bf3d54f0..2f74ff46b176 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:
>>>> @@ -3293,6 +3294,25 @@ static int kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu)
>>>> return 0;
>>>> }
>>>>
>>>> +static int kvm_arch_vcpu_ioctl_reset(struct kvm_vcpu *vcpu, unsigned long type)
>>>> +{
>>>> + int rc = -EINVAL;
>>>> +
>>>> + switch (type) {
>>>> + case KVM_S390_VCPU_RESET_NORMAL:
>>>> + rc = 0;
>>>> + kvm_clear_async_pf_completion_queue(vcpu);
>>>> + kvm_s390_clear_local_irqs(vcpu);
>>>> + break;
>>>> + case KVM_S390_VCPU_RESET_INITIAL:
>>>> + /* fallthrough */
>>>> + case KVM_S390_VCPU_RESET_CLEAR:
>>>> + rc = kvm_arch_vcpu_ioctl_initial_reset(vcpu);
>>>
>>> As we now have two interfaces to achieve the same thing (initial reset),
>>> I do wonder if we should simply introduce
>>>
>>> KVM_S390_NORMAL_RESET
>>> KVM_S390_CLEAR_RESET
>>>
>>> instead ...
>>>
>>> Then you can do KVM_S390_NORMAL_RESET for the bugfix and
>>> KVM_S390_CLEAR_RESET later for PV.
>>>
>>> Does anything speak against that?
>>
>> Apart from loosing one more ioctl number probably not
>
> Do we care? (I think not, but maybe I am missing something :) )
>
I don't, maybe somebody else does
Btw. I'm struggling to find a good name for the capability:
KVM_CAP_S390_VCPU_ADDITIONAL_RESETS ?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-11-29 14:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-29 14:21 [PATCH] KVM: s390: Add new reset vcpu API Janosch Frank
2019-11-29 14:31 ` David Hildenbrand
2019-11-29 14:33 ` Janosch Frank
2019-11-29 14:33 ` David Hildenbrand
2019-11-29 14:38 ` Janosch Frank [this message]
2019-11-29 14:39 ` Christian Borntraeger
2019-11-29 14:48 ` David Hildenbrand
2019-11-29 14:57 ` Janosch Frank
2019-12-02 8:54 ` Cornelia Huck
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=dedd1d55-bebb-059e-c8c9-7c2771afa157@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mihajlov@linux.ibm.com \
--cc=thuth@redhat.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