* [PATCH 2/5] user: ppc: fix build break caused by changes to kvm_callbacks
[not found] ` <a3f0c46b2455645569aed89e4d43b43b66d3bc87.1228330895.git.hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2008-12-03 19:07 ` Hollis Blanchard
2008-12-03 19:07 ` [PATCH 3/5] user: ppc: Fix guest load address Hollis Blanchard
2008-12-03 19:07 ` [PATCH 4/5] user: ppc: Move -ffreestanding to the right location Hollis Blanchard
2 siblings, 0 replies; 7+ messages in thread
From: Hollis Blanchard @ 2008-12-03 19:07 UTC (permalink / raw)
To: avi-H+wXaHxf7aLQT0dZR+AlfA
Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
Hollis Blanchard
Signed-off-by: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
user/main-ppc.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/user/main-ppc.c b/user/main-ppc.c
index c4ddcef..5fdf28e 100644
--- a/user/main-ppc.c
+++ b/user/main-ppc.c
@@ -69,7 +69,7 @@ static int test_debug(void *opaque, void *vcpu)
return 0;
}
-static int test_halt(void *opaque, void *vcpu)
+static int test_halt(void *opaque, int vcpu)
{
int n;
@@ -87,9 +87,8 @@ static int test_try_push_interrupts(void *opaque)
return 0;
}
-static int test_try_push_nmi(void *opaque)
+static void test_push_nmi(void *opaque)
{
- return 0;
}
static void test_post_kvm_run(void *opaque, void *vcpu)
@@ -160,14 +159,14 @@ static int test_mem_write(void *opaque, uint64_t addr, uint8_t *data, int len)
(uint64_t *)data);
}
-static int test_dcr_read(uint32_t dcrn, uint32_t *data)
+static int test_dcr_read(int vcpu, uint32_t dcrn, uint32_t *data)
{
printf("%s: dcrn %04X\n", __func__, dcrn);
*data = 0;
return 0;
}
-static int test_dcr_write(uint32_t dcrn, uint32_t data)
+static int test_dcr_write(int vcpu, uint32_t dcrn, uint32_t data)
{
printf("%s: dcrn %04X data %04X\n", __func__, dcrn, data);
return 0;
@@ -180,7 +179,7 @@ static struct kvm_callbacks test_callbacks = {
.halt = test_halt,
.io_window = test_io_window,
.try_push_interrupts = test_try_push_interrupts,
- .try_push_nmi = test_try_push_nmi,
+ .push_nmi = test_push_nmi,
.post_kvm_run = test_post_kvm_run,
.pre_kvm_run = test_pre_kvm_run,
.powerpc_dcr_read = test_dcr_read,
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 3/5] user: ppc: Fix guest load address
[not found] ` <a3f0c46b2455645569aed89e4d43b43b66d3bc87.1228330895.git.hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-12-03 19:07 ` [PATCH 2/5] user: ppc: fix build break caused by changes to kvm_callbacks Hollis Blanchard
@ 2008-12-03 19:07 ` Hollis Blanchard
2008-12-03 19:07 ` [PATCH 4/5] user: ppc: Move -ffreestanding to the right location Hollis Blanchard
2 siblings, 0 replies; 7+ messages in thread
From: Hollis Blanchard @ 2008-12-03 19:07 UTC (permalink / raw)
To: avi-H+wXaHxf7aLQT0dZR+AlfA
Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
Deepa Srinivasan
From: Deepa Srinivasan <deepas-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Test cases must be loaded at 1 MB, their link address.
Signed-off-by: Deepa Srinivasan <deepas-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
user/main-ppc.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/user/main-ppc.c b/user/main-ppc.c
index 5fdf28e..71afc9e 100644
--- a/user/main-ppc.c
+++ b/user/main-ppc.c
@@ -63,6 +63,9 @@ struct vcpu_info {
struct vcpu_info *vcpus;
+/* Must match flat.lds linker script */
+#define VM_TEST_LOAD_ADDRESS 0x100000
+
static int test_debug(void *opaque, void *vcpu)
{
printf("test_debug\n");
@@ -239,10 +242,16 @@ static void init_vcpu(int n)
static void *do_create_vcpu(void *_n)
{
+ struct kvm_regs regs;
int n = (long)_n;
kvm_create_vcpu(kvm, n);
init_vcpu(n);
+
+ kvm_get_regs(kvm, n, ®s);
+ regs.pc = VM_TEST_LOAD_ADDRESS;
+ kvm_set_regs(kvm, n, ®s);
+
kvm_run(kvm, n, &vcpus[n]);
sem_post(&exited_sem);
return NULL;
@@ -363,8 +372,8 @@ int main(int argc, char **argv)
vm_mem = kvm_create_phys_mem(kvm, 0, memory_size, 0, 1);
- len = load_file(vm_mem, argv[optind], 1);
- sync_caches(vm_mem, len);
+ len = load_file(vm_mem + VM_TEST_LOAD_ADDRESS, argv[optind], 1);
+ sync_caches(vm_mem + VM_TEST_LOAD_ADDRESS, len);
io_table_register(&mmio_table, 0xf0000000, 64, mmio_handler, NULL);
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 4/5] user: ppc: Move -ffreestanding to the right location
[not found] ` <a3f0c46b2455645569aed89e4d43b43b66d3bc87.1228330895.git.hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-12-03 19:07 ` [PATCH 2/5] user: ppc: fix build break caused by changes to kvm_callbacks Hollis Blanchard
2008-12-03 19:07 ` [PATCH 3/5] user: ppc: Fix guest load address Hollis Blanchard
@ 2008-12-03 19:07 ` Hollis Blanchard
2 siblings, 0 replies; 7+ messages in thread
From: Hollis Blanchard @ 2008-12-03 19:07 UTC (permalink / raw)
To: avi-H+wXaHxf7aLQT0dZR+AlfA
Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
Deepa Srinivasan
From: Deepa Srinivasan <deepas-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Move the "-ffreestanding" compiler option (to avoid built-in functions) to the
correct place in the Makefile.
Signed-off-by: Deepa Srinivasan <deepas-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
user/config-powerpc.mak | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/user/config-powerpc.mak b/user/config-powerpc.mak
index 297bce4..79af245 100644
--- a/user/config-powerpc.mak
+++ b/user/config-powerpc.mak
@@ -1,5 +1,6 @@
CFLAGS += -I $(KERNELDIR)/include
CFLAGS += -Wa,-mregnames -I test/lib
+CFLAGS += -ffreestanding
cstart := test/powerpc/cstart.o
@@ -7,7 +8,6 @@ cflatobjs += \
test/lib/powerpc/io.o
$(libcflat): LDFLAGS += -nostdlib
-$(libcflat): CFLAGS += -ffreestanding
# these tests do not use libcflat
simpletests := \
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 7+ messages in thread