From: Dulloor <dulloor@gmail.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [XEN][vNUMA][PATCH 3/9] public interface
Date: Mon, 5 Jul 2010 01:52:20 -0700 [thread overview]
Message-ID: <AANLkTikHJJcTkRa_9GP-S3Nf2TbT9KKMqk95U9Euy-Ws@mail.gmail.com> (raw)
In-Reply-To: <C8574AD9.1965B%keir.fraser@eu.citrix.com>
[-- Attachment #1: Type: text/plain, Size: 397 bytes --]
oops .. sorry, here it is.
-dulloor
On Mon, Jul 5, 2010 at 12:39 AM, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
> This patch is incomplete.
>
>
> On 03/07/2010 00:54, "Dulloor" <dulloor@gmail.com> wrote:
>
>> Implement the structure that will be shared with hvmloader (with HVMs)
>> and directly with the VMs (with PV).
>>
>> -dulloor
>>
>> Signed-off-by : Dulloor <dulloor@gmail.com>
>
>
>
[-- Attachment #2: xen-03-numa-public-interface.patch --]
[-- Type: application/octet-stream, Size: 3834 bytes --]
diff --git a/xen/include/public/arch-x86/dom_numa.h b/xen/include/public/arch-x86/dom_numa.h
new file mode 100644
--- /dev/null
+++ b/xen/include/public/arch-x86/dom_numa.h
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * dom_numa.h
+ *
+ * Guest NUMA common structures.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author : Dulloor Rao
+ */
+
+
+#ifndef __XEN_PUBLIC_DOM_NUMA_X86_H__
+#define __XEN_PUBLIC_DOM_NUMA_X86_H__
+
+/* struct xc_cpumask : static structure */
+#define XEN_CPUMASK_BITS_PER_BYTE 8
+#define XEN_CPUMASK_BITS_TO_BYTES(bits) \
+ (((bits)+XEN_CPUMASK_BITS_PER_BYTE-1)/XEN_CPUMASK_BITS_PER_BYTE)
+
+#define XEN_MAX_VCPUS 128
+#define XEN_CPUMASK_DECLARE_BITMAP(name,bits) \
+ uint8_t name[XEN_CPUMASK_BITS_TO_BYTES(bits)]
+struct xen_cpumask{ XEN_CPUMASK_DECLARE_BITMAP(bits, XEN_MAX_VCPUS); };
+#define XEN_CPUMASK_BITMAP(maskp) ((maskp)->bits)
+
+#define XEN_MAX_VNODES 4
+
+/* vnodes are 1GB-aligned */
+#define XEN_MIN_VNODE_SHIFT (30)
+
+struct xen_vnode_info {
+ uint8_t vnode_id;
+ uint8_t mnode_id;
+ uint32_t nr_pages;
+ struct xen_cpumask vcpu_mask; /* vnode_to_vcpumask */
+};
+
+#define XEN_DOM_NUMA_INTERFACE_VERSION 0x01
+
+#define XEN_DOM_NUMA_CONFINE 0x01
+#define XEN_DOM_NUMA_SPLIT 0x02
+#define XEN_DOM_NUMA_STRIPE 0x03
+#define XEN_DOM_NUMA_DONTCARE 0x04
+
+struct xen_domain_numa_info {
+ uint8_t version;
+ uint8_t type;
+
+ uint8_t nr_vcpus;
+ uint8_t nr_vnodes;
+
+ /* XXX: hvm_info_table uses 32-bit for high_mem_pgend,
+ * so we should be fine 32-bits too*/
+ uint32_t nr_pages;
+ /* Only (nr_vnodes) entries are filled */
+ struct xen_vnode_info vnode_info[XEN_MAX_VNODES];
+ /* Only (nr_vnodes*nr_vnodes) entries are filled */
+ uint8_t vnode_distance[XEN_MAX_VNODES*XEN_MAX_VNODES];
+};
+
+#endif
diff --git a/xen/include/public/dom_numa.h b/xen/include/public/dom_numa.h
new file mode 100644
--- /dev/null
+++ b/xen/include/public/dom_numa.h
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * dom_numa.h
+ *
+ * Guest NUMA common structures.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author : Dulloor Rao
+ */
+
+#ifndef __XEN_PUBLIC_DOM_NUMA_H
+#define __XEN_PUBLIC_DOM_NUMA_H
+
+#if defined(__i386__) || defined(__x86_64__)
+#include "./arch-x86/dom_numa.h"
+#else
+#error "unsupported architecture"
+#endif
+
+
+#endif
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-07-05 8:52 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1BEA8649F0C00540AB2811D7922ECB6C9338B4CC@orsmsx507.amr.corp.intel.com>
2010-07-02 23:54 ` [XEN][vNUMA][PATCH 3/9] public interface Dulloor
2010-07-05 7:39 ` Keir Fraser
2010-07-05 8:52 ` Dulloor [this message]
2010-07-05 10:23 ` Keir Fraser
2010-07-06 5:57 ` Dulloor
2010-07-06 12:57 ` Keir Fraser
2010-07-06 17:52 ` Dulloor
2010-08-01 22:02 ` [vNUMA v2][PATCH 2/8] " Dulloor
2010-08-03 12:40 ` Andre Przywara
2010-08-03 15:24 ` Dulloor
2010-08-03 13:37 ` Andre Przywara
2010-08-03 14:10 ` Keir Fraser
2010-08-03 15:43 ` Dulloor
2010-08-03 15:52 ` Keir Fraser
2010-08-03 17:24 ` Dulloor
2010-08-03 19:52 ` Keir Fraser
2010-08-03 20:32 ` Dulloor
2010-08-03 21:55 ` Andre Przywara
2010-08-04 5:27 ` Keir Fraser
2010-08-04 5:48 ` Dulloor
2010-08-04 7:01 ` Andre Przywara
2010-08-04 8:45 ` Keir Fraser
2010-08-04 13:34 ` Dan Magenheimer
2010-08-03 21:35 ` Andre Przywara
2010-08-03 15:54 ` Keir Fraser
2010-08-03 15:32 ` Dulloor
2010-08-03 21:21 ` Andre Przywara
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=AANLkTikHJJcTkRa_9GP-S3Nf2TbT9KKMqk95U9Euy-Ws@mail.gmail.com \
--to=dulloor@gmail.com \
--cc=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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;
as well as URLs for NNTP newsgroup(s).