| 1 |
/* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 |
/* |
| 3 |
* Interface for managing mitigations for riscv vulnerabilities. |
| 4 |
* |
| 5 |
* Copyright (C) 2024 Rivos Inc. |
| 6 |
*/ |
| 7 |
|
| 8 |
#ifndef __ASM_BUGS_H |
| 9 |
#define __ASM_BUGS_H |
| 10 |
|
| 11 |
/* Watch out, ordering is important here. */ |
| 12 |
enum mitigation_state { |
| 13 |
UNAFFECTED, |
| 14 |
MITIGATED, |
| 15 |
VULNERABLE, |
| 16 |
}; |
| 17 |
|
| 18 |
void ghostwrite_set_vulnerable(void); |
| 19 |
bool ghostwrite_enable_mitigation(void); |
| 20 |
enum mitigation_state ghostwrite_get_state(void); |
| 21 |
|
| 22 |
#endif /* __ASM_BUGS_H */ |