From: Marc Zyngier <marc.zyngier@arm.com>
To: Vijay Kilari <vijay.kilari@gmail.com>
Cc: Vijaya Kumar K <Vijaya.Kumar@cavium.com>,
kvmarm@lists.cs.columbia.edu,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v6 1/7] arm/arm64: vgic-new: Implement support for userspace access
Date: Fri, 23 Sep 2016 10:50:38 +0100 [thread overview]
Message-ID: <57E4FAEE.3070003@arm.com> (raw)
In-Reply-To: <CALicx6uuL9xX3VxLCy+EZi0AqXrNM_O+F3MN+W4gbiriUyb7Ug@mail.gmail.com>
On 22/09/16 15:01, Vijay Kilari wrote:
> On Thu, Sep 22, 2016 at 5:38 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> On 20/09/16 07:12, vijay.kilari@gmail.com wrote:
>>> From: Vijaya Kumar K <Vijaya.Kumar@cavium.com>
>>> +static int vgic_uaccess_read(struct kvm_vcpu *vcpu, struct kvm_io_device *dev,
>>> + gpa_t addr, u32 *val)
>>> +{
>>> + struct vgic_io_device *iodev = kvm_to_vgic_iodev(dev);
>>> + const struct vgic_register_region *region;
>>> + struct kvm_vcpu *r_vcpu;
>>> +
>>> + region = vgic_get_mmio_region(iodev, addr, sizeof(u32));
>>> + if (!region) {
>>> + *val = 0;
>>> + return 0;
>>
>> This is not the previous semantic of vgic_uaccess, and I cannot see why
>> blindly ignoring an access to an undefined region would be acceptable.
>> What am I missing?
>
> AFAIK, the vgic_uaccess is not making any check on undefined region/register.
> However, dispatch_mmio_read/write are returning 0 if check of region is failed
Hmmm. Fair enough. I don't really like it, but that's something for
another day.
M.
--
Jazz is not dead. It just smells funny...
WARNING: multiple messages have this Message-ID (diff)
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 1/7] arm/arm64: vgic-new: Implement support for userspace access
Date: Fri, 23 Sep 2016 10:50:38 +0100 [thread overview]
Message-ID: <57E4FAEE.3070003@arm.com> (raw)
In-Reply-To: <CALicx6uuL9xX3VxLCy+EZi0AqXrNM_O+F3MN+W4gbiriUyb7Ug@mail.gmail.com>
On 22/09/16 15:01, Vijay Kilari wrote:
> On Thu, Sep 22, 2016 at 5:38 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> On 20/09/16 07:12, vijay.kilari at gmail.com wrote:
>>> From: Vijaya Kumar K <Vijaya.Kumar@cavium.com>
>>> +static int vgic_uaccess_read(struct kvm_vcpu *vcpu, struct kvm_io_device *dev,
>>> + gpa_t addr, u32 *val)
>>> +{
>>> + struct vgic_io_device *iodev = kvm_to_vgic_iodev(dev);
>>> + const struct vgic_register_region *region;
>>> + struct kvm_vcpu *r_vcpu;
>>> +
>>> + region = vgic_get_mmio_region(iodev, addr, sizeof(u32));
>>> + if (!region) {
>>> + *val = 0;
>>> + return 0;
>>
>> This is not the previous semantic of vgic_uaccess, and I cannot see why
>> blindly ignoring an access to an undefined region would be acceptable.
>> What am I missing?
>
> AFAIK, the vgic_uaccess is not making any check on undefined region/register.
> However, dispatch_mmio_read/write are returning 0 if check of region is failed
Hmmm. Fair enough. I don't really like it, but that's something for
another day.
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2016-09-23 9:41 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 6:12 [PATCH v6 0/7] arm/arm64: vgic-new: Implement API for vGICv3 live migration vijay.kilari
2016-09-20 6:12 ` vijay.kilari at gmail.com
2016-09-20 6:12 ` [PATCH v6 1/7] arm/arm64: vgic-new: Implement support for userspace access vijay.kilari
2016-09-20 6:12 ` vijay.kilari at gmail.com
2016-09-22 12:08 ` Marc Zyngier
2016-09-22 12:08 ` Marc Zyngier
2016-09-22 14:01 ` Vijay Kilari
2016-09-22 14:01 ` Vijay Kilari
2016-09-23 9:50 ` Marc Zyngier [this message]
2016-09-23 9:50 ` Marc Zyngier
2016-09-23 11:16 ` Christoffer Dall
2016-09-23 11:16 ` Christoffer Dall
2016-09-20 6:12 ` [PATCH v6 2/7] arm/arm64: vgic-new: Add distributor and redistributor access vijay.kilari
2016-09-20 6:12 ` vijay.kilari at gmail.com
2016-09-20 6:12 ` [PATCH v6 3/7] arm/arm64: vgic-new: Introduce find_reg_by_id() vijay.kilari
2016-09-20 6:12 ` vijay.kilari at gmail.com
2016-09-20 6:12 ` [PATCH v6 4/7] arm/arm64: vgic-new: Define required GICv3 reg definitions vijay.kilari
2016-09-20 6:12 ` vijay.kilari at gmail.com
2016-09-20 9:50 ` Marc Zyngier
2016-09-20 9:50 ` Marc Zyngier
2016-09-20 6:12 ` [PATCH v6 5/7] arm/arm64: vgic-new: Introduce VENG0 and VENG1 fields to vmcr struct vijay.kilari
2016-09-20 6:12 ` vijay.kilari at gmail.com
2016-09-20 6:12 ` [PATCH v6 6/7] arm/arm64: vgic-new: Implement VGICv3 CPU interface access vijay.kilari
2016-09-20 6:12 ` vijay.kilari at gmail.com
2016-09-22 12:24 ` Marc Zyngier
2016-09-22 12:24 ` Marc Zyngier
2016-09-20 6:12 ` [PATCH v6 7/7] arm/arm64: vgic-new: Implement KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO ioctl vijay.kilari
2016-09-20 6:12 ` vijay.kilari at gmail.com
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=57E4FAEE.3070003@arm.com \
--to=marc.zyngier@arm.com \
--cc=Vijaya.Kumar@cavium.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=vijay.kilari@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.