WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] VPIO device model for Xen guests

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] VPIO device model for Xen guests
From: Sameer Niphadkar <dspn2012@xxxxxxxxx>
Date: Mon, 27 Apr 2009 18:01:26 -0400
Delivery-date: Mon, 27 Apr 2009 15:01:58 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=QtgyhmT9PGzMVE8zi+kWUrQ2+ClikTDRQBXAqGxqLi4=; b=H2ersDVg/xB2otlRa+isYWaEKhutwUY7kbUdOogesC4bkpmEx5eJPVGLNC3gS1NyHd 065kN/9TEPep4R8/bxqG52TDT5V7a8bTLN8w/E9O1gWWKVOuAe2CDAk8nlHk/WQ3zO0L NWiCs8udQB5vakAMLJyDK0Sfcsp3GQiwjIJxc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=q/ND+h/ZSt3xBxIEGYB8BQYBIZuRQxhPBdGWN2FsuSqv3WmLejhAddy9lBQGfkAoQm bN/Z8GkKpjLo4oVUNKglvKpypCKGa16cXuybIN7nikvoGo2O+2etBFt65gFL02Jc9qTx mT+fnlatfefqqABpGye21iUAu8BzIgmB/XBqI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hello,

For our research we are trying to come up with a Virtual - passthrough
model of device drivers in  PV guests. We are looking for 2 separate
implementations : 1 for transmitting and the other for receiving the
packets in the guest OS. We are relying on IOMMU to ensure isolation.

We need to add  these new hypercalls for communication between the
guest device driver and the hypervisor. The guest device drivers use
these hypercalls to read the state of the current physical device and
also request the ownership of the device. We need following
hypercalls:

HYPERVISOR_device_op, get device state. Before the device driver
accesses the device, it first issues this hypercall to check the state
of the device. The state could be “idle” or “busy”. “Idle” means no
other guest is currently using the device. “busy” means other guest is
using the device. We may use just one char or int value to denote the
state.

Note: it might be better implement using shareinfo_page of Xen. Then
the performance will be better.

HYPERVISOR_device_op, grab the device. This should be called after the
device driver checked the state of the device, and the state is
“idle”. In this case, the guest device driver issues this hypercall to
actually grab the device. If the device is “busy” and the guest does
this hypercall, the return value should indicate an error. Also, there
may be multiple guest OSes trying to grab the device at the same time,
the hypervisor should then be fair to all of them.  It may also be
possible that “HYPERVISOR_device_op, get device state” returns “idle”
but “HYPERVISOR_device_op, grab the device” fails. This happens when
multiple guest OSes compete for the same device.

Note that the hypervisor should also maintain an ownership filed for
the device and the device driver should maintain a state to indicate
if it holds the device or not. Also, the implementation details for
the above hypercalls can be re-designed for easy implementation.

We also need an upcall to let the hypervisor notify the guest device
driver when it used up all its time slice. At that time, the upcall
tells the guest device driver that it should stop using the device.
The guest device driver should then stop the device  usage as soon as
possible. The hypervisor should keep a timeout for this operation. If
a malicious driver ignores this upcall, the hypervisor should
forcibly stop the current guest OS and context switch to another guest
OS. The current guest OS may lose some data or crash. This is more
desirable than letting one guest OS keeping the device forever to
itself.

It would be great to know if there are any such resembling Hypercalls
in use ? I was going through the macro defined Hypercalls in
include/x86/x86_32/hypercall-x86_32.h
 and xen/arch/x86/platform_hypercall.c but was not sure where to
begin..any pointers would be appreciated.

thanks

regards
Sameer

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>