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]
Date:   Tue, 14 Dec 2021 18:35:34 +0000
From:   "Michael Kelley (LINUX)" <mikelley@...rosoft.com>
To:     Tianyu Lan <ltykernel@...il.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        Dexuan Cui <decui@...rosoft.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "arnd@...db.de" <arnd@...db.de>,
        "hch@...radead.org" <hch@...radead.org>,
        "m.szyprowski@...sung.com" <m.szyprowski@...sung.com>,
        "robin.murphy@....com" <robin.murphy@....com>,
        "thomas.lendacky@....com" <thomas.lendacky@....com>,
        Tianyu Lan <Tianyu.Lan@...rosoft.com>
CC:     "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        vkuznets <vkuznets@...hat.com>,
        "brijesh.singh@....com" <brijesh.singh@....com>,
        "konrad.wilk@...cle.com" <konrad.wilk@...cle.com>,
        "hch@....de" <hch@....de>, "joro@...tes.org" <joro@...tes.org>,
        "parri.andrea@...il.com" <parri.andrea@...il.com>,
        "dave.hansen@...el.com" <dave.hansen@...el.com>
Subject: RE: [PATCH V7 0/5] x86/Hyper-V: Add Hyper-V Isolation VM
 support(Second part)

From: Tianyu Lan <ltykernel@...il.com> Sent: Sunday, December 12, 2021 11:14 PM
> 
> Hyper-V provides two kinds of Isolation VMs. VBS(Virtualization-based
> security) and AMD SEV-SNP unenlightened Isolation VMs. This patchset
> is to add support for these Isolation VM support in Linux.
> 
> The memory of these vms are encrypted and host can't access guest
> memory directly. Hyper-V provides new host visibility hvcall and
> the guest needs to call new hvcall to mark memory visible to host
> before sharing memory with host. For security, all network/storage
> stack memory should not be shared with host and so there is bounce
> buffer requests.
> 
> Vmbus channel ring buffer already plays bounce buffer role because
> all data from/to host needs to copy from/to between the ring buffer
> and IO stack memory. So mark vmbus channel ring buffer visible.
> 
> For SNP isolation VM, guest needs to access the shared memory via
> extra address space which is specified by Hyper-V CPUID HYPERV_CPUID_
> ISOLATION_CONFIG. The access physical address of the shared memory
> should be bounce buffer memory GPA plus with shared_gpa_boundary
> reported by CPUID.
> 
> This patchset is to enable swiotlb bounce buffer for netvsc/storvsc
> drivers in Isolation VM.
> 
> Change since v6:
>         * Fix compile error in hv_init.c and mshyperv.c when swiotlb
> 	  is not enabled.
> 	* Change the order in the cc_platform_has() and check sev first.
> 
> Change sicne v5:
>         * Modify "Swiotlb" to "swiotlb" in commit log.
> 	* Remove CONFIG_HYPERV check in the hyperv_cc_platform_has()
> 
> Change since v4:
> 	* Remove Hyper-V IOMMU IOMMU_INIT_FINISH related functions
> 	  and set SWIOTLB_FORCE and swiotlb_unencrypted_base in the
> 	  ms_hyperv_init_platform(). Call swiotlb_update_mem_attributes()
> 	  in the hyperv_init().
> 
> Change since v3:
> 	* Fix boot up failure on the host with mem_encrypt=on.
> 	  Move calloing of set_memory_decrypted() back from
> 	  swiotlb_init_io_tlb_mem to swiotlb_late_init_with_tbl()
> 	  and rmem_swiotlb_device_init().
> 	* Change code style of checking GUEST_MEM attribute in the
> 	  hyperv_cc_platform_has().
> 	* Add comment in pci-swiotlb-xen.c to explain why add
> 	  dependency between hyperv_swiotlb_detect() and pci_
> 	  xen_swiotlb_detect().
> 	* Return directly when fails to allocate Hyper-V swiotlb
> 	  buffer in the hyperv_iommu_swiotlb_init().
> 
> Change since v2:
> 	* Remove Hyper-V dma ops and dma_alloc/free_noncontiguous. Add
> 	  hv_map/unmap_memory() to map/umap netvsc rx/tx ring into extra
> 	  address space.
> 	* Leave mem->vaddr in swiotlb code with phys_to_virt(mem->start)
> 	  when fail to remap swiotlb memory.
> 
> Change since v1:
> 	* Add Hyper-V Isolation support check in the cc_platform_has()
> 	  and return true for guest memory encrypt attr.
> 	* Remove hv isolation check in the sev_setup_arch()
> 
> Tianyu Lan (5):
>   swiotlb: Add swiotlb bounce buffer remap function for HV IVM
>   x86/hyper-v: Add hyperv Isolation VM check in the cc_platform_has()
>   hyper-v: Enable swiotlb bounce buffer for Isolation VM
>   scsi: storvsc: Add Isolation VM support for storvsc driver
>   net: netvsc: Add Isolation VM support for netvsc driver
> 
>  arch/x86/hyperv/hv_init.c         |  12 +++
>  arch/x86/hyperv/ivm.c             |  28 ++++++
>  arch/x86/kernel/cc_platform.c     |   8 ++
>  arch/x86/kernel/cpu/mshyperv.c    |  15 +++-
>  drivers/hv/hv_common.c            |  11 +++
>  drivers/hv/vmbus_drv.c            |   4 +
>  drivers/net/hyperv/hyperv_net.h   |   5 ++
>  drivers/net/hyperv/netvsc.c       | 136 +++++++++++++++++++++++++++++-
>  drivers/net/hyperv/netvsc_drv.c   |   1 +
>  drivers/net/hyperv/rndis_filter.c |   2 +
>  drivers/scsi/storvsc_drv.c        |  37 ++++----
>  include/asm-generic/mshyperv.h    |   2 +
>  include/linux/hyperv.h            |   6 ++
>  include/linux/swiotlb.h           |   6 ++
>  kernel/dma/swiotlb.c              |  43 +++++++++-
>  15 files changed, 294 insertions(+), 22 deletions(-)
> 
> --
> 2.25.1

For the entire series,

Reviewed-by: Michael Kelley <mikelley@...rosoft.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