On Tue, May 20, 2025 at 01:30:08PM +0200, Magnus Kulke wrote: > Add support for writing general-purpose registers to MSHV vCPUs > during initialization or migration using the MSHV register interface. A > generic set_register call is introduced to abstract the HV call over > the various register types. > > Signed-off-by: Magnus Kulke <magnusku...@linux.microsoft.com> > --- [...] > int mshv_store_regs(CPUState *cpu) > { > - error_report("unimplemented"); > - abort(); > + int ret; > + > + ret = set_standard_regs(cpu); > + if (ret < 0) { > + error_report("Failed to store standard registers"); > + return -1; > + } > + > + /* TODO: should store special registers? the equivalent hvf code doesn't > */
(I'm just using x86 KVM's special registers as a reference) We should not need to store them every time we refresh the CPU state, unless we know some of them are dirtied by QEMU. Thanks, Wei. > + > + return 0; > } > > + > int mshv_load_regs(CPUState *cpu) > { > error_report("unimplemented"); > -- > 2.34.1 >