[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v12 2/5] intc/gic: Extract some reusable vGIC co
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v12 2/5] intc/gic: Extract some reusable vGIC code |
Date: |
Fri, 4 Sep 2015 09:47:20 +0100 |
On 4 September 2015 at 07:54, Pavel Fedin <address@hidden> 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