All of lore.kernel.org
 help / color / mirror / Atom feed
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 3 of 3] Move x86 specific properties of kvm_init to own file
Date: Sun, 28 Oct 2007 19:42:49 -0500	[thread overview]
Message-ID: <64de4ce84d745217a700.1193618569@thinkpad> (raw)
In-Reply-To: <patchbomb.1193618566@thinkpad>

# HG changeset patch
# User Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
# Date 1193618393 18000
# Node ID 64de4ce84d745217a7001dd5ba8c871aa9ad533a
# Parent  8bf5e4e6a4c9d2dab89062a0ab24a2ae5d144a02
Move x86 specific properties of kvm_init to own file.

This patch breaks out x86 specific properties for kvm_init initialization
into it's own function, into a architecture specific file.

Signed-off-by: Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

diff --git a/user/config-x86-common.mak b/user/config-x86-common.mak
--- a/user/config-x86-common.mak
+++ b/user/config-x86-common.mak
@@ -2,9 +2,9 @@
 
 all: kvmctl libkvm.a test_cases
 
-kvmctl_objs=kvmctl.o main.o
+kvmctl_objs=kvmctl-x86.o kvmctl.o main.o
 
-libkvm_objs=kvmctl.o
+libkvm_objs=kvmctl-x86.o kvmctl.o
 
 balloon_ctl: balloon_ctl.o
 
diff --git a/user/kvmctl-x86.c b/user/kvmctl-x86.c
new file mode 100644
--- /dev/null
+++ b/user/kvmctl-x86.c
@@ -0,0 +1,9 @@
+#include "kvmctl.h"
+#include <string.h>
+
+void arch_kvm_init(kvm_context_t kvm)
+{
+	kvm->dirty_pages_log_all = 0;
+	kvm->no_irqchip_creation = 0;
+	memset(&kvm->mem_regions, 0, sizeof(kvm->mem_regions));
+}
diff --git a/user/kvmctl-x86.h b/user/kvmctl-x86.h
--- a/user/kvmctl-x86.h
+++ b/user/kvmctl-x86.h
@@ -54,4 +54,11 @@ struct kvm_callbacks {
     void (*post_kvm_run)(void *opaque, int vcpu);
     int (*pre_kvm_run)(void *opaque, int vcpu);
 };
+
+/*
+ * \brief  Arch specific initialization for KVM context
+ */  
+void arch_kvm_init(kvm_context_t kvm);
+
+
 #endif
diff --git a/user/kvmctl.c b/user/kvmctl.c
--- a/user/kvmctl.c
+++ b/user/kvmctl.c
@@ -231,10 +231,9 @@ kvm_context_t kvm_init(struct kvm_callba
 	kvm->vm_fd = -1;
 	kvm->callbacks = callbacks;
 	kvm->opaque = opaque;
-	kvm->dirty_pages_log_all = 0;
-	kvm->no_irqchip_creation = 0;
-	memset(&kvm->mem_regions, 0, sizeof(kvm->mem_regions));
-
+
+	arch_kvm_init(kvm);
+	
 	return kvm;
  out_close:
 	close(fd);

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

      parent reply	other threads:[~2007-10-29  0:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29  0:42 [PATCH 0 of 3] kvmctl code refactoring part 1 Jerone Young
2007-10-29  0:42 ` [PATCH 1 of 3] Move x86 kvmcallback structure to kvmctl-x86.h header Jerone Young
2007-10-29  1:13   ` [PATCH 1 of 3] Move x86 kvmcallback structure tokvmctl-x86.h header Zhang, Xiantao
     [not found]     ` <42DFA526FC41B1429CE7279EF83C6BDC8B51E0-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-10-29  2:04       ` [kvm-ppc-devel] " Hollis Blanchard
2007-10-29  2:17         ` Anthony Liguori
     [not found]           ` <472542B8.9070105-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-10-29  2:41             ` Zhang, Xiantao
     [not found]               ` <42DFA526FC41B1429CE7279EF83C6BDC8B5292-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-10-29  3:00                 ` Hollis Blanchard
2007-10-29  3:53                   ` Anthony Liguori
2007-10-29  2:41         ` [kvm-ppc-devel] [PATCH 1 of 3] Move x86kvmcallback " Zhang, Xiantao
     [not found]           ` <42DFA526FC41B1429CE7279EF83C6BDC8B528F-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-10-29  2:56             ` Hollis Blanchard
2007-10-29  2:11   ` [PATCH 1 of 3] Move x86 kvmcallback structure to kvmctl-x86.h header Anthony Liguori
     [not found]     ` <4725415B.4020601-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-10-29  3:14       ` [kvm-ppc-devel] " Hollis Blanchard
2007-10-29  3:50         ` Anthony Liguori
     [not found]           ` <47255892.2090308-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-10-29  4:14             ` Hollis Blanchard
2007-10-29 14:12               ` Anthony Liguori
2007-10-30  4:31               ` Avi Kivity
2007-10-29  0:42 ` [PATCH 2 of 3] Move kvm_context structure to kvmctl.h header Jerone Young
2007-10-29  1:28   ` [PATCH 2 of 3] Move kvm_context structure to kvmctl.hheader Zhang, Xiantao
2007-10-29  2:08   ` [PATCH 2 of 3] Move kvm_context structure to kvmctl.h header Anthony Liguori
2007-10-29  7:18   ` Izik Eidus
2007-10-29  0:42 ` Jerone Young [this message]

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=64de4ce84d745217a700.1193618569@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.