Re: [PATCH] powerpc/pseries/vas: Don't print an error when VAS is unavailable
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2021-11-30 11:22:32
Haren Myneni [off-list ref] writes:
On Tue, 2021-11-30 at 10:25 +1100, Michael Ellerman wrote:quoted
Nicholas Piggin [off-list ref] writes:quoted
Excerpts from Cédric Le Goater's message of November 26, 2021 5:13 pm:quoted
On 11/26/21 06:21, Nicholas Piggin wrote:quoted
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