Migration with Host model fails to set md-clear (not yet released in archive)

Bug #1836299 reported by Christian Ehrhardt 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Fix Released
Undecided
Rafael David Tinoco

Bug Description

This s an issue found while testing for a planned update.
Filing it as bug to work together on it.

PPA: https://launchpad.net/~paelzer/+archive/ubuntu/bug-1830243-1832622-1828495-sruregressiontests/+packages

(U) = Updated to the new version
(O) = orig version as in the archive now

Migrations fails from old versions to the new Disco version:
 - Cosmic (O) -> Disco (U) -> fail
 - Disco (O) -> Disco (U) -> fail
Migration works in other cases where the same backport should be active:
 - Bionic (O) -> Bionic (U) -> works
Also it works if both peers of the migration are updated
 - Disco (U) -> Disco (U) -> works
The same worked without the update
 - Disco (O) -> Disco (O) -> works
And the same code in later versions work as well:
 - Disco (U) -> Eoan (O)

The case that fails is the recently added host-model migration check, so there might be soemthing we miss so far in the test setup.
Error:

$ virsh migrate --unsafe --live kvmguest-disco-normal qemu+ssh://10.21.151.7/system
error: internal error: process exited while connecting to monitor: 2019-07-11T21:33:29.584326Z qemu-system-x86_64: can't apply global Haswell-noTSX-IBRS-x86_64-cpu.md-clear=on: Property '.md-clear' not found

TL;DR of the case:
1. Get two Disco systems (x86)
2. one system has the base version, one the new version of qemu
3. start a guest with type "host-model"
4. migrate that guest between the two systems

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Changed in qemu (Ubuntu):
status: New → Confirmed
assignee: nobody → Rafael David Tinoco (rafaeldtinoco)
Changed in qemu (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

AMD machine is good for host-passthrough:

(c)inaddy@kvmdisco2:~$ virsh list --all
 Id Name State
------------------------------
 3 kguest running
 - kbionic shut off
 - kdebian shut off
 - kdisco shut off
 - keoan shut off
 - kguestspice shut off
 - kxenial shut off

(c)inaddy@kvmdisco2:~$ virsh console kguest
Connected to domain kguest
Escape character is ^]

inaddy@kguest:~$

as expected! I'll reproduce this is a non-AMD machine and fix it.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Hey Christian:

Checking out my merge requests from:

https://code.launchpad.net/~rafaeldtinoco/ubuntu/+source/qemu

You can see that the upstream commit:

https://github.com/qemu/qemu/commit/4c257911dcc7

Is the same in the QEMU Bionic MR:

https://git.launchpad.net/~rafaeldtinoco/ubuntu/+source/qemu/commit/?id=da8eec6e84a0f04226d6f6e1bf5bbb80befe6c53

But something odd happened in Disco MR:

https://git.launchpad.net/~rafaeldtinoco/ubuntu/+source/qemu/commit/?id=84eb95cbd1f62d964f8986e227297a1811de234a

And the patch looks like a mix of several other patches :\, and it removed md-clear flag from FEAT_7_0_EDX (possible cause of this issue), among several other wrong things it wasn't supposed to.

I have already compared all other debian/ubuntu/patches/XX and it looks like only lp1828495-0015-remove-cpuid-intel_pt.patch was changed from one merge request to another. I'm fixing it, really unsure what happened there :\.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

I have provided a fix in:

https://code.launchpad.net/~rafaeldtinoco/ubuntu/+source/qemu/+git/qemu/+merge/369470

And provided that patchset package in PPA:

https://launchpad.net/~rafaeldtinoco/+archive/ubuntu/lp1828495?field.series_filter=disco

I think we're good now, will test it in my new Intel environment (I had to create an Intel new CPU lab, migration capable, so I can workout issues with Intel CPUs).

Thanks.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Ok, I have followed what you have found and agree to the broken patch #15.
I fixed my branches and builds from your updated MP and will respin the testsuite.

Consider this bug fixed unless I reopen it.

Changed in qemu (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.