cachepc-qemu

Fork of AMDESE/qemu with changes for cachepc side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-qemu
Log | Files | Refs | Submodules | LICENSE | sfeed.txt

sysemu.h (3730B)


      1#ifndef SYSEMU_H
      2#define SYSEMU_H
      3/* Misc. things related to the system emulator.  */
      4
      5#include "qemu/timer.h"
      6#include "qemu/notify.h"
      7#include "qemu/uuid.h"
      8
      9/* vl.c */
     10
     11extern int only_migratable;
     12extern const char *qemu_name;
     13extern QemuUUID qemu_uuid;
     14extern bool qemu_uuid_set;
     15
     16void qemu_add_exit_notifier(Notifier *notify);
     17void qemu_remove_exit_notifier(Notifier *notify);
     18
     19void qemu_run_machine_init_done_notifiers(void);
     20void qemu_add_machine_init_done_notifier(Notifier *notify);
     21void qemu_remove_machine_init_done_notifier(Notifier *notify);
     22
     23void configure_rtc(QemuOpts *opts);
     24
     25void qemu_init_subsystems(void);
     26
     27extern int autostart;
     28
     29typedef enum {
     30    VGA_NONE, VGA_STD, VGA_CIRRUS, VGA_VMWARE, VGA_XENFB, VGA_QXL,
     31    VGA_TCX, VGA_CG3, VGA_DEVICE, VGA_VIRTIO,
     32    VGA_TYPE_MAX,
     33} VGAInterfaceType;
     34
     35extern int vga_interface_type;
     36
     37extern int graphic_width;
     38extern int graphic_height;
     39extern int graphic_depth;
     40extern int display_opengl;
     41extern const char *keyboard_layout;
     42extern int win2k_install_hack;
     43extern int alt_grab;
     44extern int ctrl_grab;
     45extern int graphic_rotate;
     46extern int old_param;
     47extern int boot_menu;
     48extern bool boot_strict;
     49extern uint8_t *boot_splash_filedata;
     50extern bool enable_mlock;
     51extern bool enable_cpu_pm;
     52extern QEMUClockType rtc_clock;
     53
     54#define MAX_OPTION_ROMS 16
     55typedef struct QEMUOptionRom {
     56    const char *name;
     57    int32_t bootindex;
     58} QEMUOptionRom;
     59extern QEMUOptionRom option_rom[MAX_OPTION_ROMS];
     60extern int nb_option_roms;
     61
     62#define MAX_PROM_ENVS 128
     63extern const char *prom_envs[MAX_PROM_ENVS];
     64extern unsigned int nb_prom_envs;
     65
     66/* pcie aer error injection */
     67void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict);
     68
     69/* serial ports */
     70
     71/* Return the Chardev for serial port i, or NULL if none */
     72Chardev *serial_hd(int i);
     73
     74/* parallel ports */
     75
     76#define MAX_PARALLEL_PORTS 3
     77
     78extern Chardev *parallel_hds[MAX_PARALLEL_PORTS];
     79
     80void hmp_info_usb(Monitor *mon, const QDict *qdict);
     81
     82void add_boot_device_path(int32_t bootindex, DeviceState *dev,
     83                          const char *suffix);
     84char *get_boot_devices_list(size_t *size);
     85
     86DeviceState *get_boot_device(uint32_t position);
     87void check_boot_index(int32_t bootindex, Error **errp);
     88void del_boot_device_path(DeviceState *dev, const char *suffix);
     89void device_add_bootindex_property(Object *obj, int32_t *bootindex,
     90                                   const char *name, const char *suffix,
     91                                   DeviceState *dev);
     92void restore_boot_order(void *opaque);
     93void validate_bootdevices(const char *devices, Error **errp);
     94void add_boot_device_lchs(DeviceState *dev, const char *suffix,
     95                          uint32_t lcyls, uint32_t lheads, uint32_t lsecs);
     96void del_boot_device_lchs(DeviceState *dev, const char *suffix);
     97char *get_boot_devices_lchs_list(size_t *size);
     98
     99/* handler to set the boot_device order for a specific type of MachineClass */
    100typedef void QEMUBootSetHandler(void *opaque, const char *boot_order,
    101                                Error **errp);
    102void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque);
    103void qemu_boot_set(const char *boot_order, Error **errp);
    104
    105bool defaults_enabled(void);
    106
    107void qemu_init(int argc, char **argv, char **envp);
    108void qemu_main_loop(void);
    109void qemu_cleanup(void);
    110
    111extern QemuOptsList qemu_legacy_drive_opts;
    112extern QemuOptsList qemu_common_drive_opts;
    113extern QemuOptsList qemu_drive_opts;
    114extern QemuOptsList bdrv_runtime_opts;
    115extern QemuOptsList qemu_chardev_opts;
    116extern QemuOptsList qemu_device_opts;
    117extern QemuOptsList qemu_netdev_opts;
    118extern QemuOptsList qemu_nic_opts;
    119extern QemuOptsList qemu_net_opts;
    120extern QemuOptsList qemu_global_opts;
    121extern QemuOptsList qemu_semihosting_config_opts;
    122
    123#endif