mbox series

[kvm-unit-tests,v6,0/6] CSS Mesurement Block

Message ID 1615545714-13747-1-git-send-email-pmorel@linux.ibm.com (mailing list archive)
Headers show
Series CSS Mesurement Block | expand

Message

Pierre Morel March 12, 2021, 10:41 a.m. UTC
We tests the update of the Mesurement Block (MB) format 0
and format 1 using a serie of senseid requests.

*Warning*: One of the tests for format-1 will unexpectedly fail for QEMU elf
unless the QEMU patch "css: SCHIB measurement block origin must be aligned"
is applied.
This patch has recently hit QEMU master ...
With Protected Virtualization, the PGM is correctly recognized.

The MB format 1 is only provided if the Extended mesurement Block
feature is available.

This feature is exposed by the CSS characteristics general features
stored by the Store Channel Subsystem Characteristics CHSC command,
consequently, we implement the CHSC instruction call and the SCSC CHSC
command.

In order to ease the writing of new tests using:
- interrupt
- enablement of a subchannel
- multiple I/O on a subchannel

We do the following simplifications:
- we create a CSS initialization routine
- we register the I/O interrupt handler on CSS initialization
- we do not enable or disable a subchannel in the senseid test,
  assuming this test is done after the enable test, this allows
  to create traffic using the SSCH used by senseid.
- failures not part of the feature under test will stop the tests.
- we add a css_enabled() function to test if a subchannel is enabled.

*note*:
    I rearranged the use of the senseid for the tests, by not modifying
    the existing test and having a dedicated senseid() function for
    the purpose of the tests.
    I think that it is in the rigght way so I kept the RB and ACK on
    the simplification, there are less changes, if it is wrong from me
    I suppose I will see this in the comments.
    Since the changed are moved inside the fmt0 test which is not approved
    for now I hope it is OK.

Regards,
Pierre

Pierre Morel (6):
  s390x: css: Store CSS Characteristics
  s390x: css: simplifications of the tests
  s390x: css: extending the subchannel modifying functions
  s390x: css: implementing Set CHannel Monitor
  s390x: css: testing measurement block format 0
  s390x: css: testing measurement block format 1

 lib/s390x/css.h     | 115 ++++++++++++++++++++-
 lib/s390x/css_lib.c | 236 ++++++++++++++++++++++++++++++++++++++++----
 s390x/css.c         | 216 ++++++++++++++++++++++++++++++++++++++--
 3 files changed, 539 insertions(+), 28 deletions(-)

Comments

Cornelia Huck March 12, 2021, 11:18 a.m. UTC | #1
On Fri, 12 Mar 2021 11:41:48 +0100
Pierre Morel <pmorel@linux.ibm.com> wrote:

> We tests the update of the Mesurement Block (MB) format 0
> and format 1 using a serie of senseid requests.
> 
> *Warning*: One of the tests for format-1 will unexpectedly fail for QEMU elf
> unless the QEMU patch "css: SCHIB measurement block origin must be aligned"
> is applied.
> This patch has recently hit QEMU master ...
> With Protected Virtualization, the PGM is correctly recognized.
> 
> The MB format 1 is only provided if the Extended mesurement Block
> feature is available.
> 
> This feature is exposed by the CSS characteristics general features
> stored by the Store Channel Subsystem Characteristics CHSC command,
> consequently, we implement the CHSC instruction call and the SCSC CHSC
> command.
> 
> In order to ease the writing of new tests using:
> - interrupt
> - enablement of a subchannel
> - multiple I/O on a subchannel
> 
> We do the following simplifications:
> - we create a CSS initialization routine
> - we register the I/O interrupt handler on CSS initialization
> - we do not enable or disable a subchannel in the senseid test,
>   assuming this test is done after the enable test, this allows
>   to create traffic using the SSCH used by senseid.
> - failures not part of the feature under test will stop the tests.
> - we add a css_enabled() function to test if a subchannel is enabled.
> 
> *note*:
>     I rearranged the use of the senseid for the tests, by not modifying
>     the existing test and having a dedicated senseid() function for
>     the purpose of the tests.
>     I think that it is in the rigght way so I kept the RB and ACK on
>     the simplification, there are less changes, if it is wrong from me
>     I suppose I will see this in the comments.
>     Since the changed are moved inside the fmt0 test which is not approved
>     for now I hope it is OK.
> 
> Regards,
> Pierre
> 
> Pierre Morel (6):
>   s390x: css: Store CSS Characteristics
>   s390x: css: simplifications of the tests
>   s390x: css: extending the subchannel modifying functions
>   s390x: css: implementing Set CHannel Monitor
>   s390x: css: testing measurement block format 0
>   s390x: css: testing measurement block format 1
> 
>  lib/s390x/css.h     | 115 ++++++++++++++++++++-
>  lib/s390x/css_lib.c | 236 ++++++++++++++++++++++++++++++++++++++++----
>  s390x/css.c         | 216 ++++++++++++++++++++++++++++++++++++++--
>  3 files changed, 539 insertions(+), 28 deletions(-)
> 

