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=-6.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 7BA7BC433DF for ; Wed, 19 Aug 2020 08:53:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 591E0207FB for ; Wed, 19 Aug 2020 08:53:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="niSdGqNe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727769AbgHSIxY (ORCPT ); Wed, 19 Aug 2020 04:53:24 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:27892 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727030AbgHSIvs (ORCPT ); Wed, 19 Aug 2020 04:51:48 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07J8XFV6070490; Wed, 19 Aug 2020 04:51:38 -0400 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=S+nsWlwf+U8EP6ck/CPDu7nHuTHsUi9kQOKDLthEZ9Q=; b=niSdGqNeGZ9z/4yhvg5wOGNU03UEjPnZ5q9uYkK5QyIwjvUVG+54rYq+f0/dwzXdPOtZ tNkJO2QMpIQ8czSZPvO+jn33v0pasbPNusJdL+gwsEFJsUDRaGrpQ9TsrU0lDvxvT6j9 EY6gzahMWidXzHi1evQzdMDuP2PhadIFJVk0QUwEp8526YLCMZP5b7v0sWgaiH80hey+ e7C4P+flw6+DduFgUEgTTltCwcfbFBlmQZIBSXVkrIAL8DslUWkIPnP96aFLRxsWjAEK 8BNU8o0RigFLyaY12uwNz9hkGtDnVLFztexUkoU31bMRITpqU4T+iLo4P1AzkSofgkmh /w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3304r4ag78-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Aug 2020 04:51:38 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 07J8YQdb073315; Wed, 19 Aug 2020 04:51:38 -0400 Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 3304r4ag6h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Aug 2020 04:51:38 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 07J8oHjh026071; Wed, 19 Aug 2020 08:51:36 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma02fra.de.ibm.com with ESMTP id 3304bbs0pq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Aug 2020 08:51:36 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 07J8pXnY32113038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Aug 2020 08:51:33 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7BA6511C04A; Wed, 19 Aug 2020 08:51:33 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DE1B311C04C; Wed, 19 Aug 2020 08:51:32 +0000 (GMT) Received: from oc3016276355.ibm.com (unknown [9.145.33.131]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 19 Aug 2020 08:51:32 +0000 (GMT) Subject: Re: [PATCH v8 2/2] s390: virtio: PV needs VIRTIO I/O device protection To: Cornelia Huck Cc: linux-kernel@vger.kernel.org, pasic@linux.ibm.com, borntraeger@de.ibm.com, frankja@linux.ibm.com, mst@redhat.com, jasowang@redhat.com, kvm@vger.kernel.org, linux-s390@vger.kernel.org, virtualization@lists.linux-foundation.org, thomas.lendacky@amd.com, david@gibson.dropbear.id.au, linuxram@us.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com References: <1597762711-3550-1-git-send-email-pmorel@linux.ibm.com> <1597762711-3550-3-git-send-email-pmorel@linux.ibm.com> <20200818192233.6c80798e.cohuck@redhat.com> From: Pierre Morel Message-ID: <2a0e6ac5-1238-fd7b-f39f-6fad767b1493@linux.ibm.com> Date: Wed, 19 Aug 2020 10:51:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200818192233.6c80798e.cohuck@redhat.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.235,18.0.687 definitions=2020-08-19_04:2020-08-19,2020-08-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 mlxlogscore=804 mlxscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008190073 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-08-18 19:22, Cornelia Huck wrote: >> + */ >> +int arch_has_restricted_memory_access(struct virtio_device *dev) >> +{ >> + if (!is_prot_virt_guest()) >> + return 0; > > If you just did a > > return is_prot_virt_guest(); > > and did the virtio feature stuff in the virtio core, this function > would be short and sweet :) yes, the smaller the better, thanks Pierre -- Pierre Morel IBM Lab Boeblingen 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=-6.4 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,URIBL_BLOCKED,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 B40FAC433E5 for ; Wed, 19 Aug 2020 08:51:51 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 84A8F207FB for ; Wed, 19 Aug 2020 08:51:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="niSdGqNe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84A8F207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 21737207A4; Wed, 19 Aug 2020 08:51:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XDsmbOhw-bWU; Wed, 19 Aug 2020 08:51:49 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id EC9A4204B0; Wed, 19 Aug 2020 08:51:48 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C13EEC07FF; Wed, 19 Aug 2020 08:51:48 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7DB76C0051 for ; Wed, 19 Aug 2020 08:51:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6B92985E03 for ; Wed, 19 Aug 2020 08:51:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0W9pdYcJCE_0 for ; Wed, 19 Aug 2020 08:51:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by fraxinus.osuosl.org (Postfix) with ESMTPS id C630A85DFC for ; Wed, 19 Aug 2020 08:51:45 +0000 (UTC) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07J8XFV6070490; Wed, 19 Aug 2020 04:51:38 -0400 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=S+nsWlwf+U8EP6ck/CPDu7nHuTHsUi9kQOKDLthEZ9Q=; b=niSdGqNeGZ9z/4yhvg5wOGNU03UEjPnZ5q9uYkK5QyIwjvUVG+54rYq+f0/dwzXdPOtZ tNkJO2QMpIQ8czSZPvO+jn33v0pasbPNusJdL+gwsEFJsUDRaGrpQ9TsrU0lDvxvT6j9 EY6gzahMWidXzHi1evQzdMDuP2PhadIFJVk0QUwEp8526YLCMZP5b7v0sWgaiH80hey+ e7C4P+flw6+DduFgUEgTTltCwcfbFBlmQZIBSXVkrIAL8DslUWkIPnP96aFLRxsWjAEK 8BNU8o0RigFLyaY12uwNz9hkGtDnVLFztexUkoU31bMRITpqU4T+iLo4P1AzkSofgkmh /w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3304r4ag78-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Aug 2020 04:51:38 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 07J8YQdb073315; Wed, 19 Aug 2020 04:51:38 -0400 Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 3304r4ag6h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Aug 2020 04:51:38 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 07J8oHjh026071; Wed, 19 Aug 2020 08:51:36 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma02fra.de.ibm.com with ESMTP id 3304bbs0pq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Aug 2020 08:51:36 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 07J8pXnY32113038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Aug 2020 08:51:33 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7BA6511C04A; Wed, 19 Aug 2020 08:51:33 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DE1B311C04C; Wed, 19 Aug 2020 08:51:32 +0000 (GMT) Received: from oc3016276355.ibm.com (unknown [9.145.33.131]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 19 Aug 2020 08:51:32 +0000 (GMT) Subject: Re: [PATCH v8 2/2] s390: virtio: PV needs VIRTIO I/O device protection To: Cornelia Huck References: <1597762711-3550-1-git-send-email-pmorel@linux.ibm.com> <1597762711-3550-3-git-send-email-pmorel@linux.ibm.com> <20200818192233.6c80798e.cohuck@redhat.com> From: Pierre Morel Message-ID: <2a0e6ac5-1238-fd7b-f39f-6fad767b1493@linux.ibm.com> Date: Wed, 19 Aug 2020 10:51:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200818192233.6c80798e.cohuck@redhat.com> Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-19_04:2020-08-19, 2020-08-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 mlxlogscore=804 mlxscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008190073 Cc: gor@linux.ibm.com, linux-s390@vger.kernel.org, frankja@linux.ibm.com, kvm@vger.kernel.org, mst@redhat.com, linuxram@us.ibm.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, pasic@linux.ibm.com, borntraeger@de.ibm.com, thomas.lendacky@amd.com, hca@linux.ibm.com, david@gibson.dropbear.id.au X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On 2020-08-18 19:22, Cornelia Huck wrote: >> + */ >> +int arch_has_restricted_memory_access(struct virtio_device *dev) >> +{ >> + if (!is_prot_virt_guest()) >> + return 0; > > If you just did a > > return is_prot_virt_guest(); > > and did the virtio feature stuff in the virtio core, this function > would be short and sweet :) yes, the smaller the better, thanks Pierre -- Pierre Morel IBM Lab Boeblingen _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization