From: Andre Przywara <andre.przywara@amd.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] [PATCH 4/8] v2: extend parser to parse pin: option
Date: Tue, 16 Dec 2008 15:17:07 +0100 [thread overview]
Message-ID: <4947B863.1040909@amd.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 491 bytes --]
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
--
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: qemunuma_v2_cmdline_pin.patch --]
[-- Type: text/x-patch, Size: 3096 bytes --]
# HG changeset patch
# User Andre Przywara <andre.przywara@amd.com>
# Date 1229432330 -3600
# Node ID 28e2cf1452bacb7c8fca7154cc259769bd9df79e
# Parent c966a24fc826ccf77a698492003faeab87f0f9e5
add pin option to -numa cmdline parser
diff -r c966a24fc826 -r 28e2cf1452ba sysemu.h
--- a/sysemu.h Tue Dec 16 13:51:18 2008 +0100
+++ b/sysemu.h Tue Dec 16 13:58:50 2008 +0100
@@ -97,9 +97,10 @@ extern int numnumanodes;
extern int numnumanodes;
extern uint64_t node_mem[MAX_NODES];
extern uint64_t node_to_cpus[MAX_NODES];
-
-int parse_numa_args (const char *opt, uint64_t *mems,
- uint64_t *cpus, int maxentries, int expect_numnodes);
+extern uint64_t hostnodes[MAX_NODES];
+
+int parse_numa_args(const char *opt, uint64_t *hostnodes, uint64_t *mems,
+ uint64_t *cpus, int maxentries, int expect_numnodes);
extern int cursor_hide;
extern int graphic_rotate;
diff -r c966a24fc826 -r 28e2cf1452ba vl.c
--- a/vl.c Tue Dec 16 13:51:18 2008 +0100
+++ b/vl.c Tue Dec 16 13:58:50 2008 +0100
@@ -225,6 +225,7 @@ int numnumanodes = 0;
int numnumanodes = 0;
uint64_t node_mem[MAX_NODES];
uint64_t node_to_cpus[MAX_NODES];
+uint64_t hostnodes[MAX_NODES];
const char *vnc_display;
int acpi_enabled = 1;
int fd_bootchk = 1;
@@ -4520,7 +4521,7 @@ static int parse_to_array(const char *ar
return num;
}
-int parse_numa_args(const char *opt, uint64_t *mems,
+int parse_numa_args(const char *opt, uint64_t *hostnodes, uint64_t *mems,
uint64_t *cpus, int maxentries, int expect_numnodes)
{
const char *s;
@@ -4547,7 +4548,10 @@ int num = 0;
parse_to_array(val, mems, ';', maxentries, PARSE_FLAG_SUFFIX);
} else if (!strcmp(s, "cpu") && cpus != NULL) {
parse_to_array(val, cpus, ';', maxentries, PARSE_FLAG_BITMASK);
+ } else if (!strcmp(s, "pin") && hostnodes != NULL) {
+ parse_to_array(val, hostnodes, ';', maxentries, 0);
}
+
}
}
free(arg);
@@ -4657,6 +4661,7 @@ int main(int argc, char **argv, char **e
for(i = 0; i < MAX_NODES; i++) {
node_to_cpus[i] = 0;
node_mem[i] = 0;
+ hostnodes[i] = (uint64_t)-1;
}
usb_devices_index = 0;
@@ -5115,12 +5120,12 @@ int main(int argc, char **argv, char **e
break;
case QEMU_OPTION_numa:
if (numnumanodes > 0)
- parse_numa_args(optarg, node_mem,
+ parse_numa_args(optarg, hostnodes, node_mem,
node_to_cpus, MAX_NODES, 0);
else
- numnumanodes = parse_numa_args(optarg,
+ numnumanodes = parse_numa_args(optarg, hostnodes,
node_mem, node_to_cpus, MAX_NODES, 1);
- numnumanodes = parse_numa_args(optarg,
+ numnumanodes = parse_numa_args(optarg, hostnodes,
node_mem, node_to_cpus, MAX_NODES, 1);
if (numnumanodes < 0) {
fprintf(stderr, "Invalid number of NUMA nodes\n");
next reply other threads:[~2008-12-16 14:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-16 14:17 Andre Przywara [this message]
2008-12-16 21:17 ` [Qemu-devel] Re: [PATCH 4/8] v2: extend parser to parse pin: option Anthony Liguori
2008-12-16 23:25 ` Andre Przywara
2008-12-17 0:19 ` Anthony Liguori
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=4947B863.1040909@amd.com \
--to=andre.przywara@amd.com \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=qemu-devel@nongnu.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.