<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>FreeBSD 7.1 on Windows Server 2008 + Hyper-V へのコメント</title>
	<atom:link href="http://shell.peach.ne.jp/aoyama/archives/40/feed" rel="self" type="application/rss+xml" />
	<link>http://shell.peach.ne.jp/aoyama/archives/40</link>
	<description>WordPress 2.9.2</description>
	<lastBuildDate>Sat, 13 Feb 2010 14:26:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>aoyama より</title>
		<link>http://shell.peach.ne.jp/aoyama/archives/40/comment-page-1#comment-278</link>
		<dc:creator>aoyama</dc:creator>
		<pubDate>Tue, 07 Apr 2009 09:58:13 +0000</pubDate>
		<guid isPermaLink="false">http://shell.peach.ne.jp/aoyama/archives/40#comment-278</guid>
		<description>The resource size is determined by normal method of PCI standard.
Did you consider when this patch affect?

I don&#039;t know a reason why FreeBSD ignore I/O indicator of base address register and Hyper-V only accept sequence of the values of 0xffffffff and something in DEC21140 I/O MAP at BAR(0) but I noticed that FreeBSD can reboot if it did not write at BAR after setting map.

pci_add_map()@sys/dev/pci/pci.c is called for each BAR.

&gt;    map = PCIB_READ_CONFIG(pcib, b, s, f, reg, 4);
&gt;    PCIB_WRITE_CONFIG(pcib, b, s, f, reg, 0xffffffff, 4);
&gt;    testval = PCIB_READ_CONFIG(pcib, b, s, f, reg, 4);
&gt;    PCIB_WRITE_CONFIG(pcib, b, s, f, reg, map, 4);

This method is correct and work on Hyper-V. FreeBSD can get the size.

&gt;        start = rman_get_start(res);
&gt;    pci_write_config(dev, reg, start, 4);

&lt;del datetime=&quot;2009-04-07T17:27:08+00:00&quot;&gt;The value of start may ignore I/O indicator of map becasue rman_get_start() never includes mask bits. But it is not important in this case.&lt;/del&gt;

pci_write_config() call pci_write_config_method() then
call PCIB_WRITE_CONFIG().

&gt;    PCIB_WRITE_CONFIG(device_get_parent(dev),
&gt;        cfg-&gt;bus, cfg-&gt;slot, cfg-&gt;func, reg, val, width);

Write sequence of the reg is

&gt;    PCIB_WRITE_CONFIG(pcib, b, s, f, reg, 0xffffffff, 4);
&gt;    PCIB_WRITE_CONFIG(pcib, b, s, f, reg, map, 4);
&gt;    PCIB_WRITE_CONFIG(device_get_parent(dev),
&gt;        cfg-&gt;bus, cfg-&gt;slot, cfg-&gt;func, reg, val, width);

This break on Hyper-V of DEC21140 I/O MAP. The patch avoid to write to BARS of DEC21140 after setting map. Of course, it will break if it write to BAR in somewhere.

Note: pci_write_config() is also called by pci_cfg_save()/restore().

&gt;Also, this patch would break the ability to run a de card in
&gt;a system whose bios doesn&#039;t assign a resource to the card.

You are right. It was intended to use only within Hyper-V w/DEC 21140 and physical machine w/o DEC 21140. I think this code is dirty at first time. But I thought that it&#039;s better than VM continued stopping all the time.

