From: "Mike D. Day" <ncmike@us.ibm.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: Greg KH <greg@kroah.com>,
xen-devel@lists.xensource.com,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] Re: [PATCH 2.6.12.6-xen] sysfs attributes for xen
Date: Mon, 30 Jan 2006 11:58:12 -0500 [thread overview]
Message-ID: <43DE45A4.6010808@us.ibm.com> (raw)
In-Reply-To: <1138637931.19801.101.camel@localhost.localdomain>
Dave Hansen wrote:
> What are the actual types of the values that come back from the
>
> HYPERVISOR_xen_version(XENVER_version, NULL)
> call? If they are really 8-bit or 16-bit values, it might be nice to
> call that out and use some of the kernel types like u8 or u16. In fact,
> it might even be worth it to have a function wrap that up.
return is int, but the ranges are small enough for a u8, so a wrap might be good. ret == 0 is ESUCCESS _unless_ you are calling HYPERVISOR_xen_version, in which case ret == version.
> Silly idea: you _could_ have separate files for the major and minor.
> Are they something that a userspace program might commonly have to parse
> out? Is the patch trying to save a potential hcall by outputting them
> both at once?
no, this hypercall is not in any performance path and it also returns major ver and minor ver embedded into the returned int. Good suggestion and no problem calling repeatedly (within reason).
> Where does that 1024 come from? Is it a guarantee from Xen that it will
> never fill more than 1k? I know it is a long shot, but what if the page
> size is less than 1k? Would this function have strange results?
Per the xen headers, this particular hcall option returns a typedef char[1024] thingy_t (which is simply a char [1024] in the patch). Yes, if the page size is < 1024 there is a problem. So a check against PAGE_SIZE may be prudent.
I'm rewriting based on Greg's and your feedback,
thanks again,
Mike
--
next prev parent reply other threads:[~2006-01-30 16:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-28 2:20 [PATCH 2.6.12.6-xen] sysfs attributes for xen Mike D. Day
2006-01-28 2:25 ` Greg KH
2006-01-28 2:38 ` Greg KH
2006-01-28 12:23 ` Vincent Hanquez
2006-01-28 3:03 ` [Xen-devel] " Anthony Liguori
2006-01-30 16:18 ` Dave Hansen
2006-01-30 16:58 ` Mike D. Day [this message]
2006-01-30 17:04 ` [Xen-devel] " Dave Hansen
2006-01-30 17:17 ` Mike D. Day
2006-01-30 17:26 ` Greg KH
2006-01-30 17:38 ` Dave Hansen
2006-01-30 17:53 ` Keir Fraser
2006-01-30 17:56 ` Dave Hansen
2006-01-30 19:33 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43DE45A4.6010808@us.ibm.com \
--to=ncmike@us.ibm.com \
--cc=greg@kroah.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox