Merge ~paelzer/ubuntu/+source/qemu:lp-1902654-broken-wily-type-GROOVY into ubuntu/+source/qemu:ubuntu/groovy-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: 61742143a2cfa8eafcb935442936e52ca4fabab9
Merge reported by: Christian Ehrhardt 
Merged at revision: 61742143a2cfa8eafcb935442936e52ca4fabab9
Proposed branch: ~paelzer/ubuntu/+source/qemu:lp-1902654-broken-wily-type-GROOVY
Merge into: ubuntu/+source/qemu:ubuntu/groovy-devel
Diff against target: 108 lines (+68/-4)
2 files modified
debian/changelog (+7/-0)
debian/patches/ubuntu/define-ubuntu-machine-types.patch (+61/-4)
Reviewer Review Type Date Requested Status
Lucas Kanashiro (community) Approve
Canonical Server Pending
Canonical Server packageset reviewers Pending
Review via email: mp+393489@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
Lucas Kanashiro (lucaskanashiro) wrote :

The comments I made to Hirsute's MP apply to this one as well.

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

To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/qemu
 * [new tag] upload/1%5.0-5ubuntu9.1 -> upload/1%5.0-5ubuntu9.1

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading qemu_5.0-5ubuntu9.1.dsc: done.
  Uploading qemu_5.0-5ubuntu9.1.debian.tar.xz: done.
  Uploading qemu_5.0-5ubuntu9.1_source.buildinfo: done.
  Uploading qemu_5.0-5ubuntu9.1_source.changes: done.
Successfully uploaded packages.

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 1d90fbf..d32902b 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+qemu (1:5.0-5ubuntu9.1) groovy; urgency=medium
7+
8+ * d/p/ubuntu/define-ubuntu-machine-types.patch: update to fix 15.04 wily
9+ machine type to match how it originally was released (LP: #1902654)
10+
11+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 09 Nov 2020 08:19:07 +0100
12+
13 qemu (1:5.0-5ubuntu9) groovy; urgency=medium
14
15 * d/p/u/usb-fix-setup_len-init-CVE-2020-14364.patch: sanity check usb
16diff --git a/debian/patches/ubuntu/define-ubuntu-machine-types.patch b/debian/patches/ubuntu/define-ubuntu-machine-types.patch
17index d236b4f..056fd12 100644
18--- a/debian/patches/ubuntu/define-ubuntu-machine-types.patch
19+++ b/debian/patches/ubuntu/define-ubuntu-machine-types.patch
20@@ -110,7 +110,7 @@ Forward-info: downstream decision
21 pcmc->default_cpu_version = 1;
22 }
23
24-@@ -975,3 +970,199 @@ static void xenfv_3_1_machine_options(Ma
25+@@ -975,3 +970,204 @@ static void xenfv_3_1_machine_options(Ma
26 DEFINE_PC_MACHINE(xenfv, "xenfv-3.1", pc_xen_hvm_init,
27 xenfv_3_1_machine_options);
28 #endif
29@@ -289,15 +289,20 @@ Forward-info: downstream decision
30 + * moving between those version references.
31 + * This introduces pc_i440fx_wily_machine_options which encapsulates the
32 + * old behavior as it was (this is the purpose of machine types).
33++ *
34++ * Further bug 1902654 identified issues due to the upstream rework of types
35++ * that made the wily type change some attributes in >=Eoan.
36++ * As we did in Bionic for 1829868 we need to use a 2_4/2_3 hybrid type to
37++ * match what was initially shipped.
38 + */
39 +static void pc_i440fx_wily_machine_options(MachineClass *m)
40 +{
41 + PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
42-+ pc_i440fx_2_4_machine_options(m);
43++ pc_i440fx_2_5_machine_options(m);
44 + m->hw_version = "2.4.0";
45 + pcmc->broken_reserved_end = true;
46-+ compat_props_add(m->compat_props, hw_compat_2_3, hw_compat_2_3_len);
47-+ compat_props_add(m->compat_props, pc_compat_2_3, pc_compat_2_3_len);
48++ compat_props_add(m->compat_props, hw_compat_2_4_wily, hw_compat_2_4_wily_len);
49++ compat_props_add(m->compat_props, pc_compat_2_4, pc_compat_2_4_len);
50 +}
51 +
52 +static void pc_wily_machine_options(MachineClass *m)
53@@ -682,3 +687,55 @@ Forward-info: downstream decision
54 extern GlobalProperty pc_compat_3_1[];
55 extern const size_t pc_compat_3_1_len;
56
57+--- a/hw/core/machine.c
58++++ b/hw/core/machine.c
59+@@ -153,17 +153,29 @@ GlobalProperty hw_compat_2_5[] = {
60+ };
61+ const size_t hw_compat_2_5_len = G_N_ELEMENTS(hw_compat_2_5);
62+
63++#define HW_COMPAT_2_4_DEFS \
64++ /* Optional because the 'scsi' property is Linux-only */ \
65++ { "virtio-blk-device", "scsi", "true", .optional = true }, \
66++ { "e1000", "extra_mac_registers", "off" }, \
67++ { "virtio-pci", "x-disable-pcie", "on" }, \
68++ { "virtio-pci", "migrate-extra", "off" }, \
69++ { "fw_cfg_mem", "dma_enabled", "off" }, \
70++ { "fw_cfg_io", "dma_enabled", "off" }, \
71++
72+ GlobalProperty hw_compat_2_4[] = {
73+- /* Optional because the 'scsi' property is Linux-only */
74+- { "virtio-blk-device", "scsi", "true", .optional = true },
75+- { "e1000", "extra_mac_registers", "off" },
76+- { "virtio-pci", "x-disable-pcie", "on" },
77+- { "virtio-pci", "migrate-extra", "off" },
78+- { "fw_cfg_mem", "dma_enabled", "off" },
79+- { "fw_cfg_io", "dma_enabled", "off" }
80++ HW_COMPAT_2_4_DEFS
81+ };
82+ const size_t hw_compat_2_4_len = G_N_ELEMENTS(hw_compat_2_4);
83+
84++// workaround for bug 1902654 / 1829868, see pc_i440fx_wily_machine_options in hw/i386/pc_piix.c
85++GlobalProperty hw_compat_2_4_wily[] = {
86++ HW_COMPAT_2_4_DEFS
87++ { "migration", "send-configuration", "off" },
88++ { "migration", "send-section-footer", "off" },
89++ { "migration", "store-global-state", "off" },
90++};
91++const size_t hw_compat_2_4_wily_len = G_N_ELEMENTS(hw_compat_2_4_wily);
92++
93+ GlobalProperty hw_compat_2_3[] = {
94+ { "virtio-blk-pci", "any_layout", "off" },
95+ { "virtio-balloon-pci", "any_layout", "off" },
96+--- a/include/hw/boards.h
97++++ b/include/hw/boards.h
98+@@ -360,6 +360,10 @@ extern const size_t hw_compat_2_5_len;
99+ extern GlobalProperty hw_compat_2_4[];
100+ extern const size_t hw_compat_2_4_len;
101+
102++// workaround for bug 1902654 / 1829868, see pc_i440fx_wily_machine_options in hw/i386/pc_piix.c
103++extern GlobalProperty hw_compat_2_4_wily[];
104++extern const size_t hw_compat_2_4_wily_len;
105++
106+ extern GlobalProperty hw_compat_2_3[];
107+ extern const size_t hw_compat_2_3_len;
108+

Subscribers

People subscribed via source and target branches