Possibly read the codes with a $29 OBD-codereader or bat your eyelashes at the dude behind the counter to let you borrow the one he has behind the counter to read the code...
It's likely the O2 sensor(s) have failed - that will cause rough running and bad mpg plus rich/unburnt-gas smell of exhaust.
O2 sensors are expected to require replacement any time after or along with spark plugs & wires at about 100k or 5+ years.
You didn't ask but just so you know:
imho the first-gen XC90 remains quite the superlative excellent/safest passenger vehicle available on the planet (I used to own an 04, and cannot identify any safer passenger vehicle available in 2011 compared to the 04 or more recent XC90. )