Mailing List Archive

how to change Xen scheduler and enable the XM-FLASK in case Xen is not compiled from the source?
Hello everyone,
first, i am new to xen so maybe my questions might sound uninteresting but
i am still learning :). I have installed xen using this method:
https://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide and not
compiling it from the source (i tried multiple times but i got errors while
compiling the kernel). To change the scheduler, I read that i have to pass
this command sched=credit2 to the hypervisor at boottime and to enable
FLASK i have to modify .config file and set XSM_ENABLE and FLASK_ENABLE to
"y"
My questions are :
- Is there a difference between the method i used for installing xen and
compiling it fromn the sources? I did not compile xen in the method i
used.
- How to change the scheduler and enable XM-FLASK, while i am using the
installation in the link?
- In case this is not possible, can anyone guide me on how to instal it
from the source and give me the right kernel?
Thank you so much,
Re: how to change Xen scheduler and enable the XM-FLASK in case Xen is not compiled from the source? [ In reply to ]
On 7/11/19 6:10 AM, tee as wrote:
> Hello everyone,
> first, i am new to xen so maybe my questions might sound uninteresting but
> i am still learning :). I have installed xen using this method:
> https://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide and not
> compiling it from the source (i tried multiple times but i got errors while
> compiling the kernel). To change the scheduler, I read that i have to pass
> this command sched=credit2 to the hypervisor at boottime and to enable
> FLASK i have to modify .config file and set XSM_ENABLE and FLASK_ENABLE to
> "y"
> My questions are :
> - Is there a difference between the method i used for installing xen and
> compiling it fromn the sources? I did not compile xen in the method i
> used.

Modifying the .config file only makes a difference when compiling from source. This describes the purpose of .config if you want to understand more:

https://www.linuxjournal.com/content/kbuild-linux-kernel-build-system

flask is almost certainly not enabled already, but you should be able to check for support by running 'sudo xl flask'.


> - How to change the scheduler and enable XM-FLASK, while i am using the
> installation in the link?

credit2 is supposedly the default in some versions, such as 4.12 for example.

https://xenbits.xenproject.org/docs/4.12-testing/features/sched_credit2.html

You can check the current scheduler by looking at 'xen_scheduler' in the output of 'sudo xl info'.
If the scheduler is not sched2, assuming you're using Debian, look at https://wiki.debian.org/Xen#Other_configuration_tweaks

> - In case this is not possible, can anyone guide me on how to instal it
> from the source and give me the right kernel?

If you already have a distribution kernel that works with Xen, you should be able to use it as-is.

For Xen, try

https://wiki.xenproject.org/wiki/Compiling_Xen_From_Source

and let us know.

--Sarah

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: how to change Xen scheduler and enable the XM-FLASK in case Xen is not compiled from the source? [ In reply to ]
hello,
thanks for the reply, i have the Dom0 working with debian 9 , but as i said
i did not compile it from the source. I succeded at creating a new domain
with credit2 scheduler by adding an entry to the file 40-custom.
Concerning Flask it is disabled, i tried to add this line
GRUB_CMDLINE_XEN="flask=enforcing" to the file /etc/default/grub but stil i
cannot get it to work. Is there another solution? or i should add something
else?
I also have another question concerning communication between domains. As
far as i know they work using grant tables, but the structure of xen that i
have running on my board(intel E3845) is different than what i see in
tutorials. I do not have a source folder for xen so i cannot run make
menuconfig command or compile anything, i also do not have the "include"
folder and all .h files (expl xenbus.h ) are empty, does this mean that i
have to take them from another distribution (i saw this on Ubuntu, but
unfortunatly it does not work on my board) and put them inside the
debian?or the installation is wrong?
Thank you so much for your help!



Le ven. 12 juil. 2019 à 21:10, Sarah Newman <srn@prgmr.com> a écrit :

