1 /* SPDX-License-Identifier: GPL-2.0 */ 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 2 /* 3 * Copyright (C) 2020, Red Hat, Inc. 3 * Copyright (C) 2020, Red Hat, Inc. 4 */ 4 */ 5 #include "kvm_util.h" 5 #include "kvm_util.h" 6 6 7 struct guest_mode { 7 struct guest_mode { 8 bool supported; 8 bool supported; 9 bool enabled; 9 bool enabled; 10 }; 10 }; 11 11 12 extern struct guest_mode guest_modes[NUM_VM_MO 12 extern struct guest_mode guest_modes[NUM_VM_MODES]; 13 13 14 #define guest_mode_append(mode, enabled) ({ \ 14 #define guest_mode_append(mode, enabled) ({ \ 15 guest_modes[mode] = (struct guest_mode 15 guest_modes[mode] = (struct guest_mode){ (enabled), (enabled) }; \ 16 }) 16 }) 17 17 18 void guest_modes_append_default(void); 18 void guest_modes_append_default(void); 19 void for_each_guest_mode(void (*func)(enum vm_ 19 void for_each_guest_mode(void (*func)(enum vm_guest_mode, void *), void *arg); 20 void guest_modes_help(void); 20 void guest_modes_help(void); 21 void guest_modes_cmdline(const char *arg); 21 void guest_modes_cmdline(const char *arg); 22 22
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.