Merge ~paelzer/ubuntu/+source/qemu:post-disco-sru-set-bionic into ubuntu/+source/qemu:ubuntu/bionic-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Andreas Hasenack
Approved revision: 16993c2dd7d7aa6e47fc013a012b77b4f3fe1bac
Merge reported by: Christian Ehrhardt 
Merged at revision: 16993c2dd7d7aa6e47fc013a012b77b4f3fe1bac
Proposed branch: ~paelzer/ubuntu/+source/qemu:post-disco-sru-set-bionic
Merge into: ubuntu/+source/qemu:ubuntu/bionic-devel
Diff against target: 273 lines (+233/-0)
6 files modified
debian/changelog (+11/-0)
debian/patches/series (+4/-0)
debian/patches/ubuntu/lp-1806104-spapr_pci-Remove-unhelpful-pagesize-warning.patch (+49/-0)
debian/patches/ubuntu/lp-1809083-1-target-ppc-always-set-PPC_MEM_TLBIE-in-pre-2.8.patch (+54/-0)
debian/patches/ubuntu/lp-1809083-3-spapr-don-t-advertise-radix-GTSE-if-max-compat.patch (+72/-0)
debian/patches/ubuntu/lp-1812384-s390x-Return-specification-exception.patch (+43/-0)
Reviewer Review Type Date Requested Status
Andreas Hasenack Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+362539@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

dep8 tests are only hitting known flaky tests, so they are ok

Also the automated virt regression tests ran fine on all architectures.

I verified the SRU test steps on the bug on the target HW.

Remaining: I'm waiting on the MP review here

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

+1

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

