* [PATCH] KVM: apic: fix LDR calculation in x2apic mode
@ 2012-10-14 11:08 Gleb Natapov
2012-10-14 13:41 ` Chegu Vinod
2012-10-18 14:33 ` Avi Kivity
0 siblings, 2 replies; 3+ messages in thread
From: Gleb Natapov @ 2012-10-14 11:08 UTC (permalink / raw)
To: kvm; +Cc: Chegu Vinod, avi, mtosatti
Signed-off-by: Gleb Natapov <gleb@redhat.com>
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index c6e6b72..43e9fad 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1311,7 +1311,7 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value)
vcpu->arch.apic_base = value;
if (apic_x2apic_mode(apic)) {
u32 id = kvm_apic_id(apic);
- u32 ldr = ((id & ~0xf) << 16) | (1 << (id & 0xf));
+ u32 ldr = ((id >> 4) << 16) | (1 << (id & 0xf));
kvm_apic_set_ldr(apic, ldr);
}
apic->base_address = apic->vcpu->arch.apic_base &
--
Gleb.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: apic: fix LDR calculation in x2apic mode
2012-10-14 11:08 [PATCH] KVM: apic: fix LDR calculation in x2apic mode Gleb Natapov
@ 2012-10-14 13:41 ` Chegu Vinod
2012-10-18 14:33 ` Avi Kivity
1 sibling, 0 replies; 3+ messages in thread
From: Chegu Vinod @ 2012-10-14 13:41 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm, avi, mtosatti
On 10/14/2012 4:08 AM, Gleb Natapov wrote:
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index c6e6b72..43e9fad 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -1311,7 +1311,7 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value)
> vcpu->arch.apic_base = value;
> if (apic_x2apic_mode(apic)) {
> u32 id = kvm_apic_id(apic);
> - u32 ldr = ((id & ~0xf) << 16) | (1 << (id & 0xf));
> + u32 ldr = ((id >> 4) << 16) | (1 << (id & 0xf));
> kvm_apic_set_ldr(apic, ldr);
> }
> apic->base_address = apic->vcpu->arch.apic_base &
> --
> Gleb.
> .
>
Reviewed-by: Chegu Vinod <chegu_vinod@hp.com>
Tested-by: Chegu Vinod <chegu_vinod@hp.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: apic: fix LDR calculation in x2apic mode
2012-10-14 11:08 [PATCH] KVM: apic: fix LDR calculation in x2apic mode Gleb Natapov
2012-10-14 13:41 ` Chegu Vinod
@ 2012-10-18 14:33 ` Avi Kivity
1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2012-10-18 14:33 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm, Chegu Vinod, mtosatti
On 10/14/2012 01:08 PM, Gleb Natapov wrote:
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index c6e6b72..43e9fad 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -1311,7 +1311,7 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value)
> vcpu->arch.apic_base = value;
> if (apic_x2apic_mode(apic)) {
> u32 id = kvm_apic_id(apic);
> - u32 ldr = ((id & ~0xf) << 16) | (1 << (id & 0xf));
> + u32 ldr = ((id >> 4) << 16) | (1 << (id & 0xf));
> kvm_apic_set_ldr(apic, ldr);
> }
Thanks, applied to master for 3.7.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-18 14:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-14 11:08 [PATCH] KVM: apic: fix LDR calculation in x2apic mode Gleb Natapov
2012-10-14 13:41 ` Chegu Vinod
2012-10-18 14:33 ` Avi Kivity
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.