diff --git a/packages/by-name/qemu-static/0003-accel-kvm-check-for-KVM_CAP_READONLY_MEM-on-VM.patch b/packages/by-name/qemu-static/0003-accel-kvm-check-for-KVM_CAP_READONLY_MEM-on-VM.patch deleted file mode 100644 index e0285dad4..000000000 --- a/packages/by-name/qemu-static/0003-accel-kvm-check-for-KVM_CAP_READONLY_MEM-on-VM.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 5c1ad1ff44438402ec824a224ac4659c8044ec7e Mon Sep 17 00:00:00 2001 -From: Tom Dohrmann -Date: Tue, 3 Sep 2024 06:25:04 +0000 -Subject: [PATCH] accel/kvm: check for KVM_CAP_READONLY_MEM on VM - -KVM_CAP_READONLY_MEM used to be a global capability, but with the -introduction of AMD SEV-SNP confidential VMs, this extension is not -always available on all VM types [1,2]. - -Query the extension on the VM level instead of on the KVM level. - -[1] https://patchwork.kernel.org/project/kvm/patch/20240809190319.1710470-2-seanjc@google.com/ -[2] https://patchwork.kernel.org/project/kvm/patch/20240902144219.3716974-1-erbse.13@gmx.de/ - -Cc: Paolo Bonzini -Signed-off-by: Tom Dohrmann ---- - accel/kvm/kvm-all.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c -index 75d11a07b2..acc23092e7 100644 ---- a/accel/kvm/kvm-all.c -+++ b/accel/kvm/kvm-all.c -@@ -2603,7 +2603,7 @@ static int kvm_init(MachineState *ms) - } - - kvm_readonly_mem_allowed = -- (kvm_check_extension(s, KVM_CAP_READONLY_MEM) > 0); -+ (kvm_vm_check_extension(s, KVM_CAP_READONLY_MEM) > 0); - - kvm_resamplefds_allowed = - (kvm_check_extension(s, KVM_CAP_IRQFD_RESAMPLE) > 0); --- -2.34.1 - diff --git a/packages/by-name/qemu-static/package.nix b/packages/by-name/qemu-static/package.nix index ac244f30d..fca040697 100644 --- a/packages/by-name/qemu-static/package.nix +++ b/packages/by-name/qemu-static/package.nix @@ -15,7 +15,7 @@ hostCpuOnly = true; hostCpuTargets = [ "x86_64-softmmu" ]; })).overrideAttrs - (previousAttrs: rec { + (previousAttrs: { configureFlags = previousAttrs.configureFlags ++ [ "-Dlinux_aio_path=${libaio}/lib" "-Dlinux_fdt_path=${dtc}/lib" @@ -33,8 +33,5 @@ # Based on https://github.com/NixOS/nixpkgs/pull/300070/commits/96054ca98020df125bb91e5cf49bec107bea051b#diff-7246126ac058898e6da6aadc1e831bb26afe07fa145958e55c5e112dc2c578fd. # We applied the same change done to libaio to libfdt as well. ./0002-add-options-for-library-paths.patch - # Fix needed for a behaviour change in Linux 6.11-rc4. - # TODO(freax13): Remove this when QEMU 9.1.2 is released. - ./0003-accel-kvm-check-for-KVM_CAP_READONLY_MEM-on-VM.patch ]; })