mirror of https://github.com/xqemu/xqemu.git
added last_io_time field
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1752 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
5f1ce9487c
commit
f1c85677fc
|
@ -68,6 +68,9 @@ static inline DATA_TYPE glue(io_read, SUFFIX)(target_phys_addr_t physaddr,
|
||||||
res |= (uint64_t)io_mem_read[index][2](io_mem_opaque[index], physaddr + 4) << 32;
|
res |= (uint64_t)io_mem_read[index][2](io_mem_opaque[index], physaddr + 4) << 32;
|
||||||
#endif
|
#endif
|
||||||
#endif /* SHIFT > 2 */
|
#endif /* SHIFT > 2 */
|
||||||
|
#ifdef USE_KQEMU
|
||||||
|
env->last_io_time = cpu_get_time_fast();
|
||||||
|
#endif
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,6 +204,9 @@ static inline void glue(io_write, SUFFIX)(target_phys_addr_t physaddr,
|
||||||
io_mem_write[index][2](io_mem_opaque[index], physaddr + 4, val >> 32);
|
io_mem_write[index][2](io_mem_opaque[index], physaddr + 4, val >> 32);
|
||||||
#endif
|
#endif
|
||||||
#endif /* SHIFT > 2 */
|
#endif /* SHIFT > 2 */
|
||||||
|
#ifdef USE_KQEMU
|
||||||
|
env->last_io_time = cpu_get_time_fast();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void REGPARM(2) glue(glue(__st, SUFFIX), MMUSUFFIX)(target_ulong addr,
|
void REGPARM(2) glue(glue(__st, SUFFIX), MMUSUFFIX)(target_ulong addr,
|
||||||
|
|
|
@ -522,6 +522,7 @@ typedef struct CPUX86State {
|
||||||
|
|
||||||
#ifdef USE_KQEMU
|
#ifdef USE_KQEMU
|
||||||
int kqemu_enabled;
|
int kqemu_enabled;
|
||||||
|
int last_io_time;
|
||||||
#endif
|
#endif
|
||||||
/* in order to simplify APIC support, we leave this pointer to the
|
/* in order to simplify APIC support, we leave this pointer to the
|
||||||
user */
|
user */
|
||||||
|
@ -637,6 +638,15 @@ void cpu_x86_update_cr0(CPUX86State *env, uint32_t new_cr0);
|
||||||
#define X86_DUMP_FPU 0x0001 /* dump FPU state too */
|
#define X86_DUMP_FPU 0x0001 /* dump FPU state too */
|
||||||
#define X86_DUMP_CCOP 0x0002 /* dump qemu flag cache */
|
#define X86_DUMP_CCOP 0x0002 /* dump qemu flag cache */
|
||||||
|
|
||||||
|
#ifdef USE_KQEMU
|
||||||
|
static inline int cpu_get_time_fast(void)
|
||||||
|
{
|
||||||
|
int low, high;
|
||||||
|
asm volatile("rdtsc" : "=a" (low), "=d" (high));
|
||||||
|
return low;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TARGET_PAGE_BITS 12
|
#define TARGET_PAGE_BITS 12
|
||||||
#include "cpu-all.h"
|
#include "cpu-all.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue