Commutative rings whose proper ideals are P-virtually semisimple