Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp830382pxk; Mon, 31 Aug 2020 02:12:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMIyVUA+QUuaK6r7/YkXNbVw2aQA+7Kt340FkT7APENmMYMfAUyF85GNZJM3lIMS+8ICUF X-Received: by 2002:aa7:c383:: with SMTP id k3mr302783edq.164.1598865146146; Mon, 31 Aug 2020 02:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598865146; cv=none; d=google.com; s=arc-20160816; b=sY+0W7zt1RtqcKV2ubhzDsxDx2xq4xNQOrl/T7rilha5PdlqZXYoD2oLgZPYk8sq1i rBbFJHUkiqvVwLQ2A+Ks6zCiAUM5y+Vnep2Sw5DbXIOeSvQs+wlcvgTxvGSkDYo+j1zo IfkAMUCDezikv3x4BT+D2Rs2ksk8LCetEbSYBBoaL3YgidSSN+NYEoWXJeTvEPD24YO7 dsS4JnNlNLrn1JoA/w05JOd3JWAQxQubDwVfh1fRQznRbSyyP9cM3gL0QlP02zofawPS ZXIu/gt12cMk8Cy2hAgwi7IXUqn85h9L6Nx6H76WZCSr127yjBXTq2eLrWuzwqZ7wiw/ sQgQ== 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=LAaTEag7rfqT6w9lcK2QWR89UbUVGYDylsa7lF6cjIw=; b=jnxNCrKgUM6fn6hUSik+YU+kdPiH2Rrhd53JZUNZcvelmZu/hNbid4za/RjJBL7nL7 KusWsgYwPExsdh17hqSP3k/fzlL6d+8O7yTN8UZ4box4RwJuMSCE/nCN1uKVn/xt0Dbx AWA/K+QKz9hbCpYT+1TWcV6WqKZf0LdVkCJsKsfSyItWyQcCARJcYnBaWpDZwn5nbSTg 2iPRP//vbdAt8bwt3lrtN1sJEEHKNIFe0Yh5CYufexJrp28dKUkOwwVRCTgFZizFvDeV v6MbIhCKnFLJ2zVJa3JcZHfh2V2LRI7ibx2rlM9JXqPDRcJt3oM8eVeH9GAZHaXDq2KG lmnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=UZWmdfeQ; 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 t23si4715021ejs.145.2020.08.31.02.12.03; Mon, 31 Aug 2020 02:12:26 -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=UZWmdfeQ; 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 S1728437AbgHaJKb (ORCPT + 99 others); Mon, 31 Aug 2020 05:10:31 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:28458 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728165AbgHaJKG (ORCPT ); Mon, 31 Aug 2020 05:10:06 -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 07V91wx3132558; Mon, 31 Aug 2020 05:09:56 -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=LAaTEag7rfqT6w9lcK2QWR89UbUVGYDylsa7lF6cjIw=; b=UZWmdfeQoqE0x29aj2NVKcoTg1HZsmPFyABaLWS0BSdsXmf2DPiM92qUF/DVUDsFY1ht 36BYzw2PGlwJ541c7GpHQKNy+uyfqCXOQ3t8VAjwGgPQUjc3mOnCbqBLaFtUR1ADgZEd RuF3pM2L2qUgIcCR3PktDwm3xuYFqF4bDZ119CBL42qaPTELKZK13T/Ri6bYx6Bpbrla feQ898e8ROMXbSNfMm1TiPZN5wH7HpLnZR2K1y1mgbZYcFii7NeyM9K+X0ayB6ixGu5u C42zUin0fpZb69J/nsdxmwuOAK8KHoFU7WpsRlLWZ10qK848+GXYhPAHL9wDoQzSkwOM sQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 338x2dgcxp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Aug 2020 05:09:56 -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 07V92Nv4133765; Mon, 31 Aug 2020 05:09:55 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 338x2dgcw4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Aug 2020 05:09:55 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 07V8TlVg007596; Mon, 31 Aug 2020 09:09:51 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma04ams.nl.ibm.com with ESMTP id 337en81yac-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Aug 2020 09:09:51 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 07V99mDt29032762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 31 Aug 2020 09:09:48 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 24C4EAE051; Mon, 31 Aug 2020 09:09:48 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D51DAE045; Mon, 31 Aug 2020 09:09:47 +0000 (GMT) Received: from oc3016276355.ibm.com (unknown [9.145.40.55]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 31 Aug 2020 09:09:47 +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 v10 0/2] s390: virtio: let arch validate VIRTIO features Date: Mon, 31 Aug 2020 11:09:44 +0200 Message-Id: <1598864986-13875-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-08-31_01:2020-08-28,2020-08-31 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 suspectscore=1 bulkscore=0 spamscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008310051 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, and the config option to ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS. 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 | 9 +++++++++ 5 files changed, 41 insertions(+) -- 2.25.1 Changelog 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)