Introduce a new feature, HOST_PAGE_SIZE, that indicates the host
provides its page size as a value in virtio_gpu_config.
Signed-off-by: Sergio Lopez
---
drivers/gpu/drm/virtio/virtgpu_drv.c | 1 +
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 ++
drivers/gpu/drm/virtio/virtgpu_kms.c | 13
Gurchetan Singh writes:
> On Tue, Aug 6, 2024 at 1:15 PM Rob Clark wrote:
>
>> On Tue, Aug 6, 2024 at 9:15 AM Gurchetan Singh
>> wrote:
>> >
>> >
>> >
>> > On Mon, Aug 5, 2024 at 2:14 AM Sergio Lopez Pascual
>> wrote:
>> >&g
Add VIRTGPU_PARAM_HOST_PAGE_SIZE as a param that can be read with
VIRTGPU_GETPARAM by userspace applications running in the guest to
obtain the host's page size and find out the right alignment to be used
in shared memory allocations.
Signed-off-by: Sergio Lopez
---
drivers/gpu/drm/v
a reference in the cover to the discussion about how device
page alignment restrictions should be shared with the driver.
Signed-off-by: Sergio Lopez
---
Sergio Lopez (2):
drm/virtio: introduce the HOST_PAGE_SIZE feature
drm/virtio: add VIRTGPU_PARAM_HOST_PAGE_SIZE to params
Use the newly introduced SHM_PAGE_SHIFT register to read the page shift
for the shared memory region, derive the page size from it and store the
resulting value into virtio_shm_region.
Reviewed-by: Dmitry Osipenko
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_mmio.c | 20
hold that field, and use it to feed
virtio_shm_region with the corresponding page size.
Reviewed-by: Dmitry Osipenko
Reviewed-by: Daniel Verkamp
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_mmio.c | 2 ++
drivers/virtio/virtio_pci_modern.c | 29
Add VIRTGPU_PARAM_HOST_SHM_PAGE_SIZE as a param that can be read with
VIRTGPU_GETPARAM by userspace applications running in the guest to
obtain the host's page size and find out the right alignment to be used
in shared memory allocations.
Reviewed-by: Dmitry Osipenko
Signed-off-by: Sergio
Introduce VIRTIO_F_SHM_PAGE_SIZE, a feature bit which indicates that the
transport provides the page size for SHM regions.
Reviewed-by: Dmitry Osipenko
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_pci_modern.c | 3 +++
drivers/virtio/virtio_ring.c | 2 ++
include/uapi/linux
ons. This patch series will be used as a reference to
propose such changes.
Signed-off-by: Sergio Lopez
---
Changes in v4:
- Validate page_shift before deriving the page size from it
(thanks Daniel Verkamp).
- Use an unsigned integer in left shift (thanks Daniel Verkamp).
- Link to v3:
https://lo
hold that field, and use it to feed
virtio_shm_region with the corresponding page size.
Reviewed-by: Dmitry Osipenko
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_mmio.c | 2 ++
drivers/virtio/virtio_pci_modern.c | 21 +
include/linux/virtio_config.h | 1
Add VIRTGPU_PARAM_HOST_SHM_PAGE_SIZE as a param that can be read with
VIRTGPU_GETPARAM by userspace applications running in the guest to
obtain the host's page size and find out the right alignment to be used
in shared memory allocations.
Signed-off-by: Sergio Lopez
---
drivers/gpu/drm/v
Use the newly introduced SHM_PAGE_SHIFT register to read the page shift
for the shared memory region, derive the page size from it and store the
resulting value into virtio_shm_region.
Reviewed-by: Dmitry Osipenko
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_mmio.c | 11
Introduce VIRTIO_F_SHM_PAGE_SIZE, a feature bit which indicates that the
transport provides the page size for SHM regions.
Reviewed-by: Dmitry Osipenko
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_pci_modern.c | 3 +++
drivers/virtio/virtio_ring.c | 2 ++
include/uapi/linux
ons. This patch series will be used as a reference to
propose such changes.
Signed-off-by: Sergio Lopez
---
Changes in v3:
- Merge patch 2 (virtio: introduce VIRTIO_F_SHM_PAGE_SIZE) into the
changes for virtio-pci (thanks Dmitry Osipenko).
- In virtio_gpu_getparam_ioctl(), return ENOENT instead of
Dmitry Osipenko writes:
> On 2/14/25 18:16, Sergio Lopez wrote:
>> Use the newly introduced SHM_PAGE_SHIFT register to read the page shift
>> for the shared memory region, derive the page size from it and store the
>> resulting value into virtio_shm_region.
>>
>
Dmitry Osipenko writes:
> On 2/14/25 18:16, Sergio Lopez wrote:
>> diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
>> b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
>> index
>> c33c057365f85a2ace536f91655c903036827312..4b49635b4fe1d4256f219823341cef8e5fa8f029
>>
Add VIRTGPU_PARAM_HOST_SHM_PAGE_SIZE as a param that can be read with
VIRTGPU_GETPARAM by userspace applications running in the guest to
obtain the host's page size and find out the right alignment to be used
in shared memory allocations.
Signed-off-by: Sergio Lopez
---
drivers/gpu/drm/v
Use the newly introduced SHM_PAGE_SHIFT register to read the page shift
for the shared memory region, derive the page size from it and store the
resulting value into virtio_shm_region.
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_mmio.c | 11 ++-
include/uapi/linux
hold that field, and use it to feed
virtio_shm_region with the corresponding page size.
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_pci_modern.c | 22 +-
include/uapi/linux/virtio_pci.h| 3 ++-
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a
ons. This patch series will be used as a reference to
propose such changes.
Signed-off-by: Sergio Lopez
---
Changes in v2:
- Use "page_shift" instead of "page_size" in the transport-related
structures to clarify its contents (thanks Daniel Verkamp).
- Update the command for
Introduce VIRTIO_F_SHM_PAGE_SIZE, a feature bit which indicates that the
transport provides the page size for SHM regions.
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_pci_modern.c | 3 +++
drivers/virtio/virtio_ring.c | 2 ++
include/uapi/linux/virtio_config.h | 7 ++-
3
Add a page_size field to virtio_shm_region to store page size supported
by the device. This is required to support running VMs with a page size
smaller than the host, among other potential scenarios.
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_mmio.c | 2 ++
drivers/virtio
"Michael S. Tsirkin" writes:
> On Thu, Feb 13, 2025 at 04:49:14PM +0100, Sergio Lopez wrote:
>> There's an incresing number of machines supporting multiple page sizes
>> and, on these machines, the host and a guest can be running with
>> different pages siz
Daniel Verkamp writes:
> On Thu, Feb 13, 2025 at 11:22 AM Daniel Verkamp wrote:
>>
>> On Thu, Feb 13, 2025 at 7:54 AM Sergio Lopez wrote:
>> >
>> > Turn the 16 bit padding into a page_size field to allow the device to
>> > pass its requ
Daniel Verkamp writes:
> On Thu, Feb 13, 2025 at 7:54 AM Sergio Lopez wrote:
>>
>> Turn the 16 bit padding into a page_size field to allow the device to
>> pass its required page size with format PAGE_SIZE >> 12.
>>
>> Signed-off-by: Sergio Lopez
>&g
Add VIRTGPU_PARAM_HOST_SHM_PAGE_SIZE as a param that can be read with
VIRTGPU_GETPARAM by userspace applications running in the guest to
obtain the host's page size and find out the right alignment to be used
in shared memory allocations.
Signed-off-by: Sergio Lopez
---
drivers/gpu/drm/v
Introduce VIRTIO_F_SHM_PAGE_SIZE, a feature bit which indicates that the
transport provides the page size for SHM regions.
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_pci_modern.c | 3 +++
drivers/virtio/virtio_ring.c | 2 ++
include/uapi/linux/virtio_config.h | 7 ++-
3
Use the newly introduced SHM_PAGE_SIZE register to read the page size
and store it into virtio_shm_region.
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_mmio.c | 13 -
include/uapi/linux/virtio_mmio.h | 3 +++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git
Turn the 16 bit padding into a page_size field to allow the device to
pass its required page size with format PAGE_SIZE >> 12.
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_pci_modern.c | 29 +
include/uapi/linux/virtio_pci.h| 2 +-
2 files chang
changes to the VIRTIO
specifications. This patch series will be used as a reference to
propose such changes.
Signed-off-by: Sergio Lopez
---
Sergio Lopez (5):
virtio_config: add page_size field to virtio_shm_region
virtio: introduce VIRTIO_F_SHM_PAGE_SIZE
virtio-pci: ext
Add a page_size field to virtio_shm_region to store page size supported
by the device. This is required to support running VMs with a page size
smaller than the host, among other potential scenarios.
Signed-off-by: Sergio Lopez
---
drivers/virtio/virtio_mmio.c | 2 ++
drivers/virtio
Gurchetan Singh writes:
> On Thu, Aug 8, 2024 at 3:38 AM Sergio Lopez Pascual wrote:
>
>> Gurchetan Singh writes:
>>
>> > On Tue, Aug 6, 2024 at 1:15 PM Rob Clark wrote:
>> >
>> >> On Tue, Aug 6, 2024 at 9:15 AM Gurchetan Singh
>> >>
Gurchetan Singh writes:
> On Tue, Aug 6, 2024 at 1:15 PM Rob Clark wrote:
>
>> On Tue, Aug 6, 2024 at 9:15 AM Gurchetan Singh
>> wrote:
>> >
>> >
>> >
>> > On Mon, Aug 5, 2024 at 2:14 AM Sergio Lopez Pascual
>> wrote:
>> >&g
Dmitry Osipenko writes:
> On 7/23/24 14:49, Sergio Lopez wrote:
>> There's an incresing number of machines supporting multiple page sizes
>> and on these machines the host and a guest can be running, each one,
>> with a different page size.
>>
>> For what
Add VIRTGPU_PARAM_HOST_PAGE_SIZE as a param that can be read with
VIRTGPU_GETPARAM by userspace applications running in the guest to
obtain the host's page size and find out the right alignment to be used
in shared memory allocations.
Signed-off-by: Sergio Lopez
---
drivers/gpu/drm/v
Introduce a new feature, HOST_PAGE_SIZE, that indicates the host
provides its page size as a value in virtio_gpu_config.
Signed-off-by: Sergio Lopez
---
drivers/gpu/drm/virtio/virtgpu_drv.c | 1 +
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 ++
drivers/gpu/drm/virtio/virtgpu_kms.c | 13
d.
On the second commit, we also add a new param that can be read with
VIRTGPU_GETPARAM by userspace applications running in the guest to
obtain the host's page size and find out the right alignment to be used
in shared memory allocations.
Sergio Lopez (2):
drm/virtio: introduce the HOST_PA
37 matches
Mail list logo