Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8116290imu; Thu, 15 Nov 2018 06:54:03 -0800 (PST) X-Google-Smtp-Source: AJdET5fDGeeIhdp35JAfqwxqEyTsZvbII8PA1xV3mry2ddGvOKevmwtxLXQqaAcof78NuYaTZLoO X-Received: by 2002:a62:5881:: with SMTP id m123-v6mr6846058pfb.160.1542293643376; Thu, 15 Nov 2018 06:54:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542293643; cv=none; d=google.com; s=arc-20160816; b=UVQcBwMMOeBCXHNmom6caW0F1HstKBR312K7s4edvFhFmvhRwzoIsXiniHkbgn7Os1 dTAWuVNXjYi4r21mGw8u6EGVUNB7E9cCtGRJmxtKEQkBcTt9x8ZKFRjq29HDbuhzm261 nptt3lsOV1n+OI6ve/3+JCrxIjnKTOsvMS3hx5vXikU8y6yJHZ+Tu4QNBgrk2ySUDl+T Xx5dYOPfNSLlB+EsTTRa1W7E04yok5MXvFM8gCEAZCMZTWpEqLSDOHVA5O2GnVX8Nw6y B0xBzN3Phw4esBwz75cKxqPq8zhBFEwq5ZHwU1ZR3fy6wbqpIstSIJr5ZpKjAO3zLF2x e61Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=LoxS45B95L/ZtAMXb/QkkOoxB2Nkp/xypHi+JzL26Do=; b=ZJjuW5qFLFjKd+kSWVBlMTeiXXjzCNcZtSDpEKO8CQRt4NUaxfS9iLcTdenalY3C3b mV0+cjhb7hdbshPgQa4t8pngAjETlMout5Q6NbKeBru9mQ9JCd9KUgk+9ScxPvqDmtw4 3ImgHguzyrfOHq3VVbLWzBAw0AOKeZGZrvWijnoHhSz/31WSdZ/jGs7EmoyXZ7GSYsCd xToD81Qzrj6XLpp+PW3nUWYv3YyDKUel2+9r8+H/j3x26rk9izbz/l/cm++nlLhDAz1c 2o+w4zXNFzeXgJiEqGfx/F71tD2u2gkdwhbIRvLyybvtqOFElk2Q5nYud5LxTo5psGs0 y7+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1-v6si22559808pfb.4.2018.11.15.06.53.48; Thu, 15 Nov 2018 06:54:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388474AbeKPA6o (ORCPT + 99 others); Thu, 15 Nov 2018 19:58:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56286 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387833AbeKPA6o (ORCPT ); Thu, 15 Nov 2018 19:58:44 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 043B37AE9E; Thu, 15 Nov 2018 14:50:36 +0000 (UTC) Received: from kamzik.brq.redhat.com (unknown [10.43.2.160]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3537F19C65; Thu, 15 Nov 2018 14:50:31 +0000 (UTC) Date: Thu, 15 Nov 2018 15:50:28 +0100 From: Andrew Jones To: Ahmed Soliman Cc: Anders Roxell , Shuah Khan , linux-kselftest@vger.kernel.org, Paolo Bonzini , Peter Xu , Vitaly Kuznetsov , linux-kernel@vger.kernel.org Subject: Re: KVM selftests are failing Message-ID: <20181115145028.qijg7hjswcuabrt2@kamzik.brq.redhat.com> References: <20181114180807.6crs7awhvo26ldbr@hawk.localdomain> <20181115090203.5z25gwa2yznj6mmu@kamzik.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 15 Nov 2018 14:50:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 15, 2018 at 03:36:44PM +0200, Ahmed Soliman wrote: > mmap(NULL, 6291456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, > -1, 0) = 0x7f46ea2a1000 > madvise(0x7f46ea2a1000, 6291456, MADV_NOHUGEPAGE) = -1 EINVAL (Invalid argument) > > For comprehension, this is done on intel core i7-4500U CPU @ 1.80GHz Argh. I see what it is. Your config doesn't have CONFIG_TRANSPARENT_HUGEPAGE=y, so madvise_behavior_valid() returns false, which causes madvise() to immediately return EINVAL. We should be more careful in kvm selftests with our madvise behavior use. > > As for now I will comment the madvise line and the assert when writing > my own kvm self test. I think it wouldn't cause any trouble?, If it is > not the case, please let me know. > You may not need madvise() at all for your test, depending on what you're doing. So leaving it out may be fine. Reworking kvm selftests to ensure only valid madvise behaviors are used (and only when necessary), before adding new tests, would be best. Thanks, drew