target/arm: Add support for VCPU event states

This patch extends the qemu-kvm state sync logic with support for
KVM_GET/SET_VCPU_EVENTS, giving access to yet missing SError exception.
And also it can support the exception state migration.

The SError exception states include SError pending state and ESR value,
the kvm_put/get_vcpu_events() will be called when set or get system
registers. When do migration, if source machine has SError pending,
QEMU will do this migration regardless whether the target machine supports
to specify guest ESR value, because if target machine does not support that,
it can also inject the SError with zero ESR value.

Backports the relevant parts of commit
202ccb6bab5fe26bca2c82bff23302f7acfd1940 from qemu
This commit is contained in:
Dongjiu Geng 2018-11-10 07:49:03 -05:00 committed by Lioncash
parent 1677898a09
commit 7087f7f398
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

View File

@ -522,6 +522,13 @@ typedef struct CPUARMState {
*/
} exception;
/* Information associated with an SError */
struct {
uint8_t pending;
uint8_t has_esr;
uint64_t esr;
} serror;
/* Thumb-2 EE state. */
uint32_t teecr;
uint32_t teehbr;