From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 5 16:24:26 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 297EE106566C for ; Sun, 5 Apr 2009 16:24:26 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms173015pub.verizon.net (vms173015pub.verizon.net [206.46.173.15]) by mx1.freebsd.org (Postfix) with ESMTP id 098FF8FC26 for ; Sun, 5 Apr 2009 16:24:25 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms124.mailsrvcs.net ([172.18.12.134]) by vms173015.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KHM0050EYVF3WDM@vms173015.mailsrvcs.net>; Sun, 05 Apr 2009 11:23:39 -0500 (CDT) Received: from 96.234.43.209 ([96.234.43.209]) by vms124.mailsrvcs.net (Verizon Webmail) with HTTP; Sun, 05 Apr 2009 11:23:39 -0500 (CDT) Date: Sun, 05 Apr 2009 11:23:39 -0500 (CDT) From: Sergey Babkin To: ivoras@freebsd.org Message-id: <1366225354.253456.1238948619308.JavaMail.root@vms124.mailsrvcs.net> Content-transfer-encoding: quoted-printable X-Originating-IP: [96.234.43.209] X-Mailman-Approved-At: Sun, 05 Apr 2009 17:04:45 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@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: Sun, 05 Apr 2009 16:24:26 -0000 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. -SB