Series looks good to me.
Janosch Frank March 12, 2021, 2:17 p.m. UTC | #2
On 3/12/21 12:18 PM, Cornelia Huck wrote:
> On Fri, 12 Mar 2021 11:41:48 +0100
> Pierre Morel <pmorel@linux.ibm.com> wrote:
> 
>> We tests the update of the Mesurement Block (MB) format 0
>> and format 1 using a serie of senseid requests.
>>
>> *Warning*: One of the tests for format-1 will unexpectedly fail for QEMU elf
>> unless the QEMU patch "css: SCHIB measurement block origin must be aligned"
>> is applied.
>> This patch has recently hit QEMU master ...
>> With Protected Virtualization, the PGM is correctly recognized.
>>
>> The MB format 1 is only provided if the Extended mesurement Block
>> feature is available.
>>
>> This feature is exposed by the CSS characteristics general features
>> stored by the Store Channel Subsystem Characteristics CHSC command,
>> consequently, we implement the CHSC instruction call and the SCSC CHSC
>> command.
>>
>> In order to ease the writing of new tests using:
>> - interrupt
>> - enablement of a subchannel
>> - multiple I/O on a subchannel
>>
>> We do the following simplifications:
>> - we create a CSS initialization routine
>> - we register the I/O interrupt handler on CSS initialization
>> - we do not enable or disable a subchannel in the senseid test,
>>   assuming this test is done after the enable test, this allows
>>   to create traffic using the SSCH used by senseid.
>> - failures not part of the feature under test will stop the tests.
>> - we add a css_enabled() function to test if a subchannel is enabled.
>>
>> *note*:
>>     I rearranged the use of the senseid for the tests, by not modifying
>>     the existing test and having a dedicated senseid() function for
>>     the purpose of the tests.
>>     I think that it is in the rigght way so I kept the RB and ACK on
>>     the simplification, there are less changes, if it is wrong from me
>>     I suppose I will see this in the comments.
>>     Since the changed are moved inside the fmt0 test which is not approved
>>     for now I hope it is OK.
>>
>> Regards,
>> Pierre
>>
>> Pierre Morel (6):
>>   s390x: css: Store CSS Characteristics
>>   s390x: css: simplifications of the tests
>>   s390x: css: extending the subchannel modifying functions
>>   s390x: css: implementing Set CHannel Monitor
>>   s390x: css: testing measurement block format 0
>>   s390x: css: testing measurement block format 1
>>
>>  lib/s390x/css.h     | 115 ++++++++++++++++++++-
>>  lib/s390x/css_lib.c | 236 ++++++++++++++++++++++++++++++++++++++++----
>>  s390x/css.c         | 216 ++++++++++++++++++++++++++++++++++++++--
>>  3 files changed, 539 insertions(+), 28 deletions(-)
>>
> 
> Series looks good to me.
> 

@Pierre: Could you please push to devel?

Let's give it a whirl on the CI over the weekend and I'll have another
look at the patches at Monday before picking.
Pierre Morel March 16, 2021, 9:39 a.m. UTC | #3
On 3/12/21 3:17 PM, Janosch Frank wrote:
> On 3/12/21 12:18 PM, Cornelia Huck wrote:
>> On Fri, 12 Mar 2021 11:41:48 +0100
>> Pierre Morel <pmorel@linux.ibm.com> wrote:

...

>> Series looks good to me.
>>
> 
> @Pierre: Could you please push to devel?
> 
> Let's give it a whirl on the CI over the weekend and I'll have another
> look at the patches at Monday before picking.
> 

  pushed this morning, sorry, had vacancies the last 2 days :)