qemu/target
Paolo Bonzini 5c3131c392 KVM: track whether guest state is encrypted
So far, KVM has allowed KVM_GET/SET_* ioctls to execute even if the
guest state is encrypted, in which case they do nothing.  For the new
API using VM types, instead, the ioctls will fail which is a safer and
more robust approach.

The new API will be the only one available for SEV-SNP and TDX, but it
is also usable for SEV and SEV-ES.  In preparation for that, require
architecture-specific KVM code to communicate the point at which guest
state is protected (which must be after kvm_cpu_synchronize_post_init(),
though that might change in the future in order to suppor migration).
From that point, skip reading registers so that cpu->vcpu_dirty is
never true: if it ever becomes true, kvm_arch_put_registers() will
fail miserably.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-04-23 17:35:25 +02:00
..
alpha target/alpha: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 11:46:16 +01:00
arm target/arm: Use insn_start from DisasContextBase 2024-04-09 07:45:09 -10:00
avr target/avr: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 11:46:17 +01:00
cris target/cris: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 11:46:17 +01:00
hexagon target/hexagon: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 11:46:17 +01:00
hppa target/hppa: Use insn_start from DisasContextBase 2024-04-09 07:45:09 -10:00
i386 KVM: track whether guest state is encrypted 2024-04-23 17:35:25 +02:00
loongarch target/loongarch: Fix qemu-system-loongarch64 assert failed with the option '-d int' 2024-03-22 17:57:49 +08:00
m68k target/m68k: Map FPU exceptions to FPSR register 2024-04-09 07:43:31 -10:00
microblaze target/microblaze: Use insn_start from DisasContextBase 2024-04-09 07:45:09 -10:00
mips target/mips: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:24 +01:00
nios2 target/nios2: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:24 +01:00
openrisc target/openrisc: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:24 +01:00
ppc target/ppc: Rename init_excp_4xx_softmmu() -> init_excp_4xx() 2024-04-02 14:55:15 +02:00
riscv target/riscv: Use insn_start from DisasContextBase 2024-04-09 07:45:09 -10:00
rx target/rx: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:24 +01:00
s390x s390: Switch to use confidential_guest_kvm_init() 2024-04-23 17:35:25 +02:00
sh4 target/sh4: add missing CHECK_NOT_DELAY_SLOT 2024-04-09 07:43:31 -10:00
sparc target/sparc: Use GET_ASI_CODE for ASI_KERNELTXT and ASI_USERTXT 2024-04-12 14:48:01 -07:00
tricore target/tricore/helper: Use correct string format in cpu_tlb_fill() 2024-03-26 14:24:06 +01:00
xtensa target/xtensa: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:25 +01:00
Kconfig hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00
meson.build target: Make qemu_target_page_mask() available for *-user 2024-01-29 21:04:10 +10:00
target-common.c target: Make qemu_target_page_mask() available for *-user 2024-01-29 21:04:10 +10:00