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 DC914C83F2C for ; Mon, 4 Sep 2023 13:46:48 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7np7sPUnRPP1Qx25or6k3oaY4bRdBENgYq86phel2HE=; b=aj/w2KkuUElXT+ mrbASYdsv/qchfkxaOjw/Z/SUKlhiN4RvKTwmFni/EMI5gSg+FDU7551IA0bVFDyhdf+q3Vr1oZHN 81tkCdPsiDFYpggo8oWCJiB3NWrGwn4YN+g0woDRxxpAuu/aFCX7C63pepHskINhLLBlKOAjXwg7p jStZ0LX+uj6gpvovAswllzQmdHf40qp4FVzLxebYPd09TMkRNKuJtCQ1UqhIVoM24D5Mwgk4AsFHB ITkl+zb3O3zNRgjsURImfXpj0fqSIt92MtnbDct5a0wemtQr9Y1471nvVf8wRoiHtyA9m1gGATR/b w7xZpFF3BZEAhldc4WGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qd9uF-004DAk-2q; Mon, 04 Sep 2023 13:46:19 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qd9uC-004D9V-2b for linux-arm-kernel@lists.infradead.org; Mon, 04 Sep 2023 13:46:17 +0000 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-99c93638322so315287166b.1 for ; Mon, 04 Sep 2023 06:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1693835173; x=1694439973; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MvFpohTVYIZg5zZrtXqASIgY84rg/Ko8jDcHzB0T9Sk=; b=g0Yrt6A1LkJhwLxYCfiJsCCoCPGb8CulDGY4Lni0317o8/DAg2xpB+aLpRHSr4aULM WWxILk12fvA+dstwpfiyUA1gbdQnyvRtTzDmQWiDghC3+QImCByZpT4rKTVcyxEUTQdR uBx2Rz/NgfmJ2+BNfJLJ32QZelbBdjGFQBJW1Ykzbm7SSPMu9jh17uyWECU0E3GS0GhV FBFA3iybiyo7Rtf7DuEmtPfUkxw6hCE6TXF+cgULbHu+tDzz1ZQ3GBKsWAE2K1waSBzu wciDlGG1DB1KF3pOLl4uA6jGqLY1YXgzCc9JfmB6LFoMmrxPVTbj3Pd6jGlzLAWQfQD0 D7bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693835173; x=1694439973; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MvFpohTVYIZg5zZrtXqASIgY84rg/Ko8jDcHzB0T9Sk=; b=WFzQDM7cl9ba8KZ5MumvNNQ6G3EFaa0HtK+0CNQ7uUIGxBtfLgQrwoqDmmIZvDSmWG 63Sp3ZUQOjkmjrwQbbbzNpqIvfWbBtjRstsfDBDggVvoXYKCZhqN6HC8dj/KZuSUVlR2 8g3/Vn/8jXP+9SqKc8uiZCzoRrR6JioRs3dtQX/lq8B/ABjA4N+zjDAGsDjg2hzRoFpN xlDsLa0a7FiUT/BGPv3MvK0w/tfeL/nA86gVEPnEHNhwEzntn1pwqhQgDxPrOsDnGm2h HCxlFGDaIpvst+nSkhwZxabvBbvEugPsUQk6oi9b+J8F3EtDRKxgqGX0aoZ46qhHStDc HQIQ== X-Gm-Message-State: AOJu0YzcsgDz5tBd8IpkVn4QHMH2Pm42MhJUiVwfX8dx6L/pFDYc+XER Z3EVZPl53a1hgc+eFY6foM93Xw== X-Google-Smtp-Source: AGHT+IEdZjuBxG+ZQHNKrQOJiw6f0psWqsTfKbwqOJ2nIP8Um69rD+e7ovBSZFqMEfeYtMk2y26GEQ== X-Received: by 2002:a17:906:51c5:b0:99c:5056:4e31 with SMTP id v5-20020a17090651c500b0099c50564e31mr10901921ejk.15.1693835172485; Mon, 04 Sep 2023 06:46:12 -0700 (PDT) Received: from localhost (2001-1ae9-1c2-4c00-20f-c6b4-1e57-7965.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:20f:c6b4:1e57:7965]) by smtp.gmail.com with ESMTPSA id l18-20020a1709066b9200b009930308425csm6163942ejr.31.2023.09.04.06.46.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Sep 2023 06:46:12 -0700 (PDT) Date: Mon, 4 Sep 2023 15:46:11 +0200 From: Andrew Jones To: Haibo Xu Cc: xiaobo55x@gmail.com, Paul Walmsley , Palmer Dabbelt , Albert Ou , Paolo Bonzini , Shuah Khan , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Anup Patel , Atish Patra , Guo Ren , wchen , Daniel Henrique Barboza , Greentime Hu , Sean Christopherson , Ricardo Koller , Vishal Annapurve , Vitaly Kuznetsov , Aaron Lewis , David Matlack , Ackerley Tng , Mingwei Zhang , Vipin Sharma , Maxim Levitsky , Peter Gonda , Thomas Huth , Like Xu , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , David Woodhouse , Michal Luczaj , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org Subject: Re: [PATCH v2 5/8] KVM: riscv: selftests: Add exception handling support Message-ID: <20230904-c4d2ea8fcfdea6e6722332b2@orel> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230904_064616_840788_1575ECD4 X-CRM114-Status: GOOD ( 14.51 ) 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 Sat, Sep 02, 2023 at 08:59:27PM +0800, Haibo Xu wrote: > Add the infrastructure for guest exception handling in riscv selftests. > Customized handlers can be enabled by vm_install_exception_handler(vector) > or vm_install_interrupt_handler(). > > The code is inspired from that of x86/arm64. > > Signed-off-by: Haibo Xu > --- > tools/testing/selftests/kvm/Makefile | 1 + > .../selftests/kvm/include/riscv/processor.h | 43 ++++++++ > .../selftests/kvm/lib/riscv/handlers.S | 101 ++++++++++++++++++ > .../selftests/kvm/lib/riscv/processor.c | 69 ++++++++++++ > 4 files changed, 214 insertions(+) > create mode 100644 tools/testing/selftests/kvm/lib/riscv/handlers.S > Reviewed-by: Andrew Jones _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel