My experience concern a hp pavilion g6-1352sl originally shipped with i5-2450m: tried with an i7 3840QM but computer do not boot, while with i7 2640M everything looks fine.
I've based my choice on ram type, TDP, socket type.
It's strange that I've been lucky to find the only pc that can be upgrade, the question will be it worth it? I don't know: I'm interested in the technical aspect, not the economic one, even if a quite old cpu turn out to be more expensive than I expected.
The paradox is that my HP pavilion has a whitelist in the bios for the wifi card so I can't upgrade that.