All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@amd.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH 1/4] hvm: NUMA guest: extend memops hypercall
Date: Fri, 4 Jul 2008 13:14:52 +0200	[thread overview]
Message-ID: <486E062C.3080700@amd.com> (raw)
In-Reply-To: <C493B17F.2387C%keir.fraser@eu.citrix.com>

[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]

Keir Fraser wrote:
> On 4/7/08 08:57, "Andre Przywara" <andre.przywara@amd.com> wrote:
> 
>> This patch extends the memops hypercall in a compatible way to transport
>> a desired NUMA node number. The address_bits field will be limited to 8
>> bits and is now embedded in the mem_flags member, which additionally
>> contains the node number (limited to 8 bit). Passing a node number of
>> '0' (currently the default) will revert to automatic node selection
>> (based on currently scheduled node).
> 
> Should unprivileged domUs be allowed to specify the NUMA node they allocate
> from, regardless of whether they even run there? Seems like a breakage of
> guest isolation to me.
Good catch (I code in HVM land most of the time), I hope this small 
(attached) patch fixes this.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>

Regards,
Andre.

-- 
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 277-84917
----to satisfy European Law for business letters:
AMD Saxony Limited Liability Company & Co. KG,
Wilschdorfer Landstr. 101, 01109 Dresden, Germany
Register Court Dresden: HRA 4896, General Partner authorized
to represent: AMD Saxony LLC (Wilmington, Delaware, US)
General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy

[-- Attachment #2: 01a_numa_guest.patch --]
[-- Type: text/plain, Size: 535 bytes --]

diff -r aa69281c1ecf xen/common/memory.c
--- a/xen/common/memory.c	Thu Jul 03 13:20:35 2008 +0200
+++ b/xen/common/memory.c	Fri Jul 04 13:13:12 2008 +0200
@@ -528,7 +528,8 @@
             args.memflags = MEMF_bits(XENMEM_addr_bits(reservation.mem_flags));
         }
 
-        args.memflags |= MEMF_node(XENMEM_get_node(reservation.mem_flags));
+        if (IS_PRIV(current->domain))
+            args.memflags |= MEMF_node(XENMEM_get_node(reservation.mem_flags));
 
         if ( likely(reservation.domid == DOMID_SELF) )
         {

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

  reply	other threads:[~2008-07-04 11:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-04  7:57 [PATCH 1/4] hvm: NUMA guest: extend memops hypercall Andre Przywara
2008-07-04  9:52 ` Keir Fraser
2008-07-04 11:14   ` Andre Przywara [this message]
2008-07-04 11:59     ` Keir Fraser
2008-07-04 12:48       ` Andre Przywara
2008-07-04 14:54         ` Keir Fraser
2008-07-04 15:28           ` Andre Przywara
2008-07-04 15:34             ` Keir Fraser
2008-07-04 23:12               ` 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=486E062C.3080700@amd.com \
    --to=andre.przywara@amd.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 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.