qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] Running QEMU for specific virtual time


From: ZEESHAN HAYAT
Subject: [Qemu-discuss] Running QEMU for specific virtual time
Date: Wed, 5 Dec 2018 16:55:08 +0000 (UTC)

Hi,
A newbie question about QEMU. Can we control the execution of QEMU by specific 
virtual time? 
I initialized a timer and set a expire time to it in cpu-exec.c, which looks 
like this...
int cpu_exec(CPUState *cpu){    CPUClass *cc = CPU_GET_CLASS(cpu);
    int ret;    SyncClocks sc = { 0 };
    /* replay_interrupt may need current_cpu */    current_cpu = cpu;
    if (cpu_handle_halt(cpu)) {        return EXCP_HALTED;    }
    rcu_read_lock();       QEMUTimer *t = g_malloc(sizeof(*t));
    QEMUTimerCB *cb = NULL;    void *opaque = NULL;    timer_init(t, 1, 1, cb, 
opaque);

    timer_del_locked(t->timer_list, t);        
timer_mod_ns_locked(t->timer_list, t, 1000);        
cc->cpu_exec_enter(cpu);....}
Now when I run QEMU it runs for a while and ends at a segmentation fault. 
/Zeeshan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]