qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 4/4] ioapic: QOM'ify ioapic


From: <address@hidden>
Subject: Re: [Qemu-devel] [PATCH v3 4/4] ioapic: QOM'ify ioapic
Date: Sat, 21 Dec 2013 07:02:12 +0800

OK. Thx Andreas!





在2013年12月20日 19:18, Andreas Färber写道:

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 via email to

[Prev in Thread] Current Thread [Next in Thread]