|
From: | Harald Freudenberger |
Subject: | Re: [qemu-s390x] [RFC 19/19] s390/facilities: enable AP facilities needed by guest |
Date: | Fri, 3 Nov 2017 09:14:17 +0100 |
I talked with the firmware guys about this. On 11/02/2017 08:08 AM, Christian Borntraeger wrote: On 10/16/2017 11:25 AM, Martin Schwidefsky wrote:
Tony Krowiak <address@hidden> wrote:
facilities for the guest VM: * STFLE.12: Enables the AP Query Configuration Information facility. The AP bus running in the guest uses the information returned from this instruction to configure AP adapters and domains for the guest machine. * STFLE.15: Indicates the AP facilities test is available. The AP bus running in the guest uses the information. Signed-off-by: Tony Krowiak <address@hidden> --- arch/s390/tools/gen_facilities.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/s390/tools/gen_facilities.c b/arch/s390/tools/gen_facilities.c index 70dd8f1..eeaa7db 100644 --- a/arch/s390/tools/gen_facilities.c +++ b/arch/s390/tools/gen_facilities.c @@ -74,8 +74,10 @@ struct facility_def { 8, /* enhanced-DAT 1 */ 9, /* sense-running-status */ 10, /* conditional sske */ + 12, /* AP query configuration */ 13, /* ipte-range */ 14, /* nonquiescing key-setting */ + 15, /* AP special-command facility */ 73, /* transactional execution */ 75, /* access-exception-fetch/store indication */ 76, /* msa extension 3 */ With this all KVM guests will always have the AP instructions available, no? In principles I like this approach, but it differs from the way z/VM does things, there the guest will get an exception if it tries to execute an AP instruction if there are no AP devices assigned to the guest. I wonder if there is a reason why z/VM does it the way it does. A good question. For LPAR it seems that you have AP instructions even if you have no crypto cards. to the guest. Bit 12 controls whether the PQAP(QCI) - query AP configuration information - instruction is available. This is necessary because if the PQAP(QCI) instruction is not available to the guest, then the AP bus scan code running on the guest will not create any AP devices regardless of whether AP devices are assigned to the guest or not. Facility bit 15 indicates whether the APFT facility is installed. If the APFT facility is not installed, then it looks like the probe function for CEX4 and CEX5 cards will fail because the information provided by the facility will not be returned from the PQAP(TAPQ) function. The way the AP bus determines whether or not AP instructions are installed is by executing an AP instruction. If the instruction throws an exception, then it is assumed the AP instructions are not available. This is done in the AP module init which returns -ENODEV if the AP instructions are not installed. Since the AP bus is not initialized, no AP instructions will ever get executed. I surmise this is the difference between z/VM and linux. Harald, can you verify my statements above?
|
[Prev in Thread] | Current Thread | [Next in Thread] |