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

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Andreas Hasenack
Approved revision: 8af8622112008e416d726ffc14b06500c68e5d75
Merge reported by: Christian Ehrhardt 
Merged at revision: 8af8622112008e416d726ffc14b06500c68e5d75
Proposed branch: ~paelzer/ubuntu/+source/qemu:post-disco-sru-set-cosmic
Merge into: ubuntu/+source/qemu:ubuntu/cosmic-devel
Diff against target: 281 lines (+241/-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 (+52/-0)
debian/patches/ubuntu/lp-1809083-1-target-ppc-always-set-PPC_MEM_TLBIE-in-pre-2.8.patch (+57/-0)
debian/patches/ubuntu/lp-1809083-3-spapr-don-t-advertise-radix-GTSE-if-max-compat.patch (+71/-0)
debian/patches/ubuntu/lp-1812384-s390x-Return-specification-exception.patch (+46/-0)
Reviewer Review Type Date Requested Status
Andreas Hasenack Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+362540@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

https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1809083/comments/3 explains why patch 2 isn't needed for #1809083

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

thanks for the review, uploaded to SRU queue

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

Cosmic was accepted - setting merged

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 905a87f..94cc473 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,14 @@
6+qemu (1:2.12+dfsg-3ubuntu8.3) cosmic; 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:28:19 +0100
16+
17 qemu (1:2.12+dfsg-3ubuntu8.2) cosmic; urgency=medium
18
19 * debian/patches/ubuntu/lp1787405-*: Support guest dedicated Crypto
20diff --git a/debian/patches/series b/debian/patches/series
21index ad98113..ebe81df 100644
22--- a/debian/patches/series
23+++ b/debian/patches/series
24@@ -47,3 +47,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..c3a019b
35--- /dev/null
36+++ b/debian/patches/ubuntu/lp-1806104-spapr_pci-Remove-unhelpful-pagesize-warning.patch
37@@ -0,0 +1,52 @@
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+Origin: upstream, https://git.qemu.org/?p=qemu.git;a=commit;h=30f79dc13f116a79ff45d37ad0f5c035012064a7
62+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1806104
63+Last-Update: 2019-01-31
64+
65+---
66+ hw/ppc/spapr_pci.c | 7 -------
67+ 1 file changed, 7 deletions(-)
68+
69+diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
70+index 39a14980d3..f936ce63ef 100644
71+--- a/hw/ppc/spapr_pci.c
72++++ b/hw/ppc/spapr_pci.c
73+@@ -1717,13 +1717,6 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp)
74+ }
75+
76+ /* DMA setup */
77+- if (((sphb->page_size_mask & qemu_getrampagesize()) == 0)
78+- && kvm_enabled()) {
79+- warn_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) {
87+--
88+2.17.1
89+
90diff --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
91new file mode 100644
92index 0000000..369ce2e
93--- /dev/null
94+++ b/debian/patches/ubuntu/lp-1809083-1-target-ppc-always-set-PPC_MEM_TLBIE-in-pre-2.8.patch
95@@ -0,0 +1,57 @@
96+From bce009645b9f1d59195518e35747c8ea30f985f7 Mon Sep 17 00:00:00 2001
97+From: Greg Kurz <groug@kaod.org>
98+Date: Thu, 3 May 2018 23:16:29 +0200
99+Subject: [PATCH 1/3] target/ppc: always set PPC_MEM_TLBIE in pre 2.8 migration
100+ hack
101+
102+The pseries-2.7 and older machine types require CPUPPCState::insns_flags
103+to be strictly equal between source and destination. This checking is
104+abusive and breaks migration of KVM guests when the host CPU models
105+are different, even if they are compatible enough to allow the guest
106+to run transparently. This buggy behaviour was fixed for pseries-2.8
107+and we added some hacks to allow backward migration of older machine
108+types. These hacks assume that the CPU belongs to the POWER8 family,
109+which was true for most KVM based setup we cared about at the time.
110+But now POWER9 systems are coming, and backward migration of pre 2.8
111+guests running in POWER8 architected mode from a POWER9 host to a
112+POWER8 host is broken:
113+
114+qemu-system-ppc64: error while loading state for instance 0x0 of device
115+ 'cpu'
116+qemu-system-ppc64: load of migration failed: Invalid argument
117+
118+This happens because POWER9 doesn't set PPC_MEM_TLBIE in insns_flags,
119+while POWER8 does. Let's force PPC_MEM_TLBIE in the migration hack to
120+fix the issue. This is an acceptable hack because these old machine
121+types only support CPU models that do set PPC_MEM_TLBIE.
122+
123+Signed-off-by: Greg Kurz <groug@kaod.org>
124+Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
125+
126+Origin: upstream, https://git.qemu.org/?p=qemu.git;a=commit;h=bce009645b9f1d59195518e35747c8ea30f985f7
127+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1809083
128+Last-Update: 2019-01-31
129+
130+---
131+ target/ppc/machine.c | 5 +++++
132+ 1 file changed, 5 insertions(+)
133+
134+diff --git a/target/ppc/machine.c b/target/ppc/machine.c
135+index 3d6434a006..ba1b9e531f 100644
136+--- a/target/ppc/machine.c
137++++ b/target/ppc/machine.c
138+@@ -212,6 +212,11 @@ static int cpu_pre_save(void *opaque)
139+ ;
140+ cpu->mig_msr_mask = env->msr_mask & ~metamask;
141+ cpu->mig_insns_flags = env->insns_flags & insns_compat_mask;
142++ /* CPU models supported by old machines all have PPC_MEM_TLBIE,
143++ * so we set it unconditionally to allow backward migration from
144++ * a POWER9 host to a POWER8 host.
145++ */
146++ cpu->mig_insns_flags |= PPC_MEM_TLBIE;
147+ cpu->mig_insns_flags2 = env->insns_flags2 & insns_compat_mask2;
148+ cpu->mig_nb_BATs = env->nb_BATs;
149+ }
150+--
151+2.17.1
152+
153diff --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
154new file mode 100644
155index 0000000..12e66cd
156--- /dev/null
157+++ b/debian/patches/ubuntu/lp-1809083-3-spapr-don-t-advertise-radix-GTSE-if-max-compat.patch
158@@ -0,0 +1,71 @@
159+From 0550b1206a91d66051a21441a02c4ff126b531fe Mon Sep 17 00:00:00 2001
160+From: Greg Kurz <groug@kaod.org>
161+Date: Thu, 3 May 2018 23:16:59 +0200
162+Subject: [PATCH 3/3] spapr: don't advertise radix GTSE if max-compat-cpu <
163+ power9
164+
165+On a POWER9 host, if a guest runs in pre POWER9 compat mode, it necessarily
166+uses the hash MMU mode. In this case, we shouldn't advertise radix GTSE in
167+the ibm,arch-vec-5-platform-support DT property as the current code does.
168+The first reason is that it doesn't make sense, and the second one is that
169+causes the CAS-negotiated options subsection to be migrated. This breaks
170+backward migration to QEMU 2.7 and older versions on POWER8 hosts:
171+
172+qemu-system-ppc64: error while loading state for instance 0x0 of device
173+ 'spapr'
174+qemu-system-ppc64: load of migration failed: No such file or directory
175+
176+This patch hence initialize CPUs a bit earlier so that we can check the
177+requested compat mode, and don't set OV5_MMU_RADIX_GTSE for power8 and
178+older.
179+
180+Signed-off-by: Greg Kurz <groug@kaod.org>
181+Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
182+
183+Origin: upstream, https://git.qemu.org/?p=qemu.git;a=commit;h=0550b1206a91d66051a21441a02c4ff126b531fe
184+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1809083
185+Last-Update: 2019-01-31
186+
187+diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
188+index 19997f66c0..32ab3c43b6 100644
189+--- a/hw/ppc/spapr.c
190++++ b/hw/ppc/spapr.c
191+@@ -2512,6 +2512,7 @@ static void spapr_machine_init(MachineState *machine)
192+ long load_limit, fw_size;
193+ char *filename;
194+ Error *resize_hpt_err = NULL;
195++ PowerPCCPU *first_ppc_cpu;
196+
197+ msi_nonbroken = true;
198+
199+@@ -2592,11 +2593,6 @@ static void spapr_machine_init(MachineState *machine)
200+ }
201+
202+ spapr_ovec_set(spapr->ov5, OV5_FORM1_AFFINITY);
203+- if (!kvm_enabled() || kvmppc_has_cap_mmu_radix()) {
204+- /* KVM and TCG always allow GTSE with radix... */
205+- spapr_ovec_set(spapr->ov5, OV5_MMU_RADIX_GTSE);
206+- }
207+- /* ... but not with hash (currently). */
208+
209+ /* advertise support for dedicated HP event source to guests */
210+ if (spapr->use_hotplug_event_source) {
211+@@ -2614,6 +2610,15 @@ static void spapr_machine_init(MachineState *machine)
212+ /* init CPUs */
213+ spapr_init_cpus(spapr);
214+
215++ first_ppc_cpu = POWERPC_CPU(first_cpu);
216++ if ((!kvm_enabled() || kvmppc_has_cap_mmu_radix()) &&
217++ ppc_check_compat(first_ppc_cpu, CPU_POWERPC_LOGICAL_3_00, 0,
218++ spapr->max_compat_pvr)) {
219++ /* KVM and TCG always allow GTSE with radix... */
220++ spapr_ovec_set(spapr->ov5, OV5_MMU_RADIX_GTSE);
221++ }
222++ /* ... but not with hash (currently). */
223++
224+ if (kvm_enabled()) {
225+ /* Enable H_LOGICAL_CI_* so SLOF can talk to in-kernel devices */
226+ kvmppc_enable_logical_ci_hcalls();
227+--
228+2.17.1
229+
230diff --git a/debian/patches/ubuntu/lp-1812384-s390x-Return-specification-exception.patch b/debian/patches/ubuntu/lp-1812384-s390x-Return-specification-exception.patch
231new file mode 100644
232index 0000000..15b393c
233--- /dev/null
234+++ b/debian/patches/ubuntu/lp-1812384-s390x-Return-specification-exception.patch
235@@ -0,0 +1,46 @@
236+From 37dbd1f4d4805edcd18d94eb202bb3461b3cd52d Mon Sep 17 00:00:00 2001
237+From: Janosch Frank <frankja@linux.ibm.com>
238+Date: Fri, 11 Jan 2019 12:36:57 +0100
239+Subject: [PATCH] s390x: Return specification exception for unimplemented diag
240+ 308 subcodes
241+
242+The architecture specifies specification exceptions for all
243+unavailable subcodes.
244+
245+The presence of subcodes is indicated by checking some query subcode.
246+For example 6 will indicate that 3-6 are available. So future systems
247+might call new subcodes to check for new features. This should not
248+trigger a hw error, instead we return the architectured specification
249+exception.
250+
251+Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
252+Cc: qemu-stable@nongnu.org
253+Message-Id: <20190111113657.66195-3-frankja@linux.ibm.com>
254+Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
255+Reviewed-by: David Hildenbrand <david@redhat.com>
256+Signed-off-by: Cornelia Huck <cohuck@redhat.com>
257+
258+Origin: upstream, https://git.qemu.org/?p=qemu.git;a=commit;h=37dbd1f4d4805edcd18d94eb202bb3461b3cd52d
259+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1812384
260+Last-Update: 2018-01-31
261+
262+---
263+ target/s390x/diag.c | 2 +-
264+ 1 file changed, 1 insertion(+), 1 deletion(-)
265+
266+diff --git a/target/s390x/diag.c b/target/s390x/diag.c
267+index acb0f3d4af..aafa740f61 100644
268+--- a/target/s390x/diag.c
269++++ b/target/s390x/diag.c
270+@@ -130,7 +130,7 @@ out:
271+ }
272+ return;
273+ default:
274+- hw_error("Unhandled diag308 subcode %" PRIx64, subcode);
275++ s390_program_interrupt(env, PGM_SPECIFICATION, ILEN_AUTO, ra);
276+ break;
277+ }
278+ }
279+--
280+2.17.1
281+

Subscribers

People subscribed via source and target branches