LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Pierre Morel <pmorel@linux.ibm.com>
Cc: alex.williamson@redhat.com, cohuck@redhat.com,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
kvm@vger.kernel.org, frankja@linux.ibm.com,
akrowiak@linux.ibm.com, pasic@linux.ibm.com, david@redhat.com,
heiko.carstens@de.ibm.com, freude@linux.ibm.com,
mimu@linux.ibm.com
Subject: Re: [PATCH v9 4/4] s390: ap: kvm: Enable PQAP/AQIC facility for the guest
Date: Tue, 25 Jun 2019 22:15:34 +0200 [thread overview]
Message-ID: <25a9ff69-47f0-fcba-e1fe-f0cc9914acba@de.ibm.com> (raw)
In-Reply-To: <69ca50bd-3f5c-98b1-3b39-04af75151baf@de.ibm.com>
On 25.06.19 22:13, Christian Borntraeger wrote:
>
>
> On 21.05.19 17:34, Pierre Morel wrote:
>> AP Queue Interruption Control (AQIC) facility gives
>> the guest the possibility to control interruption for
>> the Cryptographic Adjunct Processor queues.
>>
>> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
>> Reviewed-by: Tony Krowiak <akrowiak@linux.ibm.com>
>> ---
>> arch/s390/tools/gen_facilities.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/s390/tools/gen_facilities.c b/arch/s390/tools/gen_facilities.c
>> index 61ce5b5..aed14fc 100644
>> --- a/arch/s390/tools/gen_facilities.c
>> +++ b/arch/s390/tools/gen_facilities.c
>> @@ -114,6 +114,7 @@ static struct facility_def facility_defs[] = {
>> .bits = (int[]){
>> 12, /* AP Query Configuration Information */
>> 15, /* AP Facilities Test */
>> + 65, /* AP Queue Interruption Control */
>> 156, /* etoken facility */
>> -1 /* END */
>> }
>>
>
> I think we should only set stfle.65 if we have the aiv facility (Because we do not
> have a GISA otherwise)
>
> So something like this instead?
>
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 28ebd64..1501cd6 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -2461,6 +2461,9 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
> set_kvm_facility(kvm->arch.model.fac_list, 147);
> }
>
> + if (css_general_characteristics.aiv)
> + set_kvm_facility(kvm->arch.model.fac_mask, 65);
> +
> kvm->arch.model.cpuid = kvm_s390_get_initial_cpuid();
> kvm->arch.model.ibc = sclp.ibc & 0x0fff;
>
>
Maybe even just piggyback on gisa init (it will bail out early).
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index 9dde4d7..9182a04 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -3100,6 +3100,7 @@ void kvm_s390_gisa_init(struct kvm *kvm)
gi->timer.function = gisa_vcpu_kicker;
memset(gi->origin, 0, sizeof(struct kvm_s390_gisa));
gi->origin->next_alert = (u32)(u64)gi->origin;
+ set_kvm_facility(kvm->arch.model.fac_mask, 65);
VM_EVENT(kvm, 3, "gisa 0x%pK initialized", gi->origin);
}
next prev parent reply other threads:[~2019-06-25 20:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 15:34 [PATCH v9 0/4] vfio: ap: AP Queue Interrupt Control Pierre Morel
2019-05-21 15:34 ` [PATCH v9 1/4] s390: ap: kvm: add PQAP interception for AQIC Pierre Morel
2019-06-12 13:55 ` Harald Freudenberger
2019-05-21 15:34 ` [PATCH v9 2/4] vfio: ap: register IOMMU VFIO notifier Pierre Morel
2019-06-12 13:56 ` Harald Freudenberger
2019-05-21 15:34 ` [PATCH v9 3/4] s390: ap: implement PAPQ AQIC interception in kernel Pierre Morel
2019-05-23 15:43 ` Tony Krowiak
2019-06-04 19:38 ` Tony Krowiak
2019-06-07 14:29 ` Halil Pasic
2019-06-11 14:37 ` Tony Krowiak
2019-06-11 15:00 ` Halil Pasic
2019-06-12 13:56 ` Harald Freudenberger
2019-05-21 15:34 ` [PATCH v9 4/4] s390: ap: kvm: Enable PQAP/AQIC facility for the guest Pierre Morel
2019-06-12 13:57 ` Harald Freudenberger
2019-06-25 20:13 ` Christian Borntraeger
2019-06-25 20:15 ` Christian Borntraeger [this message]
2019-06-26 21:12 ` Tony Krowiak
2019-06-27 6:54 ` Christian Borntraeger
2019-06-27 12:04 ` Halil Pasic
2019-05-23 15:36 ` [PATCH v9 0/4] vfio: ap: AP Queue Interrupt Control Tony Krowiak
2019-06-04 14:56 ` Halil Pasic
2019-07-01 12:00 ` Halil Pasic
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=25a9ff69-47f0-fcba-e1fe-f0cc9914acba@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=akrowiak@linux.ibm.com \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=freude@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mimu@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=pmorel@linux.ibm.com \
--subject='Re: [PATCH v9 4/4] s390: ap: kvm: Enable PQAP/AQIC facility for the guest' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).