> On 7/11/19 6:10 AM, tee as wrote:
> > Hello everyone,
> > first, i am new to xen so maybe my questions might sound uninteresting
> but
> > i am still learning :). I have installed xen using this method:
> > https://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide and not
> > compiling it from the source (i tried multiple times but i got errors
> while
> > compiling the kernel). To change the scheduler, I read that i have to
> pass
> > this command sched=credit2 to the hypervisor at boottime and to enable
> > FLASK i have to modify .config file and set XSM_ENABLE and FLASK_ENABLE
> to
> > "y"
> > My questions are :
> > - Is there a difference between the method i used for installing xen and
> > compiling it fromn the sources? I did not compile xen in the method i
> > used.
>
> Modifying the .config file only makes a difference when compiling from
> source. This describes the purpose of .config if you want to understand
> more:
>
> https://www.linuxjournal.com/content/kbuild-linux-kernel-build-system
>
> flask is almost certainly not enabled already, but you should be able to
> check for support by running 'sudo xl flask'.
>
>
> > - How to change the scheduler and enable XM-FLASK, while i am using the
> > installation in the link?
>
> credit2 is supposedly the default in some versions, such as 4.12 for
> example.
>
>
> https://xenbits.xenproject.org/docs/4.12-testing/features/sched_credit2.html
>
> You can check the current scheduler by looking at 'xen_scheduler' in the
> output of 'sudo xl info'.
> If the scheduler is not sched2, assuming you're using Debian, look at
> https://wiki.debian.org/Xen#Other_configuration_tweaks
>
> > - In case this is not possible, can anyone guide me on how to instal it
> > from the source and give me the right kernel?
>
> If you already have a distribution kernel that works with Xen, you should
> be able to use it as-is.
>
> For Xen, try
>
> https://wiki.xenproject.org/wiki/Compiling_Xen_From_Source
>
> and let us know.
>
> --Sarah
>
Re: how to change Xen scheduler and enable the XM-FLASK in case Xen is not compiled from the source? [ In reply to ]
On 7/25/19 2:01 AM, tee as wrote:
> hello,
> thanks for the reply, i have the Dom0 working with debian 9 , but as i said
> i did not compile it from the source. I succeded at creating a new domain
> with credit2 scheduler by adding an entry to the file 40-custom.
> Concerning Flask it is disabled, i tried to add this line
> GRUB_CMDLINE_XEN="flask=enforcing" to the file /etc/default/grub but stil i
> cannot get it to work. Is there another solution? or i should add something
> else?

From looking at the xen source file xen/xsm/xsm_core.c, I think if 'XSM Framework' is not in the output of 'xl dmesg', then flask support is not
compiled in.

As I mentioned before, you almost assuredly need to rebuild from source.

To get the source you can do one of the following:

* Download from packages.debian.org
* Add deb-src entries to /etc/apt/source.list and use 'apt-get source <package>'
* Download a release tarball from downloads.xenproject.org
* Use git to clone the xen repository from https://xenbits.xen.org/git-http/xen.git

I'd recommend using downloads.xenproject.org.

After getting source files, try the following:

https://wiki.xenproject.org/wiki/Compiling_Xen_From_Source#Build_Dependencies_-_Debian_.2F_Ubuntu
https://wiki.xenproject.org/wiki/Compiling_Xen_From_Source#Configure
https://wiki.xenproject.org/wiki/Compiling_Xen_From_Source#Build_.26_Install

Or if you use the Debian sources, you can try following Debians packaging process.
The standard tool for rebuilding is the command dpkg-buildpackage from the package dpkg-dev. But I think for what you are doing, it is easier to
ignore the Debian way right now.

> I also have another question concerning communication between domains. As
> far as i know they work using grant tables, but the structure of xen that i
> have running on my board(intel E3845) is different than what i see in
> tutorials. I do not have a source folder for xen so i cannot run make
> menuconfig command or compile anything, i also do not have the "include"
> folder and all .h files (expl xenbus.h ) are empty, does this mean that i
> have to take them from another distribution (i saw this on Ubuntu, but
> unfortunatly it does not work on my board) and put them inside the
> debian?or the installation is wrong?
> Thank you so much for your help!

I don't think the install is wrong. Those files are only used during development. Development files are typically in a separate package from runtime
binaries.

For Ubuntu, xenbus.h is part of the libxen-dev package, which I discovered using the 'apt-file search' command.

--Sarah

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users