[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 4/4] ioapic: QOM'ify ioapic
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH v3 4/4] ioapic: QOM'ify ioapic |
Date: |
Fri, 20 Dec 2013 12:18:25 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
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