Is all of the DNA used by genes (encoding DNA)?
The ENCODE consortium classifies human and mouse genome elements to try to answer this very question.
Work by ENCODE suggested up to 80% of the genome is functional in some way. In other words, by that upper-bound measurement, there is apparently more to DNA's role in biology than just encoding genes — there's a lot going on under the hood.

Case for Abundant Functional Genomic Elements.
Genome-wide biochemical studies, including recent reports from ENCODE, have revealed pervasive activity over an unexpectedly large fraction of the genome, including noncoding and nonconserved regions and repeat elements (58⇓–60). Such results greatly increase upper bound estimates of candidate functional sequences (Fig. 2 and Fig. S2). Many human genomic regions previously assumed to be nonfunctional have recently been found to be teeming with biochemical activity, including portions of repeat elements, which can be bound by transcription factors and transcribed (79, 80), and are thought to sometimes be exapted into novel regulatory regions (81⇓⇓–84). Outside the 1.5% of the genome covered by protein-coding sequence, 11% of the genome is associated with motifs in transcription factor-bound regions or high-resolution DNase footprints in one or more cell types (Fig. 2), indicative of direct contact by regulatory proteins. Transcription factor occupancy and nucleosome-resolution DNase hypersensitivity maps overlap greatly and each cover approximately 15% of the genome. In aggregate, histone modifications associated with promoters or enhancers mark ∼20% of the genome, whereas a third of the genome is marked by modifications associated with transcriptional elongation. Over half of the genome has at least one repressive histone mark. In agreement with prior findings of pervasive transcription (85, 86), ENCODE maps of polyadenylated and total RNA cover in total more than 75% of the genome. [emph. added]

However, people outside the ENCODE consortium have criticised this research with very strong language, such as in this article by noted critic Dan Graur:

Actually, the ENCODE authors could have chosen any of a number of arbitrary percentages as “functional,” and … they did! In their scientific publications, ENCODE promoted the idea that 80% of the human genome was functional. The scientific commentators followed, and proclaimed that at least 80% of the genome is “active and needed” (Kolata 2012). Subsequently, one of the lead authors of ENCODE admitted that the press conference mislead people by claiming that 80% of our genome was “essential and useful.” He put that number at 40% (Gregory 2012), although another lead author reduced the fraction of the genome that is devoted to function to merely 20% (Hall 2012). Interestingly, even when a lead author of ENCODE reduced the functional genomic fraction to 20%, he continued to insist that the term “junk DNA” needs “to be totally expunged from the lexicon,” inventing a new arithmetic according to which 20% &gt; 80%. In its synopsis of the year 2012, the journal Nature adopted the more modest estimate, and summarized the findings of ENCODE by stating that “at least 20% of the genome can influence gene expression” (Van Noorden 2012). Science stuck to its maximalist guns, and its summary of 2012 repeated the claim that the “functional portion” of the human genome equals 80% (Anonymous 2012). Unfortunately, neither 80% nor 20% are based on actual evidence.

Other critics, including Sean Eddy, focus a great deal on what is called the C-value paradox: Given a genome of a certain size, if it was all functional — or a lot of it functional, as the ENCODE consortium has claimed — then it would all be under evolutionary pressure, i.e., you'd expect certain mutation rates to occur, but they don't. Evolutionary biology would say about 5-10% is functional, I believe, based on how much selection takes place and where. So those critics would say (and have had indeed said) a lot of negative things about results reported by ENCODE.
I suspect that the true answer, if there is one, depends on what one defines as functional and as evolutionarily conserved, by what means you measure it, and what the balance is between functionality and conservation. You pick your definitions and processes, and you accept the compromises and limitations that go along with those choices.
Caveat: I am a contributing author to ENCODE papers released in Nature in 2012.