| Age | Commit message (Collapse) | Author | Files | Lines |
|
mdev_access() calls mbochs_get_page() with mdev_state->ops_lock held,
while mbochs_get_page() locks the mutex by itself.
It leads to unavoidable deadlock.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
convert mbochs_region_vm_fault and mbochs_dmabuf_vm_fault
to return vm_fault_t type.
Signed-off-by: Souptick Joarder <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
There is no default implementation for dma_buf_ops->unmap.
So add a function unmapping the page, otherwise we'll leak them.
Signed-off-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
Atomic mapping interface for dmabufs will be removed.
Signed-off-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
Display device, demo-ing the vfio dmabuf display interface
(VFIO_GFX_PLANE_TYPE_DMABUF). Compatible enough to qemu stdvga
that bochs-drm.ko can be used as guest driver.
Signed-off-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
Guest fbdev driver for CONFIG_SAMPLE_VFIO_MDEV_MDPY.
Signed-off-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
Simple framebuffer display, demo-ing the vfio region display interface
(VFIO_GFX_PLANE_TYPE_REGION).
Signed-off-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
When FIFO mode is enabled, the receive data available interrupt
(UART_IIR_RDI in code) should be triggered when the number of data
in FIFO is equal or larger than interrupt trigger level.
This patch changes the trigger level check to ensure multiple bytes
received from upper layer can trigger RDI interrupt correctly.
Cc: Joey Zheng <[email protected]>
Signed-off-by: Shunyong Yang <[email protected]>
Reviewed by: Kirti Wankhede <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
Make this const as it is only passed to a const argument of the function
mdev_register_device. Make it static as it is not referenced in any
other file.
Structure found using Coccinelle and changes done by hand.
Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
We set info.count to 1 in mtty_get_irq_info() so static checkers
complain that, "Why do we have impossible conditions?" The answer is
that it seems to be left over dead code that can be safely removed.
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Kirti Wankhede <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
This is a sample driver for documentation so the impact is probably
pretty low. But we should check that bar_index is valid so we
don't write beyond the end of the mdev_state->region_info[] array.
Fixes: 9d1a546c53b4 ("docs: Sample driver to demonstrate how to use Mediated device framework.")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Kirti Wankhede <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
The copy_to_user() function returns the number of bytes which it wasn't
able to copy but we want to return a negative error code.
Fixes: 9d1a546c53b4 ("docs: Sample driver to demonstrate how to use Mediated device framework.")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Kirti Wankhede <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
This is just sample code. We forget to set the error codes in a couple
places.
Signed-off-by: Dan Carpenter <[email protected]>
Reported-by: Alexey Khoroshilov <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|
|
Abstract access to mdev_device so that we can define which interfaces
are public rather than relying on comments in the structure.
Cc: Zhenyu Wang <[email protected]>
Cc: Zhi Wang <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
Reviewed-by: Jike Song <[email protected]>
Reviewed by: Kirti Wankhede <[email protected]>
|
|
Rather than hoping for good behavior by marking some elements
internal, enforce it by making the entire structure private and
creating an accessor function for the one useful external field.
Cc: Zhenyu Wang <[email protected]>
Cc: Zhi Wang <[email protected]>
Cc: Jike Song <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
Reviewed by: Kirti Wankhede <[email protected]>
|
|
Add an mdev_ prefix so we're not poluting the namespace so much.
Cc: Zhenyu Wang <[email protected]>
Cc: Zhi Wang <[email protected]>
Cc: Jike Song <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
Reviewed by: Kirti Wankhede <[email protected]>
|
|
This sample driver was originally under Documentation/ and was moved
to samples, but build support was never adjusted for the new location.
Signed-off-by: Alex Williamson <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Tested-by: Eric Auger <[email protected]>
Reviewed-by: Kirti Wankhede <[email protected]>
|
|
The Sample driver creates mdev device that simulates serial port over PCI
card.
Signed-off-by: Kirti Wankhede <[email protected]>
Signed-off-by: Neo Jia <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
|