aboutsummaryrefslogtreecommitdiff
path: root/include/linux/platform-feature.h
AgeCommit message (Collapse)AuthorFilesLines
2022-08-01kernel: remove platform_has() infrastructureJuergen Gross1-15/+0
The only use case of the platform_has() infrastructure has been removed again, so remove the whole feature. Signed-off-by: Juergen Gross <[email protected]> Tested-by: Oleksandr Tyshchenko <[email protected]> # Arm64 guest using Xen Reviewed-by: Stefano Stabellini <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
2022-08-01virtio: replace restricted mem access flag with callbackJuergen Gross1-5/+1
Instead of having a global flag to require restricted memory access for all virtio devices, introduce a callback which can select that requirement on a per-device basis. For convenience add a common function returning always true, which can be used for use cases like SEV. Per default use a callback always returning false. As the callback needs to be set in early init code already, add a virtio anchor which is builtin in case virtio is enabled. Signed-off-by: Juergen Gross <[email protected]> Tested-by: Oleksandr Tyshchenko <[email protected]> # Arm64 guest using Xen Reviewed-by: Stefano Stabellini <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
2022-06-06virtio: replace arch_has_restricted_virtio_memory_access()Juergen Gross1-1/+5
Instead of using arch_has_restricted_virtio_memory_access() together with CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS, replace those with platform_has() and a new platform feature PLATFORM_VIRTIO_RESTRICTED_MEM_ACCESS. Signed-off-by: Juergen Gross <[email protected]> Reviewed-by: Oleksandr Tyshchenko <[email protected]> Tested-by: Oleksandr Tyshchenko <[email protected]> # Arm64 only Reviewed-by: Christoph Hellwig <[email protected]> Acked-by: Borislav Petkov <[email protected]>
2022-06-06kernel: add platform_has() infrastructureJuergen Gross1-0/+15
Add a simple infrastructure for setting, resetting and querying platform feature flags. Flags can be either global or architecture specific. Signed-off-by: Juergen Gross <[email protected]> Reviewed-by: Oleksandr Tyshchenko <[email protected]> Tested-by: Oleksandr Tyshchenko <[email protected]> # Arm64 only Reviewed-by: Christoph Hellwig <[email protected]> Acked-by: Borislav Petkov <[email protected]> Signed-off-by: Juergen Gross <[email protected]>