From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 6 16:10:19 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4CD010657CE; Mon, 6 Apr 2009 16:10:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4C7518FC1D; Mon, 6 Apr 2009 16:10:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id F3F5546B03; Mon, 6 Apr 2009 12:10:09 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 74CD98A04B; Mon, 6 Apr 2009 12:10:08 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 6 Apr 2009 11:54:19 -0400 User-Agent: KMail/1.9.7 References: <1366225354.253456.1238948619308.JavaMail.root@vms124.mailsrvcs.net> In-Reply-To: <1366225354.253456.1238948619308.JavaMail.root@vms124.mailsrvcs.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904061154.19601.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 06 Apr 2009 12:10:08 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=4.2 tests=RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Sergey Babkin , ivoras@freebsd.org Subject: Re: Patch for MS Hyper V (virtualization) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2009 16:10:27 -0000 On Sunday 05 April 2009 12:23:39 pm Sergey Babkin wrote: > > Apr 4, 2009 02:10:23 PM, ivoras@freebsd.org wrote: > >Can someo=ne please review and commit (if appropriate) the tweak for > >Hyper-V shu=tdown issue at > http://shell.peach.ne.jp/aoyama/archives/40 > >? > > > =>>The problem is: the VM appears to hang on shutdown without it > (hanging > >the Hyper-V VM with it so the host also can't shutdown or reboot > >re=liably - someone at MS skipped the part where an error in the VM > >isn't=supposed to bring the host down with it) > I don't have the commit =permission any more but I can review :-) > Yes, Hyper-V does not like th=e writes into the PCI config space. > Very specifically, > writing the base=register window address of the simulated 21140 > screws up something > tha=t prevents the VM from shutting down. Interestingly, even reading > and writi=ng > back the same value has this effect. So the patch is valid. > =>I don't particularly like the hackish checking for the 21140 chip, > and I'=m not sure > if if would break some real 21140 chip out there. If the dri=ver does > the same as another > one I've seen, the driver tries to align t=he register window to > 0x80, and in the > simulated 21140 it's already ali=gned. I've had a quick look but > couldn't say it > for sure. I'd do it dif=ferently: check if the value being written is > the same that was read, > =and skip the write in this case. > Let me see, maybe I'll make a dif=ferent patch. Hmm, the problem is we need to be able to write to BARs to size them. Any OS needs to be able to do this to know what address space regions are being decoded by devices. We can't avoid writing to BARs. -- John Baldwin