mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
kvm: get/set PV EOI MSR
Support get/set of new PV EOI MSR, for migration. Add an optional section for MSR value - send it out in case MSR was changed from the default value (0). Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
651682dcf5
commit
bc9a839d56
3 changed files with 35 additions and 0 deletions
|
@ -279,6 +279,13 @@ static bool async_pf_msr_needed(void *opaque)
|
|||
return cpu->async_pf_en_msr != 0;
|
||||
}
|
||||
|
||||
static bool pv_eoi_msr_needed(void *opaque)
|
||||
{
|
||||
CPUX86State *cpu = opaque;
|
||||
|
||||
return cpu->pv_eoi_en_msr != 0;
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_async_pf_msr = {
|
||||
.name = "cpu/async_pf_msr",
|
||||
.version_id = 1,
|
||||
|
@ -290,6 +297,17 @@ static const VMStateDescription vmstate_async_pf_msr = {
|
|||
}
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_pv_eoi_msr = {
|
||||
.name = "cpu/async_pv_eoi_msr",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.minimum_version_id_old = 1,
|
||||
.fields = (VMStateField []) {
|
||||
VMSTATE_UINT64(pv_eoi_en_msr, CPUX86State),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
static bool fpop_ip_dp_needed(void *opaque)
|
||||
{
|
||||
CPUX86State *env = opaque;
|
||||
|
@ -453,6 +471,9 @@ static const VMStateDescription vmstate_cpu = {
|
|||
{
|
||||
.vmsd = &vmstate_async_pf_msr,
|
||||
.needed = async_pf_msr_needed,
|
||||
} , {
|
||||
.vmsd = &vmstate_pv_eoi_msr,
|
||||
.needed = pv_eoi_msr_needed,
|
||||
} , {
|
||||
.vmsd = &vmstate_fpop_ip_dp,
|
||||
.needed = fpop_ip_dp_needed,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue