<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>pablo's tech blog</title>
    <description></description>
    <link>http://blog.polvorin.com.ar/</link>
    <atom:link href="http://blog.polvorin.com.ar/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Wed, 11 Jan 2017 19:26:20 +0000</pubDate>
    <lastBuildDate>Wed, 11 Jan 2017 19:26:20 +0000</lastBuildDate>
    <generator>Jekyll v3.3.1</generator>
    
      <item>
        <title>xen pv framebuffer support in netbsd</title>
        <description>&lt;p&gt;Recently installed 7.0 on a xen VM. There is no paravirtual driver video driver for it yet,
but there is a &lt;a href=&quot;http://wiki.netbsd.org/projects/project/xen-domu-pvfb/&quot;&gt;project proposal&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After some work (took me considerably more than the estimated 16hs, truth be told)
got something usable.  The patch is &lt;a href=&quot;http://blog.polvorin.com.ar/patches/pvfb.patch&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To apply the patch, run from the kernel’ src dir&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;patch -p1 &amp;lt; pvfb.patch  
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;It will patch the default XEN_DOMU kernel configuration to add the new video/keyboard/mouse drivers.
The code is basically a glue between xenbus and genfb | wskbddev | wsmousedev&lt;/p&gt;

&lt;p&gt;base functionality is in place, check the &lt;a href=&quot;https://sendvid.com/6q7j2yju&quot;&gt;sample screencast&lt;/a&gt;, 
but there are several aspect that need review/fixes, among others:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Xen suspend/resume seems broken, but so do without the driver, too.&lt;/li&gt;
  &lt;li&gt;No way to modify the screen resolution without recompiling. (default is set to 1280x800, 16bits)&lt;/li&gt;
  &lt;li&gt;Keyboard under X do not recognize arrows/most of keypad keys. These &lt;em&gt;are&lt;/em&gt; recognized when in terminal, so I think the problem is in wskbd driver in X&lt;/li&gt;
  &lt;li&gt;Framebuffer do not implement feature-update, that is, it do not try to detect what areas did change. This imposes additional work on the qemu side&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to give it a try and run X,  you likely will need to configure xorg.conf by hand. Use this as a template:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Section &quot;InputDevice&quot;
	Identifier &quot;Mouse0&quot;
    Driver	&quot;mouse&quot;
    Option	&quot;Protocol&quot; &quot;wsmouse&quot;
    Option	&quot;Device&quot; &quot;/dev/wsmouse0&quot;
EndSection
Section &quot;InputDevice&quot;
    Identifier &quot;Keyboard0&quot;
    Driver	&quot;kbd&quot;
    Option	&quot;Protocol&quot; &quot;wskbd&quot;
    Option	&quot;Device&quot; &quot;/dev/wskbd0&quot;
    Option	&quot;XkbModel&quot; &quot;pc102&quot;
EndSection
Section &quot;Device&quot;
    Identifier	&quot;driver&quot;
    Driver	&quot;wsfb&quot;
    Option	&quot;device&quot;	&quot;/dev/ttyE3&quot;
EndSection
Section &quot;Screen&quot;
    Identifier	&quot;screen&quot;
    Device	&quot;driver&quot;
EndSection
Section &quot;ServerLayout&quot;
    Identifier	&quot;Builtin Default Layout&quot;
    Screen	&quot;screen&quot;
EndSection
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Note this was done from someone -me- that works on erlang for a living, not C, has been a decade since the last time he used a lower level language, and never had written kernel code before.
Feedback is appreciated.&lt;/p&gt;
</description>
        <pubDate>Wed, 20 Apr 2016 00:00:00 +0000</pubDate>
        <link>http://blog.polvorin.com.ar/2016/04/20/netbsd-pvfb.html</link>
        <guid isPermaLink="true">http://blog.polvorin.com.ar/2016/04/20/netbsd-pvfb.html</guid>
        
        <category>netbsd</category>
        
        <category>xen</category>
        
        <category>programming</category>
        
        
      </item>
    
  </channel>
</rss>
