x86/apic: Add apic->eoi_write() callback
Add eoi_write callback so that kvm can override eoi accesses without touching the rest of the apic. As a side-effect, this will enable a micro-optimization for apics using msr. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Cc: Avi Kivity <avi@redhat.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: gleb@redhat.com Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/0df425d746c49ac2ecc405174df87752869629d2.1337184153.git.mst@redhat.com [ tidied it up a bit ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:

committed by
Ingo Molnar

parent
4ebcc24390
commit
2a43195d83
@@ -227,6 +227,7 @@ static struct apic apic_flat = {
|
||||
|
||||
.read = native_apic_mem_read,
|
||||
.write = native_apic_mem_write,
|
||||
.eoi_write = native_apic_mem_write,
|
||||
.icr_read = native_apic_icr_read,
|
||||
.icr_write = native_apic_icr_write,
|
||||
.wait_icr_idle = native_apic_wait_icr_idle,
|
||||
@@ -386,6 +387,7 @@ static struct apic apic_physflat = {
|
||||
|
||||
.read = native_apic_mem_read,
|
||||
.write = native_apic_mem_write,
|
||||
.eoi_write = native_apic_mem_write,
|
||||
.icr_read = native_apic_icr_read,
|
||||
.icr_write = native_apic_icr_write,
|
||||
.wait_icr_idle = native_apic_wait_icr_idle,
|
||||
|
@@ -181,6 +181,7 @@ struct apic apic_noop = {
|
||||
|
||||
.read = noop_apic_read,
|
||||
.write = noop_apic_write,
|
||||
.eoi_write = noop_apic_write,
|
||||
.icr_read = noop_apic_icr_read,
|
||||
.icr_write = noop_apic_icr_write,
|
||||
.wait_icr_idle = noop_apic_wait_icr_idle,
|
||||
|
@@ -295,6 +295,7 @@ static struct apic apic_numachip __refconst = {
|
||||
|
||||
.read = native_apic_mem_read,
|
||||
.write = native_apic_mem_write,
|
||||
.eoi_write = native_apic_mem_write,
|
||||
.icr_read = native_apic_icr_read,
|
||||
.icr_write = native_apic_icr_write,
|
||||
.wait_icr_idle = native_apic_wait_icr_idle,
|
||||
|
@@ -248,6 +248,7 @@ static struct apic apic_bigsmp = {
|
||||
|
||||
.read = native_apic_mem_read,
|
||||
.write = native_apic_mem_write,
|
||||
.eoi_write = native_apic_mem_write,
|
||||
.icr_read = native_apic_icr_read,
|
||||
.icr_write = native_apic_icr_write,
|
||||
.wait_icr_idle = native_apic_wait_icr_idle,
|
||||
|
@@ -678,6 +678,7 @@ static struct apic __refdata apic_es7000_cluster = {
|
||||
|
||||
.read = native_apic_mem_read,
|
||||
.write = native_apic_mem_write,
|
||||
.eoi_write = native_apic_mem_write,
|
||||
.icr_read = native_apic_icr_read,
|
||||
.icr_write = native_apic_icr_write,
|
||||
.wait_icr_idle = native_apic_wait_icr_idle,
|
||||
@@ -742,6 +743,7 @@ static struct apic __refdata apic_es7000 = {
|
||||
|
||||
.read = native_apic_mem_read,
|
||||
.write = native_apic_mem_write,
|
||||
.eoi_write = native_apic_mem_write,
|
||||
.icr_read = native_apic_icr_read,
|
||||
.icr_write = native_apic_icr_write,
|
||||
.wait_icr_idle = native_apic_wait_icr_idle,
|
||||
|
@@ -530,6 +530,7 @@ static struct apic __refdata apic_numaq = {
|
||||
|
||||
.read = native_apic_mem_read,
|
||||
.write = native_apic_mem_write,
|
||||
.eoi_write = native_apic_mem_write,
|
||||
.icr_read = native_apic_icr_read,
|
||||
.icr_write = native_apic_icr_write,
|
||||
.wait_icr_idle = native_apic_wait_icr_idle,
|
||||
|
@@ -142,6 +142,7 @@ static struct apic apic_default = {
|
||||
|
||||
.read = native_apic_mem_read,
|
||||
.write = native_apic_mem_write,
|
||||
.eoi_write = native_apic_mem_write,
|
||||
.icr_read = native_apic_icr_read,
|
||||
.icr_write = native_apic_icr_write,
|
||||
.wait_icr_idle = native_apic_wait_icr_idle,
|
||||
|
@@ -546,6 +546,7 @@ static struct apic apic_summit = {
|
||||
|
||||
.read = native_apic_mem_read,
|
||||
.write = native_apic_mem_write,
|
||||
.eoi_write = native_apic_mem_write,
|
||||
.icr_read = native_apic_icr_read,
|
||||
.icr_write = native_apic_icr_write,
|
||||
.wait_icr_idle = native_apic_wait_icr_idle,
|
||||
|
@@ -260,6 +260,7 @@ static struct apic apic_x2apic_cluster = {
|
||||
|
||||
.read = native_apic_msr_read,
|
||||
.write = native_apic_msr_write,
|
||||
.eoi_write = native_apic_msr_write,
|
||||
.icr_read = native_x2apic_icr_read,
|
||||
.icr_write = native_x2apic_icr_write,
|
||||
.wait_icr_idle = native_x2apic_wait_icr_idle,
|
||||
|
@@ -172,6 +172,7 @@ static struct apic apic_x2apic_phys = {
|
||||
|
||||
.read = native_apic_msr_read,
|
||||
.write = native_apic_msr_write,
|
||||
.eoi_write = native_apic_msr_write,
|
||||
.icr_read = native_x2apic_icr_read,
|
||||
.icr_write = native_x2apic_icr_write,
|
||||
.wait_icr_idle = native_x2apic_wait_icr_idle,
|
||||
|
@@ -404,6 +404,7 @@ static struct apic __refdata apic_x2apic_uv_x = {
|
||||
|
||||
.read = native_apic_msr_read,
|
||||
.write = native_apic_msr_write,
|
||||
.eoi_write = native_apic_msr_write,
|
||||
.icr_read = native_x2apic_icr_read,
|
||||
.icr_write = native_x2apic_icr_write,
|
||||
.wait_icr_idle = native_x2apic_wait_icr_idle,
|
||||
|
Reference in New Issue
Block a user