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

x86_emu.h (2096B)


      1/*
      2 * Copyright (C) 2016 Veertu Inc,
      3 * Copyright (C) 2017 Google Inc,
      4 *
      5 * This program is free software; you can redistribute it and/or
      6 * modify it under the terms of the GNU Lesser General Public
      7 * License as published by the Free Software Foundation; either
      8 * version 2.1 of the License, or (at your option) any later version.
      9 *
     10 * This program is distributed in the hope that it will be useful,
     11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     13 * Lesser General Public License for more details.
     14 *
     15 * You should have received a copy of the GNU Lesser General Public
     16 * License along with this program; if not, see <http://www.gnu.org/licenses/>.
     17 */
     18
     19#ifndef X86_EMU_H
     20#define X86_EMU_H
     21
     22#include "x86.h"
     23#include "x86_decode.h"
     24#include "cpu.h"
     25
     26void init_emu(void);
     27bool exec_instruction(struct CPUX86State *env, struct x86_decode *ins);
     28
     29void load_regs(struct CPUState *cpu);
     30void store_regs(struct CPUState *cpu);
     31
     32void simulate_rdmsr(struct CPUState *cpu);
     33void simulate_wrmsr(struct CPUState *cpu);
     34
     35target_ulong read_reg(CPUX86State *env, int reg, int size);
     36void write_reg(CPUX86State *env, int reg, target_ulong val, int size);
     37target_ulong read_val_from_reg(target_ulong reg_ptr, int size);
     38void write_val_to_reg(target_ulong reg_ptr, target_ulong val, int size);
     39void write_val_ext(struct CPUX86State *env, target_ulong ptr, target_ulong val, int size);
     40uint8_t *read_mmio(struct CPUX86State *env, target_ulong ptr, int bytes);
     41target_ulong read_val_ext(struct CPUX86State *env, target_ulong ptr, int size);
     42
     43void exec_movzx(struct CPUX86State *env, struct x86_decode *decode);
     44void exec_shl(struct CPUX86State *env, struct x86_decode *decode);
     45void exec_movsx(struct CPUX86State *env, struct x86_decode *decode);
     46void exec_ror(struct CPUX86State *env, struct x86_decode *decode);
     47void exec_rol(struct CPUX86State *env, struct x86_decode *decode);
     48void exec_rcl(struct CPUX86State *env, struct x86_decode *decode);
     49void exec_rcr(struct CPUX86State *env, struct x86_decode *decode);
     50#endif