All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Cornelia Huck <cohuck@redhat.com>,
	Pierre Morel <pmorel@linux.ibm.com>,
	kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	frankja@linux.ibm.com, david@redhat.com, thuth@redhat.com,
	imbrenda@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com
Subject: Re: [PATCH v2 2/2] s390:kvm: Topology expose TOPOLOGY facility
Date: Fri, 23 Jul 2021 11:28:34 +0200	[thread overview]
Message-ID: <46229585-507d-70a2-cc60-c06fb172fbfd@de.ibm.com> (raw)
In-Reply-To: <87wnph5rz7.fsf@redhat.com>



On 23.07.21 10:55, Cornelia Huck wrote:
> On Fri, Jul 23 2021, Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> 
>> On 22.07.21 19:02, Pierre Morel wrote:
>>> We add a KVM extension KVM_CAP_S390_CPU_TOPOLOGY to tell the
>>> userland hypervisor it is safe to activate the CPU Topology facility.
>>
>> I think the old variant of using the CPU model was actually better.
>> It was just the patch description that was wrong.
> 
> I thought we wanted a cap that userspace can enable to get ptf
> intercepts? I'm confused.
> 

PTF goes to userspace in any case as every instruction that is
not handled by kvm and where interpretion is not enabled.
Now, having said that, we actually want PTF interpretion to be enabled
for "Check topology-change status" as this is supposed to be a fast
operation. Some OSes do query that in their interrupt handlers.


>>    
>>> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
>>> ---
>>>    arch/s390/kvm/kvm-s390.c | 1 +
>>>    include/uapi/linux/kvm.h | 1 +
>>>    2 files changed, 2 insertions(+)
>>>
>>> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
>>> index b655a7d82bf0..8c695ee79612 100644
>>> --- a/arch/s390/kvm/kvm-s390.c
>>> +++ b/arch/s390/kvm/kvm-s390.c
>>> @@ -568,6 +568,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
>>>    	case KVM_CAP_S390_VCPU_RESETS:
>>>    	case KVM_CAP_SET_GUEST_DEBUG:
>>>    	case KVM_CAP_S390_DIAG318:
>>> +	case KVM_CAP_S390_CPU_TOPOLOGY:
>>>    		r = 1;
>>>    		break;
>>>    	case KVM_CAP_SET_GUEST_DEBUG2:
>>> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
>>> index d9e4aabcb31a..081ce0cd44b9 100644
>>> --- a/include/uapi/linux/kvm.h
>>> +++ b/include/uapi/linux/kvm.h
>>> @@ -1112,6 +1112,7 @@ struct kvm_ppc_resize_hpt {
>>>    #define KVM_CAP_BINARY_STATS_FD 203
>>>    #define KVM_CAP_EXIT_ON_EMULATION_FAILURE 204
>>>    #define KVM_CAP_ARM_MTE 205
>>> +#define KVM_CAP_S390_CPU_TOPOLOGY 206
>>>    
>>>    #ifdef KVM_CAP_IRQ_ROUTING
>>>    
>>>
> 
> Regardless of what we end up with: we need documentation for any new cap
> :)
> 

  reply	other threads:[~2021-07-23  9:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 17:02 [PATCH v2 0/2] s390x: KVM: CPU Topology Pierre Morel
2021-07-22 17:02 ` [PATCH v2 1/2] s390x: KVM: accept STSI for CPU topology information Pierre Morel
2021-07-23  8:34   ` Christian Borntraeger
2021-07-22 17:02 ` [PATCH v2 2/2] s390:kvm: Topology expose TOPOLOGY facility Pierre Morel
2021-07-23  8:14   ` Christian Borntraeger
2021-07-23  8:55     ` Cornelia Huck
2021-07-23  9:28       ` Christian Borntraeger [this message]
2021-07-23 10:10         ` Pierre Morel
2021-07-23 10:24           ` Christian Borntraeger
2021-07-23  2:49 kernel test robot

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=46229585-507d-70a2-cc60-c06fb172fbfd@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@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=pmorel@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 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.