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] determining dom0 version and bit size from domU

To: "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] determining dom0 version and bit size from domU
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Sat, 2 Feb 2008 14:24:28 +1100
Delivery-date: Fri, 01 Feb 2008 19:24:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D0131AA25@trantor>
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: <AEC6C66638C05B468B556EA548C1A77D0131AA25@trantor>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AchlRQYpcQr7K5pVTZi8TpkCkQ4v3gABM8XQ
Thread-topic: [Xen-devel] determining dom0 version and bit size from domU
> Unfortunately, it doesn't look like I can determine the version of Xen
> that the Dom0 kernel was compiled against, nor the bit width of Dom0.
I
> think I can get some indication of the hypervisor version, but that is
> irrelevant.

The more I look at this the more I think that Dom0 just doesn't make
this information available.

So another possible solution I have for determining what is going on is:

1. Write a request (op = 0xff, id = 0) to the ring, and fill all the
seg[] entries with 0xff too.
2. Wait for the response from Dom0, confirm that we get a failure (I'm
assuming that Dom0 will just return 'BLKIF_RSP_ERROR' here)
3. Write another request (op = 0xff, id = 0xffffffffffffffff to the
ring)
4. Wait for the response from Dom0, if we get the same response as
before then we are done and can continue as normal.
5. If we didn't get the same response, then switch bit widths (32 -> 64,
or 64 -> 32), then continue as normal.

Sounds like it might work in theory, as long as Dom0 doesn't have a huge
panic attack when it gets op=0xff, or a completely misaligned request
(the id = 0xffffffffffffffff and seg[..] = 0xff is so that if we have
our alignments wrong, the backend still see's a request of 0xff and not
a bizarre read operation).

Any thoughts?

James

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