]> git.baikalelectronics.ru Git - kernel.git/commit
xen: don't require virtio with grants for non-PV guests
authorJuergen Gross <jgross@suse.com>
Wed, 22 Jun 2022 06:38:38 +0000 (08:38 +0200)
committerJuergen Gross <jgross@suse.com>
Mon, 1 Aug 2022 05:43:03 +0000 (07:43 +0200)
commit86013a65cd535af79eb4244010bc030e2011826a
treec4c3477288ae1ab03b0933fbeeaff78020c1b63f
parent1fd077c5f9a97e44b4c0bb561009c5c768d9b7b1
xen: don't require virtio with grants for non-PV guests

Commit bf3d7b9b4e63 ("xen/virtio: Enable restricted memory access using
Xen grant mappings") introduced a new requirement for using virtio
devices: the backend now needs to support the VIRTIO_F_ACCESS_PLATFORM
feature.

This is an undue requirement for non-PV guests, as those can be operated
with existing backends without any problem, as long as those backends
are running in dom0.

Per default allow virtio devices without grant support for non-PV
guests.

On Arm require VIRTIO_F_ACCESS_PLATFORM for devices having been listed
in the device tree to use grants.

Add a new config item to always force use of grants for virtio.

Fixes: bf3d7b9b4e63 ("xen/virtio: Enable restricted memory access using Xen grant mappings")
Reported-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Tested-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> # Arm64 guest using Xen
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Link: https://lore.kernel.org/r/20220622063838.8854-4-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/arm/xen/enlighten.c
arch/x86/xen/enlighten_hvm.c
arch/x86/xen/enlighten_pv.c
drivers/xen/Kconfig
drivers/xen/grant-dma-ops.c
include/xen/xen-ops.h
include/xen/xen.h