From: "Michael S. Tsirkin" <mst@redhat.com>
To: Magnus Kulke <magnuskulke@linux.microsoft.com>
Cc: qemu-devel@nongnu.org, "Eric Blake" <eblake@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Markus Armbruster" <armbru@redhat.com>,
"Magnus Kulke" <magnus.kulke@linux.microsoft.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Phil Dennis-Jordan" <phil@philjordan.eu>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Magnus Kulke" <magnus.kulke@microsoft.com>,
"Cornelia Huck" <cohuck@redhat.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Thomas Huth" <thuth@redhat.com>,
"Yanan Wang" <wangyanan55@huawei.com>,
"Cameron Esfahani" <dirty@apple.com>,
"Wei Liu" <wei.liu@kernel.org>, "Wei Liu" <liuwe@microsoft.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Roman Bolshakov" <rbolshakov@ddn.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v3 00/26] Implementing a MSHV (Microsoft Hypervisor) accelerator
Date: Thu, 11 Sep 2025 02:59:51 -0400 [thread overview]
Message-ID: <20250911025906-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20250807143951.1154713-1-magnuskulke@linux.microsoft.com>
On Thu, Aug 07, 2025 at 04:39:25PM +0200, Magnus Kulke wrote:
> Hey all,
>
> This is the third revision of a patch set implementing an accelerator
> for the MSHV kernel driver, exposing HyperV to Linux "Dom0" hosts in various
> scenarios. Thank you for the feedback so far. Since the last revision we
> incorporated feedback from the last review and identified further areas for
> performance fixes, notably in the irqfd handling. I'm looking forward to your
> comments.
>
> Best regards,
>
> magnus
So regarding merging plans. Did you guys get in touch
with Sunil? That's the easiest smoothest path, through
an existing maintainer.
> Changelog:
>
> v2 => v3
>
> - Addressed code review comments (style)
> - Reserve GSI 01-23 for IO-APIC pins (this resolved a problem in which MSI
> routes would be overwritten with interrupts from legacy devices, breaking
> irqfd notification for virtio-blk queues)
> - Guard memory slot table with mutex and RCU mechanism (multiple threads
> might access the memory slot table, and in the event of an UNMAPPED_GPA
> exit we need to query the table for an unmapped region covering that GPA)
> - Include memory slot manager in MshvState
> - Produce mshv.h kernel header with ./scripts/update-linux-headers.sh from
> linux 6.16 (not all UAPI definitions are defined in the upstream kernel,
> hence we ship hw/hyper/hvgdk*.h and hw/hyperv/hvhdk*.h headers)
> - Added a QMP command query-mshv (a requirement for integration into
> higher-level tooling)
> - Removed handling of HALT vm exit, since this is not a supported HV
> message any more.
> - Added 2 maintainers from Microsoft for the respective file hierarchy
> - Added mshv as accelerator option in the documentation
>
> RFC (v1) => v2
>
> - Addressed code review comments (style, consilidation).
> - Rewrote the logic that handles overlap-in-userspace mappings to use
> a static list of slots, inspired by the HVF accelerator code.
> - Fixed a bug that wrote corrupt payload in a MSHV_SET_MSI_ROUTING
> call, preventing vhost=on to work on tap network devices.
> - Removed an erronous truncation of guest addresses to 32bit when
> registering ioeventfd's using MSHV_IOEVENTFD. This resulted in
> shadowing of low memory when ioevents were registered with
> addresses beyond the 4gb barrier and thus unexpected "unmapped gpa"
> vm exits in lower mem regions (impacting io performance).
> - Fixed problem in which the MSI routing table was committed for KVM
> KVM instead of MSHV in virtio-pci bus initialization.
> - Added handler for HLT vm exits.
> - The above fixes removed a few limitation present in the previous
> revision:
> - Guest with machine type "pc" are booting (testing is still mostly
> performed with q35)
> - Tap network devices can be used with vhost=on option.
> - Seabios can be used with >2.75G memory and multiple virtio-pci
> devices
> - I/O performance improvement as extranous MMIO vm exits are avoided
> by registering ioevents with a correct address.
>
> Notes:
>
> - A discrete kernel ioctl "set_immediate_exit" (to avoid a race condition
> when handling terminiation signals like ctrl-a x) has been tested and
> proven to mitigate the problem. Since other consumers of /dev/mshv have
> simular requirements as QEMU, we opted to iterate a bit more on the
> respective kernel interface.
>
> Magnus Kulke (25):
> accel: Add Meson and config support for MSHV accelerator
> target/i386/emulate: Allow instruction decoding from stream
> target/i386/mshv: Add x86 decoder/emu implementation
> hw/intc: Generalize APIC helper names from kvm_* to accel_*
> include/hw/hyperv: Add MSHV ABI header definitions
> linux-headers/linux: Add mshv.h headers
> accel/mshv: Add accelerator skeleton
> accel/mshv: Register memory region listeners
> accel/mshv: Initialize VM partition
> accel/mshv: Add vCPU creation and execution loop
> accel/mshv: Add vCPU signal handling
> target/i386/mshv: Add CPU create and remove logic
> target/i386/mshv: Implement mshv_store_regs()
> target/i386/mshv: Implement mshv_get_standard_regs()
> target/i386/mshv: Implement mshv_get_special_regs()
> target/i386/mshv: Implement mshv_arch_put_registers()
> target/i386/mshv: Set local interrupt controller state
> target/i386/mshv: Register CPUID entries with MSHV
> target/i386/mshv: Register MSRs with MSHV
> target/i386/mshv: Integrate x86 instruction decoder/emulator
> target/i386/mshv: Write MSRs to the hypervisor
> target/i386/mshv: Implement mshv_vcpu_run()
> accel/mshv: Handle overlapping mem mappings
> docs: Add mshv to documentation
> MAINTAINERS: Add maintainers for mshv accelerator
>
> Praveen K Paladugu (1):
> qapi/accel: Allow to query mshv capabilities
>
> MAINTAINERS | 15 +
> accel/Kconfig | 3 +
> accel/accel-irq.c | 106 ++
> accel/meson.build | 3 +-
> accel/mshv/irq.c | 397 +++++++
> accel/mshv/mem.c | 562 ++++++++++
> accel/mshv/meson.build | 9 +
> accel/mshv/mshv-all.c | 726 +++++++++++++
> accel/mshv/msr.c | 373 +++++++
> accel/mshv/trace-events | 30 +
> accel/mshv/trace.h | 14 +
> docs/devel/codebase.rst | 2 +-
> hw/core/machine-qmp-cmds.c | 14 +
> hw/intc/apic.c | 8 +
> hw/intc/ioapic.c | 20 +-
> hw/virtio/virtio-pci.c | 21 +-
> include/hw/hyperv/hvgdk.h | 19 +
> include/hw/hyperv/hvgdk_mini.h | 864 +++++++++++++++
> include/hw/hyperv/hvhdk.h | 164 +++
> include/hw/hyperv/hvhdk_mini.h | 105 ++
> include/system/accel-irq.h | 37 +
> include/system/mshv.h | 195 ++++
> linux-headers/linux/mshv.h | 291 ++++++
> meson.build | 11 +
> meson_options.txt | 2 +
> qapi/accelerator.json | 29 +
> qemu-options.hx | 16 +-
> scripts/meson-buildoptions.sh | 3 +
> scripts/update-linux-headers.sh | 2 +-
> target/i386/cpu.h | 4 +-
> target/i386/emulate/meson.build | 7 +-
> target/i386/emulate/x86_decode.c | 27 +-
> target/i386/emulate/x86_decode.h | 9 +
> target/i386/emulate/x86_emu.c | 3 +-
> target/i386/emulate/x86_emu.h | 2 +
> target/i386/meson.build | 2 +
> target/i386/mshv/meson.build | 8 +
> target/i386/mshv/mshv-cpu.c | 1674 ++++++++++++++++++++++++++++++
> target/i386/mshv/x86.c | 297 ++++++
> 39 files changed, 6038 insertions(+), 36 deletions(-)
> create mode 100644 accel/accel-irq.c
> create mode 100644 accel/mshv/irq.c
> create mode 100644 accel/mshv/mem.c
> create mode 100644 accel/mshv/meson.build
> create mode 100644 accel/mshv/mshv-all.c
> create mode 100644 accel/mshv/msr.c
> create mode 100644 accel/mshv/trace-events
> create mode 100644 accel/mshv/trace.h
> create mode 100644 include/hw/hyperv/hvgdk.h
> create mode 100644 include/hw/hyperv/hvgdk_mini.h
> create mode 100644 include/hw/hyperv/hvhdk.h
> create mode 100644 include/hw/hyperv/hvhdk_mini.h
> create mode 100644 include/system/accel-irq.h
> create mode 100644 include/system/mshv.h
> create mode 100644 linux-headers/linux/mshv.h
> create mode 100644 target/i386/mshv/meson.build
> create mode 100644 target/i386/mshv/mshv-cpu.c
> create mode 100644 target/i386/mshv/x86.c
>
> --
> 2.34.1
next prev parent reply other threads:[~2025-09-11 7:00 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-07 14:39 [PATCH v3 00/26] Implementing a MSHV (Microsoft Hypervisor) accelerator Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 01/26] accel: Add Meson and config support for MSHV accelerator Magnus Kulke
2025-08-11 17:51 ` Wei Liu
2025-08-27 10:27 ` Daniel P. Berrangé
2025-08-07 14:39 ` [PATCH v3 02/26] target/i386/emulate: Allow instruction decoding from stream Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 03/26] target/i386/mshv: Add x86 decoder/emu implementation Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 04/26] hw/intc: Generalize APIC helper names from kvm_* to accel_* Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 05/26] include/hw/hyperv: Add MSHV ABI header definitions Magnus Kulke
2025-08-27 10:44 ` Daniel P. Berrangé
2025-08-07 14:39 ` [PATCH v3 06/26] linux-headers/linux: Add mshv.h headers Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 07/26] accel/mshv: Add accelerator skeleton Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 08/26] accel/mshv: Register memory region listeners Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 09/26] accel/mshv: Initialize VM partition Magnus Kulke
2025-08-27 11:15 ` Daniel P. Berrangé
2025-08-07 14:39 ` [PATCH v3 10/26] accel/mshv: Add vCPU creation and execution loop Magnus Kulke
2025-08-27 11:24 ` Daniel P. Berrangé
2025-08-27 17:39 ` Wei Liu
2025-09-16 9:33 ` Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 11/26] accel/mshv: Add vCPU signal handling Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 12/26] target/i386/mshv: Add CPU create and remove logic Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 13/26] target/i386/mshv: Implement mshv_store_regs() Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 14/26] target/i386/mshv: Implement mshv_get_standard_regs() Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 15/26] target/i386/mshv: Implement mshv_get_special_regs() Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 16/26] target/i386/mshv: Implement mshv_arch_put_registers() Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 17/26] target/i386/mshv: Set local interrupt controller state Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 18/26] target/i386/mshv: Register CPUID entries with MSHV Magnus Kulke
2025-08-27 11:29 ` Daniel P. Berrangé
2025-09-16 10:49 ` Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 19/26] target/i386/mshv: Register MSRs " Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 20/26] target/i386/mshv: Integrate x86 instruction decoder/emulator Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 21/26] target/i386/mshv: Write MSRs to the hypervisor Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 22/26] target/i386/mshv: Implement mshv_vcpu_run() Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 23/26] accel/mshv: Handle overlapping mem mappings Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 24/26] docs: Add mshv to documentation Magnus Kulke
2025-08-27 11:33 ` Daniel P. Berrangé
2025-08-07 14:39 ` [PATCH v3 25/26] MAINTAINERS: Add maintainers for mshv accelerator Magnus Kulke
2025-08-07 14:39 ` [PATCH v3 26/26] qapi/accel: Allow to query mshv capabilities Magnus Kulke
2025-08-07 19:22 ` Wei Liu
2025-08-13 0:37 ` Wei Liu
2025-08-27 11:39 ` Daniel P. Berrangé
2025-08-11 17:59 ` [PATCH v3 00/26] Implementing a MSHV (Microsoft Hypervisor) accelerator Wei Liu
2025-09-11 6:59 ` Michael S. Tsirkin [this message]
2025-09-11 15:21 ` Paolo Bonzini
2025-09-11 16:07 ` Wei Liu
2025-09-11 16:26 ` Magnus Kulke
2025-09-18 4:08 ` Mohamed Mediouni
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=20250911025906-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=cohuck@redhat.com \
--cc=dirty@apple.com \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=liuwe@microsoft.com \
--cc=magnus.kulke@linux.microsoft.com \
--cc=magnus.kulke@microsoft.com \
--cc=magnuskulke@linux.microsoft.com \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=pbonzini@redhat.com \
--cc=phil@philjordan.eu \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rbolshakov@ddn.com \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=wangyanan55@huawei.com \
--cc=wei.liu@kernel.org \
--cc=zhao1.liu@intel.com \
/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.