All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] target/i386/kvm: Fix Live Migration failure on Intel Ice Lake after OS upgrade (Ubuntu 20.04 to 22.04)
@ 2026-05-12  8:02 fatih şener
  2026-05-12 17:33 ` Daniel P. Berrangé
  0 siblings, 1 reply; 3+ messages in thread
From: fatih şener @ 2026-05-12  8:02 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1734 bytes --]

Dear QEMU Developers,

We have identified a critical live migration failure on Intel Ice Lake
platforms when using *CPU host-passthrough* in OpenStack environments. The
issue specifically surfaced after upgrading compute nodes from *Ubuntu
20.04 to 22.04*.

*Technical Analysis:* The migration fails with KVM_SET_MSRS error while
restoring MSR_IA32_PERF_GLOBAL_CTRL (0x38f). On Ice Lake CPUs, this
register reports 0xf000000ff due to the 4th fixed-function counter (Perf
Mon v5).

We observed that while the source host (20.04) allows this value, the
target host (22.04 with a newer Kernel/KVM) enforces a stricter mask of
0x7000000ff. Even with identical hardware, the migration is rejected
because the target KVM treats the 4th bit as reserved/invalid.

*Proposed Fix:* We propose intercepting the MSR write in
target/i386/kvm/kvm.c to mask the value back to 0x7000000ff if 0xf000000ff
is detected. This ensures backward compatibility across different kernel
versions and stabilizes migration on Ice Lake hardware.

/* target/i386/kvm/kvm.c */
for (i = 0; i < cpu->kvm_msr_buf->nmsrs; i++) {
    if (cpu->kvm_msr_buf->entries[i].index == 0x38f &&
        cpu->kvm_msr_buf->entries[i].data == 0xf000000ffULL) {
        cpu->kvm_msr_buf->entries[i].data = 0x7000000ffULL;
    }
}

We have verified that this fix stabilizes our production environment and
allows successful live migration between hosts with different kernel
versions on Ice Lake hardware. We are looking forward to your technical
feedback on this implementation. If there is a more architectural way to
handle these MSR bitmasks upstream, we would be happy to discuss it. Best
regards,
-- 
● Fatih Şener - fatihsenerr@gmail.com

[-- Attachment #2: Type: text/html, Size: 2140 bytes --]

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12  8:02 [PATCH] target/i386/kvm: Fix Live Migration failure on Intel Ice Lake after OS upgrade (Ubuntu 20.04 to 22.04) fatih şener
2026-05-12 17:33 ` Daniel P. Berrangé
2026-05-12 19:01   ` fatih şener

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.