[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 8/8] x86/PV: use get_unsafe() instead of copy_from_unsafe()
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 23 Feb 2021 12:59:22 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HgO7JImBHK/SXOfsGbqi/TqQyoKGxJPlNWajPWBAOuQ=; b=HDiFvPb9ciEHNRUhhgHzcCLq31mbKEatXbn4sRho3nfFH6a5rmNOXIwNX+BJEjKWkk03b1LOhVGGEoAvy/bCGA165oSxuJSP2R9cb2OxzpCxZNCVsqwwLIcLwjSpDRHO05EX/bZ1B05xv6UF7TMgdN9dGJvHbZeu5dX8d9ULz+6iILDi+4kWfRvdMRDoJeTLbhUYA+hnL3Bi17NunG6ti9mi+Z9g97DJEyxxGrXsdNTvJLfdtnAKV9s9kBVrcUqaqrqc8YZc2RQhXX7qY2ho0s3l34Yp6HYMOb3dYZyvzwiDkj27fFAr/Kaw1VrUF5IYmI11poLs+e615U7I1TwpRw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fiqMMfv/tcU+mp7ZOjqHqiYX+o7Z6bqZJxdeTlNH3gQhTd0ViarmAz1uXoPgVuplamXPinKNRVpbnzUjVyJv0xP5uKKDEb3Hyl9rNuhy6mfPqXAg5BL8whilIkDzFm9CPtloYXozDHjaxRg6WdherQbjCqYYoS1bGsqckqQ13GChW++swF+uvPjwoWXzTq9HANRI1XtBlSAcSMgqee0S0s9g3vbdaln3gKylfYzUB5uH06lA4aA+YHuCrVjzb3WmCjwwgCSnHky0vj+4pYwoGdtHZfujNuNoBP9MI/NHpED7NcHTFqErqAh5sfIdn0rruwDb3TL7tTsj5z8hfVX3zQ==
- Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>
- Delivery-date: Tue, 23 Feb 2021 11:59:41 +0000
- Ironport-sdr: GJXlDHAIaSiqFMJuEh+pJtz4EFwKOXOp/isyF0Usi8Vd4JTbdMIQ8vLKCObr2ts9uy8MCqsChZ PozHbRL8+3W2VSSWP+Sycap0e+iGe1PXW+gpHtN9oDb4XtTU53M1xorxz/YOrnBNLnLDzvUQp5 0rnu/5kCpz8kvS3WFGzhZwa5yIzFOXCF3+HvPCgRA1F65QZDs1y7M01lHYsXEPjuRMfc5zgEqd SYa9cxuQb4PBHYi9s9pk5zKAVNJdlr/j5Lczy6qT0iX+BUS60NhDTfPvGzRp3FixDm7535rIHQ DSs=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Feb 17, 2021 at 09:23:33AM +0100, Jan Beulich wrote:
> The former expands to a single (memory accessing) insn, which the latter
> does not guarantee. Yet we'd prefer to read consistent PTEs rather than
> risking a split read racing with an update done elsewhere.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Albeit I wonder why the __builtin_constant_p check done in
copy_from_unsafe is not enough to take the get_unsafe_size branch in
there. Doesn't sizeof(l{1,2}_pgentry_t) qualify as a built time
constant?
Or the fact that n it's a parameter to an inline function hides this,
in which case the __builtin_constant_p is pointless?
Thanks, Roger.
|