[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <663297e7cbdee_1384629418@dwillia2-mobl3.amr.corp.intel.com.notmuch>
Date: Wed, 1 May 2024 12:28:39 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Tom Lendacky <thomas.lendacky@....com>, Dan Williams
<dan.j.williams@...el.com>, <linux-kernel@...r.kernel.org>, <x86@...nel.org>,
<linux-coco@...ts.linux.dev>, <svsm-devel@...onut-svsm.dev>
CC: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>, Andy Lutomirski <luto@...nel.org>, "Peter
Zijlstra" <peterz@...radead.org>, Michael Roth <michael.roth@....com>,
"Ashish Kalra" <ashish.kalra@....com>
Subject: Re: [PATCH v4 13/15] x86/sev: Take advantage of configfs visibility
support in TSM
Tom Lendacky wrote:
[..]
> >>> +static bool tsm_report_is_visible(struct config_item *item,
> >>> + struct configfs_attribute *attr, int n)
> >>
> >> Per the comment on where to find the is_visible() callbacks for a given
> >> item type, I expect the need to pass @item here goes away when this can
> >> assume that there is only one way to have is_visible() invoked for
> >> @attr, right?
> >
> > Yes.
>
> But as I look closer, there is only a single ops callback pair
> (is_visible() and is_bin_visible()), so as long there is never another
> group / subdir defined under the TSM report, this works. But if another
> group is added, then the item parameter would likely be needed or the
> ops callback would have to be updated to differentiate for the vendor
> (SNP/TDX).
Makes sense, for the tsm_report_is_visible() signature. Especially as
this is proposed as a generic configfs facility. It has symmetry with
sysfs that passes an @kobj parent anchor, to sysfs is_visible()
callbacks.
However, I still think neither @item nor @attr need to be passed down
from tsm_report_is_visible() to the vendor backend. Those can be added
when/if another item type is added, which I do not see on the horizon.
Powered by blists - more mailing lists