Recent studies suggest that spatial heterogeneity plays an important role in the within-host infection of viruses such as HBV, HCV, and HIV. We propose a spatial model of viral dynamics on a bounded domain in which virion movement is described by a nonlocal (convolution) diffusion operator. The model is a spatial generalization of a basic ODE viral infection model that has been extensively studied in the literature. We investigate the principal eigenvalue of a perturbation of the nonlocal diffusion operator and show that the principal eigenvalue plays a key role similar to the basic reproduction number when it comes to determining the infection dynamics. Through analyzing the spectra of two matrix operators, it is shown that the model exhibits threshold dynamics. More precisely, if the principal eigenvalue is less or equal to zero, then the infection-free equilibrium is asymptotically stable while there is an infection equilibrium which is stable provided that the principal eigenvalue is greater than zero. (Based on a joint work with Guangyu Zhao).