Interaction of volatiles with silicates and metals under high pressure