Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1484182rdh; Mon, 25 Sep 2023 14:24:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcw6z7ru16wX52IbSvl2XEWzG5vCvkmfS/At0FxP9Jhci8dwC9iuvxfHpjsD3uH+egPt/w X-Received: by 2002:a05:6a00:10c3:b0:690:41a1:9b6c with SMTP id d3-20020a056a0010c300b0069041a19b6cmr6654312pfu.10.1695677098644; Mon, 25 Sep 2023 14:24:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695677098; cv=none; d=google.com; s=arc-20160816; b=uriQJDFrdD3sAXACMJlnQeZIf476bIcsc23mG9J8pZ4tPSJUYTOX9txB2Zgr8l5o0H xHOTdlMt/FhNwsibGjslUUUugzl2UeVcimNOexx9AR2gbyleJXzeBDFoG/evJ8EKJZFq SS4dh8G6HHifRSdY2r9gzvyb42QLz6ZPga9h6q2JbSjx2KuFerH0/WlFaGwur3N1Z7z1 dBiq/BduAY0qccDl6bhHhBX8BusGdiAu29mEOZP9fZIiUSN/jSGbXjCNthHmpShhtOAc V1IiF/vIY51fc2kneR9dcTeNRkoRWhSANM9jQxqWiOQlvyP3OobyIADyrrSEjWkFAIhi fRow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=D8/L7io2iZBhsdwjWoh1XJ3RaISMq8Xsh3QW8UMayYo=; fh=UEH6cFyH1ghvNrfwViNbncCn5r9iy89nkA/jfjQrZCI=; b=sPKQdXFyMwqEOmj+Ud6NoG9e4jN2494SVOg7LfLvsQAk3XM7iUwvZHzIEE2GWJ9aix 1OeaFz5kbasgM8xqmijYmz5OTTY0AiC1HRP7mgDzla84ZC9YWaajeyqLXYdnDnsvK1SN meIppAWeq8jXPiWuPDdvPaT4ts3QTp+FAZQiTgWIkXVROc5w8qzsE2QfSg0+vQ6r/e/L O5hNTuDT9Kvds4IEL8By4zNrpG5cvBbJagVkk8HpmnaBNxPJmeZ8V5CbRllK4jd5IkHk /bCdNK6zFXjSBpb6bUdocKCLZ7MTxh8KnaOyl0BWD80VZ7uUHPESN0aE+7W/1U6YnhPk JF8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b="ptp08a/r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id ds12-20020a056a004acc00b0068bdcfc3454si11191828pfb.135.2023.09.25.14.24.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 14:24:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b="ptp08a/r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 9049F809E8AE; Mon, 25 Sep 2023 09:22:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230049AbjIYQWN (ORCPT + 99 others); Mon, 25 Sep 2023 12:22:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230177AbjIYQWM (ORCPT ); Mon, 25 Sep 2023 12:22:12 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7534DDF for ; Mon, 25 Sep 2023 09:22:06 -0700 (PDT) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38PECL0J010063; Mon, 25 Sep 2023 16:21:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2023-03-30; bh=D8/L7io2iZBhsdwjWoh1XJ3RaISMq8Xsh3QW8UMayYo=; b=ptp08a/ru91GJQ19d4baO50CZV6M/SUZrZEe8Pv/YnEn9cE5lhzH+p9tT55aUFRBm4FY xsITu4qKle0YFKpIaheBBbH0FmS+n9u0pBjRsD2M2zQDoZrGjK7ShkuazPaUSI7m6YVu Pxx1lu0W2QWFr9nWKhx5OGn9W3Bf91ZQB2tyTZHBPj+/3lE6a9XMXdcqXqzYm4FBb7/+ GWoPKcUxaQYKOlKcJsE3kWYTVHSucZk2EpGyWTAL4TV911PC/PtgU1432rotROfYPZo8 Q/uqcs2cQSSBUMFPwfN5zCzc6QAu8Pil7Xar3kXaQK4O2JX4YFfjlZ4RwyHCN5hzn1Sl 9Q== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t9qwbc3tk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Sep 2023 16:21:45 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 38PFVeVW034938; Mon, 25 Sep 2023 16:21:45 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3t9pf4yd6a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Sep 2023 16:21:45 +0000 Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38PGLi1w024071; Mon, 25 Sep 2023 16:21:44 GMT Received: from mlluis-mac.uk.oracle.com (dhcp-10-175-170-37.vpn.oracle.com [10.175.170.37]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3t9pf4ycur-1; Mon, 25 Sep 2023 16:21:44 +0000 From: Miguel Luis To: Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev Cc: miguel.luis@oracle.com Subject: [PATCH v2 0/2] Fine grain sysregs allowed to trap for nested virtualization Date: Mon, 25 Sep 2023 16:20:55 +0000 Message-Id: <20230925162057.27548-1-miguel.luis@oracle.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-25_13,2023-09-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 mlxscore=0 mlxlogscore=847 suspectscore=0 phishscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309250126 X-Proofpoint-GUID: EEyGGGEQ6o-CJQjZZsVLRe3voyfEkgOO X-Proofpoint-ORIG-GUID: EEyGGGEQ6o-CJQjZZsVLRe3voyfEkgOO X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 25 Sep 2023 09:22:16 -0700 (PDT) The current HCR_EL2 description includes _EL1 registers that are not affected by NV. Let's exclude them from those ranges to implement a more fine grained approach. Changes v1 -> v2 patch 1: fix indentation patch 2: improve commit message (Marc) fix indentation (Marc) follow kernel comment format (Marc) describe LRs in ranges (Marc) include AMEVCNTVOFF0_EL2 and AMEVCNTVOFF1_EL2 patch 3: drop. Excluded IMPDEF range is trapped by HCR_EL2.TIDCP v1: https://lore.kernel.org/kvmarm/20230913185209.32282-1-miguel.luis@oracle.com/ Miguel Luis (2): arm64: Add missing _EL12 encodings arm64/kvm: Fine grain _EL2 system registers list that affect nested virtualization arch/arm64/include/asm/sysreg.h | 11 +++++++++ arch/arm64/kvm/emulate-nested.c | 44 ++++++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 6 deletions(-) -- 2.39.2