aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/vmw_vmci
diff options
context:
space:
mode:
authorJorgen Hansen <jhansen@vmware.com>2022-02-07 02:27:21 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-08 12:15:59 +0100
commit8cb520bea1470ca205980fbf030ed1f472f4af2f (patch)
treed6326bfff31950f08d12738485c5b4c8ce72b9a3 /drivers/misc/vmw_vmci
parenteed2298d936087a1c85e0fa6f7170028e4f4fded (diff)
downloadlinux-8cb520bea1470ca205980fbf030ed1f472f4af2f.tar.gz
VMCI: dma dg: set OS page size
Tell the device the page size used by the OS. Reviewed-by: Vishnu Dasa <vdasa@vmware.com> Signed-off-by: Jorgen Hansen <jhansen@vmware.com> Link: https://lore.kernel.org/r/20220207102725.2742-5-jhansen@vmware.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/vmw_vmci')
-rw-r--r--drivers/misc/vmw_vmci/vmci_guest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/vmw_vmci/vmci_guest.c b/drivers/misc/vmw_vmci/vmci_guest.c
index b93afe7f7119c..ced187e7ac08b 100644
--- a/drivers/misc/vmw_vmci/vmci_guest.c
+++ b/drivers/misc/vmw_vmci/vmci_guest.c
@@ -578,6 +578,10 @@ static int vmci_guest_probe_device(struct pci_dev *pdev,
/* Let the host know which capabilities we intend to use. */
vmci_write_reg(vmci_dev, caps_in_use, VMCI_CAPS_ADDR);
+ /* Let the device know the size for pages passed down. */
+ if (caps_in_use & VMCI_CAPS_DMA_DATAGRAM)
+ vmci_write_reg(vmci_dev, PAGE_SHIFT, VMCI_GUEST_PAGE_SHIFT);
+
/* Set up global device so that we can start sending datagrams */
spin_lock_irq(&vmci_dev_spinlock);
vmci_dev_g = vmci_dev;