update:
I&#039;m misunderstanding. the bit 3-0 for mem, bit 1-0 for I/O are
readonly bit. start is always valid for PCIB_WRITE_CONFIG.
</description>
		<content:encoded><![CDATA[<p>The resource size is determined by normal method of PCI standard.<br />
Did you consider when this patch affect?</p>
<p>I don&#8217;t know a reason why FreeBSD ignore I/O indicator of base address register and Hyper-V only accept sequence of the values of 0xffffffff and something in DEC21140 I/O MAP at BAR(0) but I noticed that FreeBSD can reboot if it did not write at BAR after setting map.</p>
<p>pci_add_map()@sys/dev/pci/pci.c is called for each BAR.</p>
<p>>    map = PCIB_READ_CONFIG(pcib, b, s, f, reg, 4);<br />
>    PCIB_WRITE_CONFIG(pcib, b, s, f, reg, 0xffffffff, 4);<br />
>    testval = PCIB_READ_CONFIG(pcib, b, s, f, reg, 4);<br />
>    PCIB_WRITE_CONFIG(pcib, b, s, f, reg, map, 4);</p>
<p>This method is correct and work on Hyper-V. FreeBSD can get the size.</p>
<p>>        start = rman_get_start(res);<br />
>    pci_write_config(dev, reg, start, 4);</p>
<p><del datetime="2009-04-07T17:27:08+00:00">The value of start may ignore I/O indicator of map becasue rman_get_start() never includes mask bits. But it is not important in this case.</del></p>
<p>pci_write_config() call pci_write_config_method() then<br />
call PCIB_WRITE_CONFIG().</p>
<p>>    PCIB_WRITE_CONFIG(device_get_parent(dev),<br />
>        cfg->bus, cfg->slot, cfg->func, reg, val, width);</p>
<p>Write sequence of the reg is</p>
<p>>    PCIB_WRITE_CONFIG(pcib, b, s, f, reg, 0xffffffff, 4);<br />
>    PCIB_WRITE_CONFIG(pcib, b, s, f, reg, map, 4);<br />
>    PCIB_WRITE_CONFIG(device_get_parent(dev),<br />
>        cfg->bus, cfg->slot, cfg->func, reg, val, width);</p>
<p>This break on Hyper-V of DEC21140 I/O MAP. The patch avoid to write to BARS of DEC21140 after setting map. Of course, it will break if it write to BAR in somewhere.</p>
<p>Note: pci_write_config() is also called by pci_cfg_save()/restore().</p>
<p>>Also, this patch would break the ability to run a de card in<br />
>a system whose bios doesn&#8217;t assign a resource to the card.</p>
<p>You are right. It was intended to use only within Hyper-V w/DEC 21140 and physical machine w/o DEC 21140. I think this code is dirty at first time. But I thought that it&#8217;s better than VM continued stopping all the time.</p>
<p>update:<br />
I&#8217;m misunderstanding. the bit 3-0 for mem, bit 1-0 for I/O are<br />
readonly bit. start is always valid for PCIB_WRITE_CONFIG.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Warner Losh より</title>
		<link>http://shell.peach.ne.jp/aoyama/archives/40/comment-page-1#comment-194</link>
		<dc:creator>Warner Losh</dc:creator>
		<pubDate>Mon, 06 Apr 2009 17:23:12 +0000</pubDate>
		<guid isPermaLink="false">http://shell.peach.ne.jp/aoyama/archives/40#comment-194</guid>
		<description>Have we confirmed that there&#039;s nothing that the de driver is doing that causes it to, say, go into an interrupt storm that&#039;s causing the problems?  The inability to write to the BAR register violates the PCI standard since one must do that to size the resources decoded by the register.  How are the resources sized correctly with this patch?

Also, this patch would break the ability to run a de card in a system whose bios doesn&#039;t assign a resource to the card.

Warner</description>
		<content:encoded><![CDATA[<p>Have we confirmed that there&#8217;s nothing that the de driver is doing that causes it to, say, go into an interrupt storm that&#8217;s causing the problems?  The inability to write to the BAR register violates the PCI standard since one must do that to size the resources decoded by the register.  How are the resources sized correctly with this patch?</p>
<p>Also, this patch would break the ability to run a de card in a system whose bios doesn&#8217;t assign a resource to the card.</p>
<p>Warner</p>
]]></content:encoded>
	</item>
	<item>
		<title>Andrey Beshkov より</title>
		<link>http://shell.peach.ne.jp/aoyama/archives/40/comment-page-1#comment-135</link>
		<dc:creator>Andrey Beshkov</dc:creator>
		<pubDate>Mon, 15 Dec 2008 17:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://shell.peach.ne.jp/aoyama/archives/40#comment-135</guid>
		<description>I did tried your solution and it works like magic. Now DHCP in FreeBSD 7,8 works under Hyper-V flawlessly. ;-)

Thank you very much!!! ;-)</description>
		<content:encoded><![CDATA[<p>I did tried your solution and it works like magic. Now DHCP in FreeBSD 7,8 works under Hyper-V flawlessly. ;-)</p>
<p>Thank you very much!!! ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>aoyama より</title>
		<link>http://shell.peach.ne.jp/aoyama/archives/40/comment-page-1#comment-134</link>
		<dc:creator>aoyama</dc:creator>
		<pubDate>Sun, 14 Dec 2008 23:04:41 +0000</pubDate>
		<guid isPermaLink="false">http://shell.peach.ne.jp/aoyama/archives/40#comment-134</guid>
		<description>I don&#039;t know about DHCP because I use fix IPs.
But it seems to be autoselection issue.
Please try this configuration:
ifconfig_de0=&quot;DHCP media 100baseTX mediaopt full-duplex&quot;</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know about DHCP because I use fix IPs.<br />
But it seems to be autoselection issue.<br />
Please try this configuration:<br />
ifconfig_de0=&#8221;DHCP media 100baseTX mediaopt full-duplex&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Andrey Beshkov より</title>
		<link>http://shell.peach.ne.jp/aoyama/archives/40/comment-page-1#comment-133</link>
		<dc:creator>Andrey Beshkov</dc:creator>
		<pubDate>Sun, 14 Dec 2008 21:36:04 +0000</pubDate>
		<guid isPermaLink="false">http://shell.peach.ne.jp/aoyama/archives/40#comment-133</guid>
		<description>Thank you very much for this patch.  It did helped me in running FreeBSD 7 and FreeBSD 8 inside Hyper-V. 

There is only one problem remain. Problem witр DHCP. It is not working automaticaly on system startup but it possible to fix it using that commands.

ifconfig de0 down 
ifconfig de0 up
dhclient de0

After that NIC works fine.  Maybe you know solution for this issue too?</description>
		<content:encoded><![CDATA[<p>Thank you very much for this patch.  It did helped me in running FreeBSD 7 and FreeBSD 8 inside Hyper-V. </p>
<p>There is only one problem remain. Problem witр DHCP. It is not working automaticaly on system startup but it possible to fix it using that commands.</p>
<p>ifconfig de0 down<br />
ifconfig de0 up<br />
dhclient de0</p>
<p>After that NIC works fine.  Maybe you know solution for this issue too?</p>
]]></content:encoded>
	</item>
	<item>
		<title>環境さんぷる より</title>
		<link>http://shell.peach.ne.jp/aoyama/archives/40/comment-page-1#comment-124</link>
		<dc:creator>環境さんぷる</dc:creator>
		<pubDate>Fri, 28 Nov 2008 11:24:55 +0000</pubDate>
		<guid isPermaLink="false">http://shell.peach.ne.jp/aoyama/archives/40#comment-124</guid>
		<description>&lt;strong&gt;FreeBSD 6.4 / 7.1 / 8.0 on Windows Server 2008 + Hyper-V...&lt;/strong&gt;

もうすぐFreeBSD6.4がリリースされます。
ちょっと横道だけどFreeBSDのSecurity Advisory(08:11)が出ています。
以前ちらっと書いたけど6.3が仮想環境にあまりよくないので、
しばらく様子見しよう....</description>
		<content:encoded><![CDATA[<p><strong>FreeBSD 6.4 / 7.1 / 8.0 on Windows Server 2008 + Hyper-V&#8230;</strong></p>
<p>もうすぐFreeBSD6.4がリリースされます。<br />
ちょっと横道だけどFreeBSDのSecurity Advisory(08:11)が出ています。<br />
以前ちらっと書いたけど6.3が仮想環境にあまりよくないので、<br />
しばらく様子見しよう&#8230;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
