linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 00/10] Introduce /dev/mshv root partition driver
@ 2025-02-26 23:07 Nuno Das Neves
  2025-02-26 23:07 ` [PATCH v5 01/10] hyperv: Convert Hyper-V status codes to strings Nuno Das Neves
                   ` (9 more replies)
  0 siblings, 10 replies; 108+ messages in thread
From: Nuno Das Neves @ 2025-02-26 23:07 UTC (permalink / raw)
  To: linux-hyperv, x86, linux-arm-kernel, linux-kernel, linux-arch,
	linux-acpi
  Cc: kys, haiyangz, wei.liu, mhklinux, decui, catalin.marinas, will,
	tglx, mingo, bp, dave.hansen, hpa, daniel.lezcano, joro,
	robin.murphy, arnd, jinankjain, muminulrussell, skinsburskii,
	mrathor, ssengar, apais, Tianyu.Lan, stanislav.kinsburskiy,
	gregkh, vkuznets, prapal, muislam, anrayabh, rafael, lenb, corbet

This series introduces support for creating and running guest virtual
machines while running on the Microsoft Hypervisor[0] as root partition.
This is done via an IOCTL interface accessed through /dev/mshv, similar to
/dev/kvm. Another series introducing this support was previously posted in
2021[1], and v4 of this series was last posted in 2023[2].

Patches 1-4 are small refactors and additions to Hyper-V code.
Patches 5-6 just export some definitions needed by /dev/mshv.
Patches 7-9 introduce some functionality and definitions in common code, that
is needed by the driver.
Patch 10 contains the driver code.

-----------------
[0] "Hyper-V" is more well-known, but it really refers to the whole stack
    including the hypervisor and other components that run in Windows
    kernel and userspace.
[1] Previous /dev/mshv patch series (2021) and discussion:
https://lore.kernel.org/linux-hyperv/1632853875-20261-1-git-send-email-nunodasneves@linux.microsoft.com/
[2] v4 (2023):
https://lore.kernel.org/linux-hyperv/1696010501-24584-1-git-send-email-nunodasneves@linux.microsoft.com/

-----------------
Changes since v4:
* Slim down the IOCTL interface significantly, via several means:
  1. Use generic "passthrough" call MSHV_ROOT_HVCALL to replace many ioctls.
  2. Use MSHV_* versions of some of the HV_* definitions.
  3. Move hv headers out of uapi altogether, into include/hyperv/, see:
https://lore.kernel.org/linux-hyperv/1732577084-2122-1-git-send-email-nunodasneves@linux.microsoft.com/
* Remove mshv_vtl module altogther, it will be posted in followup series
  * Also remove the parent "mshv" module which didn't serve much purpose
* Update and refactor parts of the driver code for clarity, extensibility

Changes since v3 (summarized):
* Clean up the error and debug logging:
  1. Add a set of macros vp_*() and partition_*() which call the equivalent
     dev_*(), passing the device from the partition struct
     * The new macros also print the partition and vp ids to aid debugging
	   and reduce repeated code
  2. Use dev_*() (mostly via the new macros) instead of pr_*() *almost*
  everywhere - in interrupt context we can't always get the device struct
  3. Remove pr_*() logging from hv_call.c and mshv_root_hv_call.c

Changes since v2 (summarized):
* Fix many checkpatch.pl --strict style issues
* Initialize status in get/set registers hypercall helpers
* Add missing return on error in get_vp_signaled_count

Changes since v1 (summarized):
* Clean up formatting, commit messages

Nuno Das Neves (9):
  hyperv: Convert Hyper-V status codes to strings
  arm64/hyperv: Add some missing functions to arm64
  hyperv: Introduce hv_recommend_using_aeoi()
  acpi: numa: Export node_to_pxm()
  Drivers/hv: Export some functions for use by root partition module
  Drivers: hv: Introduce per-cpu event ring tail
  x86: hyperv: Add mshv_handler irq handler and setup function
  hyperv: Add definitions for root partition driver to hv headers
  Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs

