mirror of
https://github.com/xemu-project/xemu.git
synced 2025-03-02 09:27:19 +00:00

When guest CPU PM is enabled, and with -cpu host, expose the host CPU MWAIT leaf in the CPUID so guest can make good PM decisions. Note: the result is 100% CPU utilization reported by host as host no longer knows that the CPU is halted. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180622192148.178309-3-mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
38 lines
503 B
C
38 lines
503 B
C
#include "qemu/osdep.h"
|
|
#include "qemu-common.h"
|
|
#include "qom/cpu.h"
|
|
#include "sysemu/replay.h"
|
|
#include "sysemu/sysemu.h"
|
|
|
|
bool enable_cpu_pm = false;
|
|
|
|
void cpu_resume(CPUState *cpu)
|
|
{
|
|
}
|
|
|
|
void qemu_init_vcpu(CPUState *cpu)
|
|
{
|
|
}
|
|
|
|
/* User mode emulation does not support record/replay yet. */
|
|
|
|
bool replay_exception(void)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
bool replay_has_exception(void)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool replay_interrupt(void)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
bool replay_has_interrupt(void)
|
|
{
|
|
return false;
|
|
}
|