Comment 3 for bug 1763468

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-04-13 10:57 EDT-------
(In reply to comment #6)
> TL;DR I'd ask you to:
> - evaluate if a (much) simpler fix would be available

Yeah, I believe we can come up with something slightly simpler.

The kernel for 18.04 is 4.15, hence KVM supports setting the VSMT, and we
can drop all the patches that deal with kvmppc_smt_threads() != spapr->vsmt.

This means the following patches can be dropped from the backport:

lp-1763468-1-spapr-Allow-some-cases-where-we-can-t-set-VSMT-mode-.patch
lp-1763468-4-spapr-use-spapr-vsmt-to-compute-VCPU-ids.patch

These ones are cleanup and can be dropped:

lp-1763468-5-spapr-move-VCPU-calculation-to-core-machine-code.patch
lp-1763468-6-spapr-rename-spapr_vcpu_id-to-spapr_get_vcpu_id.patch
lp-1763468-7-spapr-consolidate-the-VCPU-id-numbering-logic-in-a-s.patch

This one fixes a regression from the above cleanup and can be dropped:

lp-1763468-8-spapr-fix-missing-CPU-core-nodes-in-DT-when-running-.patch

But we still need to adjust the default VSMT value, so we want to keep these:

lp-1763468-2-spapr-Adjust-default-VSMT-value-for-better-migration.patch
lp-1763468-3-spapr-set-vsmt-to-MAX-8-smp_threads.patch

and we also need to register dummy ICPs later, to "fix just the issue". This requires
to adapt lp-1763468-9-spapr-register-dummy-ICPs-later.patch to the fact that
xics_max_server_number() doesn't take arguments. The following does the trick:

perl -i -p -e 's/xics_max_server_number\(spapr\)/xics_max_server_number()/' \
lp-1763468-9-spapr-register-dummy-ICPs-later.patch

So you end up with 3 patches and a nicer diffstat:

hw/ppc/spapr.c | 35 ++++++++++++++++++++---------------
1 file changed, 20 insertions(+), 15 deletions(-)

Is it enough for you to go forward ?