Stanislav Kinsburskii (1):
  x86/mshyperv: Add support for extended Hyper-V features

 .../userspace-api/ioctl/ioctl-number.rst      |    2 +
 arch/arm64/hyperv/hv_core.c                   |   17 +
 arch/arm64/hyperv/mshyperv.c                  |    1 +
 arch/arm64/include/asm/mshyperv.h             |   12 +
 arch/x86/kernel/cpu/mshyperv.c                |   16 +-
 drivers/acpi/numa/srat.c                      |    1 +
 drivers/hv/Makefile                           |    5 +-
 drivers/hv/hv.c                               |   12 +-
 drivers/hv/hv_common.c                        |  105 +-
 drivers/hv/hv_proc.c                          |   16 +-
 drivers/hv/mshv.h                             |   30 +
 drivers/hv/mshv_common.c                      |  161 ++
 drivers/hv/mshv_eventfd.c                     |  833 ++++++
 drivers/hv/mshv_eventfd.h                     |   71 +
 drivers/hv/mshv_irq.c                         |  128 +
 drivers/hv/mshv_portid_table.c                |   84 +
 drivers/hv/mshv_root.h                        |  321 +++
 drivers/hv/mshv_root_hv_call.c                |  876 +++++++
 drivers/hv/mshv_root_main.c                   | 2329 +++++++++++++++++
 drivers/hv/mshv_synic.c                       |  665 +++++
 include/asm-generic/mshyperv.h                |   18 +
 include/hyperv/hvgdk_mini.h                   |   64 +-
 include/hyperv/hvhdk.h                        |  132 +-
 include/hyperv/hvhdk_mini.h                   |   91 +
 include/uapi/linux/mshv.h                     |  287 ++
 25 files changed, 6248 insertions(+), 29 deletions(-)
 create mode 100644 drivers/hv/mshv.h
 create mode 100644 drivers/hv/mshv_common.c
 create mode 100644 drivers/hv/mshv_eventfd.c
 create mode 100644 drivers/hv/mshv_eventfd.h
 create mode 100644 drivers/hv/mshv_irq.c
 create mode 100644 drivers/hv/mshv_portid_table.c
 create mode 100644 drivers/hv/mshv_root.h
 create mode 100644 drivers/hv/mshv_root_hv_call.c
 create mode 100644 drivers/hv/mshv_root_main.c
 create mode 100644 drivers/hv/mshv_synic.c
 create mode 100644 include/uapi/linux/mshv.h

-- 
2.34.1


^ permalink raw reply	[flat|nested] 108+ messages in thread

end of thread, other threads:[~2025-03-19 18:04 UTC | newest]

Thread overview: 108+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-26 23:07 [PATCH v5 00/10] Introduce /dev/mshv root partition driver Nuno Das Neves
2025-02-26 23:07 ` [PATCH v5 01/10] hyperv: Convert Hyper-V status codes to strings Nuno Das Neves
2025-02-26 23:26   ` Stanislav Kinsburskii
2025-02-27  4:22   ` Easwar Hariharan
2025-02-27 23:48     ` Nuno Das Neves
2025-02-27 17:02   ` Roman Kisel
2025-02-27 22:54     ` Easwar Hariharan
2025-02-27 23:08       ` Roman Kisel
2025-02-27 23:25         ` Easwar Hariharan
2025-02-28 17:20           ` Roman Kisel
2025-02-28 20:22             ` Easwar Hariharan
2025-02-28 22:26               ` Roman Kisel
2025-02-27 23:21       ` Roman Kisel
2025-02-28  0:15     ` Nuno Das Neves
2025-02-28 16:40       ` Roman Kisel
2025-03-06 17:57   ` Michael Kelley
2025-03-06 18:09     ` Michael Kelley
2025-03-06 18:40       ` Nuno Das Neves
2025-03-06 18:57         ` Michael Kelley
2025-03-07 19:38     ` Nuno Das Neves
2025-02-26 23:07 ` [PATCH v5 02/10] x86/mshyperv: Add support for extended Hyper-V features Nuno Das Neves
2025-02-26 23:27   ` Stanislav Kinsburskii
2025-02-27 17:59   ` Roman Kisel
2025-02-28  0:17     ` Nuno Das Neves
2025-02-28 16:42       ` Roman Kisel
2025-02-27 18:17   ` Easwar Hariharan
2025-03-06 18:30   ` Michael Kelley
2025-03-12 18:04     ` Nuno Das Neves
2025-03-10 13:17   ` Tianyu Lan
2025-02-26 23:07 ` [PATCH v5 03/10] arm64/hyperv: Add some missing functions to arm64 Nuno Das Neves
2025-02-26 23:27   ` Stanislav Kinsburskii
2025-02-27  5:56   ` Easwar Hariharan
2025-02-28  0:21     ` Nuno Das Neves
2025-03-06 19:05       ` Michael Kelley
2025-03-07 21:36         ` Nuno Das Neves
2025-03-07 21:55           ` Easwar Hariharan
2025-02-27 18:09   ` Roman Kisel
2025-02-26 23:07 ` [PATCH v5 04/10] hyperv: Introduce hv_recommend_using_aeoi() Nuno Das Neves
2025-02-26 23:28   ` Stanislav Kinsburskii
2025-02-27 18:04   ` Roman Kisel
2025-02-28  0:21     ` Nuno Das Neves
2025-02-27 23:03   ` Easwar Hariharan
2025-02-28  0:33     ` Nuno Das Neves
2025-02-28  0:49       ` Easwar Hariharan
2025-03-06 19:12   ` Michael Kelley
2025-03-10 12:51   ` Tianyu Lan
2025-02-26 23:07 ` [PATCH v5 05/10] acpi: numa: Export node_to_pxm() Nuno Das Neves
2025-02-26 23:31   ` Stanislav Kinsburskii
2025-02-27 23:05   ` Easwar Hariharan
2025-03-06 19:16   ` Michael Kelley
2025-03-10 12:50   ` Tianyu Lan
2025-02-26 23:08 ` [PATCH v5 06/10] Drivers/hv: Export some functions for use by root partition module Nuno Das Neves
2025-02-26 23:32   ` Stanislav Kinsburskii
2025-02-27 18:11   ` Roman Kisel
2025-02-28  0:51   ` Easwar Hariharan
2025-03-06 19:23   ` Michael Kelley
2025-03-07 21:38     ` Nuno Das Neves
2025-02-26 23:08 ` [PATCH v5 07/10] Drivers: hv: Introduce per-cpu event ring tail Nuno Das Neves
2025-02-26 23:39   ` Stanislav Kinsburskii
2025-03-07 17:02   ` Michael Kelley
2025-03-07 22:06     ` Nuno Das Neves
2025-03-07 23:21       ` Michael Kelley
2025-03-07 23:31         ` Nuno Das Neves
2025-03-07 23:37         ` Michael Kelley
2025-03-10 13:01   ` Tianyu Lan
2025-03-12 19:44     ` Nuno Das Neves
2025-03-13  7:34       ` Tianyu Lan
2025-03-13 15:56         ` Nuno Das Neves
2025-03-13 16:00           ` Tianyu Lan
2025-02-26 23:08 ` [PATCH v5 08/10] x86: hyperv: Add mshv_handler irq handler and setup function Nuno Das Neves
2025-02-26 23:43   ` Stanislav Kinsburskii
2025-03-01  0:38     ` Nuno Das Neves
2025-03-07 17:38       ` Michael Kelley
2025-03-10 21:46         ` Nuno Das Neves
2025-03-10 22:23           ` Michael Kelley
2025-03-07 17:44   ` Michael Kelley
2025-03-07 23:29     ` Nuno Das Neves
2025-03-07 23:45       ` Michael Kelley
2025-02-26 23:08 ` [PATCH v5 09/10] hyperv: Add definitions for root partition driver to hv headers Nuno Das Neves
2025-02-26 23:51   ` Stanislav Kinsburskii
2025-03-01  0:46     ` Nuno Das Neves
2025-02-27 18:13   ` Roman Kisel
2025-02-28  1:27   ` Easwar Hariharan
2025-03-01  0:52     ` Nuno Das Neves
2025-03-07 17:26   ` Michael Kelley
2025-03-07 23:35     ` Nuno Das Neves
2025-03-10 12:40   ` Tianyu Lan
2025-03-12 20:17     ` Nuno Das Neves
2025-02-26 23:08 ` [PATCH v5 10/10] Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs Nuno Das Neves
2025-02-27  4:59   ` Easwar Hariharan
2025-03-01  1:29     ` Nuno Das Neves
2025-02-27 18:50   ` Roman Kisel
2025-03-01  1:38     ` Nuno Das Neves
2025-03-06 17:32     ` Wei Liu
2025-03-07 18:06       ` Roman Kisel
2025-03-11 18:01   ` Jeff Johnson
2025-03-14 19:25     ` Nuno Das Neves
2025-03-13 16:43   ` Michael Kelley
2025-03-14  2:15     ` Nuno Das Neves
2025-03-14  3:27       ` Michael Kelley
2025-03-17 23:51   ` Michael Kelley
2025-03-18 17:24     ` Wei Liu
2025-03-18 17:45       ` Michael Kelley
2025-03-18 20:07         ` Wei Liu
2025-03-19  0:34     ` Nuno Das Neves
2025-03-19  2:10       ` Michael Kelley
2025-03-19 15:26         ` Michael Kelley
2025-03-19 18:04           ` Nuno Das Neves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).