Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5355448rwd; Sun, 18 Jun 2023 09:46:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7D6qq5dR6YKoCrsz5+XJcX3OjCG0h5ENY8eNP2wk9wJzsUbwICx73NZDakXZsDLHwu5gK5 X-Received: by 2002:a17:90a:fd0a:b0:25e:9253:6d4e with SMTP id cv10-20020a17090afd0a00b0025e92536d4emr8491049pjb.8.1687106775776; Sun, 18 Jun 2023 09:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687106775; cv=none; d=google.com; s=arc-20160816; b=rWJXR+sAzGOcjDfZnehnjydfUxLF6HxOP4nTAVARxPGUNRnuffaSMIUtLzoioR8hiV mS+DbK7dHFjGZP6WzwI45emg11Z8hajPBbr8cneKE2r1NobxmOJdmevB6wdAfKXcZja3 DZ3jSWvJFpbIhPjy0kB7E6Wjrk2ECkt7VFRkNtgwRLE9CvT5+LOH9VPJPhem6xS0nuQN yMLt3u6ZgI4p7gjHfBpml+VNDZsiA6M1TaEWLL1HnKjkQ/r4J9DElkS3fbKdjU/1eSnd /YfSoM9b3hGic8N7ZloueRmk/47i2V7rbvt0wzDZE46zPED1SXTOYqrz5UFusXBhvDR3 LG7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=tk69zSZBq69irQ6KXTUmFnUhhXE2H+D4z+iALKYIPbg=; b=eztOlywVkJCRTmUE9yuQ16Vidu/razt5XTNceEj88AkuMahJ7y44134jhuHzZW3F0p Rrase8uSRehLe35893i0YM4cWDTnXFLFRdXYVvlIIhFJxIh1EMJv1diBGg+j070p9/VC IDAdzmSJaZ5OWqpjHkVv5GQCyURHFLj0jjKovTwmwyWKCuwHzZdjd9ddOAWet1NHWYD6 hdAL7DO02epWG394OlUNZbS1LQzziHPTQIr9m7U0MGDqdrMy7oe3P+LXD3aqLW8YQ3nb eK/CP2ob/QEuoC9WigDfFdUe1i0ythGvJOBac7Un+w6iB+3q3ZA/0QRUFECLELWmdeBQ MzBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20221208.gappssmtp.com header.s=20221208 header.b=5ExsAWau; 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 bs66-20020a632845000000b0054b4670f5e0si14409276pgb.39.2023.06.18.09.46.00; Sun, 18 Jun 2023 09:46:15 -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=@brainfault-org.20221208.gappssmtp.com header.s=20221208 header.b=5ExsAWau; 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 S229482AbjFRQC3 (ORCPT + 99 others); Sun, 18 Jun 2023 12:02:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjFRQC1 (ORCPT ); Sun, 18 Jun 2023 12:02:27 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA7FF1AB for ; Sun, 18 Jun 2023 09:02:25 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5169f614977so3759500a12.3 for ; Sun, 18 Jun 2023 09:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20221208.gappssmtp.com; s=20221208; t=1687104144; x=1689696144; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tk69zSZBq69irQ6KXTUmFnUhhXE2H+D4z+iALKYIPbg=; b=5ExsAWaueLejYhbjVuFgF9fLjy9aWDlVfEnQwmoK7Asl4V2KYyGvLQvsnTWp4gqq6J pbxKuB2cFYwoaOnNGhYecK3+AyrbCgWGtS9Ef2zGA+eSFRokvsOtidXHQPptDUg1MgwA bhbjq0KTXFrMHHhxl6UlOEJmsG/7wr9S1TE7WszAxtfOg39hY8lFucCgOzU4gs5u0uul Ky+SSi1QSWo3+bAskKWltpwg3K5Bdb/HEhmhifsvZ8VB8gMnkW+FMbD9SUzWtaVWiccd MEtF93ChTUoxV2P/8Yc1EgdrnsbAFkE5o4dQvSw2XPIlk43PskK54sMS+BWsSA9XS8MQ OqCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687104144; x=1689696144; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tk69zSZBq69irQ6KXTUmFnUhhXE2H+D4z+iALKYIPbg=; b=kBDuvw3YNHTVS+t15uqYKfktMqb7LIG6R9WpTWwmVvQHXOUzO+BgNYSw1JPUJkLaGA tqdh+t8zanaovHB2Io5zerV8qoR0n/K5YtKd/a6aBH9C++7U/pEcNCUrCwzTVbc59GA2 wKDVIlGhEl0puQtFlDbBc7P5vpkNr+u9OCy37qeVMwgC8Z/oXSD4tyYjDWY8I5DARfd5 JfrACUstd5a2yaE8beoK6s9wEkIyN8iq+HE0QfQvYUMlS5hsq+FA62UDWh0ny8NCcuqD aEFQ9qsJQfWiH+sTWRLuuXyDv9LkqMoUdJ79HCM8W2H+jMlmjgVT7dzUN0TiOBNdvdSg 7xHQ== X-Gm-Message-State: AC+VfDw/B0Ue7tBIhPfnToSvioEy//WSyPLFh4YFWXPcYPZ27ggg/Y8S T/Y28oRCxMzNHe50s1fNGvRM7ZF7PTKYYXLcC4RoVA== X-Received: by 2002:aa7:c992:0:b0:51a:1f10:8a79 with SMTP id c18-20020aa7c992000000b0051a1f108a79mr5278054edt.31.1687104144358; Sun, 18 Jun 2023 09:02:24 -0700 (PDT) MIME-Version: 1.0 References: <20230615073353.85435-1-apatel@ventanamicro.com> In-Reply-To: <20230615073353.85435-1-apatel@ventanamicro.com> From: Anup Patel Date: Sun, 18 Jun 2023 21:32:12 +0530 Message-ID: Subject: Re: [PATCH v3 00/10] RISC-V KVM in-kernel AIA irqchip To: Anup Patel Cc: Paolo Bonzini , Atish Patra , Palmer Dabbelt , Paul Walmsley , Andrew Jones , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Thu, Jun 15, 2023 at 1:04=E2=80=AFPM Anup Patel wrote: > > This series adds in-kernel AIA irqchip to KVM RISC-V which trap-n-emulate > IMSIC and APLIC MSI-mode for Guest. The APLIC MSI-mode trap-n-emulate is > optional so KVM user space can emulate APLIC entirely in user space. > > The use of IMSIC HW guest files to accelerate IMSIC virtualization will b= e > done as separate series since this depends on AIA irqchip drivers to be > upstreamed. This series has no dependency on the AIA irqchip drivers. > > There is also a KVM AIA irq-bypass (or device MSI virtualization) series > under development which depends on this series and upcoming IOMMU driver > series. > > These patches (or this series) can also be found in the > riscv_kvm_aia_irqchip_v3 branch at: https://github.com/avpatel/linux.git > > Changes since v2: > - Added KVM_CAP_IRQCHIP in PATCH5 > - Fix check for KVM_DEV_RISCV_AIA_CONFIG_IDS write in PATCH6 > - Fix APLIC_IRQ_STATE_ENPEND usage in PATCH7 > > Changes since v1: > - Rebased on Linux-6.4-rc6 > - Addressed Atish's comment in PATCH6 > - Added comments in arch/riscv/include/uapi/asm/kvm.h about APLIC and > IMSIC device attribute type > > Anup Patel (10): > RISC-V: KVM: Implement guest external interrupt line management > RISC-V: KVM: Add IMSIC related defines > RISC-V: KVM: Add APLIC related defines > RISC-V: KVM: Set kvm_riscv_aia_nr_hgei to zero > RISC-V: KVM: Skeletal in-kernel AIA irqchip support > RISC-V: KVM: Implement device interface for AIA irqchip > RISC-V: KVM: Add in-kernel emulation of AIA APLIC > RISC-V: KVM: Expose APLIC registers as attributes of AIA irqchip > RISC-V: KVM: Add in-kernel virtualization of AIA IMSIC > RISC-V: KVM: Expose IMSIC registers as attributes of AIA irqchip Queued this series for 6.5 Regards, Anup > > arch/riscv/include/asm/kvm_aia.h | 107 ++- > arch/riscv/include/asm/kvm_aia_aplic.h | 58 ++ > arch/riscv/include/asm/kvm_aia_imsic.h | 38 + > arch/riscv/include/asm/kvm_host.h | 4 + > arch/riscv/include/uapi/asm/kvm.h | 72 ++ > arch/riscv/kvm/Kconfig | 4 + > arch/riscv/kvm/Makefile | 3 + > arch/riscv/kvm/aia.c | 274 +++++- > arch/riscv/kvm/aia_aplic.c | 619 ++++++++++++++ > arch/riscv/kvm/aia_device.c | 673 +++++++++++++++ > arch/riscv/kvm/aia_imsic.c | 1083 ++++++++++++++++++++++++ > arch/riscv/kvm/main.c | 3 +- > arch/riscv/kvm/vcpu.c | 2 + > arch/riscv/kvm/vm.c | 118 +++ > include/uapi/linux/kvm.h | 2 + > 15 files changed, 3027 insertions(+), 33 deletions(-) > create mode 100644 arch/riscv/include/asm/kvm_aia_aplic.h > create mode 100644 arch/riscv/include/asm/kvm_aia_imsic.h > create mode 100644 arch/riscv/kvm/aia_aplic.c > create mode 100644 arch/riscv/kvm/aia_device.c > create mode 100644 arch/riscv/kvm/aia_imsic.c > > -- > 2.34.1 > > > -- > kvm-riscv mailing list > kvm-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kvm-riscv