From: Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH 4 of 7] Add vcpu to arguments of powerpc libkvm callbacks
Date: Sun, 27 Jan 2008 21:16:27 -0600 [thread overview]
Message-ID: <3aa131f9bc863af5d029.1201490187@thinkpad> (raw)
In-Reply-To: <patchbomb.1201490183@thinkpad>
# HG changeset patch
# User Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
# Date 1201488336 21600
# Node ID 3aa131f9bc863af5d029740b1579e747d3703c7e
# Parent 7c535acfd618f41aa6f49efa25e3fd6e1f75b633
Add vcpu to arguments of powerpc libkvm callbacks
This patch adds vcpu as an argmunent for powerpc specific callbacks:
powerpc_dcr_read
powerpc_dcr_write
Signed-off-by: Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
diff --git a/libkvm/libkvm-powerpc.c b/libkvm/libkvm-powerpc.c
--- a/libkvm/libkvm-powerpc.c
+++ b/libkvm/libkvm-powerpc.c
@@ -26,15 +26,17 @@
#include <errno.h>
#include <stdio.h>
-int handle_dcr(struct kvm_run *run, kvm_context_t kvm)
+int handle_dcr(struct kvm_run *run, kvm_context_t kvm, int vcpu)
{
int ret = 0;
if (run->dcr.is_write)
- ret = kvm->callbacks->powerpc_dcr_write(run->dcr.dcrn,
+ ret = kvm->callbacks->powerpc_dcr_write(vcpu,
+ run->dcr.dcrn,
run->dcr.data);
else
- ret = kvm->callbacks->powerpc_dcr_read(run->dcr.dcrn,
+ ret = kvm->callbacks->powerpc_dcr_read(vcpu,
+ run->dcr.dcrn,
&(run->dcr.data));
return ret;
@@ -102,7 +104,7 @@ int kvm_arch_run(struct kvm_run *run, kv
switch (run->exit_reason){
case KVM_EXIT_DCR:
- ret = handle_dcr(run, kvm);
+ ret = handle_dcr(run, kvm, vcpu);
break;
default:
ret = 1;
diff --git a/libkvm/libkvm.h b/libkvm/libkvm.h
--- a/libkvm/libkvm.h
+++ b/libkvm/libkvm.h
@@ -66,8 +66,8 @@ struct kvm_callbacks {
int (*pre_kvm_run)(void *opaque, int vcpu);
int (*tpr_access)(void *opaque, int vcpu, uint64_t rip, int is_write);
#if defined(__powerpc__)
- int (*powerpc_dcr_read)(uint32_t dcrn, uint32_t *data);
- int (*powerpc_dcr_write)(uint32_t dcrn, uint32_t data);
+ int (*powerpc_dcr_read)(int vcpu, uint32_t dcrn, uint32_t *data);
+ int (*powerpc_dcr_write)(int vcpu, uint32_t dcrn, uint32_t data);
#endif
};
-------------------------------------------------------------------------
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/
next prev parent reply other threads:[~2008-01-28 3:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-28 3:16 [PATCH 0 of 7] PowerPC Embedded KVM qemu enablement patches Jerone Young
2008-01-28 3:16 ` [PATCH 1 of 7] Enhnace kvm-userspace configure script for powerpc Jerone Young
2008-01-28 3:16 ` [PATCH 2 of 7] Ensure 4kB page alignment for embedded powerpc when using kvm Jerone Young
2008-01-28 3:16 ` [PATCH 3 of 7] Chnage so that Powerpc & IA64 do not have KVM_EXTRA_PAGES set Jerone Young
2008-01-28 3:16 ` Jerone Young [this message]
2008-01-28 3:16 ` [PATCH 5 of 7] Add qemu powerpc build support Jerone Young
2008-01-28 3:16 ` [PATCH 6 of 7] Add powerpc KVM support to qemu Jerone Young
2008-01-28 3:16 ` [PATCH 7 of 7] Add Powerpc 440 board model "bamboo" to take advantage of Powerpc KVM Jerone Young
2008-01-28 3:46 ` [PATCH 0 of 7] PowerPC Embedded KVM qemu enablement patches Anthony Liguori
[not found] ` <479D5032.6050807-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2008-01-28 16:01 ` Jerone Young
2008-01-28 16:17 ` Anthony Liguori
[not found] ` <479E0029.3090906-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2008-01-28 16:20 ` Jerone Young
2008-01-28 16:48 ` [kvm-ppc-devel] " Hollis Blanchard
2008-01-28 11:03 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3aa131f9bc863af5d029.1201490187@thinkpad \
--to=jyoung5-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox