<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
On 8/18/2010 7:42 AM, Glenn Tremblay wrote:
<blockquote
cite="mid:40B551BEDC7945419A5897958AB3947C0223E9EB@mtexch.marathontechnologies.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:587084163;
mso-list-type:hybrid;
mso-list-template-ids:1692574480 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-text:"%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">I am new to vbox development/architecture
and would like to
understand my options in accessing guest memory from the vbox
host side. I am
running a Windows guest in a vbox VM with vbox running on top
of CentOS. The
windows guest contains a proprietary I/O driver that generates
requests from 4k
to 64k in size. Ideally I’d like to pass down the
virtual/physical address and
length to vbox on the host and them map the buffer into the
host’s memory space
for access by a vbox/linux driver. The host driver must be
able to read
and write the guest I/O buffer. Also ideally these buffer
addresses will
potentially be different for each I/O buffer to be mapped –
although I could
get away with a fixed mapped region and copy the buffer to
that preallocated
shared region every time if necessary.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So my questions are:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
style="">1)<span style="font: 7pt "Times New
Roman";">
</span></span><!--[endif]-->What are my options for mapping
any portion of guest
address space to host accessible address space? And unmap it
when done.<o:p></o:p></p>
</div>
</blockquote>
Two options:<br>
1) create a virtual device that reads and writes from/to guest
memory; you can map guest memory into host memory, but that is
generally discouraged<br>
2) create a virtual device that maps an associated MMIO range into
guest memory (our VGA device does that)<br>
<br>
<blockquote
cite="mid:40B551BEDC7945419A5897958AB3947C0223E9EB@mtexch.marathontechnologies.com"
type="cite">
<div class="WordSection1">
<p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
style="">2)<span style="font: 7pt "Times New
Roman";">
</span></span><!--[endif]-->Are there any memory address
limitations? (e.g. guest
address range must be < 4 GB)<o:p></o:p></p>
</div>
</blockquote>
None.<br>
<br>
<blockquote
cite="mid:40B551BEDC7945419A5897958AB3947C0223E9EB@mtexch.marathontechnologies.com"
type="cite">
<div class="WordSection1">
<p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
style="">3)<span style="font: 7pt "Times New
Roman";">
</span></span><!--[endif]-->Is there any existing vbox code
I study that utilizes
this type of guest memory/buffer access?</p>
</div>
</blockquote>
The existing virtual devices. There's a very basic sample device in
src/VMM/Devices/Samples, but you can look at any of the others for
more info.<br>
<br>
Sander<br>
<br>
<blockquote
cite="mid:40B551BEDC7945419A5897958AB3947C0223E9EB@mtexch.marathontechnologies.com"
type="cite">
<div class="WordSection1">
<p class="MsoListParagraph" style="text-indent: -0.25in;"><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance for any assistance anyone
can provide,<o:p></o:p></p>
<p class="MsoNormal">Glenn<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
vbox-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a>
<a class="moz-txt-link-freetext" href="http://vbox.innotek.de/mailman/listinfo/vbox-dev">http://vbox.innotek.de/mailman/listinfo/vbox-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>