Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3083912pxk; Mon, 7 Sep 2020 02:42:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrOVSD2WDIfZS+0nDS9q2gyc0KnqmLrpZQkbAMVMY1PhqxdB599I5kRIMZo0kd1sKdAi6d X-Received: by 2002:a17:906:9941:: with SMTP id zm1mr19808021ejb.288.1599471721679; Mon, 07 Sep 2020 02:42:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599471721; cv=none; d=google.com; s=arc-20160816; b=B8EiupZzcLwLxlX+kTBlm4em9adigWeWl6qyN98Fb1Ucf/O1/a/3Skstp8mH4eQ7Fc lyQPCJIlRCuWuj9zeCezJ3FpMOCVDCL3hewZ7hzCVeIQShQULmEgZGjL9B4nr8ek3bk4 7x8TCuDXw1mRHO0XRwIt7+VtiLvbr4EdpbYeuJwK2iD8oCRVWktFKolbgMLx/jtnZRNo YHAXwO9sbij7BIuad8f/rh3jbeDiN+oUVe0uRhnX69U8A1cHTinrFgWsb6IbRuAsEgaW j7r1Tpq/Qc3ScPMX5p9Jh07wGUbVGnJm05TzZ24cohLM6w89rqPYGhpricQllsCi2NSS 7+fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=/zsoqtLlLbEPeX56/5WqT6AsOKEzVbCt1a7Ompwymls=; b=g80TXJE+cK7mwQ8YTYfDnpGL0OoOZPKDniLQB3cH5zGd7XBEQzZA9yOhunSKsvGIXj rS2vSuFQVK5TjO2LWT/YU5yKp2RwBHQ2sWUBEVmr5C7jm51FSfd/oHLNEPHqWsvaiNd5 c+H64qJ5mLbF4+1WdJhN3biL+a4DrHy4SFhD7STi+e240Paf9CnPkvJMlASo2Gilp5tl t8oKuFMQXKqK/DWv1SobnRlcB8zzixc7FXc37xBg6Iw4OzfN3oU5NacdmUATIxG0IFI/ pDmJIM71V4Gw3c2c6EEUpoFRwHxB4OkgCJcA8h5F/0kFX5p/48piLWUxr6yVrGHnMfTg b6vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=WPvQMiZH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v2si4870632ejw.741.2020.09.07.02.41.39; Mon, 07 Sep 2020 02:42:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=WPvQMiZH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728474AbgIGJjb (ORCPT + 99 others); Mon, 7 Sep 2020 05:39:31 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59102 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728300AbgIGJj3 (ORCPT ); Mon, 7 Sep 2020 05:39:29 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0879Vp67008621; Mon, 7 Sep 2020 05:39:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id; s=pp1; bh=/zsoqtLlLbEPeX56/5WqT6AsOKEzVbCt1a7Ompwymls=; b=WPvQMiZHoj+krc7szVHr3KR8Dth4u7rrk9gmXULVKwKiISKoxDWdeR00fSQ6/wFaWLw3 y8uX0uio5xDMuMmySUIHW2qtUqGZblyjAZ8AgeNEToC/9q/FMb6wgbalFfMELy3FxInl D0yXYsss5nKqlNqiLnuvm4f/MW+M16GYVnVQY3oRuel2bDMRfxYUUBX5ia+ydCwzFEWT q29+3TgLu7XBZXMxr676edSqVK/6TKLlIylfCmaFBdLimeUDZKG7K+ixv5QPuO8Pg34p 2tHtbQD7hG7hTek66KdO00IxUgiNFhb0y4gCbKFPmYanVAVgip0d7UfYszfIeHMUDW/O 5g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 33dff85k9c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Sep 2020 05:39:16 -0400 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0879WrP2011545; Mon, 7 Sep 2020 05:39:16 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 33dff85k88-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Sep 2020 05:39:15 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0879bbYJ001949; Mon, 7 Sep 2020 09:39:13 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma03ams.nl.ibm.com with ESMTP id 33c2a827c7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Sep 2020 09:39:13 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0879dAIb32244048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Sep 2020 09:39:10 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 389B3A4065; Mon, 7 Sep 2020 09:39:10 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 62105A4060; Mon, 7 Sep 2020 09:39:09 +0000 (GMT) Received: from oc3016276355.ibm.com (unknown [9.145.86.222]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 7 Sep 2020 09:39:09 +0000 (GMT) From: Pierre Morel To: linux-kernel@vger.kernel.org Cc: pasic@linux.ibm.com, borntraeger@de.ibm.com, frankja@linux.ibm.com, mst@redhat.com, jasowang@redhat.com, cohuck@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 Subject: [PATCH v11 0/2] s390: virtio: let arch validate VIRTIO features Date: Mon, 7 Sep 2020 11:39:05 +0200 Message-Id: <1599471547-28631-1-git-send-email-pmorel@linux.ibm.com> X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-09-07_04:2020-09-07,2020-09-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 malwarescore=0 adultscore=0 spamscore=0 suspectscore=1 impostorscore=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009070090 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, The goal of the series is to give a chance to the architecture to validate VIRTIO device features. The tests are back to virtio_finalize_features. No more argument for the architecture callback which only reports if the architecture needs guest memory access restrictions for VIRTIO. I renamed the callback to arch_has_restricted_virtio_memory_access, the config option to ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS, and VIRTIO_F_IOMMU_PLATFORM to VIRTIO_F_ACCESS_PLATFORM. Regards, Pierre Pierre Morel (2): virtio: let arch advertise guest's memory access restrictions s390: virtio: PV needs VIRTIO I/O device protection arch/s390/Kconfig | 1 + arch/s390/mm/init.c | 10 ++++++++++ drivers/virtio/Kconfig | 6 ++++++ drivers/virtio/virtio.c | 15 +++++++++++++++ include/linux/virtio_config.h | 10 ++++++++++ 5 files changed, 42 insertions(+) -- 2.17.1 Changelog to v11: - replaced VIRTIO_F_IOMMU_PLATFORM with VIRTIO_F_ACCESS_PLATFORM to v10: - removed virtio_config.h unnecessary include - wording (Connie) to v9: - move virtio tests back to virtio_finalize_features (Connie) - remove virtio device argument to v8: - refactoring by using an optional callback (Connie) to v7: - typo in warning message (Connie) to v6: - rewording warning messages (Connie, Halil) to v5: - return directly from S390 arch_validate_virtio_features() when the guest is not protected. (Connie) - Somme rewording (Connie, Michael) - moved back code from arch/s390/ ...kernel/uv.c to ...mm/init.c (Christian) to v4: - separate virtio and arch code (Pierre) - moved code from arch/s390/mm/init.c to arch/s390/kernel/uv.c (as interpreted from Heiko's comment) - moved validation inside the arch code (Connie) - moved the call to arch validation before VIRTIO_F_1 test (Michael) to v3: - add warning (Connie, Christian) - add comment (Connie) - change hook name (Halil, Connie) to v2: - put the test in virtio_finalize_features() (Connie) - put the test inside VIRTIO core (Jason) - pass a virtio device as parameter (Halil)