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

Re: [Xen-devel] Displaying battery state inside Windows guests

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Displaying battery state inside Windows guests
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Thu, 27 Mar 2008 16:17:23 +0000
Cc: Barak Fargoun <barak@xxxxxxxxxxxx>
Delivery-date: Thu, 27 Mar 2008 09:17:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <9392A06CB0FDC847B3A530B3DC174E7B04E59AE4@xxxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <9392A06CB0FDC847B3A530B3DC174E7B04E59AE4@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)
Hi there,

> I would like to make Windows guest which runs on laptop machine, to
> display the battery state (as if Windows is running on the physical
> machine itself).
>
> (BTW, VMWare has added this functionality inside the latest version of
> VMWare)

Cute.  Although Xen isn't used on laptops that much I can see this type of 
feature being particularly useful when running a VM fullscreen - otherwise it 
might mask your battery meter, which could be bad :-)

> 1.       Writing a pv battery mini-class driver in Windows, which will
> receive the battery state from dom-0, and will report it to Windows
>
> 2.       Adding a section in the dsdt of the hvm guest, which will
> return the battery state using some IO ports, then I will try to catch
> these IO ports accesses using qemu, and will return the proper values.
> This method will enable Windows to use it's own generic control method
> battery (CmBatt.sys).
>
>
>
> Can anyone help/comment?

I guess I'd note that if you can emulate the behaviour of real hardware then 
you can easily apply this to other non-Windows HVM guests.  It might be 
possible to push the emulation support upstream to Qemu then too.

On the other hand, using a PV-on-HVM driver would make it easier to support 
this in PV guests too.  (the other route here would be to enable PV guests to 
use some basic emulated hardware to achieve the same effect with the above 
solution)

Not sure which is simpler!  Emulating ought to involve less grubbing about 
writing Windows drivers but if you're familiar with that then it mightn't 
sound as scary as it does to me :-)  If you go the route of writing a PV 
driver, you could perhaps base it on the existing GPLed PV drivers for 
Windows (that way you get the Xenbus driver, etc for free).

Hope this helps a little,

Mark

-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)

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

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