From patchwork Wed Aug 22 09:54:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 1360791 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D626E40B05 for ; Wed, 22 Aug 2012 09:55:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758939Ab2HVJzB (ORCPT ); Wed, 22 Aug 2012 05:55:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7583 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758775Ab2HVJy7 (ORCPT ); Wed, 22 Aug 2012 05:54:59 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7M9sjuj026318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 22 Aug 2012 05:54:46 -0400 Received: from balrog.usersys.tlv.redhat.com (dhcp-4-121.tlv.redhat.com [10.35.4.121]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7M9sfEI000696; Wed, 22 Aug 2012 05:54:42 -0400 Message-ID: <5034AC61.9030704@redhat.com> Date: Wed, 22 Aug 2012 12:54:41 +0300 From: Avi Kivity User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Tomas Racek CC: Michael Tokarev , Borislav Petkov , kvm-devel , Marcelo Tosatti , qemu-devel@nongnu.org, linux-kernel@vger.kernel.org, Anthony Liguori , "H. Peter Anvin" , Alan Cox , Alan Cox Subject: Re: [Qemu-devel] x86, nops settings result in kernel crash References: <592618508.2357204.1345541334852.JavaMail.root@redhat.com> In-Reply-To: <592618508.2357204.1345541334852.JavaMail.root@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 08/21/2012 12:28 PM, Tomas Racek wrote: > > http://fi.muni.cz/~xracek/debian2.img.bz2 > > Other things are the same. > > The runtest.sh sets environment for xfstests and runs test 285 which I wrote and and which should test if FS sends discard requests only on free sectors: > 285: > 1. Create loop device and FS on it. > 2. Populate it with some garbage. > 3. Get free sectors from FS. > 4. Run fstrim and look for discard requests via blk tracer. > 5. Compare free sectors to discard requests. > > The test itself can have some issues but I'm pretty sure it shouldn't crash the system. ;-) Does the following patch help? diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index afb7ff7..ced4534 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -165,7 +165,7 @@ static int __init setup_noreplace_paravirt(char *str) #endif #ifdef P6_NOP1 -static const unsigned char __initconst_or_module p6nops[] = +static const unsigned char p6nops[] = { P6_NOP1, P6_NOP2,