qemu/include/hw/i386/vmport.h
Liran Alon d6048bfd12 hw/i386/vmport: Add support for CMD_GETHZ
This command returns to guest information on LAPIC bus frequency and TSC
frequency.

One can see how this interface is used by Linux vmware_platform_setup()
introduced in Linux commit 88b094fb8d4f ("x86: Hypervisor detection and
get tsc_freq from hypervisor").

Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Message-Id: <20200312165431.82118-16-liran.alon@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-06-10 12:09:53 -04:00

29 lines
698 B
C

#ifndef HW_VMPORT_H
#define HW_VMPORT_H
#include "hw/isa/isa.h"
#define TYPE_VMPORT "vmport"
typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address);
typedef enum {
VMPORT_CMD_GETVERSION = 10,
VMPORT_CMD_GETBIOSUUID = 19,
VMPORT_CMD_GETRAMSIZE = 20,
VMPORT_CMD_VMMOUSE_DATA = 39,
VMPORT_CMD_VMMOUSE_STATUS = 40,
VMPORT_CMD_VMMOUSE_COMMAND = 41,
VMPORT_CMD_GETHZ = 45,
VMPORT_CMD_GET_VCPU_INFO = 68,
VMPORT_ENTRIES
} VMPortCommand;
static inline void vmport_init(ISABus *bus)
{
isa_create_simple(bus, TYPE_VMPORT);
}
void vmport_register(VMPortCommand command, VMPortReadFunc *func, void *opaque);
#endif