Let $K\colon [a,b]\times[a,b]\to\mathbb{R}$ be a continuous function (kernel), such that for any quadratically integrable function $x\colon[a,b]\to\mathbb{R}$ the following condition holds:
$$+\infty>\int_a^b\int_a^bK(s,r)x(s)x(r)\,ds\,dr \ge0$$
Question. How can one check this property, knowing only the function $K$ itself?
Motivation. If we define functions $K$ and $x$ over a finite set and replace integrals with the summation, then such $K$ will be a positive-semidefinite matrix. One can check if the matrix is positive-(semi)definite using the Sylvester's criterion. It is interesting for me if there exists something similar to this criterion in a continuous case.