Skip to contentSkip to conversation

vfio/listener: Remove unnecessary linux/kvm.h include

PATCH In review Cédric Le Goater 4 participants 4 messages Jul 21

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfio/listener: Remove unnecessary linux/kvm.h include

Since commit d0e8bccafc23 ("hw/vfio/listener.c: remove CONFIG_KVM"), the linux/kvm.h include is unconditional. This breaks the build on targets that lack asm/kvm.h such as sparc and sparc64:

In file included from ../hw/vfio/listener.c:23:
linux-headers/linux/kvm.h:16:10: fatal error: asm/kvm.h: No such file or directory

This include is not needed in listener.c which only uses kvm_enabled() and kvm_get_max_memslots(), both are declared in "system/kvm.h". Remove it.

Fixes d0e8bccafc23 ("hw/vfio/listener.c: remove CONFIG_KVM")
Cc Pierrick Bouvier <[email protected]>"
---
 hw/vfio/listener.c | 1 -
 1 file changed, 1 deletion(-)
hw/vfio/listener.c +0 -1
index c19600e980a8d02217b5d9df4aca8f879ab2c5d5..008f488a3e7d4ca2ec9e1780b496371b0f447653 100644
@@ -20,7 +20,6 @@
 
 #include "qemu/osdep.h"
 #include <sys/ioctl.h>
-#include <linux/kvm.h>
 #include <linux/vfio.h>
 
 #include "exec/target_page.h"
Signature · 1 line
2.55.0
Tested-by Michael Tokarev Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Cédric Le Goater

Since commit d0e8bccafc23 ("hw/vfio/listener.c: remove CONFIG_KVM"), the linux/kvm.h include is unconditional. This breaks the build on targets that lack asm/kvm.h such as sparc and sparc64:

In file included from ../hw/vfio/listener.c:23:
linux-headers/linux/kvm.h:16:10: fatal error: asm/kvm.h: No such file or directory

This include is not needed in listener.c which only uses kvm_enabled() and kvm_get_max_memslots(), both are declared in "system/kvm.h". Remove it.

Quoted 7 lines
Fixes d0e8bccafc23 ("hw/vfio/listener.c: remove CONFIG_KVM")
Cc Pierrick Bouvier <[email protected]>"
---
  hw/vfio/listener.c | 1 -
  1 file changed, 1 deletion(-)
Reviewed-by on v1 1/1
#2 lore raw
In reply to Cédric Le Goater
Quoted 36 lines · Cédric Le Goater

Since commit d0e8bccafc23 ("hw/vfio/listener.c: remove CONFIG_KVM"), the linux/kvm.h include is unconditional. This breaks the build on targets that lack asm/kvm.h such as sparc and sparc64:

In file included from ../hw/vfio/listener.c:23:
linux-headers/linux/kvm.h:16:10: fatal error: asm/kvm.h: No such file
or directory

This include is not needed in listener.c which only uses kvm_enabled() and kvm_get_max_memslots(), both are declared in "system/kvm.h". Remove it.

Fixes d0e8bccafc23 ("hw/vfio/listener.c: remove CONFIG_KVM")
Cc Pierrick Bouvier <[email protected]>"
---
 hw/vfio/listener.c | 1 -
 1 file changed, 1 deletion(-)
hw/vfio/listener.c +0 -0
index 

c19600e980a8d02217b5d9df4aca8f879ab2c5d5..008f488a3e7d4ca2ec9e1780b496371b0f447653 100644

hw/vfio/listener.c +0 -1
@@ -20,7 +20,6 @@
 
 #include "qemu/osdep.h"
 #include <sys/ioctl.h>
-#include <linux/kvm.h>
 #include <linux/vfio.h>
 
 #include "exec/target_page.h"
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#3 lore raw
In reply to Cédric Le Goater
Quoted 11 lines · Cédric Le Goater

Since commit d0e8bccafc23 ("hw/vfio/listener.c: remove CONFIG_KVM"), the linux/kvm.h include is unconditional. This breaks the build on targets that lack asm/kvm.h such as sparc and sparc64:

In file included from ../hw/vfio/listener.c:23:
linux-headers/linux/kvm.h:16:10: fatal error: asm/kvm.h: No such file or directory

This include is not needed in listener.c which only uses kvm_enabled() and kvm_get_max_memslots(), both are declared in "system/kvm.h". Remove it.

Quoted 8 lines
Fixes d0e8bccafc23 ("hw/vfio/listener.c: remove CONFIG_KVM")
Cc Pierrick Bouvier <[email protected]>"
---
 hw/vfio/listener.c | 1 -
 1 file changed, 1 deletion(-)