[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 04/12] x86/hvm: Reduce stack usage from HVMTRACE_ND()
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 21 Sep 2021 13:00:29 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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; bh=/gCvTzZkj/z1tXgg7O3hcPgmWbwdjjoZyAReUsMu0cA=; b=jaZPwz5B/j7SlxEatMOjDkLX6jFv1/GGa4eukjjf2NAUnQuttQbtrgTjFp6rGZ9t6O9v73+RLXS0IfZWc+Q22i2OiDwHAKvbDAXwQE8aWcp9BglphM6odLMfttbFkESGzy1yAiqPTO8m1JCqo36xznIUSs53FWVxdB+/o4C9AS34QkCCD/Fe+dB1v2+o2eY6oQIXKrCgKALegb/RsdTkEigSeM+5wWZlU23c1hN8iQrc+oVEC6QEcHbo1aItrbRpJr77qaawWXcw5FRMNBSxJo7HN/x2wQJpkxUlSZZmNDTBVMiqohvd6oMfSrPXnCJ6o16rVFKnUfRbuiKPb8Gb1g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GlyLMYuGgeJ2/eqIVv8g2NrtW4gxHlGCbSpR0TC245BT2z04hMh4gie6rzf7fiyuhQ3pgrvkj7sVWcAX3ign7qZxJMDlf4mh4yoC5v367MOBoLdtEvm1XRUPMtCY8va2MFus6CLWRlWC2JBYlt0YacSzLe74PW7S1WHa2Il6WEnt4m3o6ncmAb31rEjKw3R079OC2Lgegd2SZ1TAVpDJOhu839ytWu592j8g2yyJdMYP8LbujRGzmC9gUNm2V1McJnhZl6covxGHEpjVIq2DWZThcfKu6ghO4a7YVYo3nSgSlas8tLko7DiEvkIBCTZ7uAfE+37PL0wzHI58qtiYhQ==
- Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 21 Sep 2021 11:00:41 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 20.09.2021 19:25, Andrew Cooper wrote:
> v2:
> * Adjust callers of HVMTRACE_ND() too
What does this refer to? The sole difference to v1 that I can spot
is ...
> * Drop _d[] for the 0 case.
... the one corresponding to this line, i.e. ...
> --- a/xen/include/asm-x86/hvm/trace.h
> +++ b/xen/include/asm-x86/hvm/trace.h
> @@ -67,38 +67,30 @@
> #define TRACE_2_LONG_4D(_e, d1, d2, d3, d4, ...) \
> TRACE_6D(_e, d1, d2, d3, d4)
>
> -#define HVMTRACE_ND(evt, modifier, cycles, count, d1, d2, d3, d4, d5, d6) \
> +#define HVMTRACE_ND(evt, modifier, cycles, ...) \
> do { \
> if ( unlikely(tb_init_done) && DO_TRC_HVM_ ## evt ) \
> { \
> - struct { \
> - u32 d[6]; \
> - } _d; \
> - _d.d[0]=(d1); \
> - _d.d[1]=(d2); \
> - _d.d[2]=(d3); \
> - _d.d[3]=(d4); \
> - _d.d[4]=(d5); \
> - _d.d[5]=(d6); \
> + uint32_t _d[] = { __VA_ARGS__ }; \
> __trace_var(TRC_HVM_ ## evt | (modifier), cycles, \
> - sizeof(*_d.d) * count, &_d); \
> + sizeof(_d), sizeof(_d) ? _d : NULL); \
... the addition of a conditional operator here (which I assume was
something a particular compiler didn't like in v1). FAOD - I'm fine
with the change, but I fear I'm overlooking something (again).
Jan
|