* [PATCH] fix apic id reading in x2apic mode
@ 2009-08-25 13:39 Gleb Natapov
2009-08-26 9:46 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Gleb Natapov @ 2009-08-25 13:39 UTC (permalink / raw)
To: avi; +Cc: kvm
Format of apic id register is different in x2apic mode.
Return correct apic id when apic is in x2apic mode.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index e41e948..bd3a402 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -551,6 +551,12 @@ static u32 __apic_read(struct kvm_lapic *apic, unsigned int offset)
return 0;
switch (offset) {
+ case APIC_ID:
+ if (apic_x2apic_mode(apic))
+ val = kvm_apic_id(apic);
+ else
+ val = kvm_apic_id(apic) << 24;
+ break;
case APIC_ARBPRI:
printk(KERN_WARNING "Access APIC ARBPRI register "
"which is for P6\n");
--
Gleb.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fix apic id reading in x2apic mode
2009-08-25 13:39 [PATCH] fix apic id reading in x2apic mode Gleb Natapov
@ 2009-08-26 9:46 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-08-26 9:46 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm
On 08/25/2009 04:39 PM, Gleb Natapov wrote:
> Format of apic id register is different in x2apic mode.
> Return correct apic id when apic is in x2apic mode.
>
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-26 9:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-25 13:39 [PATCH] fix apic id reading in x2apic mode Gleb Natapov
2009-08-26 9:46 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).