Avi Kivity 18863bdd60 KVM: x86 shared msr infrastructure
The various syscall-related MSRs are fairly expensive to switch.  Currently
we switch them on every vcpu preemption, which is far too often:

- if we're switching to a kernel thread (idle task, threaded interrupt,
  kernel-mode virtio server (vhost-net), for example) and back, then
  there's no need to switch those MSRs since kernel threasd won't
  be exiting to userspace.

- if we're switching to another guest running an identical OS, most likely
  those MSRs will have the same value, so there's little point in reloading
  them.

- if we're running the same OS on the guest and host, the MSRs will have
  identical values and reloading is unnecessary.

This patch uses the new user return notifiers to implement last-minute
switching, and checks the msr values to avoid unnecessary reloading.

Signed-off-by: Avi Kivity <avi@redhat.com>
2009-12-03 09:32:21 +02:00
..
2009-04-08 11:51:46 -07:00
2009-02-10 00:41:58 +01:00
2008-10-22 22:55:23 -07:00
2009-09-20 20:25:03 +02:00
2009-01-29 14:16:51 +01:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2009-01-29 14:17:01 +01:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2009-08-08 17:44:11 +02:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2009-04-07 13:36:36 +02:00
2009-08-27 17:12:52 +02:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2009-06-11 23:31:52 +02:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2009-06-11 23:31:52 +02:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2009-03-27 14:43:57 -04:00
2008-12-12 11:58:36 +01:00
2009-04-10 20:27:13 +02:00
2008-10-22 22:55:20 -07:00
2009-04-29 06:54:34 +01:00
2009-01-21 17:26:06 +09:00
2009-08-31 09:35:45 +02:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2009-06-13 15:37:30 +02:00
2008-10-22 22:55:23 -07:00
2009-12-03 09:32:21 +02:00
2009-09-10 10:46:49 +03:00
2009-12-03 09:32:18 +02:00
2008-10-22 22:55:23 -07:00
2009-07-30 16:03:46 +09:30
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2009-05-18 09:21:04 +02:00
2008-10-22 22:55:20 -07:00
2009-02-05 22:30:14 +01:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:20 -07:00
2009-02-02 23:27:09 +05:30
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2009-08-31 11:09:40 +02:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2009-09-20 20:18:57 +02:00
2009-06-15 12:40:02 +02:00
2008-10-22 22:55:20 -07:00
2009-04-01 08:59:16 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2009-01-31 00:19:32 +05:30
2008-10-22 22:55:23 -07:00
2009-03-27 14:43:57 -04:00
2009-09-22 19:57:51 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2009-07-19 18:27:52 +02:00
2009-09-20 20:19:34 +02:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2009-08-21 21:43:46 +02:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-12-14 16:24:38 -08:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2009-06-15 12:40:02 +02:00