[PATCH 1/8] hw/vfio/listener.c: remove CONFIG_KVM

Pierrick Bouvier posted 8 patches 2 weeks ago
Maintainers: Thomas Huth <thuth@redhat.com>, Alex Williamson <alex@shazbot.org>, "Cédric Le Goater" <clg@redhat.com>, Tony Krowiak <akrowiak@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Jason Herne <jjherne@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Paolo Bonzini <pbonzini@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Richard Henderson <richard.henderson@linaro.org>, Ilya Leoshkevich <iii@linux.ibm.com>, David Hildenbrand <david@kernel.org>
There is a newer version of this series
[PATCH 1/8] hw/vfio/listener.c: remove CONFIG_KVM
Posted by Pierrick Bouvier 2 weeks ago
Code concerned is under a kvm_enabled() guard.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 hw/vfio/listener.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/hw/vfio/listener.c b/hw/vfio/listener.c
index 960da9e0a93..31c3113f8fb 100644
--- a/hw/vfio/listener.c
+++ b/hw/vfio/listener.c
@@ -20,9 +20,7 @@
 
 #include "qemu/osdep.h"
 #include <sys/ioctl.h>
-#ifdef CONFIG_KVM
 #include <linux/kvm.h>
-#endif
 #include <linux/vfio.h>
 
 #include "exec/target_page.h"
@@ -303,11 +301,9 @@ static bool vfio_ram_discard_register_listener(VFIOContainer *bcontainer,
     if (bcontainer->dma_max_mappings) {
         unsigned int vrdl_count = 0, vrdl_mappings = 0, max_memslots = 512;
 
-#ifdef CONFIG_KVM
         if (kvm_enabled()) {
             max_memslots = kvm_get_max_memslots();
         }
-#endif
 
         QLIST_FOREACH(vrdl, &bcontainer->vrdl_list, next) {
             hwaddr start, end;
-- 
2.47.3
Re: [PATCH 1/8] hw/vfio/listener.c: remove CONFIG_KVM
Posted by Cédric Le Goater 1 week, 6 days ago
On 3/12/26 23:44, Pierrick Bouvier wrote:
> Code concerned is under a kvm_enabled() guard.
> 
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   hw/vfio/listener.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/hw/vfio/listener.c b/hw/vfio/listener.c
> index 960da9e0a93..31c3113f8fb 100644
> --- a/hw/vfio/listener.c
> +++ b/hw/vfio/listener.c
> @@ -20,9 +20,7 @@
>   
>   #include "qemu/osdep.h"
>   #include <sys/ioctl.h>
> -#ifdef CONFIG_KVM
>   #include <linux/kvm.h>
> -#endif
>   #include <linux/vfio.h>
>   
>   #include "exec/target_page.h"
> @@ -303,11 +301,9 @@ static bool vfio_ram_discard_register_listener(VFIOContainer *bcontainer,
>       if (bcontainer->dma_max_mappings) {
>           unsigned int vrdl_count = 0, vrdl_mappings = 0, max_memslots = 512;
>   
> -#ifdef CONFIG_KVM
>           if (kvm_enabled()) {
>               max_memslots = kvm_get_max_memslots();
>           }
> -#endif
>   
>           QLIST_FOREACH(vrdl, &bcontainer->vrdl_list, next) {
>               hwaddr start, end;

Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.


Re: [PATCH 1/8] hw/vfio/listener.c: remove CONFIG_KVM
Posted by Philippe Mathieu-Daudé 1 week, 6 days ago
On 12/3/26 23:44, Pierrick Bouvier wrote:
> Code concerned is under a kvm_enabled() guard.
> 
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   hw/vfio/listener.c | 4 ----
>   1 file changed, 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>