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=-5.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 C101AC433E0 for ; Thu, 14 Jan 2021 09:26:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 34DB923359 for ; Thu, 14 Jan 2021 09:26:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34DB923359 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=de.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzytZ-0005zX-8l for qemu-devel@archiver.kernel.org; Thu, 14 Jan 2021 04:26:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzysg-0005De-5s; Thu, 14 Jan 2021 04:25:26 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzyse-0007ea-6z; Thu, 14 Jan 2021 04:25:25 -0500 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 10E93vqH040811; Thu, 14 Jan 2021 04:25:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : from : to : cc : references : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=aPMBM+XkQVCnTPiepVHmk0qTRFDy1OOcgjKfpH+1GSY=; b=VrK/GF7inTMWfHDVoJY3emGt/lVN8Ak57S3IBQhJhM1lRq0ljlD+aM98gP6NulWSI/ri iXdtjENQsyZr4p6b4jBPvmvxp59TKC3P75neuPDZjpSTVUHmUmMrIM2I0ySeyIsrn/1Q /FBhVR1ByjeniLvWzgCJQoI6obyx1WovGnajA1MBCO0VpIHjxlIg9N42SuzBZiAV8wv6 AvsY/z8diFEgXOV/OD8IjXlJq4TvRssWIHSfAUskmy1hGDbTVNYLH/2/1RMFciJ0dLP1 ZZphTQOelZ2+HBfwZ3+v9kf8UP3YtbK4pmlJRNbBRAsP+DOSYDkOIaKTvnHh0xkvb9uW 4A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 362jr6rw7b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Jan 2021 04:25:11 -0500 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 10E94Nk8041748; Thu, 14 Jan 2021 04:25:08 -0500 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 362jr6rw4h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Jan 2021 04:25:07 -0500 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 10E9D9AH022830; Thu, 14 Jan 2021 09:25:02 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma05fra.de.ibm.com with ESMTP id 35y448b75r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Jan 2021 09:25:01 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 10E9Ox0o43909382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Jan 2021 09:24:59 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F24304C04A; Thu, 14 Jan 2021 09:24:58 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E53224C046; Thu, 14 Jan 2021 09:24:57 +0000 (GMT) Received: from oc7455500831.ibm.com (unknown [9.171.19.194]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 14 Jan 2021 09:24:57 +0000 (GMT) Subject: Re: [PATCH v7 13/13] s390: Recognize confidential-guest-support option From: Christian Borntraeger To: David Gibson , brijesh.singh@amd.com, pair@us.ibm.com, dgilbert@redhat.com, pasic@linux.ibm.com, qemu-devel@nongnu.org References: <20210113235811.1909610-1-david@gibson.dropbear.id.au> <20210113235811.1909610-14-david@gibson.dropbear.id.au> Message-ID: <471babb9-9d5a-a2fa-7d90-f14a7d289b8d@de.ibm.com> Date: Thu, 14 Jan 2021 10:24:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 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.343, 18.0.737 definitions=2021-01-14_03:2021-01-13, 2021-01-14 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 adultscore=0 mlxscore=0 clxscore=1015 spamscore=0 suspectscore=0 impostorscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101140052 Received-SPF: pass client-ip=148.163.156.1; envelope-from=borntraeger@de.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, thuth@redhat.com, Marcelo Tosatti , berrange@redhat.com, jun.nakajima@intel.com, kvm@vger.kernel.org, David Hildenbrand , cohuck@redhat.com, Richard Henderson , Greg Kurz , mdroth@linux.vnet.ibm.com, pragyansri.pathi@intel.com, qemu-s390x@nongnu.org, frankja@linux.ibm.com, mst@redhat.com, andi.kleen@intel.com, Paolo Bonzini , Eduardo Habkost Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 14.01.21 10:19, Christian Borntraeger wrote: > > > On 14.01.21 10:10, Christian Borntraeger wrote: >> >> >> On 14.01.21 00:58, David Gibson wrote: >> [...] >>> +int s390_pv_init(ConfidentialGuestSupport *cgs, Error **errp) >>> +{ >>> + if (!object_dynamic_cast(OBJECT(cgs), TYPE_S390_PV_GUEST)) { >>> + return 0; >>> + } >>> + >>> + if (!s390_has_feat(S390_FEAT_UNPACK)) { >>> + error_setg(errp, >>> + "CPU model does not support Protected Virtualization"); >>> + return -1; >>> + } >> >> I am triggering this and I guess this is because the cpu model is not yet initialized at >> this point in time. >> > When I remove the check, things seems to work though ( I can access virtio-blk devices without > specifying iommu for example) Maybe we can turn things around and check in apply_cpu_model if the object exists but unpack was not specified?