From patchwork Tue Sep 30 17:49:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nadav Amit X-Patchwork-Id: 5005331 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E0545BEEA6 for ; Tue, 30 Sep 2014 17:49:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 21251201C7 for ; Tue, 30 Sep 2014 17:49:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0544E20200 for ; Tue, 30 Sep 2014 17:49:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753574AbaI3Rtn (ORCPT ); Tue, 30 Sep 2014 13:49:43 -0400 Received: from mailgw12.technion.ac.il ([132.68.225.12]:4433 "EHLO mailgw12.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753559AbaI3Rtm (ORCPT ); Tue, 30 Sep 2014 13:49:42 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah8FAGDsKlSERCAB/2dsb2JhbABggw6BKtF1AoENFgEBeoQEAQUnUhBRVxmIPrg0hkcYjzpkBxaENQWLTZ4riSeDZmmBBoFEAQEB X-IPAS-Result: Ah8FAGDsKlSERCAB/2dsb2JhbABggw6BKtF1AoENFgEBeoQEAQUnUhBRVxmIPrg0hkcYjzpkBxaENQWLTZ4riSeDZmmBBoFEAQEB X-IronPort-AV: E=Sophos;i="5.04,628,1406581200"; d="scan'208";a="123967591" Received: from csa.cs.technion.ac.il ([132.68.32.1]) by mailgw12.technion.ac.il with ESMTP; 30 Sep 2014 20:49:38 +0300 Received: from csn.cs.technion.ac.il (csn.cs.technion.ac.il [132.68.32.15]) by csa.cs.technion.ac.il (Postfix) with ESMTP id 2E9BC140039; Tue, 30 Sep 2014 20:49:38 +0300 (IDT) Received: from csl-tapuz20.cs.technion.ac.il (csl-tapuz20.cs.technion.ac.il [132.68.206.58]) by csn.cs.technion.ac.il (Postfix) with ESMTPSA id 22214A0C77; Tue, 30 Sep 2014 20:49:38 +0300 (IDT) From: Nadav Amit To: pbonzini@redhat.com Cc: kvm@vger.kernel.org, nadav.amit@gmail.com, Nadav Amit Subject: [PATCH 5/6] KVM: x86: Wrong assertion on paging_tmpl.h Date: Tue, 30 Sep 2014 20:49:18 +0300 Message-Id: <1412099359-5316-6-git-send-email-namit@cs.technion.ac.il> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1412099359-5316-1-git-send-email-namit@cs.technion.ac.il> References: <1412099359-5316-1-git-send-email-namit@cs.technion.ac.il> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Even after the recent fix, the assertion on paging_tmpl.h is triggered. Apparently, the assertion wants to check that the PAE is always set on long-mode, but does it in incorrect way. Note that the assertion is not enabled unless the code is debugged by defining MMU_DEBUG. Signed-off-by: Nadav Amit Reviewed-by: Radim Kr?má? --- arch/x86/kvm/paging_tmpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 806d58e..faf7298 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -298,7 +298,7 @@ retry_walk: } #endif walker->max_level = walker->level; - ASSERT(!is_long_mode(vcpu) && is_pae(vcpu)); + ASSERT(!is_long_mode(vcpu) || is_pae(vcpu)); accessed_dirty = PT_GUEST_ACCESSED_MASK; pt_access = pte_access = ACC_ALL;