From patchwork Thu Apr 25 07:52:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nakajima, Jun" X-Patchwork-Id: 2487491 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 821D4DFF66 for ; Thu, 25 Apr 2013 07:53:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756707Ab3DYHw5 (ORCPT ); Thu, 25 Apr 2013 03:52:57 -0400 Received: from mail-ve0-f181.google.com ([209.85.128.181]:46112 "EHLO mail-ve0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756353Ab3DYHwf (ORCPT ); Thu, 25 Apr 2013 03:52:35 -0400 Received: by mail-ve0-f181.google.com with SMTP id d10so1122345vea.40 for ; Thu, 25 Apr 2013 00:52:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=T75viegEvvNa2psJaAEK1gd4ulQOy4luKqbplp+xvKo=; b=Ft6j/A1nMTnl40NfhI9fLSvQXZJgLWHiWXrFVj/iW1NZ1aEytW13xNRrobr3m6f5Gt kltwoHg1PyLyTy3O9KJZ2k5CjJt2/1uDiiGwc5YCN7c1P950B0i4tWYIq5EPUXYUl5ug TeaFGLEeJy/rJGFu/DG2KH5XaZXi1nDSwRGXY8Ow4MOx7FgKLNhpiv1bQuGxT0QtRZuh qdQ7kmNOW4D0Uz5kMCgKLVHp1nw0Me0ZJqMseJTFvSgK9JVth6oWmyZOORs02PoqIBDb +1SibLoow0U4NPA+4F3ISrrnp2TMZXV7NyrwjI7kdbNnP/aJUxXMPoMpejD6P3r+l15U Xthg== MIME-Version: 1.0 X-Received: by 10.52.25.99 with SMTP id b3mr22424766vdg.99.1366876354061; Thu, 25 Apr 2013 00:52:34 -0700 (PDT) Received: by 10.58.64.196 with HTTP; Thu, 25 Apr 2013 00:52:33 -0700 (PDT) Date: Thu, 25 Apr 2013 00:52:33 -0700 Message-ID: Subject: [PATCH 11/12] Move the routines to paging_tmpl.h to make them diffrent for virtual EPT. From: "Nakajima, Jun" To: "kvm@vger.kernel.org" X-Gm-Message-State: ALoCoQmRqVwtaySaq4sgQOSrC2COU+Yst2KT9OUlP80i0CxrTUsxH0xAq+AeUTHK0QzPgUEZWIYU Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Signed-off-by: Nadav Har'El Signed-off-by: Jun Nakajima modified: arch/x86/kvm/mmu.c --- arch/x86/kvm/mmu.c | 30 ------------------------------ 1 file changed, 30 deletions(-) u64 *start, u64 *end) @@ -3399,16 +3379,6 @@ static bool sync_mmio_spte(u64 *sptep, gfn_t gfn, unsigned access, return false; } -static inline unsigned gpte_access(struct kvm_vcpu *vcpu, u64 gpte) -{ - unsigned access; - - access = (gpte & (PT_WRITABLE_MASK | PT_USER_MASK)) | ACC_EXEC_MASK; - access &= ~(gpte >> PT64_NX_SHIFT); - - return access; -} - static inline bool is_last_gpte(struct kvm_mmu *mmu, unsigned level, unsigned gpte) { unsigned index; -- 1.8.2.1.610.g562af5b -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 34e406e2..99bfc5e 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2480,26 +2480,6 @@ static pfn_t pte_prefetch_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn, return gfn_to_pfn_memslot_atomic(slot, gfn); } -static bool prefetch_invalid_gpte(struct kvm_vcpu *vcpu, - struct kvm_mmu_page *sp, u64 *spte, - u64 gpte) -{ - if (is_rsvd_bits_set(&vcpu->arch.mmu, gpte, PT_PAGE_TABLE_LEVEL)) - goto no_present; - - if (!is_present_gpte(gpte)) - goto no_present; - - if (!(gpte & PT_ACCESSED_MASK)) - goto no_present; - - return false; - -no_present: - drop_spte(vcpu->kvm, spte); - return true; -} - static int direct_pte_prefetch_many(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,