From: Cornelia Huck <cohuck@redhat.com>
To: Xianglai Li <lixianglai@loongson.cn>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Song Gao <gaosong@loongson.cn>,
Huacai Chen <chenhuacai@kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
kvm@vger.kernel.org, Bibo Mao <maobibo@loongson.cn>
Subject: Re: [RFC 0/4] Added Interrupt controller emulation for loongarch kvm
Date: Wed, 17 Jul 2024 09:58:03 +0200 [thread overview]
Message-ID: <87r0bsa1ro.fsf@redhat.com> (raw)
In-Reply-To: <cover.1721186636.git.lixianglai@loongson.cn>
On Wed, Jul 17 2024, Xianglai Li <lixianglai@loongson.cn> wrote:
> Before this, the interrupt controller simulation has been completed
> in the user mode program. In order to reduce the loss caused by frequent
> switching of the virtual machine monitor from kernel mode to user mode
> when the guest accesses the interrupt controller, we add the interrupt
> controller simulation in kvm.
>
> In qemu side implementation is simple, just make a new IPI EXTIOI PCH KVM
> related several classes, And the interface to access kvm related data is
> implemented.
>
> Most of the simulation work of the interrupt controller is done in kvm.
> Because KVM the changes have not been the Linux community acceptance,
> the patches of this series will have RFC label until KVM patch into the community.
>
> For the implementation of kvm simulation, refer to the following documents.
>
> IPI simulation implementation reference:
> https://github.com/loongson/LoongArch-Documentation/tree/main/docs/Loongson-3A5000-usermanual-EN/inter-processor-interrupts-and-communication
>
> EXTIOI simulation implementation reference:
> https://github.com/loongson/LoongArch-Documentation/tree/main/docs/Loongson-3A5000-usermanual-EN/io-interrupts/extended-io-interrupts
>
> PCH-PIC simulation implementation reference:
> https://github.com/loongson/LoongArch-Documentation/blob/main/docs/Loongson-7A1000-usermanual-EN/interrupt-controller.adoc
>
> For PCH-MSI, we used irqfd mechanism to send the interrupt signal
> generated by user state to kernel state and then to EXTIOI without
> maintaining PCH-MSI state in kernel state.
>
> You can easily get the code from the link below:
> the kernel:
> https://github.com/lixianglai/linux
> the branch is: interrupt
>
> the qemu:
> https://github.com/lixianglai/qemu
> the branch is: interrupt
>
> Please note that the code above is regularly updated based on community
> reviews.
>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Song Gao <gaosong@loongson.cn>
> Cc: Huacai Chen <chenhuacai@kernel.org>
> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: kvm@vger.kernel.org
> Cc: Bibo Mao <maobibo@loongson.cn>
>
> Xianglai Li (4):
> hw/loongarch: Add KVM IPI device support
> hw/loongarch: Add KVM extioi device support
> hw/loongarch: Add KVM pch pic device support
> hw/loongarch: Add KVM pch msi device support
>
> hw/intc/Kconfig | 12 ++
> hw/intc/loongarch_extioi_kvm.c | 141 +++++++++++++++++++
> hw/intc/loongarch_ipi_kvm.c | 207 ++++++++++++++++++++++++++++
> hw/intc/loongarch_pch_msi.c | 42 ++++--
> hw/intc/loongarch_pch_pic.c | 20 ++-
> hw/intc/loongarch_pch_pic_kvm.c | 189 +++++++++++++++++++++++++
> hw/intc/meson.build | 3 +
> hw/loongarch/virt.c | 141 ++++++++++++-------
> include/hw/intc/loongarch_extioi.h | 34 ++++-
> include/hw/intc/loongarch_pch_msi.h | 2 +-
> include/hw/intc/loongarch_pch_pic.h | 51 ++++++-
> include/hw/intc/loongson_ipi.h | 22 +++
> include/hw/loongarch/virt.h | 15 ++
> linux-headers/asm-loongarch/kvm.h | 7 +
> linux-headers/linux/kvm.h | 6 +
Please split out any headers changes into a separate patch -- just put
them into a placeholder patch at the beginning of the series as long as
the changes are not yet upstream (and replace that with a full headers
sync later.)
> 15 files changed, 823 insertions(+), 69 deletions(-)
> create mode 100644 hw/intc/loongarch_extioi_kvm.c
> create mode 100644 hw/intc/loongarch_ipi_kvm.c
> create mode 100644 hw/intc/loongarch_pch_pic_kvm.c
WARNING: multiple messages have this Message-ID (diff)
From: Cornelia Huck <cohuck@redhat.com>
To: Xianglai Li <lixianglai@loongson.cn>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Song Gao <gaosong@loongson.cn>,
Huacai Chen <chenhuacai@kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
kvm@vger.kernel.org, Bibo Mao <maobibo@loongson.cn>
Subject: Re: [RFC 0/4] Added Interrupt controller emulation for loongarch kvm
Date: Wed, 17 Jul 2024 09:58:03 +0200 [thread overview]
Message-ID: <87r0bsa1ro.fsf@redhat.com> (raw)
In-Reply-To: <cover.1721186636.git.lixianglai@loongson.cn>
On Wed, Jul 17 2024, Xianglai Li <lixianglai@loongson.cn> wrote:
> Before this, the interrupt controller simulation has been completed
> in the user mode program. In order to reduce the loss caused by frequent
> switching of the virtual machine monitor from kernel mode to user mode
> when the guest accesses the interrupt controller, we add the interrupt
> controller simulation in kvm.
>
> In qemu side implementation is simple, just make a new IPI EXTIOI PCH KVM
> related several classes, And the interface to access kvm related data is
> implemented.
>
> Most of the simulation work of the interrupt controller is done in kvm.
> Because KVM the changes have not been the Linux community acceptance,
> the patches of this series will have RFC label until KVM patch into the community.
>
> For the implementation of kvm simulation, refer to the following documents.
>
> IPI simulation implementation reference:
> https://github.com/loongson/LoongArch-Documentation/tree/main/docs/Loongson-3A5000-usermanual-EN/inter-processor-interrupts-and-communication
>
> EXTIOI simulation implementation reference:
> https://github.com/loongson/LoongArch-Documentation/tree/main/docs/Loongson-3A5000-usermanual-EN/io-interrupts/extended-io-interrupts
>
> PCH-PIC simulation implementation reference:
> https://github.com/loongson/LoongArch-Documentation/blob/main/docs/Loongson-7A1000-usermanual-EN/interrupt-controller.adoc
>
> For PCH-MSI, we used irqfd mechanism to send the interrupt signal
> generated by user state to kernel state and then to EXTIOI without
> maintaining PCH-MSI state in kernel state.
>
> You can easily get the code from the link below:
> the kernel:
> https://github.com/lixianglai/linux
> the branch is: interrupt
>
> the qemu:
> https://github.com/lixianglai/qemu
> the branch is: interrupt
>
> Please note that the code above is regularly updated based on community
> reviews.
>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Song Gao <gaosong@loongson.cn>
> Cc: Huacai Chen <chenhuacai@kernel.org>
> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: kvm@vger.kernel.org
> Cc: Bibo Mao <maobibo@loongson.cn>
>
> Xianglai Li (4):
> hw/loongarch: Add KVM IPI device support
> hw/loongarch: Add KVM extioi device support
> hw/loongarch: Add KVM pch pic device support
> hw/loongarch: Add KVM pch msi device support
>
> hw/intc/Kconfig | 12 ++
> hw/intc/loongarch_extioi_kvm.c | 141 +++++++++++++++++++
> hw/intc/loongarch_ipi_kvm.c | 207 ++++++++++++++++++++++++++++
> hw/intc/loongarch_pch_msi.c | 42 ++++--
> hw/intc/loongarch_pch_pic.c | 20 ++-
> hw/intc/loongarch_pch_pic_kvm.c | 189 +++++++++++++++++++++++++
> hw/intc/meson.build | 3 +
> hw/loongarch/virt.c | 141 ++++++++++++-------
> include/hw/intc/loongarch_extioi.h | 34 ++++-
> include/hw/intc/loongarch_pch_msi.h | 2 +-
> include/hw/intc/loongarch_pch_pic.h | 51 ++++++-
> include/hw/intc/loongson_ipi.h | 22 +++
> include/hw/loongarch/virt.h | 15 ++
> linux-headers/asm-loongarch/kvm.h | 7 +
> linux-headers/linux/kvm.h | 6 +
Please split out any headers changes into a separate patch -- just put
them into a placeholder patch at the beginning of the series as long as
the changes are not yet upstream (and replace that with a full headers
sync later.)
> 15 files changed, 823 insertions(+), 69 deletions(-)
> create mode 100644 hw/intc/loongarch_extioi_kvm.c
> create mode 100644 hw/intc/loongarch_ipi_kvm.c
> create mode 100644 hw/intc/loongarch_pch_pic_kvm.c
next prev parent reply other threads:[~2024-07-17 7:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-17 3:29 [RFC 0/4] Added Interrupt controller emulation for loongarch kvm Xianglai Li
2024-07-17 3:29 ` [RFC 1/4] hw/loongarch: Add KVM IPI device support Xianglai Li
2024-07-17 3:29 ` [RFC 2/4] hw/loongarch: Add KVM extioi " Xianglai Li
2024-07-17 3:29 ` [RFC 3/4] hw/loongarch: Add KVM pch pic " Xianglai Li
2024-07-17 3:29 ` [RFC 4/4] hw/loongarch: Add KVM pch msi " Xianglai Li
2024-07-17 7:58 ` Cornelia Huck [this message]
2024-07-17 7:58 ` [RFC 0/4] Added Interrupt controller emulation for loongarch kvm Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0bsa1ro.fsf@redhat.com \
--to=cohuck@redhat.com \
--cc=chenhuacai@kernel.org \
--cc=gaosong@loongson.cn \
--cc=jiaxun.yang@flygoat.com \
--cc=kvm@vger.kernel.org \
--cc=lixianglai@loongson.cn \
--cc=maobibo@loongson.cn \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.