[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Rename VCPUOP_craete to VCPUOP_initialise. It is likely that



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID f13b4b7306050106951f248adfb1a856437571e7
# Parent  34d25118398574dd0fa220bdf3edb789a79e5ef7
Rename VCPUOP_craete to VCPUOP_initialise. It is likely that
VCPU creation will actually be moved to domain-build time.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 34d251183985 -r f13b4b730605 
linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c       Tue Oct  4 
14:02:18 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c       Tue Oct  4 
14:02:35 2005
@@ -883,7 +883,7 @@
 
        ctxt.ctrlreg[3] = virt_to_mfn(swapper_pg_dir) << PAGE_SHIFT;
 
-       boot_error = HYPERVISOR_vcpu_op(VCPUOP_create, cpu, &ctxt);
+       boot_error = HYPERVISOR_vcpu_op(VCPUOP_initialise, cpu, &ctxt);
        if (boot_error)
                printk("boot error: %ld\n", boot_error);
 
@@ -1624,6 +1624,6 @@
 
        ctxt.ctrlreg[3] = virt_to_mfn(swapper_pg_dir) << PAGE_SHIFT;
 
-       (void)HYPERVISOR_vcpu_op(VCPUOP_create, vcpu, &ctxt);
+       (void)HYPERVISOR_vcpu_op(VCPUOP_initialise, vcpu, &ctxt);
        (void)HYPERVISOR_vcpu_op(VCPUOP_up, vcpu, NULL);
 }
diff -r 34d251183985 -r f13b4b730605 
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c     Tue Oct  4 
14:02:18 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c     Tue Oct  4 
14:02:35 2005
@@ -771,7 +771,7 @@
 
        ctxt.ctrlreg[3] = virt_to_mfn(init_level4_pgt) << PAGE_SHIFT;
 
-       boot_error  = HYPERVISOR_vcpu_op(VCPUOP_create, cpu, &ctxt);
+       boot_error  = HYPERVISOR_vcpu_op(VCPUOP_initialise, cpu, &ctxt);
        if (boot_error)
                printk("boot error: %ld\n", boot_error);
 
diff -r 34d251183985 -r f13b4b730605 xen/common/domain.c
--- a/xen/common/domain.c       Tue Oct  4 14:02:18 2005
+++ b/xen/common/domain.c       Tue Oct  4 14:02:35 2005
@@ -412,12 +412,12 @@
     if ( (vcpuid < 0) || (vcpuid >= MAX_VIRT_CPUS) )
         return -EINVAL;
 
-    if ( ((v = d->vcpu[vcpuid]) == NULL) && (cmd != VCPUOP_create) )
+    if ( ((v = d->vcpu[vcpuid]) == NULL) && (cmd != VCPUOP_initialise) )
         return -ENOENT;
 
     switch ( cmd )
     {
-    case VCPUOP_create:
+    case VCPUOP_initialise:
         if ( (ctxt = xmalloc(struct vcpu_guest_context)) == NULL )
         {
             rc = -ENOMEM;
diff -r 34d251183985 -r f13b4b730605 xen/include/public/vcpu.h
--- a/xen/include/public/vcpu.h Tue Oct  4 14:02:18 2005
+++ b/xen/include/public/vcpu.h Tue Oct  4 14:02:35 2005
@@ -1,7 +1,7 @@
 /******************************************************************************
  * vcpu.h
  * 
- * VCPU creation and hotplug.
+ * VCPU initialisation, query, and hotplug.
  * 
  * Copyright (c) 2005, Keir Fraser <keir@xxxxxxxxxxxxx>
  */
@@ -18,18 +18,17 @@
  */
 
 /*
- * Create a new VCPU. This must be called before a VCPU can be referred to
- * in any other hypercall (e.g., to bind event channels). The new VCPU
- * will not run until it is brought up by VCPUOP_up.
+ * Initialise a VCPU. Each VCPU can be initialised only once. A 
+ * newly-initialised VCPU will not run until it is brought up by VCPUOP_up.
  * 
  * @extra_arg == pointer to vcpu_guest_context structure containing initial
- *               state for the new VCPU.
+ *               state for the VCPU.
  */
-#define VCPUOP_create               0
+#define VCPUOP_initialise           0
 
 /*
- * Bring up a newly-created or previously brought-down VCPU. This makes the
- * VCPU runnable.
+ * Bring up a VCPU. This makes the VCPU runnable. This operation will fail
+ * if the VCPU has not been initialised (VCPUOP_initialise).
  */
 #define VCPUOP_up                   1
 
@@ -41,7 +40,7 @@
  *     idea to ensure that the VCPU has entered a non-critical loop before
  *     bringing it down. Alternatively, this operation is guaranteed
  *     synchronous if invoked by the VCPU itself.
- *  2. After a VCPU is created, there is currently no way to drop all its
+ *  2. After a VCPU is initialised, there is currently no way to drop all its
  *     references to domain memory. Even a VCPU that is down still holds
  *     memory references via its pagetable base pointer and GDT. It is good
  *     practise to move a VCPU onto an 'idle' or default page table, LDT and

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.