diff --git a/.gitignore b/.gitignore index ba6025e..ad21a5a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /qemu-5.0.0.tar.xz /qemu-5.1.0.tar.xz /qemu-5.2.0-rc1.tar.xz +/qemu-5.2.0-rc3.tar.xz diff --git a/0001-redhat-Adding-slirp-to-the-exploded-tree.patch b/0001-redhat-Adding-slirp-to-the-exploded-tree.patch index 5293bb8..f942236 100644 --- a/0001-redhat-Adding-slirp-to-the-exploded-tree.patch +++ b/0001-redhat-Adding-slirp-to-the-exploded-tree.patch @@ -1,4 +1,4 @@ -From bd38ad15dd837dd3baa136334f667d8d63850ae0 Mon Sep 17 00:00:00 2001 +From 03c528f8dd064ee0ac40bd37f686cd5616071fdf Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Wed, 29 Jul 2020 07:48:57 +0200 Subject: redhat: Adding slirp to the exploded tree diff --git a/0005-Initial-redhat-build.patch b/0005-Initial-redhat-build.patch index 346e59a..6b55be8 100644 --- a/0005-Initial-redhat-build.patch +++ b/0005-Initial-redhat-build.patch @@ -1,4 +1,4 @@ -From 788398591901ece77695d73db0e392ce2c357636 Mon Sep 17 00:00:00 2001 +From b3ec5c5cc8ed777c5c2cd1bd27f6684a99317953 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 12 Oct 2018 07:31:11 +0200 Subject: Initial redhat build @@ -11,7 +11,7 @@ several issues are fixed in QEMU tree: - Man page renamed from qemu to qemu-kvm - man page is installed using make install so we have to fix it in qemu tree -This rebase includes changes up to qemu-kvm-5.1.0-14.el8 +This rebase includes changes up to qemu-kvm-5.1.0-15.el8 Rebase notes (3.1.0): - added new configure options @@ -81,6 +81,14 @@ Rebase notes (5.2.0 rc0): - Fix in directory used for docs (upstream add %name so we do not pass it in configure) - Package various .so as part of qemu-kvm-core package. +Rebase notes (5.2.0 rc2): +- Added fix for dtrace build on RHEL 8.4.0 + +Rebase notes (5.2.0 rc3): +- Added man page for qemu-pr-helper +- Added new configure options +- Update qemu-kiwi patches to v4 + Merged patches (3.1.0): - 01f0c9f RHEL8: Add disable configure options to qemu spec file - Spec file cleanups @@ -116,24 +124,34 @@ Merged patches (5.2.0 rc0): - fd62478 disable virgl - 0205018 redhat: link /etc/qemu-ga/fsfreeze-hook to /etc/qemu-kvm/ - 3645097 redhat: Make all generated so files executable (not only block-*) + +Merged patches (5.2.0 rc2): +- pjw 99657 redhat: introduces disable_everything macro into the configure call +- pjw 99659 redhat: scripts/extract_build_cmd.py - Avoid listing empty lines +- pjw 99658 redhat: Fixing rh-local build +- pjw 99660 redhat: Add qemu-kiwi subpackage +- d2e59ce redhat: add (un/pre)install systemd hooks for qemu-ga + +Merged patches (5.2.0 rc3): +- pjw 99887 - redhat: allow Makefile rh-prep builddep to fail +- pjw 99885 - redhat: adding rh-rpm target --- .gitignore | 1 + README.systemtap | 43 + - crypto/meson.build | 1 - hw/s390x/s390-pci-vfio.c | 4 +- - meson.build | 10 +- + meson.build | 4 +- redhat/Makefile | 90 + redhat/Makefile.common | 53 + redhat/README.tests | 39 + - redhat/qemu-kvm.spec.template | 3170 +++++++++++++++++++++++++++++++ - redhat/scripts/extract_build_cmd.py | 2 +- + redhat/qemu-kvm.spec.template | 3409 +++++++++++++++++++++++++++++++ + redhat/scripts/extract_build_cmd.py | 5 +- redhat/scripts/process-patches.sh | 17 +- scripts/qemu-guest-agent/fsfreeze-hook | 2 +- scripts/systemtap/conf.d/qemu_kvm.conf | 4 + scripts/systemtap/script.d/qemu_kvm.stp | 1 + tests/check-block.sh | 2 + ui/vnc.c | 2 +- - 16 files changed, 3424 insertions(+), 17 deletions(-) + 15 files changed, 3660 insertions(+), 16 deletions(-) create mode 100644 README.systemtap create mode 100644 redhat/Makefile create mode 100644 redhat/Makefile.common @@ -191,20 +209,8 @@ index 0000000..ad913fc + +3. Translate the trace record to readable format. + # /usr/share/qemu-kvm/simpletrace.py --no-header /usr/share/qemu-kvm/trace-events /tmp/trace.log -diff --git a/crypto/meson.build b/crypto/meson.build -index 7f37b5d..e30efb8 100644 ---- a/crypto/meson.build -+++ b/crypto/meson.build -@@ -50,7 +50,6 @@ if 'CONFIG_GNUTLS' in config_host - crypto_ss.add(gnutls) - endif - -- - util_ss.add(files('aes.c')) - util_ss.add(files('init.c')) - diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c -index d5c7806..19f92eb 100644 +index 9296e1b..f70c5a8 100644 --- a/hw/s390x/s390-pci-vfio.c +++ b/hw/s390x/s390-pci-vfio.c @@ -28,7 +28,7 @@ @@ -226,21 +232,10 @@ index d5c7806..19f92eb 100644 uint32_t argsz; int fd; diff --git a/meson.build b/meson.build -index b473620..3636fb9 100644 +index 5062407..c1db9b8 100644 --- a/meson.build +++ b/meson.build -@@ -292,6 +292,10 @@ if 'CONFIG_GNUTLS' in config_host - gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(), - link_args: config_host['GNUTLS_LIBS'].split()) - endif -+gcrypt = not_found -+if 'CONFIG_GCRYPT' in config_host -+ gcrypt = dependency('libgcrypt') -+endif - pixman = not_found - if have_system or have_tools - pixman = dependency('pixman-1', required: have_system, version:'>=0.21.8', -@@ -1123,7 +1127,9 @@ if capstone_opt == 'internal' +@@ -1149,7 +1149,9 @@ if capstone_opt == 'internal' # Include all configuration defines via a header file, which will wind up # as a dependency on the object file, and thus changes here will result # in a rebuild. @@ -251,15 +246,6 @@ index b473620..3636fb9 100644 ] libcapstone = static_library('capstone', -@@ -1641,7 +1647,7 @@ libblock = static_library('block', block_ss.sources() + genh, - - block = declare_dependency(link_whole: [libblock], - link_args: '@block.syms', -- dependencies: [crypto, io]) -+ dependencies: [crypto, io, zlib]) - - blockdev_ss = blockdev_ss.apply(config_host, strict: false) - libblockdev = static_library('blockdev', blockdev_ss.sources() + genh, diff --git a/scripts/qemu-guest-agent/fsfreeze-hook b/scripts/qemu-guest-agent/fsfreeze-hook index 13aafd4..e9b84ec 100755 --- a/scripts/qemu-guest-agent/fsfreeze-hook diff --git a/0006-Enable-disable-devices-for-RHEL.patch b/0006-Enable-disable-devices-for-RHEL.patch index 86ecb27..50e42d5 100644 --- a/0006-Enable-disable-devices-for-RHEL.patch +++ b/0006-Enable-disable-devices-for-RHEL.patch @@ -1,4 +1,4 @@ -From 65eea220dcce6177b306eae08935f5354847bb08 Mon Sep 17 00:00:00 2001 +From 2ed436b54735a68c7f4422a8d6e5b4f3a7580fd3 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Wed, 2 Sep 2020 09:11:07 +0200 Subject: Enable/disable devices for RHEL @@ -106,14 +106,13 @@ Merged patches (5.2.0 rc0): hw/ppc/spapr_cpu_core.c | 2 + hw/usb/meson.build | 2 +- qemu-options.hx | 4 - - redhat/Makefile.common | 1 + - redhat/qemu-kvm.spec.template | 9 ++- + redhat/qemu-kvm.spec.template | 11 ++- target/arm/cpu.c | 4 +- target/arm/cpu_tcg.c | 3 + target/ppc/cpu-models.c | 10 +++ target/s390x/cpu_models.c | 3 + target/s390x/kvm.c | 8 ++ - 27 files changed, 273 insertions(+), 25 deletions(-) + 26 files changed, 274 insertions(+), 25 deletions(-) create mode 100644 default-configs/devices/aarch64-rh-devices.mak create mode 100644 default-configs/devices/ppc64-rh-devices.mak create mode 100644 default-configs/devices/rh-virtio.mak @@ -406,7 +405,7 @@ index 64b2ee2..b5de7e5 100644 + +include x86_64-rh-devices.mak diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c -index 95cb0f9..f9690a0 100644 +index 5ff4e01..ac45ca4 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -374,8 +374,8 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm) @@ -476,10 +475,10 @@ index 9e52fee..bb71c9f 100644 -specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c')) +#specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c')) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c -index 722b9e7..25de8b2 100644 +index fdca6ca..fa1a7ee 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c -@@ -2963,6 +2963,9 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp) +@@ -2945,6 +2945,9 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp) PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev); int16_t device_id = pc->device_id; @@ -526,7 +525,7 @@ index dde85ba..62cf60c 100644 static const TypeInfo i8042_info = { diff --git a/hw/net/e1000.c b/hw/net/e1000.c -index 83347cb..8fb83a1 100644 +index d7d05ae..aaea06d 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -1796,6 +1796,7 @@ static const E1000Info e1000_devices[] = { @@ -576,7 +575,7 @@ index 934e4fa..e3abba5 100644 endif diff --git a/qemu-options.hx b/qemu-options.hx -index 2c83390..53472fd 100644 +index 104632e..363a15b 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2251,10 +2251,6 @@ ERST @@ -620,7 +619,7 @@ index 0013e25..6540046 100644 arm_cpu_register(&arm_tcg_cpus[i]); } diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c -index 4ad1686..16b2185 100644 +index 87e4228..6eaa65e 100644 --- a/target/ppc/cpu-models.c +++ b/target/ppc/cpu-models.c @@ -66,6 +66,7 @@ @@ -704,10 +703,10 @@ index b5abff8..abe09d7 100644 /* detect missing features if any to properly report them */ diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c -index baa070f..10ce36a 100644 +index b8385e6..1839cc6 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c -@@ -2540,6 +2540,14 @@ void kvm_s390_apply_cpu_model(const S390CPUModel *model, Error **errp) +@@ -2552,6 +2552,14 @@ void kvm_s390_apply_cpu_model(const S390CPUModel *model, Error **errp) error_setg(errp, "KVM doesn't support CPU models"); return; } diff --git a/0007-Machine-type-related-general-changes.patch b/0007-Machine-type-related-general-changes.patch index 519cff2..a630ff8 100644 --- a/0007-Machine-type-related-general-changes.patch +++ b/0007-Machine-type-related-general-changes.patch @@ -1,4 +1,4 @@ -From 673234091c4073ebc31bf36559e249796772c8b5 Mon Sep 17 00:00:00 2001 +From c08267680d5cdede8c1b80591f294f8c0e8a2ddc Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 11 Jan 2019 09:54:45 +0100 Subject: Machine type related general changes @@ -69,7 +69,7 @@ Merged patches (5.2.0 rc0): 23 files changed, 400 insertions(+), 11 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c -index f9690a0..f6c6c6a 100644 +index ac45ca4..0b35b35 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -369,6 +369,18 @@ static void ich9_pm_set_enable_tco(Object *obj, bool value, Error **errp) @@ -102,7 +102,7 @@ index f9690a0..f6c6c6a 100644 &pm->disable_s3, OBJ_PROP_FLAG_READWRITE); object_property_add_uint8_ptr(obj, ACPI_PM_PROP_S4_DISABLED, diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c -index 67a1ea4..85312a3 100644 +index 669be5b..2063131 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -277,6 +277,7 @@ static const VMStateDescription vmstate_acpi = { @@ -193,7 +193,7 @@ index 97f7187..aeb207e 100644 } diff --git a/hw/core/machine.c b/hw/core/machine.c -index 98b87f7..8674586 100644 +index d040804..19d50dd 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -28,6 +28,219 @@ @@ -456,7 +456,7 @@ index a3f4959..f6c2ef4 100644 } diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c -index b6f1ae3..19955eb 100644 +index a8a77ec..6d39c1f 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -80,6 +80,11 @@ struct E1000EState { @@ -692,10 +692,10 @@ index 27ca237..eb24e39 100644 if (s->masterbus) { USBPort *ports[NB_PORTS]; diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c -index 79ce5c4..325cd02 100644 +index 9ce7ca7..0af661c 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c -@@ -3486,9 +3486,27 @@ static const VMStateDescription vmstate_xhci_slot = { +@@ -3491,9 +3491,27 @@ static const VMStateDescription vmstate_xhci_slot = { } }; @@ -723,7 +723,7 @@ index 79ce5c4..325cd02 100644 .fields = (VMStateField[]) { VMSTATE_UINT32(type, XHCIEvent), VMSTATE_UINT32(ccode, XHCIEvent), -@@ -3497,6 +3515,8 @@ static const VMStateDescription vmstate_xhci_event = { +@@ -3502,6 +3520,8 @@ static const VMStateDescription vmstate_xhci_event = { VMSTATE_UINT32(flags, XHCIEvent), VMSTATE_UINT8(slotid, XHCIEvent), VMSTATE_UINT8(epid, XHCIEvent), @@ -733,7 +733,7 @@ index 79ce5c4..325cd02 100644 } }; diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h -index ccf50ae..8716904 100644 +index 02ebd76..dfda04b 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -149,6 +149,8 @@ typedef struct XHCIEvent { @@ -746,7 +746,7 @@ index ccf50ae..8716904 100644 typedef struct XHCIInterrupter { diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h -index 28a5318..ff4a672 100644 +index 54571c7..b3369da 100644 --- a/include/hw/acpi/ich9.h +++ b/include/hw/acpi/ich9.h @@ -61,6 +61,9 @@ typedef struct ICH9LPCPMRegs { @@ -839,7 +839,7 @@ index a70a72e..78b9043 100644 + #endif diff --git a/migration/migration.c b/migration/migration.c -index 3263aa5..c8d54ac 100644 +index 87a9b59..1bb8d01 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -134,6 +134,8 @@ enum mig_rp_message_type { diff --git a/0008-Add-aarch64-machine-types.patch b/0008-Add-aarch64-machine-types.patch index 91f21e0..57b281c 100644 --- a/0008-Add-aarch64-machine-types.patch +++ b/0008-Add-aarch64-machine-types.patch @@ -1,4 +1,4 @@ -From be3ca54f04ade6a20265f9aeeb46662caa6d16dc Mon Sep 17 00:00:00 2001 +From 57f949e002928186b80562fe517e1d83464c24fd Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 19 Oct 2018 12:53:31 +0200 Subject: Add aarch64 machine types diff --git a/0009-Add-ppc64-machine-types.patch b/0009-Add-ppc64-machine-types.patch index b7c5e68..fd3fda5 100644 --- a/0009-Add-ppc64-machine-types.patch +++ b/0009-Add-ppc64-machine-types.patch @@ -1,4 +1,4 @@ -From d33e7e8c4d6e006d5039782d54f583ea3f242fd6 Mon Sep 17 00:00:00 2001 +From 965f17e40984c06f87be2dad8100f4742412cc05 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 19 Oct 2018 13:27:13 +0200 Subject: Add ppc64 machine types @@ -521,7 +521,7 @@ index 2e89e36..ba2d814 100644 char *kvm_type; char *host_model; diff --git a/target/ppc/compat.c b/target/ppc/compat.c -index e9bec5f..74e3db9 100644 +index 7949a24..f207a9b 100644 --- a/target/ppc/compat.c +++ b/target/ppc/compat.c @@ -114,8 +114,19 @@ static const CompatInfo *compat_by_pvr(uint32_t pvr) @@ -546,7 +546,7 @@ index e9bec5f..74e3db9 100644 const CompatInfo *compat = compat_by_pvr(compat_pvr); const CompatInfo *min = compat_by_pvr(min_compat_pvr); diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h -index 2eb41a2..d850521 100644 +index 2609e40..21c63b5 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1347,6 +1347,7 @@ static inline int cpu_mmu_index(CPUPPCState *env, bool ifetch) diff --git a/0010-Add-s390x-machine-types.patch b/0010-Add-s390x-machine-types.patch index 0b94070..9c1ea62 100644 --- a/0010-Add-s390x-machine-types.patch +++ b/0010-Add-s390x-machine-types.patch @@ -1,4 +1,4 @@ -From 79307dba97fef45adfbc03ab46db0460b27ceab9 Mon Sep 17 00:00:00 2001 +From 79dafd0d91aecadc163685311c220dc2d7a49add Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 19 Oct 2018 13:47:32 +0200 Subject: Add s390x machine types @@ -25,10 +25,10 @@ Merged patches (4.2.0): 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c -index 22222c4..68cea20 100644 +index 4e140bb..b8dde7e 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c -@@ -761,7 +761,7 @@ bool css_migration_enabled(void) +@@ -765,7 +765,7 @@ bool css_migration_enabled(void) { \ MachineClass *mc = MACHINE_CLASS(oc); \ ccw_machine_##suffix##_class_options(mc); \ @@ -37,7 +37,7 @@ index 22222c4..68cea20 100644 if (latest) { \ mc->alias = "s390-ccw-virtio"; \ mc->is_default = true; \ -@@ -785,6 +785,7 @@ bool css_migration_enabled(void) +@@ -789,6 +789,7 @@ bool css_migration_enabled(void) } \ type_init(ccw_machine_register_##suffix) @@ -45,7 +45,7 @@ index 22222c4..68cea20 100644 static void ccw_machine_5_2_instance_options(MachineState *machine) { } -@@ -1049,6 +1050,74 @@ static void ccw_machine_2_4_class_options(MachineClass *mc) +@@ -1053,6 +1054,74 @@ static void ccw_machine_2_4_class_options(MachineClass *mc) compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); } DEFINE_CCW_MACHINE(2_4, "2.4", false); diff --git a/0011-Add-x86_64-machine-types.patch b/0011-Add-x86_64-machine-types.patch index 2aff59c..74e6ccc 100644 --- a/0011-Add-x86_64-machine-types.patch +++ b/0011-Add-x86_64-machine-types.patch @@ -1,4 +1,4 @@ -From 4c6e7a672399b3962d904c2b01e8844544383d89 Mon Sep 17 00:00:00 2001 +From 3fb64e4127e2b74f0d93a51dd3709fe30adc1d23 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 19 Oct 2018 13:10:31 +0200 Subject: Add x86_64 machine types @@ -59,7 +59,7 @@ Merged patches (5.2.0 rc0): 8 files changed, 714 insertions(+), 7 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c -index 4f66642..78f50d4 100644 +index 1f5c211..b1082bd 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -217,6 +217,9 @@ static void acpi_get_pm_info(MachineState *machine, AcpiPmInfo *pm) @@ -896,7 +896,7 @@ index ae6bf1d..e2ba9a4 100644 * depending on QEMU versions up to QEMU 2.4. */ diff --git a/target/i386/cpu.c b/target/i386/cpu.c -index 0d86069..dd52fe5 100644 +index 5a8c960..dc592e9 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1803,7 +1803,7 @@ static X86CPUDefinition builtin_x86_defs[] = { @@ -917,10 +917,10 @@ index 0d86069..dd52fe5 100644 }; diff --git a/target/i386/kvm.c b/target/i386/kvm.c -index cf46259..4e58c09 100644 +index a2934dd..19bc39b 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c -@@ -3124,6 +3124,7 @@ static int kvm_get_msrs(X86CPU *cpu) +@@ -3126,6 +3126,7 @@ static int kvm_get_msrs(X86CPU *cpu) struct kvm_msr_entry *msrs = cpu->kvm_msr_buf->entries; int ret, i; uint64_t mtrr_top_bits; @@ -928,7 +928,7 @@ index cf46259..4e58c09 100644 kvm_msr_buf_reset(cpu); -@@ -3436,6 +3437,9 @@ static int kvm_get_msrs(X86CPU *cpu) +@@ -3438,6 +3439,9 @@ static int kvm_get_msrs(X86CPU *cpu) break; case MSR_KVM_ASYNC_PF_EN: env->async_pf_en_msr = msrs[i].data; diff --git a/0012-Enable-make-check.patch b/0012-Enable-make-check.patch index ae7c435..5e51706 100644 --- a/0012-Enable-make-check.patch +++ b/0012-Enable-make-check.patch @@ -1,4 +1,4 @@ -From 1170780d2fdd4cb8b663603c4d509d65b2e05846 Mon Sep 17 00:00:00 2001 +From 2621db7ae95fdf112a7e1798ae428a865ae55b59 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Wed, 2 Sep 2020 09:39:41 +0200 Subject: Enable make check @@ -36,8 +36,11 @@ Merged patches (4.0.0): Merged patches (4.1.0-rc0): - 41288ff redhat: Remove raw iotest 205 + +Conflicts: + redhat/qemu-kvm.spec.template --- - redhat/qemu-kvm.spec.template | 2 +- + redhat/qemu-kvm.spec.template | 4 ++-- tests/qemu-iotests/051 | 12 ++++++------ tests/qtest/boot-serial-test.c | 6 +++++- tests/qtest/cdrom-test.c | 2 ++ @@ -48,7 +51,7 @@ Merged patches (4.1.0-rc0): tests/qtest/prom-env-test.c | 4 ++++ tests/qtest/test-x86-cpuid-compat.c | 2 ++ tests/qtest/usb-hcd-xhci-test.c | 4 ++++ - 11 files changed, 34 insertions(+), 18 deletions(-) + 11 files changed, 35 insertions(+), 19 deletions(-) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index bee2607..61d25c4 100755 diff --git a/0013-vfio-cap-number-of-devices-that-can-be-assigned.patch b/0013-vfio-cap-number-of-devices-that-can-be-assigned.patch index d57621f..bbed9bb 100644 --- a/0013-vfio-cap-number-of-devices-that-can-be-assigned.patch +++ b/0013-vfio-cap-number-of-devices-that-can-be-assigned.patch @@ -1,4 +1,4 @@ -From 3bf885effef5666a13145e7942116ed9ba5039bb Mon Sep 17 00:00:00 2001 +From bb05135a744ae87847bcaf2344f826664dc9e19c Mon Sep 17 00:00:00 2001 From: Bandan Das Date: Tue, 3 Dec 2013 20:05:13 +0100 Subject: vfio: cap number of devices that can be assigned @@ -38,7 +38,7 @@ Merged patches (2.9.0): 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c -index 58c0ce8..558eea8 100644 +index 51dc373..06ce2a3 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -45,6 +45,9 @@ @@ -83,7 +83,7 @@ index 58c0ce8..558eea8 100644 if (!vdev->vbasedev.sysfsdev) { if (!(~vdev->host.domain || ~vdev->host.bus || ~vdev->host.slot || ~vdev->host.function)) { -@@ -3202,6 +3226,9 @@ static Property vfio_pci_dev_properties[] = { +@@ -3207,6 +3231,9 @@ static Property vfio_pci_dev_properties[] = { DEFINE_PROP_BOOL("x-no-kvm-msix", VFIOPCIDevice, no_kvm_msix, false), DEFINE_PROP_BOOL("x-no-geforce-quirks", VFIOPCIDevice, no_geforce_quirks, false), diff --git a/0014-Add-support-statement-to-help-output.patch b/0014-Add-support-statement-to-help-output.patch index d123653..0a9f748 100644 --- a/0014-Add-support-statement-to-help-output.patch +++ b/0014-Add-support-statement-to-help-output.patch @@ -1,4 +1,4 @@ -From 107ded716aa28243015b41940e660fe72dd4d3de Mon Sep 17 00:00:00 2001 +From a2490cc686e14979a82f176a76ca0f5ec22082ad Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 4 Dec 2013 18:53:17 +0100 Subject: Add support statement to -help output @@ -21,10 +21,10 @@ Signed-off-by: Eduardo Habkost 1 file changed, 9 insertions(+) diff --git a/softmmu/vl.c b/softmmu/vl.c -index a711644..f951684 100644 +index e6e0ad5..065d52e 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c -@@ -1687,9 +1687,17 @@ static void version(void) +@@ -1688,9 +1688,17 @@ static void version(void) QEMU_COPYRIGHT "\n"); } @@ -42,7 +42,7 @@ index a711644..f951684 100644 printf("usage: %s [options] [disk_image]\n\n" "'disk_image' is a raw hard disk image for IDE hard disk 0\n\n", error_get_progname()); -@@ -1706,6 +1714,7 @@ static void help(int exitcode) +@@ -1707,6 +1715,7 @@ static void help(int exitcode) "\n" QEMU_HELP_BOTTOM "\n"); diff --git a/0015-globally-limit-the-maximum-number-of-CPUs.patch b/0015-globally-limit-the-maximum-number-of-CPUs.patch index eed1259..6e4d4ce 100644 --- a/0015-globally-limit-the-maximum-number-of-CPUs.patch +++ b/0015-globally-limit-the-maximum-number-of-CPUs.patch @@ -1,4 +1,4 @@ -From e3883f9d6e74843fd14d44cdf2d36b35123347a3 Mon Sep 17 00:00:00 2001 +From b0baccfdfb10c34d9f9d35363e098dab7f376fe9 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 21 Jan 2014 10:46:52 +0100 Subject: globally limit the maximum number of CPUs @@ -38,7 +38,7 @@ Merged patches (5.2.0 rc0): 1 file changed, 12 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c -index 9ef5daf..4fab04d 100644 +index baaa542..a1fbda0 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2108,6 +2108,18 @@ static int kvm_init(MachineState *ms) diff --git a/0016-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch b/0016-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch index 96ac311..6ec42b2 100644 --- a/0016-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch +++ b/0016-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch @@ -1,4 +1,4 @@ -From 4f1d9fa771f3932ab14319a9df8cb37e1c9f7547 Mon Sep 17 00:00:00 2001 +From f72477389598ad4fee78640ec3a96166f00baf97 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Wed, 8 Jul 2020 08:35:50 +0200 Subject: Use qemu-kvm in documentation instead of qemu-system- @@ -125,7 +125,7 @@ index fb70445..0d9a783 100644 See also -------- diff --git a/docs/tools/virtiofsd.rst b/docs/tools/virtiofsd.rst -index 34a9e40..50fec10 100644 +index 866b7db..5b3be8a 100644 --- a/docs/tools/virtiofsd.rst +++ b/docs/tools/virtiofsd.rst @@ -297,7 +297,7 @@ Export ``/var/lib/fs/vm001/`` on vhost-user UNIX domain socket @@ -138,7 +138,7 @@ index 34a9e40..50fec10 100644 -device vhost-user-fs-pci,chardev=char0,tag=myfs \ -object memory-backend-memfd,id=mem,size=4G,share=on \ diff --git a/qemu-options.hx b/qemu-options.hx -index 53472fd..fde1a62 100644 +index 363a15b..5e5e265 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2935,11 +2935,11 @@ SRST diff --git a/0017-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch b/0017-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch index 95964c2..33a8125 100644 --- a/0017-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch +++ b/0017-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch @@ -1,4 +1,4 @@ -From b8b6ddabd9482c454a68fabe51660fda6a13b0b4 Mon Sep 17 00:00:00 2001 +From 21a45442631721270ff6aba4635e2b72ac2cb248 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Wed, 14 Jun 2017 15:37:01 +0200 Subject: virtio-scsi: Reject scsi-cd if data plane enabled [RHEL only] diff --git a/0018-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch b/0018-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch index 7e3c2b6..6f60d45 100644 --- a/0018-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch +++ b/0018-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch @@ -1,4 +1,4 @@ -From 90dad3577e6873e23eb99c1b55c9e1f8fe0e1e16 Mon Sep 17 00:00:00 2001 +From f0561c2a8caa9080f2849b5679816e2268ee420d Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 6 Feb 2019 03:58:56 +0000 Subject: BZ1653590: Require at least 64kiB pages for downstream guests & hosts diff --git a/0019-block-Versioned-x-blockdev-reopen-API-with-feature-f.patch b/0019-block-Versioned-x-blockdev-reopen-API-with-feature-f.patch index f768d26..7a6e1fe 100644 --- a/0019-block-Versioned-x-blockdev-reopen-API-with-feature-f.patch +++ b/0019-block-Versioned-x-blockdev-reopen-API-with-feature-f.patch @@ -1,4 +1,4 @@ -From 35b0411d0de4e3e8ef4fb4cef9ee2e8f8ef836e6 Mon Sep 17 00:00:00 2001 +From 37e71d91a69d0437d6f181b757a702910c25c21f Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 13 Mar 2020 12:34:32 +0000 Subject: block: Versioned x-blockdev-reopen API with feature flag diff --git a/0020-Build-RHEL-9.patch b/0020-Build-RHEL-9.patch new file mode 100644 index 0000000..e815d00 --- /dev/null +++ b/0020-Build-RHEL-9.patch @@ -0,0 +1,62 @@ +From 1a0497bf6405db1e9ee07db40d90309566bb9f25 Mon Sep 17 00:00:00 2001 +From: Miroslav Rezanina +Date: Thu, 26 Nov 2020 08:26:34 +0100 +Subject: Build RHEL 9 + +--- + migration/qemu-file.c | 2 +- + qobject/block-qdict.c | 2 +- + redhat/Makefile.common | 3 ++- + redhat/qemu-kvm.spec.template | 12 ------------ + tests/meson.build | 4 ++-- + 5 files changed, 6 insertions(+), 17 deletions(-) + +diff --git a/migration/qemu-file.c b/migration/qemu-file.c +index be21518..d6e03db 100644 +--- a/migration/qemu-file.c ++++ b/migration/qemu-file.c +@@ -595,7 +595,7 @@ size_t qemu_get_buffer_in_place(QEMUFile *f, uint8_t **buf, size_t size) + { + if (size < IO_BUF_SIZE) { + size_t res; +- uint8_t *src; ++ uint8_t *src = NULL; + + res = qemu_peek_buffer(f, &src, size, 0); + +diff --git a/qobject/block-qdict.c b/qobject/block-qdict.c +index 1487cc5..b265244 100644 +--- a/qobject/block-qdict.c ++++ b/qobject/block-qdict.c +@@ -224,7 +224,7 @@ void qdict_array_split(QDict *src, QList **dst) + for (i = 0; i < UINT_MAX; i++) { + QObject *subqobj; + bool is_subqdict; +- QDict *subqdict; ++ QDict *subqdict = NULL; + char indexstr[32], prefix[32]; + size_t snprintf_ret; + +diff --git a/tests/meson.build b/tests/meson.build +index afeb6be..52aeaf4 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -136,7 +136,7 @@ if have_block + 'test-blockjob': [testblock], + 'test-blockjob-txn': [testblock], + 'test-block-backend': [testblock], +- 'test-block-iothread': [testblock], ++# 'test-block-iothread': [testblock], + 'test-write-threshold': [testblock], + 'test-crypto-hash': [crypto], + 'test-crypto-hmac': [crypto], +@@ -286,5 +286,5 @@ if not get_option('tcg').disabled() + endif + + subdir('qapi-schema') +-subdir('qtest') ++#subdir('qtest') + subdir('migration') +-- +1.8.3.1 + diff --git a/0020-Upstream.patch b/0020-Upstream.patch deleted file mode 100644 index f7ca399..0000000 --- a/0020-Upstream.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 36ad7c726f12e4b706eebc7bac185cd91646dbc3 Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Wed, 11 Nov 2020 15:41:44 +0100 -Subject: Upstream - ---- - default-configs/devices/aarch64-rh-devices.mak | 1 - - hw/arm/Kconfig | 1 + - 2 files changed, 1 insertion(+), 1 deletion(-) - -diff --git a/default-configs/devices/aarch64-rh-devices.mak b/default-configs/devices/aarch64-rh-devices.mak -index 9831940..d289f34 100644 ---- a/default-configs/devices/aarch64-rh-devices.mak -+++ b/default-configs/devices/aarch64-rh-devices.mak -@@ -1,7 +1,6 @@ - include rh-virtio.mak - - CONFIG_ARM_GIC_KVM=y --CONFIG_ARM_GIC=y - CONFIG_ARM_SMMUV3=y - CONFIG_ARM_V7M=y - CONFIG_ARM_VIRT=y -diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig -index 7d022ee..e69a900 100644 ---- a/hw/arm/Kconfig -+++ b/hw/arm/Kconfig -@@ -6,6 +6,7 @@ config ARM_VIRT - imply VFIO_PLATFORM - imply VFIO_XGMAC - imply TPM_TIS_SYSBUS -+ select ARM_GIC - select ACPI - select ARM_SMMUV3 - select GPIO_KEY --- -1.8.3.1 - diff --git a/0021-RHEL-9-test.patch b/0021-RHEL-9-test.patch deleted file mode 100644 index 611078f..0000000 --- a/0021-RHEL-9-test.patch +++ /dev/null @@ -1,33 +0,0 @@ -From c7b7fffb5ad743115dac8918200a848513acbd4e Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Fri, 13 Nov 2020 11:03:26 +0100 -Subject: RHEL 9 test - ---- - redhat/Makefile.common | 4 ++-- - redhat/qemu-kvm.spec.template | 8 -------- - tests/meson.build | 3 +-- - 3 files changed, 3 insertions(+), 12 deletions(-) - -diff --git a/tests/meson.build b/tests/meson.build -index afeb6be..2180fc4 100644 ---- a/tests/meson.build -+++ b/tests/meson.build -@@ -136,7 +136,7 @@ if have_block - 'test-blockjob': [testblock], - 'test-blockjob-txn': [testblock], - 'test-block-backend': [testblock], -- 'test-block-iothread': [testblock], -+# 'test-block-iothread': [testblock], - 'test-write-threshold': [testblock], - 'test-crypto-hash': [crypto], - 'test-crypto-hmac': [crypto], -@@ -286,5 +286,4 @@ if not get_option('tcg').disabled() - endif - - subdir('qapi-schema') --subdir('qtest') - subdir('migration') --- -1.8.3.1 - diff --git a/qemu-kvm.spec b/qemu-kvm.spec index 929d4cd..4ce97ec 100644 --- a/qemu-kvm.spec +++ b/qemu-kvm.spec @@ -8,7 +8,7 @@ %global have_gluster 1 %global have_kvm_setup 0 %global have_memlock_limits 0 -%global rcversion -rc1 +%global rcversion -rc3 %ifnarch %{ix86} x86_64 @@ -61,12 +61,10 @@ Requires: %{name}-block-iscsi = %{epoch}:%{version}-%{release} \ Requires: %{name}-block-rbd = %{epoch}:%{version}-%{release} \ Requires: %{name}-block-ssh = %{epoch}:%{version}-%{release} -# Macro to properly setup RHEL/RHEV conflict handling - Summary: QEMU is a machine emulator and virtualizer Name: qemu-kvm Version: 5.2.0 -Release: rc1.1%{?dist} +Release: rc3.1%{?dist} # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped Epoch: 15 License: GPLv2 and GPLv2+ and CC-BY @@ -74,7 +72,8 @@ Group: Development/Tools URL: http://www.qemu.org/ ExclusiveArch: x86_64 %{power64} aarch64 s390x -Source0: http://wiki.qemu.org/download/qemu-5.2.0-rc1.tar.xz + +Source0: http://wiki.qemu.org/download/qemu-5.2.0-rc3.tar.xz # KSM control scripts Source4: ksm.service @@ -118,8 +117,7 @@ Patch0016: 0016-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch Patch0017: 0017-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch Patch0018: 0018-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch Patch0019: 0019-block-Versioned-x-blockdev-reopen-API-with-feature-f.patch -Patch0020: 0020-Upstream.patch -Patch0021: 0021-RHEL-9-test.patch +Patch0020: 0020-Build-RHEL-9.patch BuildRequires: wget BuildRequires: rpm-build @@ -247,24 +245,19 @@ hardware for a full system such as a PC and its associated peripherals. %package -n qemu-kvm-core Summary: qemu-kvm core components +Requires: %{name}-common = %{epoch}:%{version}-%{release} Requires: qemu-img = %{epoch}:%{version}-%{release} +Conflicts: qemu-kiwi %ifarch %{ix86} x86_64 -Requires: seabios-bin >= 1.10.2-1 -Requires: sgabios-bin Requires: edk2-ovmf %endif %ifarch aarch64 Requires: edk2-aarch64 %endif -%ifnarch aarch64 s390x -Requires: seavgabios-bin >= 1.12.0-3 -Requires: ipxe-roms-qemu >= 20170123-1 -%endif %ifarch %{power64} Requires: SLOF >= %{SLOF_gittagdate}-1.git%{SLOF_gittagcommit} %endif -Requires: %{name}-common = %{epoch}:%{version}-%{release} Requires: libseccomp >= 2.4.0 # For compressed guest memory dumps Requires: lzo snappy @@ -283,19 +276,25 @@ Requires: usbredir >= 0.7.1 Requires: libfdt >= 1.6.0 %endif - %description -n qemu-kvm-core qemu-kvm is an open source virtualizer that provides hardware emulation for the KVM hypervisor. qemu-kvm acts as a virtual machine monitor together with the KVM kernel modules, and emulates the hardware for a full system such as a PC and its associated peripherals. +%package -n qemu-kiwi +Summary: qemu-kiwi components +Requires: qemu-kvm-common = %{epoch}:%{version}-%{release} + +%description -n qemu-kiwi +qemu-kiwi is a version of qemu-kvm with a restricted set of features +intended for use by specific applications. +It's experimental and unsupported. %package -n qemu-img Summary: QEMU command line tool for manipulating disk images Group: Development/Tools - %description -n qemu-img This package provides a command line tool for manipulating disk images. @@ -308,7 +307,14 @@ Requires(post): /usr/sbin/useradd Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units - +%ifarch %{ix86} x86_64 +Requires: seabios-bin >= 1.10.2-1 +Requires: sgabios-bin +%endif +%ifnarch aarch64 s390x +Requires: seavgabios-bin >= 1.12.0-3 +Requires: ipxe-roms-qemu >= 20170123-1 +%endif %description -n qemu-kvm-common qemu-kvm is an open source virtualizer that provides hardware emulation for @@ -405,7 +411,22 @@ the Secure Shell (SSH) protocol. rm -fr slirp mkdir slirp %autopatch -p1 -mkdir qemu-kvm-build + +%global qemu_kvm_build qemu_kvm_build +%global qemu_kiwi_build qemu_kiwi_src/build + +# XXX: ugly hack to copy source tree into a new folder. +# it allows to build qemu-kiwi without touching the original source tree. +# This is required as the build isolation is not 100% as we also have to +# change the source tree when building qemu-kiwi. And, when we do that, +# calling "make check" on qemu-kvm see that change and behaves baddly. +# Newer version of qemu allow us to create a better sollution, and this +# hack can be dropped. +cp -fpr . ../qemu_kiwi_src +mv ../qemu_kiwi_src ./qemu_kiwi_src +mkdir -p %{qemu_kiwi_build} +mkdir -p %{qemu_kvm_build} + %build %global buildarch %{kvm_target}-softmmu @@ -420,7 +441,121 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id" %endif -cd qemu-kvm-build +%define disable_everything \\\ + --disable-attr \\\ + --disable-auth-pam \\\ + --disable-avx2 \\\ + --disable-avx512f \\\ + --disable-bochs \\\ + --disable-brlapi \\\ + --disable-bsd-user \\\ + --disable-bzip2 \\\ + --disable-cap-ng \\\ + --disable-capstone \\\ + --disable-cloop \\\ + --disable-cocoa \\\ + --disable-coroutine-pool \\\ + --disable-crypto-afalg \\\ + --disable-curl \\\ + --disable-curses \\\ + --disable-debug-info \\\ + --disable-debug-mutex \\\ + --disable-debug-tcg \\\ + --disable-dmg \\\ + --disable-docs \\\ + --disable-fdt \\\ + --disable-gcrypt \\\ + --disable-git-update \\\ + --disable-glusterfs \\\ + --disable-gnutls \\\ + --disable-gtk \\\ + --disable-guest-agent \\\ + --disable-guest-agent-msi \\\ + --disable-hax \\\ + --disable-hvf \\\ + --disable-iconv \\\ + --disable-jemalloc \\\ + --disable-kvm \\\ + --disable-libdaxctl \\\ + --disable-libiscsi \\\ + --disable-libnfs \\\ + --disable-libpmem \\\ + --disable-libssh \\\ + --disable-libudev \\\ + --disable-libusb \\\ + --disable-libxml2 \\\ + --disable-linux-aio \\\ + --disable-linux-io-uring \\\ + --disable-linux-user \\\ + --disable-live-block-migration \\\ + --disable-lzfse \\\ + --disable-lzo \\\ + --disable-malloc-trim \\\ + --disable-membarrier \\\ + --disable-modules \\\ + --disable-module-upgrades \\\ + --disable-mpath \\\ + --disable-netmap \\\ + --disable-nettle \\\ + --disable-numa \\\ + --disable-opengl \\\ + --disable-parallels \\\ + --disable-pie \\\ + --disable-pvrdma \\\ + --disable-qcow1 \\\ + --disable-qed \\\ + --disable-qom-cast-debug \\\ + --disable-rbd \\\ + --disable-rdma \\\ + --disable-replication \\\ + --disable-rng-none \\\ + --disable-safe-stack \\\ + --disable-sanitizers \\\ + --disable-sdl \\\ + --disable-sdl-image \\\ + --disable-seccomp \\\ + --disable-sheepdog \\\ + --disable-smartcard \\\ + --disable-snappy \\\ + --disable-sparse \\\ + --disable-spice \\\ + --disable-strip \\\ + --disable-system \\\ + --disable-tcg \\\ + --disable-tcmalloc \\\ + --disable-tools \\\ + --disable-tpm \\\ + --disable-u2f \\\ + --disable-usb-redir \\\ + --disable-user \\\ + --disable-vde \\\ + --disable-vdi \\\ + --disable-vhost-crypto \\\ + --disable-vhost-kernel \\\ + --disable-vhost-net \\\ + --disable-vhost-scsi \\\ + --disable-vhost-user \\\ + --disable-vhost-user-blk-server \\\ + --disable-vhost-vdpa \\\ + --disable-vhost-vsock \\\ + --disable-virglrenderer \\\ + --disable-virtfs \\\ + --disable-virtiofsd \\\ + --disable-vnc \\\ + --disable-vnc-jpeg \\\ + --disable-vnc-png \\\ + --disable-vnc-sasl \\\ + --disable-vte \\\ + --disable-vvfat \\\ + --disable-werror \\\ + --disable-whpx \\\ + --disable-xen \\\ + --disable-xen-pci-passthrough \\\ + --disable-xfsctl \\\ + --disable-xkbcommon \\\ + --disable-zstd + +pushd %{qemu_kvm_build} ../configure \ --prefix="%{_prefix}" \ --libdir="%{_libdir}" \ @@ -443,155 +578,84 @@ cd qemu-kvm-build --with-coroutine=ucontext \ --with-git=git \ --tls-priority=NORMAL \ + %{disable_everything} \ --enable-attr \ - --disable-auth-pam \ %ifarch %{ix86} x86_64 --enable-avx2 \ %else - --disable-avx2 \ %endif - --disable-avx512f \ - --disable-bochs \ - --disable-brlapi \ - --disable-bsd-user \ - --disable-bzip2 \ --enable-cap-ng \ --enable-capstone \ - --disable-cloop \ - --disable-cocoa \ --enable-coroutine-pool \ - --disable-crypto-afalg \ --enable-curl \ - --disable-curses \ --enable-debug-info \ - --disable-debug-mutex \ --disable-debug-tcg \ --disable-dmg \ --enable-docs \ %if 0%{have_fdt} --enable-fdt \ -%else - --disable-fdt \ - %endif +%endif --enable-gcrypt \ - --disable-git-update \ %if 0%{have_gluster} --enable-glusterfs \ -%else - --disable-glusterfs \ %endif --enable-gnutls \ - --disable-gtk \ --enable-guest-agent \ - --disable-guest-agent-msi \ - --disable-hax \ - --disable-hvf \ --enable-iconv \ - --disable-jemalloc \ --enable-kvm \ - --disable-libdaxctl \ --enable-libiscsi \ - --disable-libnfs \ %ifarch x86_64 --enable-libpmem \ -%else - --disable-libpmem \ %endif --enable-libssh \ --enable-libusb \ - --disable-libxml2 \ + --enable-libudev \ --enable-linux-aio \ - --disable-linux-io-uring \ - --disable-linux-user \ - --disable-live-block-migration \ - --disable-lzfse \ --enable-lzo \ --enable-malloc-trim \ - --disable-membarrier \ --enable-modules \ - --disable-module-upgrades \ --enable-mpath \ - --disable-netmap \ - --disable-nettle \ %ifnarch s390x --enable-numa \ -%else - --disable-numa \ %endif %if 0%{have_opengl} --enable-opengl \ -%else - --disable-opengl \ %endif - --disable-parallels \ --enable-pie \ - --disable-pvrdma \ - --disable-qcow1 \ - --disable-qed \ - --disable-qom-cast-debug \ --enable-rbd \ %if 0%{have_librdma} --enable-rdma \ -%else - --disable-rdma \ %endif - --disable-rng-none \ - --disable-replication \ - --disable-safe-stack \ - --disable-sanitizers \ - --disable-sdl \ - --disable-sdl-image \ --enable-seccomp \ - --disable-sheepdog \ --enable-snappy \ - --disable-sparse \ %if 0%{have_spice} --enable-smartcard \ --enable-spice \ -%else - --disable-smartcard \ - --disable-spice \ %endif - --disable-strip \ --enable-system \ --enable-tcg \ - --disable-tcmalloc \ --enable-tools \ --enable-tpm \ --enable-trace-backend=dtrace \ %if 0%{have_usbredir} --enable-usb-redir \ -%else - --disable-usb-redir \ %endif - --disable-user \ - --disable-vde \ - --disable-vdi \ - --disable-vhost-crypto \ + --enable-virtiofsd \ --enable-vhost-kernel \ --enable-vhost-net \ - --disable-vhost-scsi \ --enable-vhost-user \ + --enable-vhost-user-blk-server \ --enable-vhost-vdpa \ --enable-vhost-vsock \ - --disable-virglrenderer \ - --disable-virtfs \ --enable-vnc \ - --disable-vnc-jpeg \ --enable-vnc-png \ --enable-vnc-sasl \ - --disable-vte \ - --disable-vvfat \ --enable-werror \ - --disable-whpx \ - --disable-xen \ - --disable-xen-pci-passthrough \ - --disable-xfsctl \ --enable-xkbcommon \ --disable-zstd \ --without-default-devices -echo "config-host.mak contents:" +echo "qemu-kvm config-host.mak contents:" echo "===" cat config-host.mak echo "===" @@ -616,8 +680,97 @@ cp -a %{kvm_target}-softmmu/qemu-system-%{kvm_target} qemu-kvm gcc %{SOURCE6} $RPM_OPT_FLAGS $RPM_LD_FLAGS -o ksmctl gcc %{SOURCE35} $RPM_OPT_FLAGS $RPM_LD_FLAGS -o udev-kvm-check +popd +echo "Starting qemu-kiwi build" + +pushd %{qemu_kiwi_build} +# XXX: removing QXL and CONFIG_TPM.* mak configuration, +# which causes problem with the config options used by qemu-kiwi. +# Ideally we should be able to do this at configure time. +find ../default-configs -name "*-rh-devices.mak" \ + -exec sed -i '/CONFIG_QXL=/d' {} \; +find ../default-configs -name "*-rh-devices.mak" \ + -exec sed -i '/CONFIG_TPM.*=/d' {} \; + +../configure \ + --prefix="%{_prefix}" \ + --libdir="%{_libdir}" \ + --sysconfdir="%{_sysconfdir}" \ + --interp-prefix=%{_prefix}/qemu-%M \ + --localstatedir="%{_localstatedir}" \ + --libexecdir="%{_libexecdir}" \ + --extra-ldflags="-Wl,--build-id -Wl,-z,relro -Wl,-z,now" \ + --extra-cflags="%{optflags}" \ + --with-pkgversion="%{name}-%{version}-%{release}" \ + --firmwarepath=%{_prefix}/share/qemu-firmware \ + --python=%{__python3} \ + --target-list="%{buildarch}" \ + --block-drv-rw-whitelist=%{block_drivers_list} \ + --audio-drv-list= \ + --block-drv-ro-whitelist=vmdk,vhdx,vpc,https,ssh \ + --with-coroutine=ucontext \ + --with-git=git \ + --tls-priority=NORMAL \ + %{disable_everything} \ + --enable-attr \ +%ifarch %{ix86} x86_64 + --enable-avx2 \ +%endif + --enable-cap-ng \ + --enable-coroutine-pool \ + --enable-debug-info \ +%if 0%{have_fdt} + --enable-fdt \ +%endif + --enable-kvm \ +%ifarch x86_64 + --enable-libpmem \ +%endif + --enable-linux-aio \ + --enable-libudev \ + --enable-malloc-trim \ + --enable-mpath \ +%ifnarch s390x + --enable-numa \ +%endif + --enable-seccomp \ + --enable-system \ + --enable-tcg \ + --enable-trace-backend=dtrace \ + --enable-vhost-kernel \ + --enable-vhost-net \ + --enable-vhost-user \ + --enable-vhost-user-blk-server \ + --enable-vhost-vdpa \ + --enable-vhost-vsock \ + --enable-werror \ + --enable-xkbcommon \ + --without-default-devices + +echo "qemu-kiki config-host.mak contents:" +echo "===" +cat config-host.mak +echo "===" + +make V=1 %{?_smp_mflags} $buildldflags + +%{__python3} scripts/tracetool.py --backend dtrace --format stap \ + --group=all --binary %{_libexecdir}/qemu-kiwi --probe-prefix qemu.kvm \ + trace/trace-events-all > qemu-kiwi.stp + +%{__python3} scripts/tracetool.py --backends=dtrace --format=log-stap \ + --group=all --binary %{_libexecdir}/qemu-kiwi --probe-prefix qemu.kvm \ + trace/trace-events-all > qemu-kiwi-log.stp + +%{__python3} scripts/tracetool.py --backend dtrace --format simpletrace-stap \ + --group=all --binary %{_libexecdir}/qemu-kiwi --probe-prefix qemu.kvm \ + trace/trace-events-all > qemu-kiwi-simpletrace.stp + +cp -a %{kvm_target}-softmmu/qemu-system-%{kvm_target} qemu-kiwi +popd + %install -cd qemu-kvm-build +pushd %{qemu_kvm_build} %define _udevdir %(pkg-config --variable=udevdir udev) %define _udevrulesdir %{_udevdir}/rules.d @@ -722,6 +875,7 @@ install -c -m 0644 scripts/systemtap/script.d/qemu_kvm.stp "$RPM_BUILD_ROOT%{_da install -d -m 0755 "$RPM_BUILD_ROOT%{_datadir}/%{name}/systemtap/conf.d" install -c -m 0644 scripts/systemtap/conf.d/qemu_kvm.conf "$RPM_BUILD_ROOT%{_datadir}/%{name}/systemtap/conf.d/" + rm $RPM_BUILD_ROOT/%{_datadir}/applications/qemu.desktop rm $RPM_BUILD_ROOT%{_bindir}/qemu-system-%{kvm_target} rm $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/qemu-system-%{kvm_target}.stp @@ -904,11 +1058,50 @@ rm -rf $RPM_BUILD_ROOT%{qemudocdir}/user/.buildinfo # Remove spec rm -rf $RPM_BUILD_ROOT%{qemudocdir}/specs -%check -cd qemu-kvm-build -export DIFF=diff; make check V=1 +popd -%post -n qemu-kvm-core +pushd %{qemu_kiwi_build} +install -m 0755 %{kvm_target}-softmmu/qemu-system-%{kvm_target} $RPM_BUILD_ROOT%{_libexecdir}/qemu-kiwi +install -m 0644 qemu-kiwi.stp $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/ +install -m 0644 qemu-kiwi-log.stp $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/ +install -m 0644 qemu-kiwi-simpletrace.stp $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/ +popd + +%check +pushd %{qemu_kvm_build} +echo "Testing qemu-kvm-build" +export DIFF=diff; make check V=1 +popd + +echo "Testing qemu-kiwi" +pushd %{qemu_kiwi_build} +export DIFF=diff; make check V=1 +popd + +%post -n qemu-kvm-common +%systemd_post ksm.service +%systemd_post ksmtuned.service + +getent group kvm >/dev/null || groupadd -g 36 -r kvm +getent group qemu >/dev/null || groupadd -g 107 -r qemu +getent passwd qemu >/dev/null || \ +useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ + -c "qemu user" qemu + +# load kvm modules now, so we can make sure no reboot is needed. +# If there's already a kvm module installed, we don't mess with it +%udev_rules_update +sh %{_sysconfdir}/sysconfig/modules/kvm.modules &> /dev/null || : + udevadm trigger --subsystem-match=misc --sysname-match=kvm --action=add || : +%if %{have_kvm_setup} + systemctl daemon-reload # Make sure it sees the new presets and unitfile + %systemd_post kvm-setup.service + if systemctl is-enabled kvm-setup.service > /dev/null; then + systemctl start kvm-setup.service + fi +%endif + +%post -n qemu-kiwi # load kvm modules now, so we can make sure no reboot is needed. # If there's already a kvm module installed, we don't mess with it %udev_rules_update @@ -923,28 +1116,28 @@ sh %{_sysconfdir}/sysconfig/modules/kvm.modules &> /dev/null || : %endif %if %{have_kvm_setup} -%preun -n qemu-kvm-core +%preun -n qemu-kiwi %systemd_preun kvm-setup.service %endif -%post -n qemu-kvm-common -%systemd_post ksm.service -%systemd_post ksmtuned.service - -getent group kvm >/dev/null || groupadd -g 36 -r kvm -getent group qemu >/dev/null || groupadd -g 107 -r qemu -getent passwd qemu >/dev/null || \ -useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ - -c "qemu user" qemu - %preun -n qemu-kvm-common %systemd_preun ksm.service %systemd_preun ksmtuned.service +%if %{have_kvm_setup} +%systemd_preun kvm-setup.service +%endif %postun -n qemu-kvm-common %systemd_postun_with_restart ksm.service %systemd_postun_with_restart ksmtuned.service +%post -n qemu-guest-agent +%systemd_post qemu-guest-agent.service +%preun -n qemu-guest-agent +%systemd_preun qemu-guest-agent.service +%postun -n qemu-guest-agent +%systemd_postun_with_restart qemu-guest-agent.service + %files # Deliberately empty @@ -972,6 +1165,7 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_unitdir}/qemu-pr-helper.service %{_unitdir}/qemu-pr-helper.socket %{_mandir}/man7/qemu-ga-ref.7* +%{_mandir}/man8/qemu-pr-helper.8* %{_mandir}/man1/virtiofsd.1* %dir %{_datadir}/%{name}/ @@ -999,8 +1193,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_datadir}/%{name}/tracetool/backend/*.py* %{_datadir}/%{name}/tracetool/format/*.py* -%files -n qemu-kvm-core -%defattr(-,root,root) %ifarch x86_64 %{_datadir}/%{name}/bios.bin %{_datadir}/%{name}/bios-256k.bin @@ -1035,13 +1227,7 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_datadir}/icons/* %{_datadir}/%{name}/linuxboot_dma.bin %{_datadir}/%{name}/dump-guest-memory.py* -%{_libexecdir}/qemu-kvm -%{_datadir}/systemtap/tapset/qemu-kvm.stp -%{_datadir}/systemtap/tapset/qemu-kvm-log.stp %{_datadir}/%{name}/trace-events-all -%{_datadir}/systemtap/tapset/qemu-kvm-simpletrace.stp -%{_datadir}/%{name}/systemtap/script.d/qemu_kvm.stp -%{_datadir}/%{name}/systemtap/conf.d/qemu_kvm.conf %if 0%{have_kvm_setup} %{_prefix}/lib/systemd/kvm-setup %{_unitdir}/kvm-setup.service @@ -1052,6 +1238,16 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %endif %{_libexecdir}/virtiofsd %{_datadir}/%{name}/vhost-user/50-qemu-virtiofsd.json + +%files -n qemu-kvm-core +%defattr(-,root,root) +%{_libexecdir}/qemu-kvm +%{_datadir}/systemtap/tapset/qemu-kvm.stp +%{_datadir}/systemtap/tapset/qemu-kvm-log.stp +%{_datadir}/systemtap/tapset/qemu-kvm-simpletrace.stp +%{_datadir}/%{name}/systemtap/script.d/qemu_kvm.stp +%{_datadir}/%{name}/systemtap/conf.d/qemu_kvm.conf + %if %{have_usbredir} %{_libdir}/qemu-kvm/hw-usb-redirect.so %endif @@ -1072,6 +1268,13 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_libdir}/qemu-kvm/ui-opengl.so %endif +%files -n qemu-kiwi +%defattr(-,root,root) +%{_libexecdir}/qemu-kiwi +%{_datadir}/systemtap/tapset/qemu-kiwi.stp +%{_datadir}/systemtap/tapset/qemu-kiwi-log.stp +%{_datadir}/systemtap/tapset/qemu-kiwi-simpletrace.stp + %files -n qemu-img %defattr(-,root,root) %{_bindir}/qemu-img @@ -1115,6 +1318,39 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Mon Nov 16 2020 Danilo Cesar Lemes de Paula - 5.1.0-15.el8 +- kvm-redhat-add-un-pre-install-systemd-hooks-for-qemu-ga.patch [bz#1882719] +- kvm-rcu-Implement-drain_call_rcu.patch [bz#1812399 bz#1866707] +- kvm-libqtest-Rename-qmp_assert_error_class-to-qmp_expect.patch [bz#1812399 bz#1866707] +- kvm-qtest-rename-qtest_qmp_receive-to-qtest_qmp_receive_.patch [bz#1812399 bz#1866707] +- kvm-qtest-Reintroduce-qtest_qmp_receive-with-QMP-event-b.patch [bz#1812399 bz#1866707] +- kvm-qtest-remove-qtest_qmp_receive_success.patch [bz#1812399 bz#1866707] +- kvm-device-plug-test-use-qtest_qmp-to-send-the-device_de.patch [bz#1812399 bz#1866707] +- kvm-qtest-switch-users-back-to-qtest_qmp_receive.patch [bz#1812399 bz#1866707] +- kvm-qtest-check-that-drives-are-really-appearing-and-dis.patch [bz#1812399 bz#1866707] +- kvm-qemu-iotests-qtest-rewrite-test-067-as-a-qtest.patch [bz#1812399 bz#1866707] +- kvm-qdev-add-check-if-address-free-callback-for-buses.patch [bz#1812399 bz#1866707] +- kvm-scsi-scsi_bus-switch-search-direction-in-scsi_device.patch [bz#1812399 bz#1866707] +- kvm-device_core-use-drain_call_rcu-in-in-qmp_device_add.patch [bz#1812399 bz#1866707] +- kvm-device-core-use-RCU-for-list-of-children-of-a-bus.patch [bz#1812399 bz#1866707] +- kvm-scsi-switch-to-bus-check_address.patch [bz#1812399 bz#1866707] +- kvm-device-core-use-atomic_set-on-.realized-property.patch [bz#1812399 bz#1866707] +- kvm-scsi-scsi-bus-scsi_device_find-don-t-return-unrealiz.patch [bz#1812399] +- kvm-scsi-scsi_bus-Add-scsi_device_get.patch [bz#1812399 bz#1866707] +- kvm-virtio-scsi-use-scsi_device_get.patch [bz#1812399 bz#1866707] +- kvm-scsi-scsi_bus-fix-races-in-REPORT-LUNS.patch [bz#1812399 bz#1866707] +- kvm-tests-migration-fix-memleak-in-wait_command-wait_com.patch [bz#1812399 bz#1866707] +- kvm-libqtest-fix-the-order-of-buffered-events.patch [bz#1812399 bz#1866707] +- kvm-libqtest-fix-memory-leak-in-the-qtest_qmp_event_ref.patch [bz#1812399 bz#1866707] +- kvm-iotests-add-filter_qmp_virtio_scsi-function.patch [bz#1812399 bz#1866707] +- kvm-iotests-rewrite-iotest-240-in-python.patch [bz#1812399 bz#1866707] +- Resolves: bz#1812399 + (Qemu crash when detach disk with cache="none" discard="ignore" io="native") +- Resolves: bz#1866707 + (qemu-kvm is crashing with error "scsi_target_emulate_report_luns: Assertion `i == n + 8' failed") +- Resolves: bz#1882719 + (qemu-ga service still active and can work after qemu-guest-agent been removed) + * Tue Oct 13 2020 Danilo Cesar Lemes de Paula - 5.1.0-14.el8_3 - kvm-virtiofsd-avoid-proc-self-fd-tempdir.patch [bz#1884276] - Resolves: bz#1884276 diff --git a/sources b/sources index 7c6eed4..235915c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qemu-5.2.0-rc1.tar.xz) = 5345c9e8811efe2c1bab92ecb846f267dc6ef2a67ac03a39547344dc810a13027ef7352c7209d528ec81108dbc1e5e9ca96da6f7306c682ad8f785f596fa4dde +SHA512 (qemu-5.2.0-rc3.tar.xz) = e3913388fd5f5b7e3564bdc10869e1b9a9bf1a569c11748aec391ae6d13ea99fad43f74c4d70202f69dce93dd8961072a0655f63a8d9bbe78dc2a7220bc32048