From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Feiner Subject: [kvm-unit-tests v3 0/6] Split large EPT mappings properly Date: Wed, 2 Mar 2016 09:10:51 -0800 Message-ID: <1456938657-20850-1-git-send-email-pfeiner@google.com> References: <1456860622-31251-1-git-send-email-pfeiner@google.com> Cc: pfeiner@google.com To: kvm@vger.kernel.org, jan.kiszka@siemens.com, drjones@redhat.com, pbonzini@redhat.com Return-path: Received: from mail-pf0-f173.google.com ([209.85.192.173]:35587 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752730AbcCBRLA (ORCPT ); Wed, 2 Mar 2016 12:11:00 -0500 Received: by mail-pf0-f173.google.com with SMTP id w128so92687742pfb.2 for ; Wed, 02 Mar 2016 09:11:00 -0800 (PST) In-Reply-To: <1456860622-31251-1-git-send-email-pfeiner@google.com> Sender: kvm-owner@vger.kernel.org List-ID: install_ept_entry would overwrite arbitrary memory when it encountered a large page. I discovered the bug while working on a simple multi-page allocator, which I'm using for huge page testing, that sorts the free list in ascending order of HPA. v3: * Added #define BITS_PER_LONG_LONG 64 * Fixed EPT_ADDR_MASK bit range * Made EPT_ADDR_MASK unsigned long long v2: * Added lib/bitops.h for GENMASK. * Factored common stuff out of lib/*/asm/bitops.h * Fixed all of the whitespace in vmx.h. Peter Feiner (6): x86: vmx.h: trivial whitespace fixes lib: generic bitops.h x86: vmx: Named constant: EPT_ADDR_MASK x86: vmx: Named constant: EPT_LEVEL_SHIFT x86: vmx: split large EPTEs in install_ept_entry x86: vmx: don't explicitly split identity EPT map lib/arm/asm/bitops.h | 8 ++-- lib/arm/asm/cpumask.h | 2 +- lib/arm/bitops.c | 2 +- lib/arm64/asm/bitops.h | 8 ++-- lib/bitops.h | 36 ++++++++++++++++ lib/ppc64/asm/bitops.h | 10 +++++ lib/x86/asm/bitops.h | 14 +++++++ x86/vmx.c | 65 ++++++++++++++++++++++------- x86/vmx.h | 111 +++++++++++++++++++++++++------------------------ x86/vmx_tests.c | 7 ---- 10 files changed, 176 insertions(+), 87 deletions(-) create mode 100644 lib/bitops.h create mode 100644 lib/ppc64/asm/bitops.h create mode 100644 lib/x86/asm/bitops.h -- 2.7.0.rc3.207.g0ac5344