From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F019F13699B for ; Mon, 9 Sep 2024 15:19:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725895202; cv=none; b=jJCy6JXnSAXk5LChSn7+oW2HHVdvlwnuCcG19w4IC4mj3IhOrvbEZOmNevLPL/QDP3YaW48cErELKFjVY64kOwjN9cGVyal4VWAWT2y/nzkDZ8VeVJbQzFMimz4MU6uLqK4gk0JmWKxLv5DWO/nSD1IeW04oMpwcmJQ49S89yzc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725895202; c=relaxed/simple; bh=NbCI0cPkIwWDZXrCjRlTBDISd5Iah3+OZSNz5k11OEY=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=gQxn7JQZGmggBMEaiPd7+ErClBgaI9vbGXvlSlN4hkho/AIm06735hkwHO+kSf/fmQrIpAaD64RFZPlT89PNQQmbX4o6iflY54L+vvA5UMZzUSO6lZ/UzszrKEzEkOfys+q+6W847x8kyCoWFzSBrLDAhUi1bOZVbB0U8dsSqMA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.254]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4X2Vnl2PdpzfbwL; Mon, 9 Sep 2024 23:17:47 +0800 (CST) Received: from kwepemd100010.china.huawei.com (unknown [7.221.188.107]) by mail.maildlp.com (Postfix) with ESMTPS id 08B6318010A; Mon, 9 Sep 2024 23:19:57 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (7.191.163.240) by kwepemd100010.china.huawei.com (7.221.188.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Mon, 9 Sep 2024 23:19:56 +0800 Received: from lhrpeml500005.china.huawei.com ([7.191.163.240]) by lhrpeml500005.china.huawei.com ([7.191.163.240]) with mapi id 15.01.2507.039; Mon, 9 Sep 2024 16:19:54 +0100 From: Shameerali Kolothum Thodi To: Oliver Upton , "kvmarm@lists.linux.dev" , Sebastian Ott CC: Marc Zyngier , James Morse , "Suzuki K Poulose" , yuzenghui , "kvm@vger.kernel.org" , Shaoqin Huang , Eric Auger , "Wangzhou (B)" Subject: RE: [PATCH v5 07/10] KVM: arm64: Treat CTR_EL0 as a VM feature ID register Thread-Topic: [PATCH v5 07/10] KVM: arm64: Treat CTR_EL0 as a VM feature ID register Thread-Index: AQHawm/0TP9B4WSU3kSdeZvzR1wQjLJQDNGg Date: Mon, 9 Sep 2024 15:19:54 +0000 Message-ID: <0db19a081d9e41f08b0043baeef16f16@huawei.com> References: <20240619174036.483943-1-oliver.upton@linux.dev> <20240619174036.483943-8-oliver.upton@linux.dev> In-Reply-To: <20240619174036.483943-8-oliver.upton@linux.dev> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi Oliver/Sebastian, > -----Original Message----- > From: Oliver Upton > Sent: Wednesday, June 19, 2024 6:41 PM > To: kvmarm@lists.linux.dev > Cc: Marc Zyngier ; James Morse > ; Suzuki K Poulose ; > yuzenghui ; kvm@vger.kernel.org; Sebastian Ott > ; Shaoqin Huang ; Eric Auger > ; Oliver Upton > Subject: [PATCH v5 07/10] KVM: arm64: Treat CTR_EL0 as a VM feature ID > register [...]=20 =20 > @@ -2487,7 +2490,10 @@ static const struct sys_reg_desc sys_reg_descs[] = =3D > { > { SYS_DESC(SYS_CCSIDR2_EL1), undef_access }, > { SYS_DESC(SYS_SMIDR_EL1), undef_access }, > { SYS_DESC(SYS_CSSELR_EL1), access_csselr, reset_unknown, > CSSELR_EL1 }, > - { SYS_DESC(SYS_CTR_EL0), access_ctr }, > + ID_WRITABLE(CTR_EL0, CTR_EL0_DIC_MASK | > + CTR_EL0_IDC_MASK | > + CTR_EL0_DminLine_MASK | > + CTR_EL0_IminLine_MASK), (Sorry if this was discussed earlier, but I couldn't locate it anywhere.) Is there a reason why we can't make the L1Ip writable as well here? We do have hardware that reports VIPT and PIPT for L11p. The comment here states, https://elixir.bootlin.com/linux/v6.11-rc7/source/arch/arm64/kernel/cpufeat= ure.c#L489 " If we have differing I-cache policies, report it as the weakest - VIPT." Does this also mean it is safe to downgrade the PIPT to VIPT for Guest as w= ell? Please let me know. Thanks, Shameer