From: Jes Sorensen <jes.sorensen@gmail.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: Avi Kivity <avi@redhat.com>, Gleb Natapov <gleb@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [patch] qemu-kvm introduce -maxcpus argument
Date: Mon, 22 Jun 2009 09:11:38 +0200 [thread overview]
Message-ID: <4A3F2EAA.7010604@gmail.com> (raw)
In-Reply-To: <20090619152441.GA1301@amit-x200.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 350 bytes --]
On 06/19/2009 05:24 PM, Amit Shah wrote:
> On (Fri) Jun 19 2009 [15:59:57], Jes Sorensen wrote:
> ACK, but please fix this:
>
> +DEF("maxcpus", HAS_ARG, QEMU_OPTION_maxcpus,
> + "-maxcpus n set maximumthe number of possibly CPUs to 'n'\n")
> +STEXI
Argh, thanks, dunno how I managed to create that.
Here is an updated version.
Cheers,
Jes
[-- Attachment #2: 0003-qemu-madt-maxcpus.patch --]
[-- Type: text/x-patch, Size: 1811 bytes --]
Build madt table based on max_cpus count.
Signed-off-by: Jes Sorensen <jes@sgi.com>
---
kvm/bios/rombios32.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: qemu-kvm/kvm/bios/rombios32.c
===================================================================
--- qemu-kvm.orig/kvm/bios/rombios32.c
+++ qemu-kvm/kvm/bios/rombios32.c
@@ -1168,13 +1168,13 @@ static void mptable_init(void)
putstr(&q, "0.1 "); /* vendor id */
putle32(&q, 0); /* OEM table ptr */
putle16(&q, 0); /* OEM table size */
- putle16(&q, MAX_CPUS + 18); /* entry count */
+ putle16(&q, max_cpus + 18); /* entry count */
putle32(&q, 0xfee00000); /* local APIC addr */
putle16(&q, 0); /* ext table length */
putb(&q, 0); /* ext table checksum */
putb(&q, 0); /* reserved */
- for(i = 0; i < MAX_CPUS ; i++) {
+ for(i = 0; i < max_cpus ; i++) {
putb(&q, 0); /* entry type = processor */
putb(&q, i); /* APIC id */
putb(&q, 0x11); /* local APIC version number */
@@ -1700,7 +1700,7 @@ void acpi_bios_init(void)
addr = (addr + 7) & ~7;
madt_addr = addr;
madt_size = sizeof(*madt) +
- sizeof(struct madt_processor_apic) * MAX_CPUS +
+ sizeof(struct madt_processor_apic) * max_cpus +
#ifdef BX_QEMU
sizeof(struct madt_io_apic) + sizeof(struct madt_int_override) * MAX_INT_OVERRIDES;
#else
@@ -1778,7 +1778,7 @@ void acpi_bios_init(void)
madt->local_apic_address = cpu_to_le32(0xfee00000);
madt->flags = cpu_to_le32(1);
*(uint32_t*)APIC_MADT_PTR = apic = (void *)(madt + 1);
- for(i=0;i<MAX_CPUS;i++) {
+ for(i=0; i < max_cpus; i++) {
apic->type = APIC_PROCESSOR;
apic->length = sizeof(*apic);
apic->processor_id = i;
next prev parent reply other threads:[~2009-06-22 7:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-19 13:59 [patch] qemu-kvm introduce -maxcpus argument Jes Sorensen
2009-06-19 14:15 ` Daniel P. Berrange
2009-06-19 14:23 ` Jes Sorensen
2009-06-21 12:53 ` Avi Kivity
2009-06-19 15:24 ` Amit Shah
2009-06-22 7:11 ` Jes Sorensen [this message]
2009-06-21 12:54 ` 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=4A3F2EAA.7010604@gmail.com \
--to=jes.sorensen@gmail.com \
--cc=amit.shah@redhat.com \
--cc=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox