All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollisb@us.ibm.com>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [kvm-ppc-devel] [PATCH 1 of 3] Pass an opaque parameter
Date: Tue, 05 Feb 2008 05:34:32 +0000	[thread overview]
Message-ID: <bede9476e203f5bf59d2.1202189672@basalt> (raw)
In-Reply-To: <patchbomb.1202189671@basalt>

# HG changeset patch
# User Hollis Blanchard <hollisb@us.ibm.com>
# Date 1202189664 21600
# Node ID bede9476e203f5bf59d21cc3cd71a30de2ce2c44
# Parent  dfb0e1d58b57dfdf76b3111565815599bd38b92d

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

---
4 files changed, 9 insertions(+), 7 deletions(-)
arch/powerpc/kvm/powerpc.c |    3 ++-
arch/x86/kvm/x86.c         |    4 ++--
include/linux/kvm_host.h   |    3 ++-
virt/kvm/kvm_main.c        |    6 +++---


diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -460,7 +460,8 @@ int kvm_arch_set_memory_region(struct kv
 	return 0;
 }
 
-struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
+struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id,
+                                      void *opaque)
 {
 	struct kvm_vcpu *vcpu;
 	int err;
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3052,8 +3052,8 @@ void kvm_arch_vcpu_free(struct kvm_vcpu 
 	kvm_x86_ops->vcpu_free(vcpu);
 }
 
-struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
-						unsigned int id)
+struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id,
+                                      void *opaque)
 {
 	return kvm_x86_ops->vcpu_create(kvm, id);
 }
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -237,7 +237,8 @@ void kvm_arch_vcpu_free(struct kvm_vcpu 
 void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu);
 void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu);
 void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu);
-struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id);
+struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id,
+                                      void *opaque);
 int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu);
 void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu);
 
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -733,7 +733,7 @@ static int create_vcpu_fd(struct kvm_vcp
 /*
  * Creates some virtual cpus.  Good luck creating more than one.
  */
-static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, int n)
+static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, int n, void *opaque)
 {
 	int r;
 	struct kvm_vcpu *vcpu;
@@ -741,7 +741,7 @@ static int kvm_vm_ioctl_create_vcpu(stru
 	if (!valid_vcpu(n))
 		return -EINVAL;
 
-	vcpu = kvm_arch_vcpu_create(kvm, n);
+	vcpu = kvm_arch_vcpu_create(kvm, n, opaque);
 	if (IS_ERR(vcpu))
 		return PTR_ERR(vcpu);
 
@@ -945,7 +945,7 @@ static long kvm_vm_ioctl(struct file *fi
 		return -EIO;
 	switch (ioctl) {
 	case KVM_CREATE_VCPU:
-		r = kvm_vm_ioctl_create_vcpu(kvm, arg);
+		r = kvm_vm_ioctl_create_vcpu(kvm, arg, NULL);
 		if (r < 0)
 			goto out;
 		break;

-------------------------------------------------------------------------
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-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

WARNING: multiple messages have this Message-ID (diff)
From: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH 1 of 3] Pass an opaque parameter through	kvm_vm_ioctl_vcpu_create() to kvm_arch_vcpu_create()
Date: Mon, 04 Feb 2008 23:34:32 -0600	[thread overview]
Message-ID: <bede9476e203f5bf59d2.1202189672@basalt> (raw)
In-Reply-To: <patchbomb.1202189671@basalt>

# HG changeset patch
# User Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
# Date 1202189664 21600
# Node ID bede9476e203f5bf59d21cc3cd71a30de2ce2c44
# Parent  dfb0e1d58b57dfdf76b3111565815599bd38b92d

Signed-off-by: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

---
4 files changed, 9 insertions(+), 7 deletions(-)
arch/powerpc/kvm/powerpc.c |    3 ++-
arch/x86/kvm/x86.c         |    4 ++--
include/linux/kvm_host.h   |    3 ++-
virt/kvm/kvm_main.c        |    6 +++---


diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -460,7 +460,8 @@ int kvm_arch_set_memory_region(struct kv
 	return 0;
 }
 
-struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
+struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id,
+                                      void *opaque)
 {
 	struct kvm_vcpu *vcpu;
 	int err;
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3052,8 +3052,8 @@ void kvm_arch_vcpu_free(struct kvm_vcpu 
 	kvm_x86_ops->vcpu_free(vcpu);
 }
 
-struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
-						unsigned int id)
+struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id,
+                                      void *opaque)
 {
 	return kvm_x86_ops->vcpu_create(kvm, id);
 }
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -237,7 +237,8 @@ void kvm_arch_vcpu_free(struct kvm_vcpu 
 void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu);
 void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu);
 void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu);
-struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id);
+struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id,
+                                      void *opaque);
 int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu);
 void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu);
 
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -733,7 +733,7 @@ static int create_vcpu_fd(struct kvm_vcp
 /*
  * Creates some virtual cpus.  Good luck creating more than one.
  */
-static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, int n)
+static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, int n, void *opaque)
 {
 	int r;
 	struct kvm_vcpu *vcpu;
@@ -741,7 +741,7 @@ static int kvm_vm_ioctl_create_vcpu(stru
 	if (!valid_vcpu(n))
 		return -EINVAL;
 
-	vcpu = kvm_arch_vcpu_create(kvm, n);
+	vcpu = kvm_arch_vcpu_create(kvm, n, opaque);
 	if (IS_ERR(vcpu))
 		return PTR_ERR(vcpu);
 
@@ -945,7 +945,7 @@ static long kvm_vm_ioctl(struct file *fi
 		return -EIO;
 	switch (ioctl) {
 	case KVM_CREATE_VCPU:
-		r = kvm_vm_ioctl_create_vcpu(kvm, arg);
+		r = kvm_vm_ioctl_create_vcpu(kvm, arg, NULL);
 		if (r < 0)
 			goto out;
 		break;

-------------------------------------------------------------------------
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/

  reply	other threads:[~2008-02-05  5:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05  5:34 [kvm-ppc-devel] [PATCH 0 of 3] RFC: creating a particular vcpu type Hollis Blanchard
2008-02-05  5:34 ` Hollis Blanchard
2008-02-05  5:34 ` Hollis Blanchard [this message]
2008-02-05  5:34   ` [PATCH 1 of 3] Pass an opaque parameter through kvm_vm_ioctl_vcpu_create() to kvm_arch_vcpu_create() Hollis Blanchard
2008-02-05  5:34 ` [kvm-ppc-devel] [PATCH 2 of 3] Export kvm_vm_ioctl_create_vcpu() to Hollis Blanchard
2008-02-05  5:34   ` [PATCH 2 of 3] Export kvm_vm_ioctl_create_vcpu() to be called from architecture modules Hollis Blanchard
2008-02-05  5:34 ` [kvm-ppc-devel] [PATCH 3 of 3] [POWERPC] Implement an ioctl that Hollis Blanchard
2008-02-05  5:34   ` [PATCH 3 of 3] [POWERPC] Implement an ioctl that creates a vcpu of a particular type Hollis Blanchard
2008-02-05 12:52   ` [kvm-ppc-devel] [kvm-devel] [PATCH 3 of 3] [POWERPC] Implement Christian Ehrhardt
2008-02-05 12:52     ` [PATCH 3 of 3] [POWERPC] Implement an ioctl that creates a vcpu of a particular type Christian Ehrhardt
     [not found]     ` <47A85C09.5070609-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-02-05 13:41       ` [kvm-ppc-devel] [kvm-devel] [PATCH 3 of 3] [POWERPC] Implement Carsten Otte
2008-02-05 13:41         ` [PATCH 3 of 3] [POWERPC] Implement an ioctl that creates a vcpu of a particular type Carsten Otte
     [not found]         ` <47A86794.4020408-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2008-02-05 14:03           ` [kvm-ppc-devel] [kvm-devel] [PATCH 3 of 3] [POWERPC] Implement Carsten Otte
2008-02-05 14:03             ` [PATCH 3 of 3] [POWERPC] Implement an ioctl that creates a vcpu of a particular type Carsten Otte
2008-02-05 15:13       ` [kvm-ppc-devel] [kvm-devel] [PATCH 3 of 3] [POWERPC] Implement Hollis Blanchard
2008-02-05 15:13         ` [PATCH 3 of 3] [POWERPC] Implement an ioctl that creates a vcpu of a particular type Hollis Blanchard
2008-02-05 16:44 ` [kvm-ppc-devel] [kvm-devel] [PATCH 0 of 3] RFC: creating a Anthony Liguori
2008-02-05 16:44   ` [PATCH 0 of 3] RFC: creating a particular vcpu type Anthony Liguori
     [not found]   ` <47A89285.40802-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-02-05 17:53     ` [kvm-ppc-devel] [kvm-devel] [PATCH 0 of 3] RFC: creating a Hollis Blanchard
2008-02-05 17:53       ` [PATCH 0 of 3] RFC: creating a particular vcpu type Hollis Blanchard
2008-02-05 18:05       ` [kvm-ppc-devel] [kvm-devel] [PATCH 0 of 3] RFC: creating a Anthony Liguori
2008-02-05 18:05         ` [PATCH 0 of 3] RFC: creating a particular vcpu type Anthony Liguori
     [not found]         ` <47A8A582.5060502-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-02-05 19:23           ` [kvm-ppc-devel] [kvm-devel] [PATCH 0 of 3] RFC: creating a Hollis Blanchard
2008-02-05 19:23             ` [PATCH 0 of 3] RFC: creating a particular vcpu type Hollis Blanchard
2008-02-05 19:32             ` [kvm-ppc-devel] [kvm-devel] [PATCH 0 of 3] RFC: creating a Anthony Liguori
2008-02-05 19:32               ` [PATCH 0 of 3] RFC: creating a particular vcpu type Anthony Liguori
2008-02-11  8:23               ` [kvm-ppc-devel] [kvm-devel] [PATCH 0 of 3] RFC: creating a Avi Kivity
2008-02-11  8:23                 ` [PATCH 0 of 3] RFC: creating a particular vcpu type 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=bede9476e203f5bf59d2.1202189672@basalt \
    --to=hollisb@us.ibm.com \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@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.