From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Subject: [PATCH 3/3] Add dcr read/write to the PowerPC kvmctl implementation Date: Wed, 9 Jan 2008 16:11:16 +0100 Message-ID: <1199891480765-git-send-email-ehrhardt@linux.vnet.ibm.com> References: <1199891476938-git-send-email-ehrhardt@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: , kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, "Avi Kivity ; Hollis Blanchard ; Jerone Young" , Christian Ehrhardt To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: In-Reply-To: <1199891476938-git-send-email-ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Subject: [PATCH 3/3] Add dcr read/write to the PowerPC kvmctl implementation From: Christian Ehrhardt Adds simple functions to catch dcr access while executing testcases printing information about that access when triggered. Signed-off-by: Christian Ehrhardt --- main-ppc.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+) diff -r d19893c744fa user/main-ppc.c --- a/user/main-ppc.c Wed Jan 09 14:06:38 2008 +0100 +++ b/user/main-ppc.c Wed Jan 09 14:34:49 2008 +0100 @@ -146,6 +146,19 @@ static int test_mem_write(void *opaque, return 0; } +static int test_dcr_read(kvm_context_t kvm, uint32_t dcrn, uint32_t *data) +{ + printf("%s: dcrn %04X\n", __func__, dcrn); + *data = 0; + return 0; +} + +static int test_dcr_write(kvm_context_t kvm, uint32_t dcrn, uint32_t data) +{ + printf("%s: dcrn %04X data %04X\n", __func__, dcrn, data); + return 0; +} + static struct kvm_callbacks test_callbacks = { .mmio_read = test_mem_read, .mmio_write = test_mem_write, @@ -155,6 +168,8 @@ static struct kvm_callbacks test_callbac .try_push_interrupts = test_try_push_interrupts, .post_kvm_run = test_post_kvm_run, .pre_kvm_run = test_pre_kvm_run, + .powerpc_dcr_read = test_dcr_read, + .powerpc_dcr_write = test_dcr_write, }; static unsigned long load_file(void *mem, const char *fname, int inval_icache) ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace