On 5/20/25 14:02, Daniel P. Berrangé wrote:
On Tue, May 20, 2025 at 01:29:59PM +0200, Magnus Kulke wrote:
Introduce the initial scaffold for the MSHV (Microsoft Hypervisor)
accelerator backend. This includes the basic directory structure and
stub implementations needed to integrate with QEMU's accelerator
framework.
Signed-off-by: Magnus Kulke <magnusku...@linux.microsoft.com>
---
accel/meson.build | 1 +
accel/mshv/meson.build | 6 ++
accel/mshv/mshv-all.c | 143 +++++++++++++++++++++++++++++++++++++++++
include/system/mshv.h | 34 ++++++++++
4 files changed, 184 insertions(+)
create mode 100644 accel/mshv/meson.build
create mode 100644 accel/mshv/mshv-all.c
diff --git a/accel/mshv/mshv-all.c b/accel/mshv/mshv-all.c
new file mode 100644
index 0000000000..44605adf94
--- /dev/null
+++ b/accel/mshv/mshv-all.c
+
+static int mshv_init(MachineState *ms)
+{
+ error_report("unimplemented");
+ abort();
+}
Nit-picking - although you remove these lines in later patches,
lets remove the tabs from these lines.
Indent is a bit messy throughout the whole series, in some files there
are also TAB characters that are supposed to expand to 4.
Probably easiest to run all new files through autoindent, there must be
some VSCode magic for that. :)
Paolo
diff --git a/include/system/mshv.h b/include/system/mshv.h
index bc8f2c228a..0858e47def 100644
--- a/include/system/mshv.h
+++ b/include/system/mshv.h
@@ -16,6 +16,14 @@
#ifndef QEMU_MSHV_INT_H
#define QEMU_MSHV_INT_H
+#include "qemu/osdep.h"
+#include "qemu/accel.h"
+#include "hw/hyperv/hyperv-proto.h"
+#include "hw/hyperv/linux-mshv.h"
+#include "hw/hyperv/hvhdk.h"
+#include "qapi/qapi-types-common.h"
+#include "system/memory.h"
+
#ifdef COMPILING_PER_TARGET
#ifdef CONFIG_MSHV
#define CONFIG_MSHV_IS_POSSIBLE
@@ -28,6 +36,32 @@
#ifdef CONFIG_MSHV_IS_POSSIBLE
extern bool mshv_allowed;
#define mshv_enabled() (mshv_allowed)
+
+typedef struct MshvMemoryListener {
+ MemoryListener listener;
+ int as_id;
+} MshvMemoryListener;
+
+typedef struct MshvAddressSpace {
+ MshvMemoryListener *ml;
+ AddressSpace *as;
+} MshvAddressSpace;
Inconsistent mix of 2-space and 4-space
indents - stick with 4-space throughout