[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cbd4cd8a-0271-5a53-4688-59d6cc6ee3db@suse.com>
Date: Tue, 26 Apr 2022 11:36:40 +0200
From: Juergen Gross <jgross@...e.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Oleksandr <olekstysh@...il.com>,
Christoph Hellwig <hch@...radead.org>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Stefano Stabellini <sstabellini@...nel.org>,
xen-devel@...ts.xenproject.org, x86@...nel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Julien Grall <julien@....org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Tom Lendacky <thomas.lendacky@....com>
Subject: Re: [PATCH V1 3/6] xen/virtio: Add option to restrict memory access
under Xen
On 26.04.22 10:41, Borislav Petkov wrote:
> On Tue, Apr 26, 2022 at 07:16:16AM +0200, Juergen Gross wrote:
>> Christoph suggested (rather firmly) this would be the way to go.
>
> Yeah, I saw it but I don't think it is the right way to go.
>
> What happens the next time a guest needs to query the platform
> underneath? Misuse these interfaces again?
>
> Because people will see the Xen use and say, hey, look, I will use this
> for my funky HV too.
>
> Even worse: what happens if Xen decides to implement SEV/TDX? Then
> you're in for a world of fun.
As the suggestion was to add another flag this wouldn't be a problem IMO.
But I agree that coco might be not the best way to go (as I wrote already).
>
> Now, if we want to *extend* the interfaces to have something as generic
> as, say, platform_has() and that should be the way for generic kernel
> code running in the guest to query the platform capabilities, then sure,
> by all means.
I agree.
>
>> This is needed on guest side at a rather hypervisor independent place.
>>
>> So a capability of some sort seems appropriate.
>>
>> Another suggestion of mine was to have a callback (or flag) in
>> struct x86_hyper_runtime for that purpose.
>
> This becomes an issue if the HV is not x86 - then you need a different
> method of querying it, which then underneath will call the arch-specific
> interface.
>
> I don't know how much of querying guests need to do and how they've been
> doing that so far. Depending on the requirements, we probably should
> think about a clean design from the get-go instead of homegrown things.
Yes.
platform_has() doesn't seem too bad IMO.
I will write a patch for starting the discussion.
Juergen
Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3099 bytes)
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)
Powered by blists - more mailing lists