Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3157392pxa; Tue, 18 Aug 2020 08:02:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuSl4GYuD/GhTgx2uFT42CcOmVHOWpw9txXXAI8Ngdl9nJ8J3HRtUKafFA0UvmvXSH+KZp X-Received: by 2002:aa7:d3c2:: with SMTP id o2mr9043012edr.11.1597762974041; Tue, 18 Aug 2020 08:02:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597762974; cv=none; d=google.com; s=arc-20160816; b=HQYNaX854QkYXjCFy/OygQs10hk4fhPnv2+JQtpvzB6Yw1HoSG0JoNshdcANZ4DzFv hYbRM2ubu4qA1YO7CIFjWi0QzwXUqTgTsFHTNW5kONJ8aURfjgqdOuwsw+CEXF5KfOB5 Gi0YLIsvrgPz9MciL6YLj3IMIC8KgoltBBLhWPkY53mwvd3NYB5QnvD/d8Ppqdx3Vndr J1XlE4EUKLaggDZHXXaD+bN8GV35rHdqJs+5xD8oMuOJgKK/WbQ0tarJuLJoQkIZ4zyH BQ3D38lr9Rf4AGv3++4/cAqd5IgTR+7Hz002GpitPOV9VbuPO4Og3Ol8PuUithG1rkt4 lInA== 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=25izQLYXYfVWZ0i4cAY3epGdXG76W5RcjkJkTe+0JMM=; b=OS0nx1T1gILEHfKbhnbeHLjai5TnUaKGYOQLtMKqIcv67Wu4UKWsJYvMJR3/Xv5JwQ zirYVDzgT3p01grcHfqboUBSDHsvEgfC5/ddOnsnWquIluUUAQ7aUbZlzoq0lcpayHB6 BEhsXJ2bM2fCVi96T1rmIK3i+836jsvGQYkU1jlAtJN+7Y63kU0su/w+xro23P6i/gcD vn5Z0OSsK3ZuCbE2X+KVrUT+X8IwDxPD63O3cf3jI7wb3CLnlqOjLsimrPN308kRO4ms MJtSSzd7LyC2fFJH9/JjEinTg2mCXYmSLFRwEs8qyDhHzgSZR24z01PPvpq+JjJ4PK2k +EGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="jzE/+AdW"; 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 k20si13676546ejq.330.2020.08.18.08.02.28; Tue, 18 Aug 2020 08:02:54 -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="jzE/+AdW"; 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 S1727095AbgHRPA7 (ORCPT + 99 others); Tue, 18 Aug 2020 11:00:59 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48395 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726651AbgHRPA6 (ORCPT ); Tue, 18 Aug 2020 11:00:58 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07IF0DBA004146; Tue, 18 Aug 2020 11:00:52 -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=25izQLYXYfVWZ0i4cAY3epGdXG76W5RcjkJkTe+0JMM=; b=jzE/+AdWdKPtTeBKXHpUotgoCIpsllkKpftVNpZeTXfxHG4snNkKdNdEwJ7UIlLf3XQU mLGzrXG75kcyPJKpTnas3n2ol7Ul2ItQNK5VY19nUyESyIg28vw8ftVdRLZMLnlTkVcP B6RmRWTaba6otVnhSn/uaVPLVOpop000lYDqARF6SKG8cmBahL0IaVkFBZ5lLhOvwGGK xpJhQPAOO8uq1OHRh59OWKl+CmDekVkgxoE3Pbe1OtYBP+m4g66TSFIyvnIYpgTBPyAj qhEJmAuxkRxXD3cMgNCTdaPYt6dYdZrPzFr2Yy74INQjNSQHk9jBny04Pro/EeowMlip iQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3304r3cq03-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Aug 2020 11:00:52 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 07IF0lTg007389; Tue, 18 Aug 2020 11:00:47 -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 3304r3cnd3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Aug 2020 11:00:43 -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 07IEtjgu015594; Tue, 18 Aug 2020 14:58:36 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma02fra.de.ibm.com with ESMTP id 3304bbrfh3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Aug 2020 14:58:36 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 07IEwXm426280302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Aug 2020 14:58:33 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 49D3342041; Tue, 18 Aug 2020 14:58:33 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A56DE4203F; Tue, 18 Aug 2020 14:58:32 +0000 (GMT) Received: from oc3016276355.ibm.com (unknown [9.145.28.154]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 18 Aug 2020 14:58:32 +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 v8 0/2] s390: virtio: let arch validate VIRTIO features Date: Tue, 18 Aug 2020 16:58:29 +0200 Message-Id: <1597762711-3550-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-18_10:2020-08-18,2020-08-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 mlxlogscore=999 bulkscore=0 suspectscore=1 priorityscore=1501 malwarescore=0 impostorscore=0 adultscore=0 clxscore=1015 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008180102 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. in this respin: I use the original idea from Connie for an optional arch_has_restricted_memory_access. I renamed the callback accordingly, added the definition of ARCH_HAS_RESTRICTED_MEMORY_ACCESS inside the VIRTIO Kconfig and the selection in the PROTECTED_VIRTUALIZATION_GUEST config entry. Regards, Pierre Pierre Morel (2): virtio: let arch validate VIRTIO features s390: virtio: PV needs VIRTIO I/O device protection arch/s390/Kconfig | 1 + arch/s390/mm/init.c | 30 ++++++++++++++++++++++++++++++ drivers/virtio/Kconfig | 6 ++++++ drivers/virtio/virtio.c | 4 ++++ include/linux/virtio_config.h | 9 +++++++++ 5 files changed, 50 insertions(+) -- 2.25.1 Changelog 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)