1. A method of controlling branch prediction logic in a data processing system, the method comprising: selectively setting an enable state of branch prediction logic in at least one processing core in response to a hypervisor running on the processing core; selectively overriding the enable state of the branch prediction logic set by the hypervisor in response to a guest operating system running on the processing core and hosted by the hypervisor such that the guest operating system controls the enable state of the branch prediction logic while the processing core is executing the guest operating system; and selectively enabling the branch prediction logic based upon the enable state of the branch prediction logic during execution of at least one instruction stream such that the at least one instruction stream is executed while the branch prediction logic is selectively enabled; wherein selectively setting the enable state and selectively overriding the enable state optimize the branch prediction logic for different workloads of the data processing system.