[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <87y32xzr8n.fsf@morokweng.localdomain>
Date: Thu, 23 May 2019 02:15:04 -0300
From: Thiago Jung Bauermann <bauerman@...ux.ibm.com>
To: Christoph Hellwig <hch@....de>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
Alexey Kardashevskiy <aik@...abs.ru>,
Anshuman Khandual <anshuman.linux@...il.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Michael Ellerman <mpe@...erman.id.au>,
Mike Anderson <andmike@...ux.ibm.com>,
Paul Mackerras <paulus@...ba.org>,
Ram Pai <linuxram@...ibm.com>,
Claudio Carvalho <cclaudio@...ux.ibm.com>,
Anshuman Khandual <khandual@...ux.vnet.ibm.com>
Subject: Re: [PATCH 11/12] powerpc/pseries/svm: Force SWIOTLB for secure guests
Hello Christoph,
Thanks for reviewing the patch!
Christoph Hellwig <hch@....de> writes:
>> diff --git a/arch/powerpc/include/asm/mem_encrypt.h b/arch/powerpc/include/asm/mem_encrypt.h
>> new file mode 100644
>> index 000000000000..45d5e4d0e6e0
>> --- /dev/null
>> +++ b/arch/powerpc/include/asm/mem_encrypt.h
>> @@ -0,0 +1,19 @@
>> +/* SPDX-License-Identifier: GPL-2.0+ */
>> +/*
>> + * SVM helper functions
>> + *
>> + * Copyright 2019 IBM Corporation
>> + */
>> +
>> +#ifndef _ASM_POWERPC_MEM_ENCRYPT_H
>> +#define _ASM_POWERPC_MEM_ENCRYPT_H
>> +
>> +#define sme_me_mask 0ULL
>> +
>> +static inline bool sme_active(void) { return false; }
>> +static inline bool sev_active(void) { return false; }
>> +
>> +int set_memory_encrypted(unsigned long addr, int numpages);
>> +int set_memory_decrypted(unsigned long addr, int numpages);
>> +
>> +#endif /* _ASM_POWERPC_MEM_ENCRYPT_H */
>
> S/390 seems to be adding a stub header just like this. Can you please
> clean up the Kconfig and generic headers bits for memory encryption so
> that we don't need all this boilerplate code?
Yes, that's a good idea. Will do.
>> config PPC_SVM
>> bool "Secure virtual machine (SVM) support for POWER"
>> depends on PPC_PSERIES
>> + select SWIOTLB
>> + select ARCH_HAS_MEM_ENCRYPT
>> default n
>
> n is the default default, no need to explictly specify it.
Indeed. Changed for the next version.
--
Thiago Jung Bauermann
IBM Linux Technology Center
Powered by blists - more mailing lists