thanks for the review, uploaded to SRU queue

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 29a808e..c8df18c 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,14 @@
6+qemu (1:2.11+dfsg-1ubuntu7.10) bionic; urgency=medium
7+
8+ * d/p/ubuntu/lp-1806104-spapr_pci-Remove-unhelpful-pagesize-warning.patch:
9+ remove misleading page size warning on qemu-system-ppc64 (LP: #1806104)
10+ * d/p/ubuntu/lp-1812384-s390x-Return-specification-exception.patch: ensure
11+ a proper exception on unknown diag 308 subcodes
12+ (LP: #1812384)
13+ * d/p/ubuntu/lp-1809083-*: fix backward migration on ppc64el (LP: #1809083)
14+
15+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 31 Jan 2019 14:07:51 +0100
16+
17 qemu (1:2.11+dfsg-1ubuntu7.9) bionic; urgency=medium
18
19 * debian/patches/ubuntu/lp1787405-*: Support guest dedicated Crypto
20diff --git a/debian/patches/series b/debian/patches/series
21index 066e1fb..f4579b5 100644
22--- a/debian/patches/series
23+++ b/debian/patches/series
24@@ -74,3 +74,7 @@ ubuntu/lp1787405-0003-s390x-kvm-enable-AP-instruction-interpretation-for-g.patch
25 ubuntu/lp1787405-0004-s390x-ap-base-Adjunct-Processor-AP-object-model.patch
26 ubuntu/lp1787405-0005-s390x-vfio-ap-Introduce-VFIO-AP-device.patch
27 ubuntu/lp1787405-0006-s390-doc-detailed-specifications-for-AP-virtualizati.patch
28+ubuntu/lp-1806104-spapr_pci-Remove-unhelpful-pagesize-warning.patch
29+ubuntu/lp-1812384-s390x-Return-specification-exception.patch
30+ubuntu/lp-1809083-1-target-ppc-always-set-PPC_MEM_TLBIE-in-pre-2.8.patch
31+ubuntu/lp-1809083-3-spapr-don-t-advertise-radix-GTSE-if-max-compat.patch
32diff --git a/debian/patches/ubuntu/lp-1806104-spapr_pci-Remove-unhelpful-pagesize-warning.patch b/debian/patches/ubuntu/lp-1806104-spapr_pci-Remove-unhelpful-pagesize-warning.patch
33new file mode 100644
34index 0000000..117d7d6
35--- /dev/null
36+++ b/debian/patches/ubuntu/lp-1806104-spapr_pci-Remove-unhelpful-pagesize-warning.patch
37@@ -0,0 +1,49 @@
38+From 30f79dc13f116a79ff45d37ad0f5c035012064a7 Mon Sep 17 00:00:00 2001
39+From: David Gibson <david@gibson.dropbear.id.au>
40+Date: Thu, 19 Apr 2018 16:07:40 +1000
41+Subject: [PATCH] spapr_pci: Remove unhelpful pagesize warning
42+
43+By default, the IOMMU model built into the spapr virtual PCI host bridge
44+supports 4kiB and 64kiB IOMMU page sizes. However this can be overridden
45+which may be desirable to allow larger IOMMU page sizes when running a
46+guest with hugepage backing and passthrough devices. For that reason a
47+warning was printed when the device wasn't configured to allow the pagesize
48+with which guest RAM is backed.
49+
50+Experience has proven, however, that this message is more confusing than
51+useful. Worse it sometimes makes little sense when the host-available page
52+sizes don't match those available on the guest, which can happen with
53+a POWER8 guest running on a POWER9 KVM host.
54+
55+Long term we do want better handling to allow large IOMMU page sizes to be
56+used, but for now this parameter and warning don't really accomplish it.
57+So, remove the message, pending a better solution.
58+
59+Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
60+
61+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
62+Original-Author: David Gibson <david@gibson.dropbear.id.au>
63+Origin: backport, https://git.qemu.org/?p=qemu.git;a=commit;h=30f79dc13f116a79ff45d37ad0f5c035012064a7
64+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1806104
65+Last-Update: 2019-01-31
66+
67+---
68+ hw/ppc/spapr_pci.c | 7 -------
69+ 1 file changed, 7 deletions(-)
70+
71+--- a/hw/ppc/spapr_pci.c
72++++ b/hw/ppc/spapr_pci.c
73+@@ -1717,13 +1717,6 @@ static void spapr_phb_realize(DeviceStat
74+ }
75+
76+ /* DMA setup */
77+- if (((sphb->page_size_mask & qemu_getrampagesize()) == 0)
78+- && kvm_enabled()) {
79+- error_report("System page size 0x%lx is not enabled in page_size_mask "
80+- "(0x%"PRIx64"). Performance may be slow",
81+- qemu_getrampagesize(), sphb->page_size_mask);
82+- }
83+-
84+ for (i = 0; i < windows_supported; ++i) {
85+ tcet = spapr_tce_new_table(DEVICE(sphb), sphb->dma_liobn[i]);
86+ if (!tcet) {
87diff --git a/debian/patches/ubuntu/lp-1809083-1-target-ppc-always-set-PPC_MEM_TLBIE-in-pre-2.8.patch b/debian/patches/ubuntu/lp-1809083-1-target-ppc-always-set-PPC_MEM_TLBIE-in-pre-2.8.patch
88new file mode 100644
89index 0000000..b943460
90--- /dev/null
91+++ b/debian/patches/ubuntu/lp-1809083-1-target-ppc-always-set-PPC_MEM_TLBIE-in-pre-2.8.patch
92@@ -0,0 +1,54 @@
93+From bce009645b9f1d59195518e35747c8ea30f985f7 Mon Sep 17 00:00:00 2001
94+From: Greg Kurz <groug@kaod.org>
95+Date: Thu, 3 May 2018 23:16:29 +0200
96+Subject: [PATCH 1/3] target/ppc: always set PPC_MEM_TLBIE in pre 2.8 migration
97+ hack
98+
99+The pseries-2.7 and older machine types require CPUPPCState::insns_flags
100+to be strictly equal between source and destination. This checking is
101+abusive and breaks migration of KVM guests when the host CPU models
102+are different, even if they are compatible enough to allow the guest
103+to run transparently. This buggy behaviour was fixed for pseries-2.8
104+and we added some hacks to allow backward migration of older machine
105+types. These hacks assume that the CPU belongs to the POWER8 family,
106+which was true for most KVM based setup we cared about at the time.
107+But now POWER9 systems are coming, and backward migration of pre 2.8
108+guests running in POWER8 architected mode from a POWER9 host to a
109+POWER8 host is broken:
110+
111+qemu-system-ppc64: error while loading state for instance 0x0 of device
112+ 'cpu'
113+qemu-system-ppc64: load of migration failed: Invalid argument
114+
115+This happens because POWER9 doesn't set PPC_MEM_TLBIE in insns_flags,
116+while POWER8 does. Let's force PPC_MEM_TLBIE in the migration hack to
117+fix the issue. This is an acceptable hack because these old machine
118+types only support CPU models that do set PPC_MEM_TLBIE.
119+
120+Signed-off-by: Greg Kurz <groug@kaod.org>
121+Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
122+
123+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
124+Original-Author: Greg Kurz <groug@kaod.org>
125+Origin: backport, https://git.qemu.org/?p=qemu.git;a=commit;h=bce009645b9f1d59195518e35747c8ea30f985f7
126+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1809083
127+Last-Update: 2019-01-31
128+
129+---
130+ target/ppc/machine.c | 5 +++++
131+ 1 file changed, 5 insertions(+)
132+
133+--- a/target/ppc/machine.c
134++++ b/target/ppc/machine.c
135+@@ -192,6 +192,11 @@ static int cpu_pre_save(void *opaque)
136+ if (cpu->pre_2_8_migration) {
137+ cpu->mig_msr_mask = env->msr_mask;
138+ cpu->mig_insns_flags = env->insns_flags & insns_compat_mask;
139++ /* CPU models supported by old machines all have PPC_MEM_TLBIE,
140++ * so we set it unconditionally to allow backward migration from
141++ * a POWER9 host to a POWER8 host.
142++ */
143++ cpu->mig_insns_flags |= PPC_MEM_TLBIE;
144+ cpu->mig_insns_flags2 = env->insns_flags2 & insns_compat_mask2;
145+ cpu->mig_nb_BATs = env->nb_BATs;
146+ }
147diff --git a/debian/patches/ubuntu/lp-1809083-3-spapr-don-t-advertise-radix-GTSE-if-max-compat.patch b/debian/patches/ubuntu/lp-1809083-3-spapr-don-t-advertise-radix-GTSE-if-max-compat.patch
148new file mode 100644
149index 0000000..31955d0
150--- /dev/null
151+++ b/debian/patches/ubuntu/lp-1809083-3-spapr-don-t-advertise-radix-GTSE-if-max-compat.patch
152@@ -0,0 +1,72 @@
153+From 0550b1206a91d66051a21441a02c4ff126b531fe Mon Sep 17 00:00:00 2001
154+From: Greg Kurz <groug@kaod.org>
155+Date: Thu, 3 May 2018 23:16:59 +0200
156+Subject: [PATCH 3/3] spapr: don't advertise radix GTSE if max-compat-cpu <
157+ power9
158+
159+On a POWER9 host, if a guest runs in pre POWER9 compat mode, it necessarily
160+uses the hash MMU mode. In this case, we shouldn't advertise radix GTSE in
161+the ibm,arch-vec-5-platform-support DT property as the current code does.
162+The first reason is that it doesn't make sense, and the second one is that
163+causes the CAS-negotiated options subsection to be migrated. This breaks
164+backward migration to QEMU 2.7 and older versions on POWER8 hosts:
165+
166+qemu-system-ppc64: error while loading state for instance 0x0 of device
167+ 'spapr'
168+qemu-system-ppc64: load of migration failed: No such file or directory
169+
170+This patch hence initialize CPUs a bit earlier so that we can check the
171+requested compat mode, and don't set OV5_MMU_RADIX_GTSE for power8 and
172+older.
173+
174+Signed-off-by: Greg Kurz <groug@kaod.org>
175+Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
176+
177+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
178+Original-Author: Greg Kurz <groug@kaod.org>
179+Origin: backport, https://git.qemu.org/?p=qemu.git;a=commit;h=0550b1206a91d66051a21441a02c4ff126b531fe
180+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1809083
181+Last-Update: 2019-01-31
182+
183+---
184+ hw/ppc/spapr.c | 15 ++++++++++-----
185+ 1 file changed, 10 insertions(+), 5 deletions(-)
186+
187+--- a/hw/ppc/spapr.c
188++++ b/hw/ppc/spapr.c
189+@@ -2343,6 +2343,7 @@ static void ppc_spapr_init(MachineState
190+ long load_limit, fw_size;
191+ char *filename;
192+ Error *resize_hpt_err = NULL;
193++ PowerPCCPU *first_ppc_cpu;
194+
195+ msi_nonbroken = true;
196+
197+@@ -2435,11 +2436,6 @@ static void ppc_spapr_init(MachineState
198+ }
199+
200+ spapr_ovec_set(spapr->ov5, OV5_FORM1_AFFINITY);
201+- if (!kvm_enabled() || kvmppc_has_cap_mmu_radix()) {
202+- /* KVM and TCG always allow GTSE with radix... */
203+- spapr_ovec_set(spapr->ov5, OV5_MMU_RADIX_GTSE);
204+- }
205+- /* ... but not with hash (currently). */
206+
207+ /* advertise support for dedicated HP event source to guests */
208+ if (spapr->use_hotplug_event_source) {
209+@@ -2456,6 +2452,15 @@ static void ppc_spapr_init(MachineState
210+
211+ spapr_init_cpus(spapr);
212+
213++ first_ppc_cpu = POWERPC_CPU(first_cpu);
214++ if ((!kvm_enabled() || kvmppc_has_cap_mmu_radix()) &&
215++ ppc_check_compat(first_ppc_cpu, CPU_POWERPC_LOGICAL_3_00, 0,
216++ spapr->max_compat_pvr)) {
217++ /* KVM and TCG always allow GTSE with radix... */
218++ spapr_ovec_set(spapr->ov5, OV5_MMU_RADIX_GTSE);
219++ }
220++ /* ... but not with hash (currently). */
221++
222+ if (kvm_enabled()) {
223+ /* Enable H_LOGICAL_CI_* so SLOF can talk to in-kernel devices */
224+ kvmppc_enable_logical_ci_hcalls();
225diff --git a/debian/patches/ubuntu/lp-1812384-s390x-Return-specification-exception.patch b/debian/patches/ubuntu/lp-1812384-s390x-Return-specification-exception.patch
226new file mode 100644
227index 0000000..b72cc7d
228--- /dev/null
229+++ b/debian/patches/ubuntu/lp-1812384-s390x-Return-specification-exception.patch
230@@ -0,0 +1,43 @@
231+From 37dbd1f4d4805edcd18d94eb202bb3461b3cd52d Mon Sep 17 00:00:00 2001
232+From: Janosch Frank <frankja@linux.ibm.com>
233+Date: Fri, 11 Jan 2019 12:36:57 +0100
234+Subject: [PATCH] s390x: Return specification exception for unimplemented diag
235+ 308 subcodes
236+
237+The architecture specifies specification exceptions for all
238+unavailable subcodes.
239+
240+The presence of subcodes is indicated by checking some query subcode.
241+For example 6 will indicate that 3-6 are available. So future systems
242+might call new subcodes to check for new features. This should not
243+trigger a hw error, instead we return the architectured specification
244+exception.
245+
246+Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
247+Cc: qemu-stable@nongnu.org
248+Message-Id: <20190111113657.66195-3-frankja@linux.ibm.com>
249+Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
250+Reviewed-by: David Hildenbrand <david@redhat.com>
251+Signed-off-by: Cornelia Huck <cohuck@redhat.com>
252+
253+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
254+Original-Author: Janosch Frank <frankja@linux.ibm.com>
255+Origin: backport, https://git.qemu.org/?p=qemu.git;a=commit;h=37dbd1f4d4805edcd18d94eb202bb3461b3cd52d
256+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1812384
257+Last-Update: 2018-01-31
258+
259+---
260+ target/s390x/diag.c | 2 +-
261+ 1 file changed, 1 insertion(+), 1 deletion(-)
262+
263+--- a/target/s390x/diag.c
264++++ b/target/s390x/diag.c
265+@@ -182,7 +182,7 @@ out:
266+ }
267+ return;
268+ default:
269+- hw_error("Unhandled diag308 subcode %" PRIx64, subcode);
270++ program_interrupt(env, PGM_SPECIFICATION, ILEN_AUTO);
271+ break;
272+ }
273+ }

Subscribers

People subscribed via source and target branches