Re: [kvm-devel] can't boot 2.6.26-rcX

Avi Kivity
2008-05-21T12:40:26Z

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

Bernd Schubert wrote:
> On Wednesday 21 May 2008 11:54:03 Avi Kivity wrote:
>
>> Bernd Schubert wrote:
>>
>>> It is CONFIG_KVM_GUEST, with CONFIG_KVM_CLOCK=y is boots fine!
>>>
>> Works fine here. Can you post your non-booting config?
>>
>
> CONFIG_KVM_GUEST=y doesn't work on my workstation, while the same kernel works
> fine in a kvm-session on a laptop of a colleague. So it seems to be dependent
> on the host hardware.
>

Yes. Attached patch fixes hypercalls on AMD.

--
error compiling committee.c: too many arguments to function

[-- Attachment #2: fix-amd-hypercall.patch --]
[-- Type: text/plain, Size: 407 bytes --]

diff --git a/kernel/x86_emulate.c b/kernel/x86_emulate.c
index 8a96320..932f216 100644
--- a/kernel/x86_emulate.c
+++ b/kernel/x86_emulate.c
@@ -1727,7 +1727,8 @@ twobyte_insn:
if (rc)
goto done;

- kvm_emulate_hypercall(ctxt->vcpu);
+ /* Let the processor re-execute the fixed hypercall */
+ c->eip = ctxt->vcpu->arch.rip;
/* Disable writeback. */
c->dst.type = OP_NONE;
break;