1. A method of controlling branch prediction logic in a data processing system, the method comprising: saving a first state of branch prediction logic in the processing core in response to a first, hypervisor-mode instruction executed by the processing core for a hypervisor resident in the data processing system; restoring the first state of the branch prediction logic in response to a second, hypervisor-mode instruction executed by the processing core for the hypervisor; saving a second state of the branch prediction logic in response to a third instruction executed by the processing core for a program hosted by the hypervisor; and restoring the second state of the branch prediction logic in response to a fourth instruction executed by the processing core and hosted by the hypervisor.