qemu-devel
[Top][All Lists]
Advanced

[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: Pavel Fedin
Subject: Re: [Qemu-devel] [PATCH v12 2/5] intc/gic: Extract some reusable vGIC code
Date: Fri, 04 Sep 2015 09:54:23 +0300

 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?

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia





reply via email to

[Prev in Thread] Current Thread [Next in Thread]