Hello,

While I haven't seen that particular error before, currently KVM only works
on AMD platforms and it doesn't work on Intel platforms. There are a couple
of patches on our code review site to fix this (
https://gem5-review.googlesource.com/
<https://gem5-review.googlesource.com/dashboard/self>). However, they are
untested in SE mode.

Cheers,
Jason

On Tue, Jan 28, 2020 at 2:39 AM chenboya <[email protected]> wrote:

> 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
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to