[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 02/21] IOMMU: simplify unmap-on-error in iommu_map()
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 3 May 2022 18:22:17 +0200
- 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Qkzrd2DUK+DDbH0WxNzsiXtOa7GcoyGYyEZagU34lpw=; b=fXKxSjl6xIecuasqQQZ+X3KOulvuZP6NaGZLUMZwJYiBVkN5sU7Xjrr4cB2KHv/D4jVsSOXw5gmUjT2DdTc9hKelYKc4mc1OXbKtAo266PnHpyLjp/MV4sXfXPtWBkLF4YMgVzHQWKVJEUxRFhmk19feRpP2Gglw+cjDmX8Camd4tm2D+3daYrIpShLb8WSdod0bRLsyMxFRejjcDdY2Ey9IYDXtyojcL53qZGRosV8Yka5MygoRVwEyTYXy8yzL0z1g8oNkXL5R9kTtFMLugAR3N+2m6QII1MRg4Obp9OVp5VeXquhjICoahZZCv1kI5Ua+puIS/ZC94HLZ0we9BA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jMHmeZHsCQTmvFm1eHbR6VzAfp1wl5PUqnYxE3iImJaO/APZq4GDyyZwpLwHUkdqKwXWeHTmvvwlwgEiNUN7JHbYpUX+GuTkS150ZhYYnMmIeo4oTGfzzz5w6v+77odVZjpipyrM4J5pTp9i8KvsSfoQRxibF5uhMyt4P8tg5uC44VVwApcFXAlNPa5jZAc8A0CH4Fzas1oQZmhaHFq5kMr53RaN5CsVlS6aG0CvG1C0SqNGcl/47n1tz16c61XDnGdRvMRpPuLp38lvzqWFhRRXaLubdSPS+ZbIiOyVEABEZF32JNhfdo40S92vuUXuBvE0VgdoqwI+C9y/WZ5yQA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
- Delivery-date: Tue, 03 May 2022 16:22:30 +0000
- Ironport-data: A9a23:yWjmVK0qZeR343PzTPbD5aVwkn2cJEfYwER7XKvMYLTBsI5bpzwFn WUbUTuPMvneYjb8e99zO4Wy8kMEv8fUztdrQQI5pC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkjk7xdOCn9xGQ7InQLlbGILes1htZGEk1EU/NtTo5w7Rj2tMw2oDja++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /0T5YTsTFxzEpfThbo8eAdlKR4lLKd/reqvzXiX6aR/zmXgWl61m7BCKR9zOocVvOFqHWtJ6 PoUbigXaQyOjP63x7T9TfRwgsMkL4/gO4Z3VnNIlGmFS6p5B82TBfyStbe03x9p7ixKNezZa McDLyJmcTzLYgFVO0dRA5U79AutrialImAG9wvIzUYxy3j61Spwk5fvDPbcOeTVVJ9NnByIg W2TqgwVBTlfbrRz0wGt8Hihm+vOliPTQ58JGfuz8fsCqE2ewCkfBQMbUXO/oOKlkQiuVtRHM UsW9yEy668o+ySDVtDgWzWorXjCuQQTM+e8CMU/4QCJj6bRvQCQAzFcSiYbMYR28sgrWTYty 1mF2cvzAiBiu6GUTnTb8aqIqTS1Om4eKmpqiTI4cDbpKuLL+Okb5i8jhP46eEJpprUZwQ3N/ g0=
- Ironport-hdrordr: A9a23:z0p/XKvQ/VX6wgiNqA4c+77v7skC/4Mji2hC6mlwRA09TyXGra 2TdaUgvyMc1gx7ZJhBo7+90We7MBbhHLpOkPEs1NCZLXLbUQqTXfhfBO7ZrwEIdBefygcw79 YCT0E6MqyLMbEYt7eE3ODbKadG/DDvysnB64bjJjVWPGdXgslbnntE422gYylLrWd9dPgE/M 323Ls7m9PsQwVeUu2LQl0+G8TTrdzCk5zrJTYAGh4c8QGLyRel8qTzHRS01goXF2on+8ZpzU H11yjCoomzufCyzRHRk0fV8pRtgdPkjv9OHtaFhMQ5IijlziyoeINicbufuy1dmpDl1H8a1P 335zswNcV67H3cOkmzvBvWwgHllA0j7nfzoGXo9kcKDaTCNUEHIvsEobgcXgrS6kImst05+r lMxXilu51eCg6FtDjh5vDTPisa2HackD4Hq6o+nnZfWYwRZPt6tooE5n5YF58GAWbT9J0nKu 9zF8vRjcwmPm9yV0qp/lWH/ebcHUjaRny9Mwo/U42uonRrdUlCvgolLJd1pAZEyHo/I6M0k9 gsfJ4Y0I2mdfVmHJ6VNN1xP/dfNVa9MS4kEFjiV2gPR5t3ck4klfbMkccIzdDvXqA0570Pv7 mEeG9klAcJCjfT4Iu1rdB2ziw=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Tue, May 03, 2022 at 04:37:29PM +0200, Jan Beulich wrote:
> On 03.05.2022 12:25, Roger Pau Monné wrote:
> > On Mon, Apr 25, 2022 at 10:32:10AM +0200, Jan Beulich wrote:
> >> As of 68a8aa5d7264 ("iommu: make map and unmap take a page count,
> >> similar to flush") there's no need anymore to have a loop here.
> >>
> >> Suggested-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> >> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> >
> > Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>
> Thanks.
>
> > I wonder whether we should have a macro to ignore returns from
> > __must_check attributed functions. Ie:
> >
> > #define IGNORE_RETURN(exp) while ( exp ) break;
> >
> > As to avoid confusion (and having to reason) whether the usage of
> > while is correct. I always find it confusing to assert such loop
> > expressions are correct.
>
> I've been considering some form of wrapper macro (not specifically
> the one you suggest), but I'm of two minds: On one hand I agree it
> would help readers, but otoh I fear it may make it more attractive
> to actually override the __must_check (which really ought to be an
> exception).
Well, I think anyone reviewing the code would realize that the error
is being ignored, and hence check that this is actually intended.
Thanks, Roger.
|