From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFF62C433FE for ; Mon, 4 Apr 2022 01:51:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376884AbiDDBx3 (ORCPT ); Sun, 3 Apr 2022 21:53:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238610AbiDDBx1 (ORCPT ); Sun, 3 Apr 2022 21:53:27 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A04CAAE48 for ; Sun, 3 Apr 2022 18:51:32 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id c23so7008352plo.0 for ; Sun, 03 Apr 2022 18:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/HPdEv1u1dHBI9/8ZBUeRoQdCX9qorofNrQMRHwE/GM=; b=TH7dk7njieIgZMTiOMnEIMvq+kdoMWSqtMYSxG5nKkNG4lplBb6nOcZElTyYhgdDrp hR9rgg9oE2w1A7L4evuBKkZ258pqZoWl2wBuPX3QeTUN0fsmzRuh3Mi6Yxn1H37IQqg3 X80ZJeF8GbE73f1zPSqOYhkLWEUPe0NE+5q76iLvJZ+4uFD40aOTQ8rkoBvoF0xBvVie CWx92BLBNo6CsWPLZOmC5jsJ/d8/XNmGI+oyuCS8ixp3agIFVepWHZjPhNcTQWmvgMX8 GgSAV2Bj+pC7Xv0vAQQJIXIDDv67tLEX4dg644wEjpR/Eq+2cR+xwBxdTEZ3JJLdkvxM sqXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/HPdEv1u1dHBI9/8ZBUeRoQdCX9qorofNrQMRHwE/GM=; b=M+fekxmwofkdIXNT5BWrmHT7agN+qX1fooWhTgAabiMLkp3GHxlEa0hjMQ9VYyd9fo kW6Xva/S5/9mjtRv5yIMhd0iKg89bw/BVmzCPSNuD67UrIxaYYKBSL3y/L5hpj3QKhFW vfmqD7vzp+HTYjVS4Is4JHf79j9BzFww1xp/lyt03qAc99s5+SzGojvIOCNCvseJNCUj IQRor9G7ig8URNKYif3fOhWFhsrkGoSFDAmOpl/X2aSxywQnPJETxzvIL+FFhpGE0vzs 1ebczdY2VGI+c4t8k0sQ3arw7eXEUl2GcepimDuBe0QFySyEjIddu7Tv+22egRiDZvT5 ESHQ== X-Gm-Message-State: AOAM533g7ZMikIIdGEbDPvZkNwHEFAirlWOL+RGhl+qFNWlKyfniIxZg jYE7Ue4tfJMKGWVzDFpZ1+VtAYspXchmw3CQS/RVeA== X-Google-Smtp-Source: ABdhPJxyxERsq7XOg9dz4MNtcUQNW88b6cSv75PSoe0iFwSBsyc+IpLz523KkiK7LrRy69grM1vP5GttYQgnmHlw9TY= X-Received: by 2002:a17:902:c215:b0:153:8d90:a108 with SMTP id 21-20020a170902c21500b001538d90a108mr21434704pll.172.1649037091972; Sun, 03 Apr 2022 18:51:31 -0700 (PDT) MIME-Version: 1.0 References: <20220401010832.3425787-1-oupton@google.com> <20220401010832.3425787-2-oupton@google.com> In-Reply-To: <20220401010832.3425787-2-oupton@google.com> From: Reiji Watanabe Date: Sun, 3 Apr 2022 18:51:16 -0700 Message-ID: Subject: Re: [PATCH v2 1/3] KVM: arm64: Wire up CP15 feature registers to their AArch64 equivalents To: Oliver Upton Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Linux ARM , Peter Shier , Ricardo Koller Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Thu, Mar 31, 2022 at 6:08 PM Oliver Upton wrote: > > KVM currently does not trap ID register accesses from an AArch32 EL1. > This is painful for a couple of reasons. Certain unimplemented features > are visible to AArch32 EL1, as we limit PMU to version 3 and the debug > architecture to v8.0. Additionally, we attempt to paper over > heterogeneous systems by using register values that are safe > system-wide. All this hard work is completely sidestepped because KVM > does not set TID3 for AArch32 guests. > > Fix up handling of CP15 feature registers by simply rerouting to their > AArch64 aliases. Punt setting HCR_EL2.TID3 to a later change, as we need > to fix up the oddball CP10 feature registers still. > > Signed-off-by: Oliver Upton Reviewed-by: Reiji Watanabe From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDAE5C433EF for ; Mon, 4 Apr 2022 01:51:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id E730849EBD; Sun, 3 Apr 2022 21:51:35 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AgNkYDia7HS2; Sun, 3 Apr 2022 21:51:34 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D7DE94B0EF; Sun, 3 Apr 2022 21:51:34 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 0EDE94A5A0 for ; Sun, 3 Apr 2022 21:51:34 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZNa1iYnaEm4k for ; Sun, 3 Apr 2022 21:51:33 -0400 (EDT) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 08AA249EBD for ; Sun, 3 Apr 2022 21:51:32 -0400 (EDT) Received: by mail-pl1-f170.google.com with SMTP id y6so6974116plg.2 for ; Sun, 03 Apr 2022 18:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/HPdEv1u1dHBI9/8ZBUeRoQdCX9qorofNrQMRHwE/GM=; b=TH7dk7njieIgZMTiOMnEIMvq+kdoMWSqtMYSxG5nKkNG4lplBb6nOcZElTyYhgdDrp hR9rgg9oE2w1A7L4evuBKkZ258pqZoWl2wBuPX3QeTUN0fsmzRuh3Mi6Yxn1H37IQqg3 X80ZJeF8GbE73f1zPSqOYhkLWEUPe0NE+5q76iLvJZ+4uFD40aOTQ8rkoBvoF0xBvVie CWx92BLBNo6CsWPLZOmC5jsJ/d8/XNmGI+oyuCS8ixp3agIFVepWHZjPhNcTQWmvgMX8 GgSAV2Bj+pC7Xv0vAQQJIXIDDv67tLEX4dg644wEjpR/Eq+2cR+xwBxdTEZ3JJLdkvxM sqXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/HPdEv1u1dHBI9/8ZBUeRoQdCX9qorofNrQMRHwE/GM=; b=5y10+NjZp8T60DAQs1m+SAqCr5tSTaaK/G0Bb4tU+AB3TpzWwoiSFLpNYJ8P/WVtBJ SfjLWwegvGSFKbRQHCCx16Apc3Ezt/t6BAt/oXFgm/Nc5/4InLHi6Kqy7wlkbV7AJccR zZVZ3BwB7gxSYsJbHfznDELcfAfbXjCf//w1c4wWmz972geGdl5NgD3y4pFwqTHxhbOD Wti8VpvBUVR/6Jtgk+t21dUspDKxDyrZI1jC8tEzBBBK3d8pHK2XITCr/nMZvSydgxQY lCbPGn3sPK9dVqfVtEVElR9MJ8hV+DzGiDMlKp9TVPBhV2iDNqqbVIKh1s1+QawkZgEk Lgxg== X-Gm-Message-State: AOAM531TAAaPPSq+NnpA7HMNW3SqGU7lXYth73v+GCNIr3rmZMkOhjY6 fCJWApPs+HWyHw512k3lnT9AKEwl7wk865ZyWKzutQ== X-Google-Smtp-Source: ABdhPJxyxERsq7XOg9dz4MNtcUQNW88b6cSv75PSoe0iFwSBsyc+IpLz523KkiK7LrRy69grM1vP5GttYQgnmHlw9TY= X-Received: by 2002:a17:902:c215:b0:153:8d90:a108 with SMTP id 21-20020a170902c21500b001538d90a108mr21434704pll.172.1649037091972; Sun, 03 Apr 2022 18:51:31 -0700 (PDT) MIME-Version: 1.0 References: <20220401010832.3425787-1-oupton@google.com> <20220401010832.3425787-2-oupton@google.com> In-Reply-To: <20220401010832.3425787-2-oupton@google.com> From: Reiji Watanabe Date: Sun, 3 Apr 2022 18:51:16 -0700 Message-ID: Subject: Re: [PATCH v2 1/3] KVM: arm64: Wire up CP15 feature registers to their AArch64 equivalents To: Oliver Upton Cc: kvm@vger.kernel.org, Marc Zyngier , Peter Shier , kvmarm@lists.cs.columbia.edu, Linux ARM X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Thu, Mar 31, 2022 at 6:08 PM Oliver Upton wrote: > > KVM currently does not trap ID register accesses from an AArch32 EL1. > This is painful for a couple of reasons. Certain unimplemented features > are visible to AArch32 EL1, as we limit PMU to version 3 and the debug > architecture to v8.0. Additionally, we attempt to paper over > heterogeneous systems by using register values that are safe > system-wide. All this hard work is completely sidestepped because KVM > does not set TID3 for AArch32 guests. > > Fix up handling of CP15 feature registers by simply rerouting to their > AArch64 aliases. Punt setting HCR_EL2.TID3 to a later change, as we need > to fix up the oddball CP10 feature registers still. > > Signed-off-by: Oliver Upton Reviewed-by: Reiji Watanabe _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6C5EC433F5 for ; Mon, 4 Apr 2022 01:53:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OFHJ6n6XdtG9ZccMntzxR6kX0cACtHGGg1IXtS4EKUY=; b=EOYwv4HNWLTO3h OzWooCEpn/y/1g70yvDBt6bOv2YUlT84R8iuZoRz+NV3DrjJW/6yuAnVUQj3NhwIoAxvWaHyzoQd1 aUVrRqnIC+AWfJZWCln+10P1Ph479GZRBGIWAGavu8+rDm5t0GLrEhtDAxokuTRT+EO94Z/ROVz/k xf4qy+4SLs4bR9hvlMoRrU04kCJCIRRGD8ku0AeGvb8NYxEoQQAdrz9k2Ug6w/mHkWg3TsRp5LOO1 CSMeSLwquQTjSZ9si0t60ateuHtHaUurUI81HEArJ8we7nkIgmQJuJ7LRSDIYdNScFb5JlZz9p4xU yLaAtV6LWwCHE8vZbjXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbBsc-00CkLX-64; Mon, 04 Apr 2022 01:51:42 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbBsY-00CkKl-Qv for linux-arm-kernel@lists.infradead.org; Mon, 04 Apr 2022 01:51:40 +0000 Received: by mail-pj1-x102f.google.com with SMTP id kw18so1170594pjb.5 for ; Sun, 03 Apr 2022 18:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/HPdEv1u1dHBI9/8ZBUeRoQdCX9qorofNrQMRHwE/GM=; b=TH7dk7njieIgZMTiOMnEIMvq+kdoMWSqtMYSxG5nKkNG4lplBb6nOcZElTyYhgdDrp hR9rgg9oE2w1A7L4evuBKkZ258pqZoWl2wBuPX3QeTUN0fsmzRuh3Mi6Yxn1H37IQqg3 X80ZJeF8GbE73f1zPSqOYhkLWEUPe0NE+5q76iLvJZ+4uFD40aOTQ8rkoBvoF0xBvVie CWx92BLBNo6CsWPLZOmC5jsJ/d8/XNmGI+oyuCS8ixp3agIFVepWHZjPhNcTQWmvgMX8 GgSAV2Bj+pC7Xv0vAQQJIXIDDv67tLEX4dg644wEjpR/Eq+2cR+xwBxdTEZ3JJLdkvxM sqXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/HPdEv1u1dHBI9/8ZBUeRoQdCX9qorofNrQMRHwE/GM=; b=PAtZPFKvCgIYOk4eOI2qA4Fnvc9FW+q6LARy6drOWpVaXEDXMiEA3X2KGxnSjoM1jl cbtbco0rDmjZvvNQKv9+zB+QknrjSMj60cal+HFghU+hzorHjqg+KpUhUrKVqO4HjYML rCVRxxh+kZ0DqZKwXkiuzanALhmXOOzzbz2ZqFA317yyFFxwTMgpXLtIKOW2roYQx1tG Gas5GNbYKZF8m3NHxUPZrbzdtcIcL6gFwTk8XFiUg/Pt57cr64Ul17NrcBuJ9J1ZS+kK QamQgip2zJWj2JZLl/W9Ote6Bo+g4jfs7mVLTHmLnn+DqESujZU8Za69w4EBncIoEv3t EkEg== X-Gm-Message-State: AOAM530S9Qyul0ARgB76Yu0xErksICs/CVuTCag4/fCQPYGqVjCk7vQS /0QCIWsZLQxov9RW7ZnWfLWVp9hAl3QQFC4j509p9Q== X-Google-Smtp-Source: ABdhPJxyxERsq7XOg9dz4MNtcUQNW88b6cSv75PSoe0iFwSBsyc+IpLz523KkiK7LrRy69grM1vP5GttYQgnmHlw9TY= X-Received: by 2002:a17:902:c215:b0:153:8d90:a108 with SMTP id 21-20020a170902c21500b001538d90a108mr21434704pll.172.1649037091972; Sun, 03 Apr 2022 18:51:31 -0700 (PDT) MIME-Version: 1.0 References: <20220401010832.3425787-1-oupton@google.com> <20220401010832.3425787-2-oupton@google.com> In-Reply-To: <20220401010832.3425787-2-oupton@google.com> From: Reiji Watanabe Date: Sun, 3 Apr 2022 18:51:16 -0700 Message-ID: Subject: Re: [PATCH v2 1/3] KVM: arm64: Wire up CP15 feature registers to their AArch64 equivalents To: Oliver Upton Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Linux ARM , Peter Shier , Ricardo Koller X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220403_185138_895153_52FB7974 X-CRM114-Status: GOOD ( 12.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Mar 31, 2022 at 6:08 PM Oliver Upton wrote: > > KVM currently does not trap ID register accesses from an AArch32 EL1. > This is painful for a couple of reasons. Certain unimplemented features > are visible to AArch32 EL1, as we limit PMU to version 3 and the debug > architecture to v8.0. Additionally, we attempt to paper over > heterogeneous systems by using register values that are safe > system-wide. All this hard work is completely sidestepped because KVM > does not set TID3 for AArch32 guests. > > Fix up handling of CP15 feature registers by simply rerouting to their > AArch64 aliases. Punt setting HCR_EL2.TID3 to a later change, as we need > to fix up the oddball CP10 feature registers still. > > Signed-off-by: Oliver Upton Reviewed-by: Reiji Watanabe _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel