title: I/O port-mapped or memory-mapped device?
body: <p><strong>Introduction:</strong></p>
  
  <p>I am trying to "say" something to my virtual device ( I mean virtualbox). So first, I have to know I/O port or Memory address region. </p>
  
  <p>So, let look at my lspci output:</p>
  
  <pre><code>00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
      Subsystem: Intel Corporation PRO/1000 MT Desktop Adapter
      Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
      Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium &gt;TAbort- &lt;TAbort- &lt;MAbort- &gt;SERR- &lt;PERR- INTx-
      Latency: 64 (63750ns min)
      Interrupt: pin A routed to IRQ 19
      Region 0: Memory at f0000000 (32-bit, non-prefetchable) [size=128K]
      Region 2: I/O ports at d010 [size=8]
      Capabilities: &lt;access denied&gt;
      Kernel driver in use: e1000
      Kernel modules: e1000 
  </code></pre>
  
  <p><strong>Problem</strong></p>
  
  <p>So there are two region and I don't understand why there are two regions. I don't know 
  if device is memory-mapped or port-mapped? I don't understand how can I write bytes to my device. What address I should choose?</p>