Christoph Hellwig
2019-Apr-26 19:27 UTC
[PATCH 04/10] s390/mm: force swiotlb for protected virtualization
On Fri, Apr 26, 2019 at 08:32:39PM +0200, Halil Pasic wrote:> +EXPORT_SYMBOL_GPL(set_memory_encrypted);> +EXPORT_SYMBOL_GPL(set_memory_decrypted);> +EXPORT_SYMBOL_GPL(sev_active);Why do you export these? I know x86 exports those as well, but it shoudn't be needed there either.
Halil Pasic
2019-Apr-29 13:59 UTC
[PATCH 04/10] s390/mm: force swiotlb for protected virtualization
On Fri, 26 Apr 2019 12:27:11 -0700 Christoph Hellwig <hch at infradead.org> wrote:> On Fri, Apr 26, 2019 at 08:32:39PM +0200, Halil Pasic wrote: > > +EXPORT_SYMBOL_GPL(set_memory_encrypted); > > > +EXPORT_SYMBOL_GPL(set_memory_decrypted); > > > +EXPORT_SYMBOL_GPL(sev_active); > > Why do you export these? I know x86 exports those as well, but > it shoudn't be needed there either. >I export these to be in line with the x86 implementation (which is the original and seems to be the only one at the moment). I assumed that 'exported or not' is kind of a part of the interface definition. Honestly, I did not give it too much thought. For x86 set_memory(en|de)crypted got exported by 95cf9264d5f3 "x86, drm, fbdev: Do not specify encrypted memory for video mappings" (Tom Lendacky, 2017-07-17). With CONFIG_FB_VGA16=m seems to be necessary for x84. If the consensus is don't export: I won't. I'm fine one way or the other. @Christian, what is your take on this? Thank you very much! Regards, Halil
Christian Borntraeger
2019-Apr-29 14:05 UTC
[PATCH 04/10] s390/mm: force swiotlb for protected virtualization
On 29.04.19 15:59, Halil Pasic wrote:> On Fri, 26 Apr 2019 12:27:11 -0700 > Christoph Hellwig <hch at infradead.org> wrote: > >> On Fri, Apr 26, 2019 at 08:32:39PM +0200, Halil Pasic wrote: >>> +EXPORT_SYMBOL_GPL(set_memory_encrypted); >> >>> +EXPORT_SYMBOL_GPL(set_memory_decrypted); >> >>> +EXPORT_SYMBOL_GPL(sev_active); >> >> Why do you export these? I know x86 exports those as well, but >> it shoudn't be needed there either. >> > > I export these to be in line with the x86 implementation (which > is the original and seems to be the only one at the moment). I assumed > that 'exported or not' is kind of a part of the interface definition. > Honestly, I did not give it too much thought. > > For x86 set_memory(en|de)crypted got exported by 95cf9264d5f3 "x86, drm, > fbdev: Do not specify encrypted memory for video mappings" (Tom > Lendacky, 2017-07-17). With CONFIG_FB_VGA16=m seems to be necessary for x84. > > If the consensus is don't export: I won't. I'm fine one way or the other. > @Christian, what is your take on this?If we do not need it today for anything (e.g. virtio-gpu) then we can get rid of the exports (and introduce them when necessary).> > Thank you very much! > > Regards, > Halil > >