From: Julien Grall <julien.grall@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xenproject.org
Cc: Wei Liu <wei.liu2@citrix.com>,
shameerali.kolothum.thodi@huawei.com,
stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH 2/3] xen/arm: vgic-v3: Correctly retrieve the vCPU associated to a re-distributor
Date: Tue, 29 Sep 2015 15:15:09 +0100 [thread overview]
Message-ID: <560A9CED.70901@citrix.com> (raw)
In-Reply-To: <1443534960.16718.85.camel@citrix.com>
On 29/09/15 14:56, Ian Campbell wrote:
> On Mon, 2015-09-28 at 21:31 +0100, Julien Grall wrote:
>> When the guest is accessing the re-distributor, Xen retrieves the base
>> of the re-distributor using a mask based on the stride.
>>
>> Although, when the stride contains multiple set, the corresponding mask
>
> ^bits?
I guess you mean "multiple bits set" here?
> (Also, drop the "Although, ").
>
>> will be computed incorrectly [1] and therefore giving invalid vCPU and
>> offset:
>>
>> (XEN) d0v0: vGICR: unknown gpa read address 000000008d130008
>> (XEN) traps.c:2447:d0v1 HSR=0x93c08006 pc=0xffffffc00032362c
>> gva=0xffffff80000b0008 gpa=0x0000008d130008
>>
>> For instance if the region of re-distributor is starting at 0x8d100000
>> and the stride is 0x30000, an access to the address 0x8d130008 should
>> be valid and use the re-distributor of vCPU1 with an offset of 0x8.
>> Although, Xen is returning the vCPU0 and an offset of 0x20008.
>>
>> I didn't find a way to replace the current computation of the mask with
>> a valid. The only solution I have found is to pass the region in private
>
> ^one
>
>> data of the handler. So we can directly get the offset from the
>> beginning of the region and find the corresponding vCPU/offset in the
>> re-distributor.
>>
>> This is also make the code simpler and avoid fast/slow path.
>>
>> [1] http://lists.xen.org/archives/html/xen-devel/2015-09/msg03372.html
>>
>> Signed-off-by: Julien Grall <julien.grall@citrix.com>
>>
>> ---
>> Cc: shameerali.kolothum.thodi@huawei.com
>> Cc: Wei Liu <wei.liu2@citrix.com>
>>
>> This is technically a good candidate for Xen 4.6. Without it DOM0
>> may not be able to bring secondary CPU on platform using a stride
>> with multiple bit set [1]. Although, we don't support such platform
>> right now. So I would rather defer this change to Xen 4.6.1 and
>> avoid possible downside/bug in this patch.
>
> Agreed.
>
> Other than the text:
>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Thank you.
Regards,
--
Julien Grall
next prev parent reply other threads:[~2015-09-29 14:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 20:31 [PATCH 0/3] xen/arm: vgic-v3: Correctly retrieved the vCPU associated to a re-distributor Julien Grall
2015-09-28 20:31 ` [PATCH 1/3] xen/arm: io: Extend write/read handler to pass private data Julien Grall
2015-09-29 13:50 ` Ian Campbell
2015-09-28 20:31 ` [PATCH 2/3] xen/arm: vgic-v3: Correctly retrieve the vCPU associated to a re-distributor Julien Grall
2015-09-29 9:46 ` Wei Liu
2015-09-29 12:24 ` Shameerali Kolothum Thodi
2015-09-29 12:28 ` Julien Grall
2015-09-29 13:56 ` Ian Campbell
2015-09-29 14:15 ` Julien Grall [this message]
2015-09-29 14:28 ` Ian Campbell
2015-09-28 20:31 ` [PATCH 3/3] xen/arm: io: Shorten the name of the fields and clean up Julien Grall
2015-09-29 13:58 ` Ian Campbell
2015-09-28 20:40 ` [PATCH 0/3] xen/arm: vgic-v3: Correctly retrieved the vCPU associated to a re-distributor Julien Grall
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=560A9CED.70901@citrix.com \
--to=julien.grall@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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 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.