All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] Add migration support to MSHV accelerator, Part 2
@ 2026-07-10 10:15 Magnus Kulke
  2026-07-10 10:15 ` [PATCH 01/12] target/i386/mshv: disable AMX TILE features Magnus Kulke
                   ` (11 more replies)
  0 siblings, 12 replies; 16+ messages in thread
From: Magnus Kulke @ 2026-07-10 10:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Magnus Kulke, Doru Blânzeanu, Zhao Liu,
	Richard Henderson, Magnus Kulke, Michael S. Tsirkin, Wei Liu,
	Doru Blânzeanu, Wei Liu

Hey all,

this is a follow up to a previous series "Add migration support to the
MSHV accelerator".

There were 2 contested changes that have been reworked in this series

- target/i386/mshv: migrate LAPIC state
- accel/mshv: introduce SaveVMHandler

"Introduce SaveVMHandler" was adding lifecycle hooks that froze the
timer at the start of the migration on the source, which effectively
paused any workload that would depend on timer progress (like an os)
during the migration window. This is undesired for live migration and
has been split out into a dedicated clock device that has its own
migration lifecycle in "hw/i386/mshv: migrate REFERENCE_TIME".

"Migrate LAPIC state" changed in 2 ways: 1) for mshv-specific fields
there is now an "MshvAPICState" object that captures auxiliary fields
that exist in the MSHV LAPIC state. Initially we also shadowed the
lvt[APIC_LVT_LINT0/1] fields, since a write to those fields was
triggering a userpace PIC delivery path that MSHV doesn't support.
2) We add a guard in "pic_irq_request()" to short-circuit the userland
delivery for MSHV for PIC interrupts, that means can use the LINT0/1
fields from the CommonAPICState.

The other migration steps have been carried over more or less
verbatim from the first patch series.

3 drive-by fixes:

- disable AMX TILE features: this is required on because we do not
  not support XSAVE buffers beyond 4k in the accelerator yet
- drop initial msi vector 0: this has produced a warning at launch,
  after tracing the source we can drop it silently with confidence.
- toggle fpu/xsave migration: a subtle bug where fpu state would be
  clobbered by xsave legacy space when applied in the wrong order.

best regards,

magnus

Magnus Kulke (12):
  target/i386/mshv: disable AMX TILE features
  accel/mshv: introduce SaveVMHandler
  hw/i386/mshv: migrate REFERENCE_TIME
  accel/mshv: install dummy handler for SIG_IPI
  target/i386/mshv: migrate LAPIC state
  target/i386/mshv: migrate Synic SINT MSRs
  target/i386/mshv: migrate SIMP and SIEFP state
  target/i386/mshv: migrate STIMER state
  accel/mshv: write synthetic MSRs after migration
  target/i386/mshv: migrate MP_STATE
  target/i386/mshv: toggle fpu/xsave migration
  hw/i386/mshv: drop initial msi vector 0

 MAINTAINERS                    |   1 +
 accel/mshv/mshv-all.c          |  98 ++++----
 accel/mshv/trace-events        |   1 +
 hw/i386/meson.build            |   1 +
 hw/i386/mshv/apic.c            | 405 +++++++++++++++++++++++++++++++++
 hw/i386/mshv/clock.c           | 189 +++++++++++++++
 hw/i386/mshv/meson.build       |   5 +
 hw/i386/x86-cpu.c              |   6 +
 include/hw/hyperv/hvgdk_mini.h |   5 +
 include/hw/i386/apic-msidef.h  |   1 +
 include/system/mshv.h          |   5 +
 include/system/mshv_int.h      |  19 +-
 target/i386/cpu-apic.c         |   3 +
 target/i386/cpu.h              |  10 +
 target/i386/machine.c          |  46 ++++
 target/i386/mshv/meson.build   |   1 +
 target/i386/mshv/mshv-cpu.c    | 305 +++++++++++++++++--------
 target/i386/mshv/msr.c         |  40 ++++
 target/i386/mshv/synic.c       | 206 +++++++++++++++++
 19 files changed, 1196 insertions(+), 151 deletions(-)
 create mode 100644 hw/i386/mshv/apic.c
 create mode 100644 hw/i386/mshv/clock.c
 create mode 100644 hw/i386/mshv/meson.build
 create mode 100644 target/i386/mshv/synic.c

-- 
2.34.1



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

end of thread, other threads:[~2026-07-16 12:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10 10:15 [PATCH 00/12] Add migration support to MSHV accelerator, Part 2 Magnus Kulke
2026-07-10 10:15 ` [PATCH 01/12] target/i386/mshv: disable AMX TILE features Magnus Kulke
2026-07-16 11:06   ` Doru Blânzeanu
2026-07-10 10:15 ` [PATCH 02/12] accel/mshv: introduce SaveVMHandler Magnus Kulke
2026-07-16 11:10   ` Doru Blânzeanu
2026-07-10 10:15 ` [PATCH 03/12] hw/i386/mshv: migrate REFERENCE_TIME Magnus Kulke
2026-07-16 12:01   ` Doru Blânzeanu
2026-07-10 10:15 ` [PATCH 04/12] accel/mshv: install dummy handler for SIG_IPI Magnus Kulke
2026-07-10 10:15 ` [PATCH 05/12] target/i386/mshv: migrate LAPIC state Magnus Kulke
2026-07-10 10:15 ` [PATCH 06/12] target/i386/mshv: migrate Synic SINT MSRs Magnus Kulke
2026-07-10 10:15 ` [PATCH 07/12] target/i386/mshv: migrate SIMP and SIEFP state Magnus Kulke
2026-07-10 10:15 ` [PATCH 08/12] target/i386/mshv: migrate STIMER state Magnus Kulke
2026-07-10 10:15 ` [PATCH 09/12] accel/mshv: write synthetic MSRs after migration Magnus Kulke
2026-07-10 10:15 ` [PATCH 10/12] target/i386/mshv: migrate MP_STATE Magnus Kulke
2026-07-10 10:15 ` [PATCH 11/12] target/i386/mshv: toggle fpu/xsave migration Magnus Kulke
2026-07-10 10:15 ` [PATCH 12/12] hw/i386/mshv: drop initial msi vector 0 Magnus Kulke

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.