| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * AMD Memory Encryption Support |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2016 Advanced Micro Devices, Inc. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Author: Tom Lendacky <thomas.lendacky@amd.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 10 | | - * published by the Free Software Foundation. |
|---|
| 11 | 8 | */ |
|---|
| 12 | 9 | |
|---|
| 13 | 10 | #ifndef __MEM_ENCRYPT_H__ |
|---|
| .. | .. |
|---|
| 21 | 18 | |
|---|
| 22 | 19 | #else /* !CONFIG_ARCH_HAS_MEM_ENCRYPT */ |
|---|
| 23 | 20 | |
|---|
| 24 | | -#define sme_me_mask 0ULL |
|---|
| 25 | | - |
|---|
| 26 | | -static inline bool sme_active(void) { return false; } |
|---|
| 27 | | -static inline bool sev_active(void) { return false; } |
|---|
| 21 | +static inline bool mem_encrypt_active(void) { return false; } |
|---|
| 28 | 22 | |
|---|
| 29 | 23 | #endif /* CONFIG_ARCH_HAS_MEM_ENCRYPT */ |
|---|
| 30 | | - |
|---|
| 31 | | -static inline bool mem_encrypt_active(void) |
|---|
| 32 | | -{ |
|---|
| 33 | | - return sme_me_mask; |
|---|
| 34 | | -} |
|---|
| 35 | | - |
|---|
| 36 | | -static inline u64 sme_get_me_mask(void) |
|---|
| 37 | | -{ |
|---|
| 38 | | - return sme_me_mask; |
|---|
| 39 | | -} |
|---|
| 40 | 24 | |
|---|
| 41 | 25 | #ifdef CONFIG_AMD_MEM_ENCRYPT |
|---|
| 42 | 26 | /* |
|---|