From: "Michael S. Tsirkin" <mst@redhat.com>
To: liu ping fan <qemulist@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH v6 2/5] hpet: enable to entitle more irq pins for hpet
Date: Mon, 14 Oct 2013 17:17:09 +0300 [thread overview]
Message-ID: <20131014141709.GA19575@redhat.com> (raw)
In-Reply-To: <CAJnKYQm3n98AZe84ViiN6mtDNTEH_uBF-9HjZFiUFpc0Pf_23w@mail.gmail.com>
On Fri, Oct 11, 2013 at 05:18:30PM +0800, liu ping fan wrote:
> On Fri, Oct 11, 2013 at 4:38 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> > Il 11/10/2013 04:59, liu ping fan ha scritto:
> >> On Thu, Oct 10, 2013 at 7:41 PM, Michael S. Tsirkin <mst@redhat.com> 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);
> }
>
> Regards,
> Ping Fan
So if you use it from C, please use a macro.
If not, no need to.
next prev parent reply other threads:[~2013-10-14 14:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-10 7:56 [Qemu-devel] [PATCH v6 0/5] bugs fix for hpet Liu Ping Fan
2013-10-10 7:56 ` [Qemu-devel] [PATCH v6 1/5] hpet: inverse polarity when pin above ISA_NUM_IRQS Liu Ping Fan
2013-10-10 7:56 ` [Qemu-devel] [PATCH v6 2/5] hpet: enable to entitle more irq pins for hpet Liu Ping Fan
2013-10-10 9:11 ` Paolo Bonzini
2013-10-11 2:59 ` liu ping fan
2013-10-10 9:16 ` Michael S. Tsirkin
2013-10-10 9:33 ` Paolo Bonzini
2013-10-10 9:41 ` Michael S. Tsirkin
2013-10-10 9:46 ` Paolo Bonzini
2013-10-10 11:41 ` Michael S. Tsirkin
2013-10-11 2:59 ` liu ping fan
2013-10-11 8:38 ` Paolo Bonzini
2013-10-11 9:18 ` liu ping fan
2013-10-11 11:28 ` Paolo Bonzini
2013-10-14 14:17 ` Michael S. Tsirkin [this message]
2013-10-14 14:18 ` Michael S. Tsirkin
2013-10-15 5:24 ` liu ping fan
2013-10-10 7:56 ` [Qemu-devel] [PATCH v6 3/5] PC: use qdev_xx to create hpet instead of sysbus_create_xx Liu Ping Fan
2013-10-10 9:10 ` Paolo Bonzini
2013-10-10 9:24 ` Michael S. Tsirkin
2013-10-10 7:56 ` [Qemu-devel] [PATCH v6 4/5] PC: add hpet compat to trace compatability version Liu Ping Fan
2013-10-10 9:09 ` Paolo Bonzini
2013-10-10 7:56 ` [Qemu-devel] [PATCH v6 5/5] PC: differentiate hpet's interrupt capability on piix and q35 Liu Ping Fan
2013-10-10 9:23 ` Michael S. Tsirkin
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=20131014141709.GA19575@redhat.com \
--to=mst@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemulist@gmail.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).