From 9e1e02c3d589a048a61e552e74e79bf5f44645f6 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Thu, 19 Sep 2024 14:25:34 +0200 Subject: [PATCH 1/7] vm: fix kernel build --- vagrant/ansible/roles/kvm/tasks/install_normal.yml | 4 ++++ vagrant/ansible/roles/kvm/tasks/main.yml | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/vagrant/ansible/roles/kvm/tasks/install_normal.yml b/vagrant/ansible/roles/kvm/tasks/install_normal.yml index dba81283..d55ad909 100644 --- a/vagrant/ansible/roles/kvm/tasks/install_normal.yml +++ b/vagrant/ansible/roles/kvm/tasks/install_normal.yml @@ -3,12 +3,16 @@ command: "make -j{{ ansible_processor_vcpus }} bzImage" args: chdir: "{{ root_dir }}/kvm" + environment: + EXTRA_CFLAGS: "-Wno-error=use-after-free" become: false - name: build modules command: "make -j{{ ansible_processor_vcpus }} modules" args: chdir: "{{ root_dir }}/kvm" + environment: + EXTRA_CFLAGS: "-Wno-error=use-after-free" become: false - name: install modules diff --git a/vagrant/ansible/roles/kvm/tasks/main.yml b/vagrant/ansible/roles/kvm/tasks/main.yml index f8487ddd..14cc35cb 100644 --- a/vagrant/ansible/roles/kvm/tasks/main.yml +++ b/vagrant/ansible/roles/kvm/tasks/main.yml @@ -14,6 +14,7 @@ - bison - libelf-dev - libssl-dev + - pahole # because of Windows filesystem restrictions, the KVM repo cannot be checked out on Windows # it contains some files like @@ -56,12 +57,16 @@ # -> !TRANSPARENT_HUGEPAGE - { switch: "--disable", option: "TRANSPARENT_HUGEPAGE" } - { switch: "--enable", option: "REMOTE_MAPPING" } + # fix: arch/x86/entry/thunk_64.o: warning: objtool: missing symbol table + - { switch: "--enable", option: "PREEMPT" } + # fix: error: call to '__compiletime_assert_653' in drivers/net/ethernet/netronome/nfp/bpf/jit.c + - { switch: "--disable", option: "NET_VENDOR_NETRONOME" } - name: append -kvmi to kernel version string lineinfile: dest: "{{ root_dir }}/kvm/Makefile" - regexp: '^EXTRAVERSION =' - line: 'EXTRAVERSION = -kvmi' + regexp: "^EXTRAVERSION =" + line: "EXTRAVERSION = -kvmi" become: false - name: set default config to new options @@ -81,7 +86,7 @@ - name: set kvmi kernel as default lineinfile: dest: /etc/default/grub - regexp: '^GRUB_DEFAULT' + regexp: "^GRUB_DEFAULT" line: 'GRUB_DEFAULT="1>0"' - name: update GRUB configuration From 7ce524781871b3d5d45e8db899adf0e0dc1650e0 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Thu, 19 Sep 2024 14:27:49 +0200 Subject: [PATCH 2/7] kvm: add missing deps for libkvmi --- vagrant/ansible/roles/kvm/tasks/libkvmi.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vagrant/ansible/roles/kvm/tasks/libkvmi.yml b/vagrant/ansible/roles/kvm/tasks/libkvmi.yml index a2e207d9..ade9d5c5 100644 --- a/vagrant/ansible/roles/kvm/tasks/libkvmi.yml +++ b/vagrant/ansible/roles/kvm/tasks/libkvmi.yml @@ -4,6 +4,8 @@ name: "{{ item }}" with_items: - uuid-dev + - autoconf + - libtool - name: bootstrap libkvmi command: ./bootstrap From 731ea98e79f69d5a797ba4028e4da40bb6e9cfe1 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Thu, 19 Sep 2024 15:10:14 +0200 Subject: [PATCH 3/7] kvm: fix GRUB_DEFAULT --- vagrant/ansible/roles/kvm/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vagrant/ansible/roles/kvm/tasks/main.yml b/vagrant/ansible/roles/kvm/tasks/main.yml index 14cc35cb..04a1379e 100644 --- a/vagrant/ansible/roles/kvm/tasks/main.yml +++ b/vagrant/ansible/roles/kvm/tasks/main.yml @@ -87,7 +87,7 @@ lineinfile: dest: /etc/default/grub regexp: "^GRUB_DEFAULT" - line: 'GRUB_DEFAULT="1>0"' + line: 'GRUB_DEFAULT="1>6"' - name: update GRUB configuration command: update-grub From f656fbe4e325f13593812abdecad01659182663d Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Thu, 19 Sep 2024 16:12:25 +0200 Subject: [PATCH 4/7] vagrant: disable kvm self tests hang, 100% CPU --- vagrant/ansible/playbook_2.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vagrant/ansible/playbook_2.yml b/vagrant/ansible/playbook_2.yml index 03e01504..f91ff4a5 100644 --- a/vagrant/ansible/playbook_2.yml +++ b/vagrant/ansible/playbook_2.yml @@ -25,10 +25,10 @@ DEBUG: 1 become: false - - name: run kvm self-tests - command: ./tools/testing/selftests/kvm/x86_64/kvmi_test - args: - chdir: "{{ root_dir }}/kvm" + # - name: run kvm self-tests + # command: ./tools/testing/selftests/kvm/x86_64/kvmi_test + # args: + # chdir: "{{ root_dir }}/kvm" roles: - remote From aeb559393657556c3a08380e9b71c30dc2d8b6ee Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Thu, 19 Sep 2024 16:12:47 +0200 Subject: [PATCH 5/7] vagrant/libvmi: fix deps --- vagrant/ansible/roles/libvmi/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vagrant/ansible/roles/libvmi/tasks/main.yml b/vagrant/ansible/roles/libvmi/tasks/main.yml index 283ded73..6b91f7b8 100644 --- a/vagrant/ansible/roles/libvmi/tasks/main.yml +++ b/vagrant/ansible/roles/libvmi/tasks/main.yml @@ -14,7 +14,7 @@ - libvirt-dev - bison - flex - - python-dev + - python3-dev - libjson-c-dev - name: create build directory From af5ef744fcac111737f77618042ddf7e679d4490 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Thu, 19 Sep 2024 16:12:58 +0200 Subject: [PATCH 6/7] vagrant/qemu: disable werror --- vagrant/ansible/roles/qemu/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vagrant/ansible/roles/qemu/tasks/main.yml b/vagrant/ansible/roles/qemu/tasks/main.yml index d920fde6..5d3a0242 100644 --- a/vagrant/ansible/roles/qemu/tasks/main.yml +++ b/vagrant/ansible/roles/qemu/tasks/main.yml @@ -14,7 +14,7 @@ - libseccomp-dev - name: configure QEMU - command: ./configure --target-list=x86_64-softmmu --enable-spice --enable-seccomp --prefix=/usr/local + command: ./configure --target-list=x86_64-softmmu --enable-spice --enable-seccomp --prefix=/usr/local --disable-werror args: chdir: "{{ root_dir }}/qemu" become: false From 852ce478fb0784d4dbdc0f7d7665b40de827cd21 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Thu, 19 Sep 2024 16:13:27 +0200 Subject: [PATCH 7/7] vagrant/vm: fix deps for libvirt --- vagrant/ansible/roles/vm/tasks/libvirt.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/vagrant/ansible/roles/vm/tasks/libvirt.yml b/vagrant/ansible/roles/vm/tasks/libvirt.yml index 9f92365a..76494596 100644 --- a/vagrant/ansible/roles/vm/tasks/libvirt.yml +++ b/vagrant/ansible/roles/vm/tasks/libvirt.yml @@ -4,7 +4,6 @@ name: "{{ item }}" with_items: - libvirt-daemon-system - - python-libvirt - python3-libvirt # kvm group to access /dev/kvm, libvirt-qemu for rw on memory access socket @@ -17,18 +16,18 @@ - name: include local config for libvirt-qemu apparmor profile lineinfile: path: /etc/apparmor.d/libvirt/TEMPLATE.qemu - line: '#include ' - insertafter: '#include ' + line: "#include " + insertafter: "#include " - name: add local QEMU apparmor profile for libvirtd lineinfile: path: /etc/apparmor.d/local/usr.sbin.libvirtd - line: '/usr/local/bin/qemu-system-x86_64 PUx,' + line: "/usr/local/bin/qemu-system-x86_64 PUx," - name: add local QEMU apparmor profile for libvirt-qemu lineinfile: path: /etc/apparmor.d/local/libvirt-qemu - line: '/usr/local/bin/qemu-system-x86_64 PUx,' + line: "/usr/local/bin/qemu-system-x86_64 PUx," create: yes - name: reload apparmor