From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] KVM: arm/arm64: Rename vgic_attr_regs_access to vgic_attr_regs_access_v2
Date: Tue, 16 Aug 2016 19:35:27 +0200 [thread overview]
Message-ID: <20160816173527.GG14088@cbox> (raw)
In-Reply-To: <20160816160924.vaq7s3n3vjvx4uhg@kamzik.localdomain>
On Tue, Aug 16, 2016 at 06:09:24PM +0200, Andrew Jones wrote:
> On Tue, Aug 16, 2016 at 05:10:34PM +0200, Christoffer Dall wrote:
> > Just a rename so we can implement a v3-specific function later. No
> > functional change.
> >
> > Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
> > ---
> > virt/kvm/arm/vgic/vgic-kvm-device.c | 27 ++++++++++++++-------------
> > 1 file changed, 14 insertions(+), 13 deletions(-)
> >
> > diff --git a/virt/kvm/arm/vgic/vgic-kvm-device.c b/virt/kvm/arm/vgic/vgic-kvm-device.c
> > index 22d7ab3..2e18f03 100644
> > --- a/virt/kvm/arm/vgic/vgic-kvm-device.c
> > +++ b/virt/kvm/arm/vgic/vgic-kvm-device.c
> > @@ -296,17 +296,20 @@ static bool lock_all_vcpus(struct kvm *kvm)
> > return true;
> > }
> >
> > -/** vgic_attr_regs_access: allows user space to read/write VGIC registers
> > - *
> > - * @dev: kvm device handle
> > - * @attr: kvm device attribute
> > - * @reg: address the value is read or written
> > - * @is_write: write flag
> > +/* V2 ops */
> > +
> > +
>
> Do we want 2 blank lines here? Do we need the 'V2 ops' comment at all?
>
> > +/**
> > + * vgic_attr_regs_access_v2 - allows user space to access VGIC v2 state
> > *
> > + * @dev: kvm device handle
> > + * @attr: kvm device attribute
> > + * @reg: address the value is read or written
> > + * @is_write: true if userspace is writing a register
> > */
> > -static int vgic_attr_regs_access(struct kvm_device *dev,
> > - struct kvm_device_attr *attr,
> > - u32 *reg, bool is_write)
> > +static int vgic_attr_regs_access_v2(struct kvm_device *dev,
> > + struct kvm_device_attr *attr,
> > + u32 *reg, bool is_write)
> > {
> > struct vgic_reg_attr reg_attr;
> > gpa_t addr;
> > @@ -349,8 +352,6 @@ out:
> > return ret;
> > }
> >
> > -/* V2 ops */
> > -
> > static int vgic_v2_set_attr(struct kvm_device *dev,
> > struct kvm_device_attr *attr)
> > {
> > @@ -369,7 +370,7 @@ static int vgic_v2_set_attr(struct kvm_device *dev,
> > if (get_user(reg, uaddr))
> > return -EFAULT;
> >
> > - return vgic_attr_regs_access(dev, attr, ®, true);
> > + return vgic_attr_regs_access_v2(dev, attr, ®, true);
> > }
> > }
> >
> > @@ -391,7 +392,7 @@ static int vgic_v2_get_attr(struct kvm_device *dev,
> > u32 __user *uaddr = (u32 __user *)(long)attr->addr;
> > u32 reg = 0;
> >
> > - ret = vgic_attr_regs_access(dev, attr, ®, false);
> > + ret = vgic_attr_regs_access_v2(dev, attr, ®, false);
> > if (ret)
> > return ret;
> > return put_user(reg, uaddr);
> > --
> > 2.9.0
> >
>
> No better way to attract reviewers than to advertise no functional
> change :-)
>
> Looks good to me.
>
Thanks for the quick review!
v2 has been sent, hopefully Vijay can pick these up from here and
include in his series.
Thanks,
-Christoffer
prev parent reply other threads:[~2016-08-16 17:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 15:10 [PATCH 0/2] Rework vgic_attr_regs_access Christoffer Dall
2016-08-16 15:10 ` [PATCH 1/2] KVM: arm/arm64: Factor out vgic_attr_regs_access functionality Christoffer Dall
2016-08-16 16:06 ` Andrew Jones
2016-08-16 15:10 ` [PATCH 2/2] KVM: arm/arm64: Rename vgic_attr_regs_access to vgic_attr_regs_access_v2 Christoffer Dall
2016-08-16 16:09 ` Andrew Jones
2016-08-16 17:35 ` Christoffer Dall [this message]
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=20160816173527.GG14088@cbox \
--to=christoffer.dall@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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).