From owner-freebsd-ports@FreeBSD.ORG Fri Jul 13 12:39:54 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7DEF616A402 for ; Fri, 13 Jul 2007 12:39:54 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.freebsd.org (Postfix) with ESMTP id 0D7FC13C4D1 for ; Fri, 13 Jul 2007 12:39:53 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by ug-out-1314.google.com with SMTP id o4so623198uge for ; Fri, 13 Jul 2007 05:39:52 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Ej2WDEGiOFHknEMFl4Iwxm1gREPOIoD0SZbM8YWurfRPEWpo8oeAjUejbSv/8tJdE5dwn6fK9q2rylf2IfHjvumzsD/T6Jmmi8daSJY8wZXbX9UEdJd9xgRYLqsPOXpuNfHjoMGcydALRJAdH+nrH4d2RiTi/feI3/Hs2/u7EJg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=d9pYOa6VW/tJlTPZ8OsB+BsIJwg6nvBW+v7wqI8oLWxzX32Yzf+3kXIfxRUirTgr7+l9fF8hZwqMFTAT+/RAfpenC7sOs1DPIQc9J99IBJIqubdj43s95W6HR+sFoAz7GJG9/1tqPA+Sc58rNMFeqEte3tIF/1Sp58UgLNwkgAU= Received: by 10.78.186.9 with SMTP id j9mr467291huf.1184330391649; Fri, 13 Jul 2007 05:39:51 -0700 (PDT) Received: by 10.78.120.9 with HTTP; Fri, 13 Jul 2007 05:39:51 -0700 (PDT) Message-ID: <3bbf2fe10707130539q5d74fd86w55dfb20254cd4255@mail.gmail.com> Date: Fri, 13 Jul 2007 14:39:51 +0200 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Craig Boston" , "Juergen Lock" , attilio@freebsd.org, freebsd-emulation@freebsd.org, freebsd-ports@freebsd.org In-Reply-To: <20070712180750.GB77654@nowhere> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070702203027.GA45302@saturn.kn-bremen.de> <46925324.9010908@freebsd.org> <3bbf2fe10707091140h6cdc7469nac5be03a8c8a60cb@mail.gmail.com> <200707092000.29768.dfr@rabson.org> <200707092149.l69LnXe9023835@saturn.kn-bremen.de> <20070712175252.GA77654@nowhere> <20070712180750.GB77654@nowhere> X-Google-Sender-Auth: bc4dc233dbf6a4ce Cc: Subject: Re: experimental qemu-devel port update, please test! X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2007 12:39:54 -0000 2007/7/12, Craig Boston : > On Thu, Jul 12, 2007 at 12:52:52PM -0500, Craig Boston wrote: > > For some reason when the ioctl is issued, curproc points to a totally > > bogus proc structure. curthread seems to be sane as far as I can tell, > > but the process it claims to belong to is full of junk. > > Aha! The problem isn't that curproc is garbage, but rather that it's > being interpreted wrong. > > struct proc has some extra fields when KSE is #defined. KSE recently > became a kernel option and was put in the DEFAULTS file, so everyone's > kernel has it defined. But kqemu is being compiled without it. > > I compiled with -DKSE and now kqemu works! Ok, this patch should make this behaviour no more conditioned to KSE presence or not: http://people.freebsd.org/~attilio/kqemu.diff Note: this is highly untested due to lack of time and stuffs, but it should work. You would test in all the 4 configuration: - kernel with KSE, kqemu without - kernel without KSE, kquemu without - kernel with KSE, kqemu with - kernel without KSE, kquemu without They should all work. If they doesn't please let me know. An alternative approach would be to just not making KSE stuffs conditional, but even if I hate these ABI breakages I hate even more adding 16 unused bytes to "struct thread" struct on amd64. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein