Hi, community:

I'm trying to run the KVM CPU. The command is:
build/X86/gem5.debug configs/example/se_kvm.py -c 
./tests/test-progs/hello/bin/x86/linux/hello --cpu-type=X86KvmCPU
But the simulation will fail with this message: "panic: KVM: Failed to set 
guest special registers"

The se_kvm.py is just the se.py with the code of 'brandPred' removed, because 
X86KvmCPU doesn't have it.

Using gdb to debug, the error is caused by the ioctl() function, which is from 
the system lib.
And this function returns error.
I tried same command in another computer, and it can work, seems that there are 
some system related issue.

Does anyone have ideas about why this function can not return right value? Any 
system permission needed?

This is the failed function:

BaseKvmCPU::setSpecialRegisters(const struct kvm_sregs &regs) 
{                                                                  
         if (ioctl(KVM_SET_SREGS, (void *)&regs) == -1)                 
             panic("KVM: Failed to set guest special registers\n");     
}                  

Using gdb, the parameter value for ioctl() is:

(gdb) p KVM_SET_SREGS
$1 = 1094233732
(gdb) p &regs
$2 = (const kvm_sregs *) 0x7fffffffcac0

The function is in this file and has no code source.
ioctl () at ../sysdeps/unix/syscall-template.S:84
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to