  In this paper we generalize the result of Fouvry and Iwaniec dealing with
prime values of the quadratic form $x^2 + y^2$ with one input restricted to a
thin subset of the integers. We prove the same result with an arbitrary
primitive positive definite binary quadratic form. In particular, for any
positive definite binary quadratic form $F$ and binary linear form $G$, there
exist infinitely many $\ell, m\in\mathbb{Z}$ such that both $F(\ell, m)$ and
$G(\ell, m)$ are primes as long as there are no local obstructions.
