qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Paolo Bonzini <pbonzini@redhat.com>, xiaoqiang zhao <zxq_yx_007@163.com>
Cc: qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH v3 4/4] ioapic: QOM'ify ioapic
Date: Fri, 20 Dec 2013 12:18:25 +0100	[thread overview]
Message-ID: <52B42781.1030800@suse.de> (raw)
In-Reply-To: <52B300A8.4030903@redhat.com>

Am 19.12.2013 15:20, schrieb Paolo Bonzini:
> Il 18/12/2013 19:03, Andreas Färber ha scritto:
>>>> @@ -61,7 +69,6 @@ static void ioapic_common_realize(DeviceState *dev, Error **errp)
>>>>  {
>>>>      IOAPICCommonState *s = IOAPIC_COMMON(dev);
>>>>      IOAPICCommonClass *info;
>>>> -    static int ioapic_no;
>>>>  
>>>>      if (ioapic_no >= MAX_IOAPICS) {
>>>>          error_setg(errp, "Only %d ioapics allowed", MAX_IOAPICS);
>> ... while the check for max. IOAPICs still happens in common code.
>>
>> Do we need to count KVM IOAPICs as well? Or can we consolidate this into
>> the non-KVM version and keep it static there?
> 
> KVM only supports one IOAPIC.  Creating a second fails with EEXIST.

As it turns out, MAX_IOAPICS is 1, so covers both cases. No KVM ioctl
actually happens on realize for using said EEXIST, so I moved the
increment back to where it was, minimizing changes.

If we want to redesign it, that can still be done in a follow-up patch.

Thanks,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2013-12-20 11:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05 10:16 [Qemu-devel] [PATCH v3 0/4] QOM'ify apic and ioapic xiaoqiang zhao
2013-11-05 10:16 ` [Qemu-devel] [PATCH v3 1/4] apic: Cleanup for QOM'ify xiaoqiang zhao
2013-11-05 10:16 ` [Qemu-devel] [PATCH v3 2/4] apic: QOM'ify apic & icc_bus xiaoqiang zhao
2013-11-05 10:16 ` [Qemu-devel] [PATCH v3 3/4] ioapic: Cleanup for QOM'ify xiaoqiang zhao
2013-11-05 10:16 ` [Qemu-devel] [PATCH v3 4/4] ioapic: QOM'ify ioapic xiaoqiang zhao
2013-12-18 18:03   ` Andreas Färber
2013-12-19  2:28     ` Chen Fan
2013-12-19  2:42       ` 赵小强
2013-12-19  5:37     ` 赵小强
2013-12-19 14:20     ` Paolo Bonzini
2013-12-20 11:18       ` Andreas Färber [this message]
2013-12-20 23:02         ` <zxq_yx_007@163.com>
2013-12-18 17:57 ` [Qemu-devel] [PATCH v3 0/4] QOM'ify apic and ioapic Andreas Färber
2013-12-18 18:08   ` Andreas Färber
2013-12-18 19:20     ` Stefano Stabellini
2013-12-18 19:24       ` Andreas Färber
2013-12-18 19:29         ` Stefano Stabellini

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=52B42781.1030800@suse.de \
    --to=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zxq_yx_007@163.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).