mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-18 17:00:26 +00:00
vancouver: handle CPUID 0x40000000
This instruction is issued by Linux when the KVM guest support is compiled in. We have to return deterministic values to let the Linux kernel survive.
This commit is contained in:
parent
688375619a
commit
ba5906e425
@ -996,9 +996,28 @@ class Vcpu_dispatcher : public Genode::Thread<STACK_SIZE>,
|
||||
if (msg.type != CpuMessage::TYPE_CPUID)
|
||||
return false;
|
||||
|
||||
PDBG("CpuMessage::TYPE_CPUID - not implemented");
|
||||
for (;;);
|
||||
return false;
|
||||
/*
|
||||
* Linux kernels with guest KVM support compiled in, executed
|
||||
* CPUID to query the presence of KVM.
|
||||
*/
|
||||
enum { CPUID_KVM_SIGNATURE = 0x40000000 };
|
||||
|
||||
switch (msg.cpuid_index) {
|
||||
|
||||
case CPUID_KVM_SIGNATURE:
|
||||
|
||||
msg.cpu->eax = 0;
|
||||
msg.cpu->ebx = 0;
|
||||
msg.cpu->ecx = 0;
|
||||
msg.cpu->edx = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
PDBG("CpuMessage::TYPE_CPUID index %x ignored, return true)",
|
||||
msg.cpuid_index);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user