Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp1925793rdb; Tue, 5 Sep 2023 09:01:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVK5qTNpb6mwo52bgTPXDlIS+yiZcw42+wS+ALqPFUavKKjHZWbFYwO5FD2s9AIb9lYAfn X-Received: by 2002:a17:90a:744c:b0:268:ee6:6bdf with SMTP id o12-20020a17090a744c00b002680ee66bdfmr10384529pjk.47.1693929714975; Tue, 05 Sep 2023 09:01:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693929714; cv=none; d=google.com; s=arc-20160816; b=ai8cDlpjbdaKlB1milwM2o1ig3pY6rExqaju8j22KgVqpF6x1y3hUT6LuuzYZRl9eD UBY5Y7b0KoBS1nFpWOHKKwQQf2iejzYcMQ0dxF6Hksd87bM/x/ndzWsHbDIRRY/G+nfN d+1jc3SLiZVevukhP1q7tPZKcKE1mS5K3weDKRDXD9KpZplGr36gxIC/6PgZ1Nl6j0KG VzVdNghn2669EhL6077kRN3EGpQs9BwyGwWTMBmnAf8De1qodNSVdRNgjaDRJYcsZxKi 17OYY+FQwND0NEIClnBg4sFsZNPIVkqhP9FZ5re/b1TFq990W6B3A0OrMgZ3/CxYka1R BaqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MvFpohTVYIZg5zZrtXqASIgY84rg/Ko8jDcHzB0T9Sk=; fh=GuY//8Z7AqeUtfQWC9jEfmUngtpnRSlotV2sdXnD1Tc=; b=h7bO1A2QWOiviIuvfFm3pgWPTIc3iHWBEogFn6LoTh6OBhu6DT4iw4MQnomqZzzmSd otrPJw/o4jo1jwAVN4HwLITLWLyFXeVR6FPBtqJO4DdueY8ukbsDKjJsRgjBor5dJG7L 0KI+0iFvyoClnlJu57pYPFeWthdLYJM40PcqndOgp4DVwy5fefJ5NKF4TUyzhixcEjLg x+uw7LxkprOLeTxC00TDm9aB+NcDHcinsPyV52ALXPefS2IDNj/J4F3tHY9YXocd7clb eTVd3AaQojNDHZkz/NbOh7br2v6qL0/UytafjJasQTUXkhLiNRFiymsNNozES4d8Vcgb mgSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=AGWgoqtO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q14-20020a17090a2e0e00b0027198fe5672si9725025pjd.129.2023.09.05.09.01.51; Tue, 05 Sep 2023 09:01:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=AGWgoqtO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244696AbjIDNqT (ORCPT + 21 others); Mon, 4 Sep 2023 09:46:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343833AbjIDNqS (ORCPT ); Mon, 4 Sep 2023 09:46:18 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DD80CC4 for ; Mon, 4 Sep 2023 06:46:14 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-51e28cac164so4947247a12.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=vger.kernel.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=AGWgoqtOgAoGQ9YM2Q8tVG78Z0ckLz16CVxzS5E+VvbkH5aA4dGWTfytqMvSL6/Q5S HGELQoRTgrfYrAJ4fQTF7Azzp2SLGWV+NyXDQV2STuEYJ7CIpknDZiskukv/IiPzufsD 1uKzAIc/J8674rZdIhyv2YWD6FkexdKXgQ/PPO6P5efqlmzuhoyjcLtZ0ebz0aK0vuHY +rVBqjZwlYmK14s46dxuFEQH+iDtqkL0Y4yAzT2fVHNqxHpsQqWtxCuJaF1FUugdtB6U yWQVb14ItOs62DOuTPIstV7WmyzuiqJoIhDgizy6tYoAzQs+9Va83LRSYNxNH8pM/U2B MTWw== 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=EbGOapv6Jgpq4elPiYFoUbwdvJioxEjR5ZkGrjqJcTHyDilOQ6R7Rpsdz1L7SLfkjM D7KmCPwjBXMyTAglJHgnhWUSXt0ZoNAZ+X1jGFQ3BeyC9grKm3GkiF8ZFIwjjA1pOCHE PoR9EdyQV3KOU+09cjsvLqBZmkZG/F+KQ2INtsy1Yzxfc/eaDKYsY4UwnbYtWuyfrOPk X4Vy3uNQsRIrBhkjMKzMwQ3f8bhZKbdqxk+SVqXJTcFcgQNSqlQsCbGr5Y9lu10ZJJoi 0bdsC4B54JZ1PYFuFW6n8nNiwhaTnr19yU6uqhvJ3k1wx4DnLs58Ts/8aoPNdkFD7JI0 Glww== X-Gm-Message-State: AOJu0YzdfhlDt+BbSkdaaEmjI/KLx4rHQ+JwinIYXAa1+9GG3/SUQjeY THf3wAUZNcntUNv+R6BJSVco5g== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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