|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH 2/2] Load gntdev and evtchn if they're modular. [
Jeremy Fitzhardinge writes ("[Xen-devel] [PATCH 2/2] Load gntdev and evtchn if
they're modular."):
> -if [ "x$1" = xstart -a -d /proc/xen -a \
> - ! -f /proc/xen/capabilities ] && \
> - ! grep -qw '^xenfs' /proc/mounts; then
> - mount -t xenfs xenfs /proc/xen
> +[ -d /proc/xen ] || exit 0 # Xen not present; exit quietly
> +
> +if [ "x$1" = xstart ]; then
> + # Mount /proc/xen if needed
> + [ -f /proc/xen/capabilities ] || mount -t xenfs xenfs /proc/xen
> +
> + # Make sure evtchn and gntdev are loaded if present
> + grep -q "xen/evtchn" /proc/misc || modprobe xen-evtchn
> + grep -q "xen/gntdev" /proc/misc || modprobe xen-gntdev
> fi
I'd be inclined to accept this although because I didn't like your
previous patch, it doesn't apply.
Olaf Hering writes ("[Xen-devel] [PATCH v2] hotplug: update xencommons script
to run only when needed"):
> +# not running in Xen dom0 or domU
> +if ! test -d /proc/xen ; then
> + exit 0
> +fi
This part is fine.
> +# mount xenfs in dom0 or domU with a pv_ops kernel
> if test "x$1" = xstart && \
> - test -d /proc/xen && \
Fine.
> ! test -f /proc/xen/capabilities && \
> - ! grep '^xenfs ' /proc/mounts >/dev/null;
> + ! grep -q '^xenfs ' /proc/mounts ;
> then
> mount -t xenfs xenfs /proc/xen
> fi
As I said to Jeremy, I'm not sure I want style changes. I'm not
convinced of the huge usefulness of this one either.
> +# run this script only in dom0:
> +# no capabilities file in xenlinux kernel
> +if ! test -f /proc/xen/capabilities ; then
> + exit 0
> +fi
> +# empty capabilities file in pv_ops kernel
> if ! grep -q "control_d" /proc/xen/capabilities ; then
> exit 0
> fi
If /proc/xen/capabilities is missing, what does it mean ? Do domU
kernels really not provide that file ? Also these two ifs would be
better combined.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|