lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Feb 2018 15:20:21 +0000
From:   Ben Hutchings <ben@...adent.org.uk>
To:     linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC:     akpm@...ux-foundation.org, "Chegu Vinod" <chegu_vinod@...com>,
        "Gleb Natapov" <gleb@...hat.com>, "Avi Kivity" <avi@...hat.com>
Subject: [PATCH 3.2 012/140] KVM: apic: fix LDR calculation in x2apic mode

3.2.100-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Gleb Natapov <gleb@...hat.com>

commit 7f46ddbd487e0d0528d89534fdfb31d885977804 upstream.

Signed-off-by: Gleb Natapov <gleb@...hat.com>
Reviewed-by: Chegu Vinod  <chegu_vinod@...com>
Tested-by: Chegu Vinod <chegu_vinod@...com>
Signed-off-by: Avi Kivity <avi@...hat.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
 arch/x86/kvm/lapic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1022,7 +1022,7 @@ void kvm_lapic_set_base(struct kvm_vcpu
 	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));
 		apic_set_reg(apic, APIC_LDR, ldr);
 	}
 	apic->base_address = apic->vcpu->arch.apic_base &

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