From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUatU-0007c9-K3 for qemu-devel@nongnu.org; Fri, 11 Oct 2013 07:28:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUatO-0001iP-Kj for qemu-devel@nongnu.org; Fri, 11 Oct 2013 07:28:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51409) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUatO-0001i7-B3 for qemu-devel@nongnu.org; Fri, 11 Oct 2013 07:28:26 -0400 Message-ID: <5257E0CF.6030607@redhat.com> Date: Fri, 11 Oct 2013 13:28:15 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1381391779-27718-1-git-send-email-pingfank@linux.vnet.ibm.com> <1381391779-27718-3-git-send-email-pingfank@linux.vnet.ibm.com> <20131010091614.GA7089@redhat.com> <52567453.50204@redhat.com> <20131010094109.GA7295@redhat.com> <52567782.1080706@redhat.com> <20131010114116.GF7582@redhat.com> <5257B8F9.3010703@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 2/5] hpet: enable to entitle more irq pins for hpet List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liu ping fan Cc: qemu-devel@nongnu.org, Anthony Liguori , "Michael S. Tsirkin" Il 11/10/2013 11:18, liu ping fan ha scritto: > On Fri, Oct 11, 2013 at 4:38 PM, Paolo Bonzini wrote: >> Il 11/10/2013 04:59, liu ping fan ha scritto: >>> On Thu, Oct 10, 2013 at 7:41 PM, Michael S. Tsirkin wrote: >>>> On Thu, Oct 10, 2013 at 11:46:42AM +0200, Paolo Bonzini wrote: >>>>> Il 10/10/2013 11:41, Michael S. Tsirkin ha scritto: >>>>>>>> Are you sure? This is not done for any other compat property. >>>>>>>> >>>>>>>> Paolo >>>>>> It's done if we use the property from C. >>>>>> See PCI_HOST_PROP_PCI_HOLE64_SIZE. >>>>>> >>>>>> You want compiler to catch errors, that's >>>>>> much better than a runtime failure. >>>>> >>>>> I agree, but I think there should be no need to use the property from C. >>>>> >>>>> Paolo >>>> >>>> Well this patchset does use it from C. >>>> If it's done it needs a macro. >>> >>> hpet.h is the ideal place to put the macro, so pc.c can see it. But >>> what about PC_COMPAT_1_7 in pc.h? I think it is not right to include >>> hpet.h. So can I do not use marco in pc.h? >> >> I think you shouldn't need the macro (no need to use the property from >> C, only from compat properties). >> > We need to tell the compat and then decide to set "intcap" in > pc_basic_device_init() > > uint8_t compat = object_property_get_int(OBJECT(hpet), > "intcap", NULL); > if (!compat) { > qdev_prop_set_uint32(hpet, "intcap", 0xff0104); > } No, that can be done via global properties as well. Paolo