From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VteSn-0006gl-8P for qemu-devel@nongnu.org; Thu, 19 Dec 2013 09:20:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VteSl-0000Px-Pw for qemu-devel@nongnu.org; Thu, 19 Dec 2013 09:20:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VteSl-0000Pr-I5 for qemu-devel@nongnu.org; Thu, 19 Dec 2013 09:20:31 -0500 Message-ID: <52B300A8.4030903@redhat.com> Date: Thu, 19 Dec 2013 15:20:24 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1383646565-13774-1-git-send-email-zxq_yx_007@163.com> <1383646565-13774-5-git-send-email-zxq_yx_007@163.com> <52B1E385.4030303@suse.de> In-Reply-To: <52B1E385.4030303@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 4/4] ioapic: QOM'ify ioapic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: xiaoqiang zhao , qemu-devel@nongnu.org, Anthony Liguori Il 18/12/2013 19:03, Andreas F=E4rber ha scritto: >> > @@ -61,7 +69,6 @@ static void ioapic_common_realize(DeviceState *dev= , Error **errp) >> > { >> > IOAPICCommonState *s =3D IOAPIC_COMMON(dev); >> > IOAPICCommonClass *info; >> > - static int ioapic_no; >> > =20 >> > if (ioapic_no >=3D MAX_IOAPICS) { >> > error_setg(errp, "Only %d ioapics allowed", MAX_IOAPICS); > ... while the check for max. IOAPICs still happens in common code. >=20 > Do we need to count KVM IOAPICs as well? Or can we consolidate this int= o > the non-KVM version and keep it static there? KVM only supports one IOAPIC. Creating a second fails with EEXIST. Paolo