Re: [PATCH 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-27 Thread Juergen Gross via Virtualization
On 27.04.22 16:09, Tom Lendacky wrote: On 4/27/22 07:37, Juergen Gross wrote: On 27.04.22 14:28, Borislav Petkov wrote: On Wed, Apr 27, 2022 at 08:37:31AM +0200, Juergen Gross wrote: On 26.04.22 19:35, Borislav Petkov wrote: On Tue, Apr 26, 2022 at 03:40:21PM +0200, Juergen Gross wrote:    /

Re: [PATCH 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-27 Thread Tom Lendacky via Virtualization
On 4/27/22 07:37, Juergen Gross wrote: On 27.04.22 14:28, Borislav Petkov wrote: On Wed, Apr 27, 2022 at 08:37:31AM +0200, Juergen Gross wrote: On 26.04.22 19:35, Borislav Petkov wrote: On Tue, Apr 26, 2022 at 03:40:21PM +0200, Juergen Gross wrote:    /* protected virtualization */    static

Re: [PATCH 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-27 Thread Juergen Gross via Virtualization
On 27.04.22 14:26, Borislav Petkov wrote: On Wed, Apr 27, 2022 at 08:40:08AM +0200, Juergen Gross wrote: I was planning to look at the x86 cpu features to see whether some of those might be candidates to be switched to platform features instead. I'd say "never touch a running system" unless th

Re: [PATCH 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-27 Thread Juergen Gross via Virtualization
On 27.04.22 14:28, Borislav Petkov wrote: On Wed, Apr 27, 2022 at 08:37:31AM +0200, Juergen Gross wrote: On 26.04.22 19:35, Borislav Petkov wrote: On Tue, Apr 26, 2022 at 03:40:21PM +0200, Juergen Gross wrote: /* protected virtualization */ static void pv_init(void) { if (!is_

Re: [PATCH 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-26 Thread Juergen Gross via Virtualization
On 26.04.22 21:51, Heiko Carstens wrote: On Tue, Apr 26, 2022 at 07:35:43PM +0200, Borislav Petkov wrote: On Tue, Apr 26, 2022 at 03:40:21PM +0200, Juergen Gross wrote: /* protected virtualization */ static void pv_init(void) { if (!is_prot_virt_guest()) return;

Re: [PATCH 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-26 Thread Juergen Gross via Virtualization
On 26.04.22 19:35, Borislav Petkov wrote: On Tue, Apr 26, 2022 at 03:40:21PM +0200, Juergen Gross wrote: /* protected virtualization */ static void pv_init(void) { if (!is_prot_virt_guest()) return; + platform_set_feature(PLATFORM_VIRTIO_RESTRICTED_MEM_ACCESS);

[PATCH 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-26 Thread Juergen Gross via Virtualization
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 --- I've only done a compile test on x86 for