[Libvir] [PATCH] virsh Range check in Credit Scheduler

Atsushi SAKAI sakaia at jp.fujitsu.com
Wed Jul 18 13:40:06 UTC 2007


Hi, Daniel

 I checked it and it works fine!

2 point of question (not related to this point)

1)I sometimes rewiriting xen_internal.c in my test environment.
from 
xen/linux/privcmd.h
to
xen/sys/privcmd.h
Is there any possibility to change the path?

2)xen-unstable 15482 changes sysctl version(from 3 to 4).
Is there any possibility libvirt to work new sysctl version?
At this moment, libvirt cannot not handle latest xen-unstable.


Thanks
Atsushi SAKAI


Daniel Veillard <veillard at redhat.com> wrote:

> On Wed, Jul 18, 2007 at 09:11:42AM +0900, Atsushi SAKAI wrote:
> > Hi, Daniel
> > 
> >  uint16(weight and cap) is copyied in src/virsh.c
> > so It cannot rewrite on src/xen_internal.c.
> 
>    xenHypervisorSetSchedulerParameters() do get the int values
> in the case XEN_SCHEDULER_CREDIT :
>   op_dom.u.getschedinfo.u.credit.weight = params[i].value.ui;
> and
>   op_dom.u.getschedinfo.u.credit.cap = params[i].value.ui;
> 
>  the ui field is an unsigned long. the test against the value
> 1 to USHRT_MAX can be done there and the case where one have
> a negative value at the virsh level would correspond to an extremely
> large integer in xenHypervisorSetSchedulerParameters() after the
> unsigned cast.
> 
>   See the enclosed patch, please check,
> 
>     thanks,
> 
> Daniel
> 
> 
> -- 
> Red Hat Virtualization group http://redhat.com/virtualization/
> Daniel Veillard      | virtualization library  http://libvirt.org/
> veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
> http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/





More information about the libvir-list mailing list