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. > 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 > + > +typedef struct MshvState { > + AccelState parent_obj; > + int vm; > + MshvMemoryListener memory_listener; > + /* number of listeners */ > + int nr_as; > + MshvAddressSpace *as; > +} MshvState; > +extern MshvState *mshv_state; > + > +struct AccelCPUState { > + int cpufd; > + bool dirty; > +}; > + > #else /* CONFIG_MSHV_IS_POSSIBLE */ > #define mshv_enabled() false > #endif > -- > 2.34.1 > > With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|