• T
    Drivers: hv: vmbus: Add SNP support for VMbus channel initiate message · f2f136c0
    Tianyu Lan 提交于
    The monitor pages in the CHANNELMSG_INITIATE_CONTACT msg are shared
    with host in Isolation VM and so it's necessary to use hvcall to set
    them visible to host. In Isolation VM with AMD SEV SNP, the access
    address should be in the extra space which is above shared gpa
    boundary. So remap these pages into the extra address(pa +
    shared_gpa_boundary).
    
    Introduce monitor_pages_original[] in the struct vmbus_connection
    to store monitor page virtual address returned by hv_alloc_hyperv_
    zeroed_page() and free monitor page via monitor_pages_original in
    the vmbus_disconnect(). The monitor_pages[] is to used to access
    monitor page and it is initialized to be equal with monitor_pages_
    original. The monitor_pages[] will be overridden in the isolation VM
    with va of extra address. Introduce monitor_pages_pa[] to store
    monitor pages' physical address and use it to populate pa in the
    initiate msg.
    Reviewed-by: NMichael Kelley <mikelley@microsoft.com>
    Signed-off-by: NTianyu Lan <Tianyu.Lan@microsoft.com>
    Link: https://lore.kernel.org/r/20211025122116.264793-9-ltykernel@gmail.comSigned-off-by: NWei Liu <wei.liu@kernel.org>
    f2f136c0
hyperv_vmbus.h 12.3 KB