Bernhard Kaindl wrote:
> I did not test this patch as I did not find documentation on how to run the
> test cases and I could not find a make target to run them from make.
>
>
make -C user test_cases
user/kvmctl user/test/x86/bootstrap user/test/x86/access.flat
(we should rename user -> test)
> --- kvm-60/user/test/x86/access.c
> +++ kvm-60/user/test/x86/access.c 2008/01/24 15:14:16
> @@ -1,6 +1,7 @@
>
> #include "smp.h"
> #include "printf.h"
> +#include "string.h"
>
> #define true 1
> #define false 0
> @@ -569,7 +570,7 @@
> int r;
>
> printf("starting test\n\n");
> - smp_init(ac_test_run);
> + smp_init((void (*)(void))ac_test_run);
> r = ac_test_run();
> return r ? 0 : 1;
> }
>
Better to add a wrapper that conforms to the expected signature, and
makes sure the return value of ac_test_run() is not lost.
Haven't run access.flat on smp for a long while; the results should be
interesting after the page fault scaling work.
> = i;
> @@ -105,7 +104,7 @@
>
> void test_push(void *mem)
> {
> - unsigned long tmp;
> + unsigned long tmp = 0;
> unsigned long *stack_top = mem + 4096;
> unsigned long *new_stack_top;
> unsigned long memw = 0x123456789abcdeful;
>
I'm needlessly pedantic, but the correct fix is to pass the constraint
"=&r"(tmp) in the write section. This tells gcc the register is
clobbered ("=") and not to pass any inputs in it ("&").
--
Any sufficiently difficult bug is indistinguishable from a feature.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel