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

misc.h (2182B)


      1/*
      2 * QEMU migration miscellaneus exported functions
      3 *
      4 * Copyright IBM, Corp. 2008
      5 *
      6 * Authors:
      7 *  Anthony Liguori   <aliguori@us.ibm.com>
      8 *
      9 * This work is licensed under the terms of the GNU GPL, version 2.  See
     10 * the COPYING file in the top-level directory.
     11 *
     12 */
     13
     14#ifndef MIGRATION_MISC_H
     15#define MIGRATION_MISC_H
     16
     17#include "qemu/notify.h"
     18#include "qapi/qapi-types-net.h"
     19
     20/* migration/ram.c */
     21
     22typedef enum PrecopyNotifyReason {
     23    PRECOPY_NOTIFY_SETUP = 0,
     24    PRECOPY_NOTIFY_BEFORE_BITMAP_SYNC = 1,
     25    PRECOPY_NOTIFY_AFTER_BITMAP_SYNC = 2,
     26    PRECOPY_NOTIFY_COMPLETE = 3,
     27    PRECOPY_NOTIFY_CLEANUP = 4,
     28    PRECOPY_NOTIFY_MAX = 5,
     29} PrecopyNotifyReason;
     30
     31typedef struct PrecopyNotifyData {
     32    enum PrecopyNotifyReason reason;
     33    Error **errp;
     34} PrecopyNotifyData;
     35
     36void precopy_infrastructure_init(void);
     37void precopy_add_notifier(NotifierWithReturn *n);
     38void precopy_remove_notifier(NotifierWithReturn *n);
     39int precopy_notify(PrecopyNotifyReason reason, Error **errp);
     40
     41void ram_mig_init(void);
     42void qemu_guest_free_page_hint(void *addr, size_t len);
     43
     44/* migration/block.c */
     45
     46#ifdef CONFIG_LIVE_BLOCK_MIGRATION
     47void blk_mig_init(void);
     48#else
     49static inline void blk_mig_init(void) {}
     50#endif
     51
     52AnnounceParameters *migrate_announce_params(void);
     53/* migration/savevm.c */
     54
     55void dump_vmstate_json_to_file(FILE *out_fp);
     56
     57/* migration/migration.c */
     58void migration_object_init(void);
     59void migration_shutdown(void);
     60bool migration_is_idle(void);
     61bool migration_is_active(MigrationState *);
     62void add_migration_state_change_notifier(Notifier *notify);
     63void remove_migration_state_change_notifier(Notifier *notify);
     64bool migration_in_setup(MigrationState *);
     65bool migration_has_finished(MigrationState *);
     66bool migration_has_failed(MigrationState *);
     67/* ...and after the device transmission */
     68bool migration_in_postcopy_after_devices(MigrationState *);
     69void migration_global_dump(Monitor *mon);
     70/* True if incomming migration entered POSTCOPY_INCOMING_DISCARD */
     71bool migration_in_incoming_postcopy(void);
     72/* True if background snapshot is active */
     73bool migration_in_bg_snapshot(void);
     74
     75/* migration/block-dirty-bitmap.c */
     76void dirty_bitmap_mig_init(void);
     77
     78#endif