From: Peter Maydell <peter.maydell@linaro.org>
To: Pavel Fedin <p.fedin@samsung.com>
Cc: Shlomo Pongratz <shlomo.pongratz@huawei.com>,
Shlomo Pongratz <shlomopongratz@gmail.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Eric Auger <eric.auger@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v12 2/5] intc/gic: Extract some reusable vGIC code
Date: Fri, 4 Sep 2015 09:47:20 +0100 [thread overview]
Message-ID: <CAFEAcA9M3S1drFXUCzzdJaAtAMcuY6h8Dv+YuLL5eW65rdMFpQ@mail.gmail.com> (raw)
In-Reply-To: <012101d0e6de$88ed5dd0$9ac81970$@samsung.com>
On 4 September 2015 at 07:54, Pavel Fedin <p.fedin@samsung.com> wrote:
> Hello!
>
>> > +
>> > +#define kvm_gicd_access(s, offset, cpu, val, write) \
>> > + kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_DIST_REGS, \
>> > + KVM_VGIC_ATTR(offset, cpu), val, write)
>> > +
>> > +#define kvm_gicc_access(s, offset, cpu, val, write) \
>> > + kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CPU_REGS, \
>> > + KVM_VGIC_ATTR(offset, cpu), val, write)
>>
>> Can you make these two static inline functions, not #defines, please?
>
> I can, of course, and i did in previous versions, but you disliked it
> because inline functions would require dev_fd instead of 's', because
> 's' is different in GICv2 and GICv3. Macro approach allowed to work
> around this difference. Or do you mean you strictly don't want them
> to be reusable?
Oh, right. In that case, yes, I don't think they're worth trying
to share between the two devices.
-- PMM
next prev parent reply other threads:[~2015-09-04 8:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-26 10:28 [Qemu-devel] [PATCH v12 0/5] vGICv3 support Pavel Fedin
2015-08-26 10:28 ` [Qemu-devel] [PATCH v12 1/5] hw/intc: Implement GIC-500 base class Pavel Fedin
2015-09-03 14:22 ` Peter Maydell
2015-08-26 10:28 ` [Qemu-devel] [PATCH v12 2/5] intc/gic: Extract some reusable vGIC code Pavel Fedin
2015-09-03 14:59 ` Peter Maydell
2015-09-04 6:54 ` Pavel Fedin
2015-09-04 8:47 ` Peter Maydell [this message]
2015-08-26 10:28 ` [Qemu-devel] [PATCH v12 3/5] arm_kvm: Do not assume particular GIC type in kvm_arch_irqchip_create() Pavel Fedin
2015-09-03 15:10 ` Peter Maydell
2015-08-26 10:28 ` [Qemu-devel] [PATCH v12 4/5] hw/intc: Initial implementation of vGICv3 Pavel Fedin
2015-08-26 10:28 ` [Qemu-devel] [PATCH v12 5/5] hw/arm/virt: Add gic-version option to virt machine Pavel Fedin
2015-09-03 17:08 ` Peter Maydell
2015-09-04 7:26 ` Pavel Fedin
2015-09-04 8:52 ` Peter Maydell
2015-09-04 15:06 ` Diana Craciun
2015-09-04 15:53 ` Pavel Fedin
2015-09-04 14:18 ` Pavel Fedin
2015-09-04 14:25 ` Peter Maydell
2015-09-04 14:53 ` Pavel Fedin
2015-09-08 8:18 ` Pavel Fedin
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=CAFEAcA9M3S1drFXUCzzdJaAtAMcuY6h8Dv+YuLL5eW65rdMFpQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=eric.auger@linaro.org \
--cc=p.fedin@samsung.com \
--cc=qemu-devel@nongnu.org \
--cc=shlomo.pongratz@huawei.com \
--cc=shlomopongratz@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).