Running kvm/use/kvmctl just segfault
Hi,
No matter what flatfile in the test/x86 directory I provide, it just "Segmentation fault".
Does these tests still work?
Regards,
Shawn
Quoted 7 lines · shawn du
Hi,
No matter what flatfile in the test/x86 directory I provide, it just "Segmentation fault".
Does these tests still work?
The tests do work. How are you launching them?
Signature · 1 line
error compiling committee.c: too many arguments to function
Are these commands right?
./kvmctl -s 1 -m 256 test/x86/smptest.flat
or ./kvmctl -s 1 -m 128 text/x86/bootstrap test/x86/smptest.flat
And I am using Linux kernel 2.6.27.18 downloaded from Ubuntu repository, my qemu-kvm is qemu-kvm-0.11.0-rc1 downloaded from kvm website.
Before that, I just make the kvm/libkvm and the kvm/user directory.
Thanks,
Shawn
Quoted 16 lines · Avi Kivity
Quoted 8 lines · shawn du
Hi,
No matter what flatfile in the test/x86 directory I provide, it just "Segmentation fault".
Does these tests still work?The tests do work. How are you launching them?
--
error compilingcommittee.c: too many arguments to function
Quoted 6 lines · shawn du
Are these commands right?
./kvmctl -s 1 -m 256 test/x86/smptest.flat
or ./kvmctl -s 1 -m 128 text/x86/bootstrap test/x86/smptest.flat
That is the correct way. However I haven't tested the smp tests in a while (probably since kvm gained smp support), they're probably completely bitrotted.
I am now in the process of eliminating kvmctl and running the tests through qemu.
Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
Thank you for your information.
Although those tests will be eliminated, I will try to fix them. I just consider running these tests will be an easier and quicker way for me to dissect kvm. If there is another way, please let me know.
Regards,
Shawn
Quoted 21 lines · Avi Kivity
Quoted 7 lines · shawn du
Are these commands right?
./kvmctl -s 1 -m 256 test/x86/smptest.flat
or ./kvmctl -s 1 -m 128 text/x86/bootstrap test/x86/smptest.flatThat is the correct way. However I haven't tested the smp tests in a while (probably since kvm gained smp support), they're probably completely bitrotted.
I am now in the process of eliminating kvmctl and running the tests through qemu.
--
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
Quoted 6 lines · shawn du
Thank you for your information.
Although those tests will be eliminated, I will try to fix them. I just consider running these tests will be an easier and quicker way for me to dissect kvm. If there is another way, please let me know.
I recommend moving smptest to use the real APIC, not the fake APIC provided by kvmctl.
It's true that kvmctl is a lot easier to understand than qemu, that's a downside of moving the testsuite to qemu.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 7 lines · Avi Kivity
Quoted 4 lines · shawn du
Thank you for your information.
Although those tests will be eliminated, I will try to fix them. I just consider running these tests will be an easier and quicker way
for me to dissect kvm. If there is another way, please let me know.
Yes, smp is broken (and its not worthwhile to fix the fake apic support).
Quoted 2 lines
I recommend moving smptest to use the real APIC, not the fake APIC provided by kvmctl.
+1.
Quoted 2 lines
It's true that kvmctl is a lot easier to understand than qemu, that's a downside of moving the testsuite to qemu.
Well, in fact not only the smp test failed, all tests failed. I don't know it is just me or not. But after debugging the kvmctl main.c and libkvm.c code, I found out that it is the invocation to pre_kvm_run() and post_kvm_run() caused the segfault, it is really mysterious. Then I just commented out them, and the tests (including smp and others) aborted at case KVM_EXIT_EXCEPTION, which seems not successful either.
This is all what I have done up to now. Thank you for your reply.
Shawn
Quoted 21 lines · Marcelo Tosatti
Quoted 7 lines · Avi Kivity
Quoted 4 lines · shawn du
Thank you for your information.
Although those tests will be eliminated, I will try to fix them. I just consider running these tests will be an easier and quicker way
for me to dissect kvm. If there is another way, please let me know.
Yes, smp is broken (and its not worthwhile to fix the fake apic support).
Quoted 2 lines
I recommend moving smptest to use the real APIC, not the fake APIC provided by kvmctl.
+1.
Quoted 2 lines
It's true that kvmctl is a lot easier to understand than qemu, that's a downside of moving the testsuite to qemu.
Quoted 9 lines · shawn du
Well, in fact not only the smp test failed, all tests failed. I don't know it is just me or not. But after debugging the kvmctl
main.candlibkvm.ccode, I found out that it is the invocation topre_kvm_run()andpost_kvm_run()caused the segfault, it is really mysterious. Then I just commented out them, and the tests (including smp and others) aborted at caseKVM_EXIT_EXCEPTION, which seems not successful either.This is all what I have done up to now. Thank you for your reply.
Are you running the latest qemu-kvm.git?
Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
Yes, I am running the latest qemu-kvm.git against the not so latest 2.6.27.18 kernel in Ubuntu 8.10. Normal VMs just run smoothly. Is there a problem?
Shawn
Quoted 19 lines · Avi Kivity
Quoted 10 lines · shawn du
Well, in fact not only the smp test failed, all tests failed. I don't know it is just me or not. But after debugging the kvmctl
main.candlibkvm.ccode, I found out that it is the invocation topre_kvm_run()andpost_kvm_run()caused the segfault, it is really mysterious. Then I just commented out them, and the tests (including smp and others) aborted at caseKVM_EXIT_EXCEPTION, which seems not successful either.This is all what I have done up to now. Thank you for your reply.
Are you running the latest qemu-kvm.git?
--
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
Quoted 4 lines · shawn du
Yes, I am running the latest qemu-kvm.git against the not so latest 2.6.27.18 kernel in Ubuntu 8.10. Normal VMs just run smoothly. Is there a problem?
It should work. If it doesn't, well, debug it with gdb.
Signature · 1 line
error compiling committee.c: too many arguments to function
After debugging with gdb, I find out the mistake is me.
It turns out that there should be three configures to do: in qemu-kvm root, in kvm, and in kvm/user, sadly, I missed the one in the middle. So, the consequence is that the definition of the type struct kvm_callbacks is different between kvm/user/main.c and kvm/libkvm/libkvm.c, and the consequence is that the kvm->callbacks->pre_kvm_run is a wild pointer.
Still, I don't know it is me or not, the configure in kvm infinitely loops, and says "./configure: line 135: cd: qemu: No such file or directory".
Clearly, there misses a qemu directory in kvm.
Regards,
Shawn
Quoted 13 lines · Avi Kivity
Quoted 5 lines · shawn du
Yes, I am running the latest qemu-kvm.git against the not so latest 2.6.27.18 kernel in Ubuntu 8.10. Normal VMs just run smoothly. Is there a problem?
It should work. If it doesn't, well, debug it with gdb.
--
error compilingcommittee.c: too many arguments to function