The Santiago Bernabeu side have confirmed the midfielder has undergone treatment on a broken metatarsal sustained during training on Wednesday
The Spain international sustained a fractured metatarsal during Wednesday morning's training session and could be out of action for an estimated three months due to the knock.
"Xabi Alonso today (Thursday) had an operation for a fracture of the fifth metatarsal of his right foot," a club statement announced.
The 31-year-old only recently returned to full match fitness after missing Spain's Confederations Cup campaign due to a groin problem.
The injury is a bitter blow to Carlo Ancelotti's plans as new signing Asier Illarramendi - dubbed the long-term replacement to Alonso at the heart of the Blancos midfield - is still short of match fitness following a muscular injury picked up in pre-season.