[PATCH] powerpc/pseries/vas: Don't print an error when VAS is unavailable

Michael Ellerman mpe at ellerman.id.au
Tue Nov 30 22:21:46 AEDT 2021


Haren Myneni <haren at linux.ibm.com> writes:
> On Tue, 2021-11-30 at 10:25 +1100, Michael Ellerman wrote:
>> Nicholas Piggin <npiggin at gmail.com> writes:
>> > Excerpts from Cédric Le Goater's message of November 26, 2021 5:13
>> > pm:
>> > > On 11/26/21 06:21, Nicholas Piggin wrote:
>> > > > KVM does not support VAS so guests always print a useless error
>> > > > on boot
>> > > > 
>> > > >      vas: HCALL(398) error -2, query_type 0, result buffer
>> > > > 0x57f2000
>> > > > 
>> > > > Change this to only print the message if the error is not
>> > > > H_FUNCTION.
>> > > 
>> > > Just being curious, why is it even called since "ibm,compression"
>> > > should
>> > > not be exposed in the DT ?
>> > 
>> > It looks like vas does not test for it. I guess in theory there can
>> > be 
>> > other functions than compression implemented as an accelerator.
>> > Maybe
>> > that's why?
>> 
>> Yeah I guess, or it's just not structured that well. The vas platform
>> code is a bit awkward, it's there to support drivers, but it's not
>> actually driver code.
>> 
>> I think we can probably rework it so the vas code does nothing until
>> a
>> driver calls in to it.
>> 
>> eg. something like below.
>
> Correct, Even though NXGZIP is the only usage right now, VAS is
> accelerator switchboard which should support other coprocessor types
> such as GZIP and 842 or SW type solutions such as fast thread wakeup
> and fast memory copy. 
>
> So can we leave VAS initialization separate from drivers and use some
> feature such as FW_FEATURE_LPAR to differentiate from KVM guests?

FW_FEATURE_LPAR is true on KVM guests as well.

As Tyrel pointed out, you should be looking for "hcall-vas" in
"ibm,hypertas-functions" and setting a new FW_FEATURE_VAS based on that.
Then use that to gate the vas init routine.

cheers


More information about the Linuxppc-dev mailing list