From patchwork Mon Sep 18 12:57:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1836096 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ecn/xcwM; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=VXkokwo/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rq4b22V5hz1ynX for ; Mon, 18 Sep 2023 22:57:48 +1000 (AEST) 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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vPcdeE6vxZmtsqNKdd9pTgRiTpIrvKxCcSNWw4vAdcg=; b=ecn/xcwMukDP6t 1jG76fy0AAFhxsusGNm6RSxUEgxi1FgO2mLU3P81VXKdZ52SJQgvJVgs3/0D3lxjqE+UitrRRRBd7 sYdwekSINafKuGYar+5QyAm1QSoIRLQE7/cTubS997Epnu5QeE2dXunADlKWFrS3yP5XeuF9WHrx6 woeJ/BgaHfwva028SRV//6K3kvkj4rFs07izlyvxxMwPGQzieqWEaGF2pRovR0BpuPp8RRSJh8noa ivLgBL1Hb8cAP8/9sFQRPXiKeL24MnSIig3zwJrMyFGqW3FG9q36mMsfClUDJUeq58u74u14mD/9c xi+KDUmDMLYNb+zX/v6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiDou-00FTkv-2F; Mon, 18 Sep 2023 12:57:44 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiDor-00FTkE-2y for kvm-riscv@lists.infradead.org; Mon, 18 Sep 2023 12:57:43 +0000 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-274e392a5c1so1093004a91.0 for ; Mon, 18 Sep 2023 05:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1695041860; x=1695646660; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1Beljry/IwhQwBQeT7aWsgo1E5496cfRJbJFPTGnyPI=; b=VXkokwo/EK7IheQXPxx57QLxd+DrP+TutDctEZba0HSkf0QtxcEwijp07KrNPB+7YN D0JUitMb1Sg8OHJX1S2KNvnj5J2s/YkWGhEjeL7KnIO3aosYCxDKSApF5PYwRpCcu5nC ySqu/ZKdo1V5jt+Dw1wWFYZwuM8sDnycm17m0q5GrT7wW4c9b5jagygShDFye8U0AIJX BDTwX7xTTT+uv3COlSodCdBDyDqnI1PJEAmljhV1oy3AhmWOFE5jboo6NVklrB9eHLMJ t7QEzmyS/kaHZDdNmv4OCnJ/06KPugd2oX8r90psEMA5n2i1AHxZKBah75Iha8ROK216 QiAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695041860; x=1695646660; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1Beljry/IwhQwBQeT7aWsgo1E5496cfRJbJFPTGnyPI=; b=Qn5CKCYWG93A7MEDKJLN54eExnYLgdjq70WXTgsUTBkL1kMEtyt94pceZhyEBPSruS BKELvoG0XGnqnxG8HmJNGhi6bao2nBPedcIfREO2qWGmrsDxgesZxva439DE5K8YaTuN 7dWditntDDt73tyZSVJGi99OfuCRP0tH5FifEaw6/gMVY8SdoZar20/oTbYqB2nS1g7V yxMO0rljR+OdY/eRUdSMUf9jAIZlHbhuNtqVuqRAy0rLnD4qDPxxlig8LEy6HmXgJdAz WdSMEqCmbN61gRu4QNaZlzoEpBN1rLBz85dI6seQ0KYUzdINf3yo1DTblvk39YGrvCHt kQLg== X-Gm-Message-State: AOJu0YwSp37EFQNjgWWWvydeoRLixJVNvTXQc+fyVgMzOYopdC8iFTrh azmOTp6b74Hai6+gHAmsBHWwNA== X-Google-Smtp-Source: AGHT+IHwugPjVxcqkVE6Uu9Ymn1P0IdCnD196rikPb2cP83RCsP6YcD7QTUipawah18llIRDaQa2kQ== X-Received: by 2002:a17:90a:43c5:b0:269:85d:2aef with SMTP id r63-20020a17090a43c500b00269085d2aefmr7912810pjg.20.1695041859992; Mon, 18 Sep 2023 05:57:39 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id n14-20020a17090ac68e00b002680b2d2ab6sm8890237pjt.19.2023.09.18.05.57.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 05:57:39 -0700 (PDT) From: Anup Patel To: Will Deacon , julien.thierry.kdev@gmail.com, maz@kernel.org Cc: Paolo Bonzini , Atish Patra , Andrew Jones , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, Anup Patel Subject: [kvmtool PATCH v2 0/6] RISC-V AIA irqchip and Svnapot support Date: Mon, 18 Sep 2023 18:27:24 +0530 Message-Id: <20230918125730.1371985-1-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_055741_965370_7A498369 X-CRM114-Status: UNSURE ( 8.86 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The latest KVM in Linux-6.5 has support for: 1) Svnapot ISA extension support 2) AIA in-kernel irqchip support This series adds corresponding changes in KVMTOOL to use the above mentioned features for Guest/VM. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1029 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The latest KVM in Linux-6.5 has support for: 1) Svnapot ISA extension support 2) AIA in-kernel irqchip support This series adds corresponding changes in KVMTOOL to use the above mentioned features for Guest/VM. These patches can also be found in the riscv_aia_v2 branch at: https://github.com/avpatel/kvmtool.git Changes since v1: - Rebased on commit 9cb1b46cb765972326a46bdba867d441a842af56 - Updated PATCH1 to sync header with released Linux-6.5 Anup Patel (6): Sync-up header with Linux-6.5 for KVM RISC-V riscv: Add Svnapot extension support riscv: Make irqchip support pluggable riscv: Add IRQFD support for in-kernel AIA irqchip riscv: Use AIA in-kernel irqchip whenever KVM RISC-V supports riscv: Fix guest/init linkage for multilib toolchain Makefile | 3 + include/linux/kvm.h | 6 +- riscv/aia.c | 227 ++++++++++++++++++++++++++++ riscv/fdt.c | 15 +- riscv/include/asm/kvm.h | 81 ++++++++++ riscv/include/kvm/fdt-arch.h | 8 +- riscv/include/kvm/kvm-arch.h | 38 ++++- riscv/include/kvm/kvm-config-arch.h | 3 + riscv/irq.c | 138 ++++++++++++++++- riscv/kvm.c | 2 + riscv/pci.c | 32 ++-- riscv/plic.c | 61 ++++---- 12 files changed, 563 insertions(+), 51 deletions(-) create mode 100644 riscv/aia.c