diff --git a/SOURCES/kvm-arm-fixes.patch b/SOURCES/kvm-arm-fixes.patch new file mode 100644 index 0000000..61d3dae --- /dev/null +++ b/SOURCES/kvm-arm-fixes.patch @@ -0,0 +1,74 @@ +diff -Naurwp a/default-configs/pci.mak b/default-configs/pci.mak +--- a/default-configs/pci.mak 2019-06-28 11:45:41.983632134 +0000 ++++ b/default-configs/pci.mak 2019-06-29 02:13:42.117191042 +0000 +@@ -15,7 +15,7 @@ CONFIG_USB_XHCI_NEC=y + CONFIG_AC97=y + CONFIG_HDA=y + #CONFIG_ES1370=y +-#CONFIG_LSI_SCSI_PCI=y ++CONFIG_LSI_SCSI_PCI=y + #CONFIG_VMW_PVSCSI_SCSI_PCI=y + #CONFIG_MEGASAS_SCSI_PCI=y + #CONFIG_MPTSAS_SCSI_PCI=y +diff -Naurwp a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs +--- a/hw/arm/Makefile.objs 2019-06-28 11:45:39.996700783 +0000 ++++ b/hw/arm/Makefile.objs 2019-06-28 12:41:01.139408649 +0000 +@@ -16,7 +16,7 @@ obj-$(CONFIG_STRONGARM) += collie.o + obj-$(CONFIG_VERSATILE) += vexpress.o versatilepb.o + obj-$(CONFIG_ZYNQ) += xilinx_zynq.o + +-#obj-$(CONFIG_ARM_V7M) += armv7m.o ++obj-$(CONFIG_ARM_V7M) += armv7m.o + obj-$(CONFIG_EXYNOS4) += exynos4210.o + obj-$(CONFIG_PXA2XX) += pxa2xx.o pxa2xx_gpio.o pxa2xx_pic.o + obj-$(CONFIG_DIGIC) += digic.o +diff -Naurwp a/hw/arm/nseries.c b/hw/arm/nseries.c +--- a/hw/arm/nseries.c 2018-04-24 16:30:46.000000000 +0000 ++++ b/hw/arm/nseries.c 2019-06-28 12:58:48.691559918 +0000 +@@ -786,6 +786,7 @@ static void n8x0_cbus_setup(struct n800_ + + static void n8x0_uart_setup(struct n800_s *s) + { ++#if 0 //Bluetooth Disabled + Chardev *radio = uart_hci_init(); + + qdev_connect_gpio_out(s->mpu->gpio, N8X0_BT_RESET_GPIO, +@@ -794,6 +795,7 @@ static void n8x0_uart_setup(struct n800_ + csrhci_pins_get(radio)[csrhci_pin_wakeup]); + + omap_uart_attach(s->mpu->uart[BT_UART], radio); ++#endif + } + + static void n8x0_usb_setup(struct n800_s *s) +diff -Naurwp a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c +--- a/hw/char/exynos4210_uart.c 2018-04-24 16:30:46.000000000 +0000 ++++ b/hw/char/exynos4210_uart.c 2019-06-28 12:07:13.338023334 +0000 +@@ -590,7 +590,7 @@ DeviceState *exynos4210_uart_create(hwad + SysBusDevice *bus; + + const char chr_name[] = "serial"; +- char label[ARRAY_SIZE(chr_name) + 1]; ++ char label[ARRAY_SIZE(chr_name) + 20]; + + dev = qdev_create(NULL, TYPE_EXYNOS4210_UART); + +diff -Naurwp a/hw/core/Makefile.objs b/hw/core/Makefile.objs +--- a/hw/core/Makefile.objs 2019-06-28 11:45:40.002700575 +0000 ++++ b/hw/core/Makefile.objs 2019-06-28 13:20:50.504941179 +0000 +@@ -16,11 +16,10 @@ common-obj-$(CONFIG_SOFTMMU) += machine. + common-obj-$(CONFIG_SOFTMMU) += loader.o + common-obj-$(CONFIG_FITLOADER) += loader-fit.o + common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o +-# Disabled in Red Hat Enterprise Linux +-# common-obj-$(CONFIG_SOFTMMU) += register.o +-# obj-$(CONFIG_SOFTMMU) += generic-loader.o +-# common-obj-$(CONFIG_SOFTMMU) += or-irq.o +-#common-obj-$(CONFIG_SOFTMMU) += split-irq.o ++common-obj-$(CONFIG_SOFTMMU) += register.o ++common-obj-$(CONFIG_SOFTMMU) += or-irq.o ++common-obj-$(CONFIG_SOFTMMU) += split-irq.o + common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o + ++obj-$(CONFIG_SOFTMMU) += generic-loader.o + obj-$(CONFIG_SOFTMMU) += null-machine.o diff --git a/SPECS/qemu-kvm.spec b/SPECS/qemu-kvm.spec index 90638d7..9d65816 100644 --- a/SPECS/qemu-kvm.spec +++ b/SPECS/qemu-kvm.spec @@ -13,7 +13,7 @@ %global have_usbredir 0 %endif -%ifnarch s390x +%ifnarch s390x %{arm} %global have_librdma 1 %else %global have_librdma 0 @@ -47,6 +47,10 @@ %global kvm_target aarch64 %global have_fdt 1 %endif +%ifarch %{arm} + %global kvm_target arm + %global have_fdt 1 +%endif #Versions of various parts: @@ -73,7 +77,7 @@ Epoch: 15 License: GPLv2 and GPLv2+ and CC-BY Group: Development/Tools URL: http://www.qemu.org/ -ExclusiveArch: x86_64 %{power64} aarch64 s390x +ExclusiveArch: x86_64 %{power64} aarch64 s390x %{arm} Source0: http://wiki.qemu.org/download/qemu-2.12.0.tar.xz @@ -104,6 +108,7 @@ Source35: udev-kvm-check.c Source36: README.tests +Source9999: kvm-arm-fixes.patch Patch0001: 0001-Initial-redhat-build.patch Patch0002: 0002-Enable-disable-devices-for-RHEL-7.patch @@ -1949,7 +1954,7 @@ BuildRequires: cpp # For compressed guest memory dumps BuildRequires: lzo-devel snappy-devel # For NUMA memory binding -%ifnarch s390x +%ifnarch s390x %{arm} BuildRequires: numactl-devel %endif BuildRequires: libgcrypt-devel @@ -2008,7 +2013,7 @@ Requires: edk2-ovmf Requires: edk2-aarch64 %endif -%ifnarch aarch64 s390x +%ifnarch aarch64 s390x %{arm} Requires: seavgabios-bin >= 1.10.2-1 Requires: ipxe-roms-qemu >= 20170123-1 %endif @@ -2157,6 +2162,10 @@ the Secure Shell (SSH) protocol. %setup -q -n qemu-%{version} %autopatch -p1 +%ifarch %{arm} +patch -p1 < %{SOURCE9999} +%endif + %build %global buildarch %{kvm_target}-softmmu @@ -2193,7 +2202,7 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id" --disable-glusterfs \ %endif --enable-guest-agent \ -%ifnarch s390x +%ifnarch s390x %{arm} --enable-numa \ %else --disable-numa \ @@ -2526,7 +2535,7 @@ pxe_link() { ln -s ../ipxe.efi/$2.rom %{buildroot}%{_datadir}/%{name}/efi-$1.rom } -%ifnarch aarch64 s390x +%ifnarch aarch64 s390x %{arm} pxe_link e1000 8086100e pxe_link ne2k_pci 10ec8029 pxe_link pcnet 10222000 @@ -2539,7 +2548,7 @@ rom_link() { ln -s $1 %{buildroot}%{_datadir}/%{name}/$2 } -%ifnarch aarch64 s390x +%ifnarch aarch64 s390x %{arm} rom_link ../seavgabios/vgabios-isavga.bin vgabios.bin rom_link ../seavgabios/vgabios-cirrus.bin vgabios-cirrus.bin rom_link ../seavgabios/vgabios-qxl.bin vgabios-qxl.bin @@ -2577,7 +2586,9 @@ find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f chmod +x $RPM_BUILD_ROOT%{_libdir}/qemu-kvm/block-*.so %check +%ifnarch %{arm} export DIFF=diff; make check V=1 +%endif %post -n qemu-kvm-core # load kvm modules now, so we can make sure no reboot is needed. @@ -2689,7 +2700,7 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_datadir}/%{name}/s390-ccw.img %{_datadir}/%{name}/s390-netboot.img %endif -%ifnarch aarch64 s390x +%ifnarch aarch64 s390x %{arm} %{_datadir}/%{name}/vgabios.bin %{_datadir}/%{name}/vgabios-cirrus.bin %{_datadir}/%{name}/vgabios-qxl.bin