From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26C7FC433DB for ; Mon, 8 Mar 2021 14:02:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 01A72651D3 for ; Mon, 8 Mar 2021 14:02:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229580AbhCHOCG (ORCPT ); Mon, 8 Mar 2021 09:02:06 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45784 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229497AbhCHOBv (ORCPT ); Mon, 8 Mar 2021 09:01:51 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 128DYBve054307 for ; Mon, 8 Mar 2021 09:01:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=5JLQ2nLmgr14p4JT6JOIK3qN+OsjW7mdpy1GkYp4rOg=; b=VibuZnqfUPWQ4eCcKUE511IoBNipjLn0PELVP8vzUKBN2nTYNRrrBFMbYL4yz5OWN0On QvFPKmA4lhU9dYGGC+A/0DV45cjMlC+sFTJ1bf0fWqFshIpM+BHod1TBVZW9Svhfsseq y+HKwCELA4f9rLskovj/K7iA7oEMCbjNhrf5Sw0rY59cmeJH9Li+Ccj+xFX33FjjY2uu K57K3ANsYWAUmWxnGcosnq5qaHLqxt2jC0FALsQ/3YgKE2xL/rnp23z/6VAQFn5XTTjr tJPseEotEW5i5mMQhMBTRrZZh2dcnlJX7f+baQ5sMQIbtEuY3axGmRUZysdsfszdERQe bg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 375kgybpfx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 08 Mar 2021 09:01:50 -0500 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 128DcAOW077853 for ; Mon, 8 Mar 2021 09:01:49 -0500 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0b-001b2d01.pphosted.com with ESMTP id 375kgybpew-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Mar 2021 09:01:49 -0500 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 128Dwj6t014172; Mon, 8 Mar 2021 14:01:47 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma01fra.de.ibm.com with ESMTP id 3741c80ynw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Mar 2021 14:01:47 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 128E1Tib22610192 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 8 Mar 2021 14:01:29 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A7107AE051; Mon, 8 Mar 2021 14:01:44 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 683E1AE04D; Mon, 8 Mar 2021 14:01:44 +0000 (GMT) Received: from oc3016276355.ibm.com (unknown [9.145.87.232]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 8 Mar 2021 14:01:44 +0000 (GMT) Subject: Re: [kvm-unit-tests PATCH v4 1/6] s390x: css: Store CSS Characteristics To: Janosch Frank , kvm@vger.kernel.org Cc: david@redhat.com, thuth@redhat.com, cohuck@redhat.com, imbrenda@linux.ibm.com References: <1614599225-17734-1-git-send-email-pmorel@linux.ibm.com> <1614599225-17734-2-git-send-email-pmorel@linux.ibm.com> <2c94918a-11af-1ac0-9e8b-11439f078727@linux.ibm.com> From: Pierre Morel Message-ID: <3730f9e7-be8a-4407-6a03-6bd6623447d8@linux.ibm.com> Date: Mon, 8 Mar 2021 15:01:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <2c94918a-11af-1ac0-9e8b-11439f078727@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-03-08_08:2021-03-08,2021-03-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 spamscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103080073 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 3/1/21 3:45 PM, Janosch Frank wrote: > On 3/1/21 12:47 PM, Pierre Morel wrote: >> CSS characteristics exposes the features of the Channel SubSystem. >> Let's use Store Channel Subsystem Characteristics to retrieve >> the features of the CSS. >> >> Signed-off-by: Pierre Morel >> Reviewed-by: Cornelia Huck > > Acked-by: Janosch Frank > > Small nits below > >> --- >> lib/s390x/css.h | 67 ++++++++++++++++++++++++++++++++ >> lib/s390x/css_lib.c | 93 ++++++++++++++++++++++++++++++++++++++++++++- >> s390x/css.c | 8 ++++ >> 3 files changed, 167 insertions(+), 1 deletion(-) >> >> diff --git a/lib/s390x/css.h b/lib/s390x/css.h >> index 3e57445..4210472 100644 >> --- a/lib/s390x/css.h >> +++ b/lib/s390x/css.h >> @@ -288,4 +288,71 @@ int css_residual_count(unsigned int schid); >> void enable_io_isc(uint8_t isc); >> int wait_and_check_io_completion(int schid); >> >> +/* >> + * CHSC definitions >> + */ >> +struct chsc_header { >> + uint16_t len; >> + uint16_t code; >> +}; >> + >> +/* Store Channel Subsystem Characteristics */ >> +struct chsc_scsc { >> + struct chsc_header req; >> + uint16_t req_fmt; >> + uint8_t cssid; >> + uint8_t res_03; >> + uint32_t res_04[2]; > > I find the naming a bit weird and it could be one uint8_t field. OK > >> + struct chsc_header res; >> + uint32_t res_fmt; >> + uint64_t general_char[255]; >> + uint64_t chsc_char[254]; >> +}; ... snip >> diff --git a/lib/s390x/css_lib.c b/lib/s390x/css_lib.c >> index 3c24480..f46e871 100644 >> --- a/lib/s390x/css_lib.c >> +++ b/lib/s390x/css_lib.c >> @@ -15,11 +15,102 @@ >> #include >> #include >> #include >> - >> +#include > > Did you intend to remove the newline here? Yes I do not see why we should have a new line here. But I can keep it if you want. > ... snip... >> #include >> +#include >> >> #include >> #include >> @@ -140,10 +141,17 @@ error_senseid: >> unregister_io_int_func(css_irq_io); >> } >> >> +static void css_init(void) >> +{ >> + report(!!get_chsc_scsc(), "Store Channel Characteristics"); > > get_chsc_scsc() returns a bool, so you shouldn't need the !! here, no? Yes, forgotten when changed get_chsc_scsc(), remove the !! Thanks, Pierre -- Pierre Morel IBM Lab Boeblingen