lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5530ed1f-90ec-ce84-2348-80e484fa48cb@infradead.org>
Date:   Mon, 15 Aug 2022 23:04:35 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Pierre Morel <pmorel@...ux.ibm.com>, linux-kernel@...r.kernel.org
Cc:     kernel test robot <lkp@...el.com>,
        Matthew Rosato <mjrosato@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Eric Farman <farman@...ux.ibm.com>, linux-s390@...r.kernel.org,
        kvm@...r.kernel.org
Subject: Re: [PATCH] vfio-pci/zdev: require KVM to be built-in

Hi--

On 8/15/22 02:43, Pierre Morel wrote:
> Thank you Randy for this good catch.
> However forcing KVM to be include statically in the kernel when using VFIO_PCI extensions is not a good solution for us I think.
> 
> I suggest we better do something like:
> 
> ----
> 
> diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h
> index 6287a843e8bc..1733339cc4eb 100644
> --- a/arch/s390/include/asm/kvm_host.h
> +++ b/arch/s390/include/asm/kvm_host.h
> @@ -1038,7 +1038,7 @@ static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {}
>  #define __KVM_HAVE_ARCH_VM_FREE
>  void kvm_arch_free_vm(struct kvm *kvm);
> 
> -#ifdef CONFIG_VFIO_PCI_ZDEV_KVM
> +#if defined(CONFIG_VFIO_PCI_ZDEV_KVM) || defined(CONFIG_VFIO_PCI_ZDEV_KVM_MODULE)

This all looks good except for the line above.
It should be:

#if IS_ENABLED(CONFIG_VFIO_PCI_ZDEV_KVM)

Thanks.


>  int kvm_s390_pci_register_kvm(struct zpci_dev *zdev, struct kvm *kvm);
>  void kvm_s390_pci_unregister_kvm(struct zpci_dev *zdev);
>  #else
> diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig
> index f9d0c908e738..bbc375b028ef 100644
> --- a/drivers/vfio/pci/Kconfig
> +++ b/drivers/vfio/pci/Kconfig
> @@ -45,9 +45,9 @@ config VFIO_PCI_IGD
>  endif
> 
>  config VFIO_PCI_ZDEV_KVM
> -       bool "VFIO PCI extensions for s390x KVM passthrough"
> +       def_tristate y
> +       prompt "VFIO PCI extensions for s390x KVM passthrough"
>         depends on S390 && KVM
> -       default y
>         help
>           Support s390x-specific extensions to enable support for enhancements
>           to KVM passthrough capabilities, such as interpretive execution of
> 
> ----
> 
> What do you think? It seems to me it solves the problem, what do you think?
> 
> Regards,
> Pierre


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