Skip to contentSkip to conversation

pyxc_linux_build() in tools/python/xen/lowlevel/xc/xc.c still needed?

DISCUSSION Juergen Gross 4 participants 9 messages Oct 6, 2015

lore
Share & tools
lore
#0 lore raw

Do we have any requirements to be compatible to old releases regarding the functions in tools/python/xen/lowlevel/xc/xc.c ?

Especially pyxc_linux_build() isn't used anywhere in the tree. And this is the only function setting xc_dom_image.superpages, thus removing it would give us the chance to remove some code of the domain builder.

Juergen

#1 lore raw
Quoted 2 lines · Juergen Gross

Do we have any requirements to be compatible to old releases regarding the functions in tools/python/xen/lowlevel/xc/xc.c ?

IMHO, no.

There are also too many compatibility shims in front of the domain builder, i.e. all the stuff in tools/libxc/xc_dom_compat_linux.c which IMHO could be nuked too.

Quoted 3 lines

Especially pyxc_linux_build() isn't used anywhere in the tree. And this is the only function setting xc_dom_image.superpages, thus removing it would give us the chance to remove some code of the domain builder.

Right.

Removing the superpages option from the non-Python might cause concern for some. Adding Konrad since IIRC PV superpages is a thing Oracle implemented and might still care about.

Also adding Roger since he is reworking the HVM builder to use the PV one, which for all I know might involve using the superpage option (but probably not the PV code to set it up).

Also CCing the other tools/libxc maintainers.

Ian.

#2 lore raw
Quoted 5 lines · Ian Campbell
Quoted 2 lines · Juergen Gross

Do we have any requirements to be compatible to old releases regarding the functions in tools/python/xen/lowlevel/xc/xc.c ?

IMHO, no.

Okay, thanks.

I'll check for other unused functions as well and do some patches to remove it (or them) from tools/python/xen/lowlevel/xc/xc.c

Quoted 3 lines

There are also too many compatibility shims in front of the domain builder, i.e. all the stuff in tools/libxc/xc_dom_compat_linux.c which IMHO could be nuked too.

Okay, I'll look into this as well.

Quoted 6 lines
Quoted 3 lines

Especially pyxc_linux_build() isn't used anywhere in the tree. And this is the only function setting xc_dom_image.superpages, thus removing it would give us the chance to remove some code of the domain builder.

Right.

Quoted 7 lines

Removing the superpages option from the non-Python might cause concern for some. Adding Konrad since IIRC PV superpages is a thing Oracle implemented and might still care about.

Also adding Roger since he is reworking the HVM builder to use the PV one, which for all I know might involve using the superpage option (but probably not the PV code to set it up).

I'm starting with the layers above the domain builder. This should give all others interested in the features some time to raise concerns about removing them.

Juergen

#3 lore raw
In reply to Ian Campbell

El 06/10/15 a les 10.56, Ian Campbell ha escrit:

Quoted 16 lines · Juergen Gross
Quoted 2 lines

Do we have any requirements to be compatible to old releases regarding the functions in tools/python/xen/lowlevel/xc/xc.c ?

IMHO, no.

There are also too many compatibility shims in front of the domain builder, i.e. all the stuff in tools/libxc/xc_dom_compat_linux.c which IMHO could be nuked too.

Quoted 3 lines

Especially pyxc_linux_build() isn't used anywhere in the tree. And this is the only function setting xc_dom_image.superpages, thus removing it would give us the chance to remove some code of the domain builder.

Right.

Quoted 7 lines

Removing the superpages option from the non-Python might cause concern for some. Adding Konrad since IIRC PV superpages is a thing Oracle implemented and might still care about.

Also adding Roger since he is reworking the HVM builder to use the PV one, which for all I know might involve using the superpage option (but probably not the PV code to set it up).

The superpages field is only used to populate memory of PV domains, AFAICT HVM domains will already try to use superpages by default in order to fill the p2m. I don't have any problem with it being removed.

Roger.

#4 lore raw
Quoted 19 lines · Roger Pau Monné

El 06/10/15 a les 10.56, Ian Campbell ha escrit:

Quoted 18 lines · Juergen Gross
Quoted 2 lines

Do we have any requirements to be compatible to old releases regarding the functions in tools/python/xen/lowlevel/xc/xc.c ?

IMHO, no.

There are also too many compatibility shims in front of the domain builder, i.e. all the stuff in tools/libxc/xc_dom_compat_linux.c which IMHO could be nuked too.

Quoted 3 lines

Especially pyxc_linux_build() isn't used anywhere in the tree. And this is the only function setting xc_dom_image.superpages, thus removing it would give us the chance to remove some code of the domain builder.

Right.

Removing the superpages option from the non-Python might cause concern for some. Adding Konrad since IIRC PV superpages is a thing Oracle implemented and might still care about.

Quoted 6 lines
Quoted 3 lines

Also adding Roger since he is reworking the HVM builder to use the PV one, which for all I know might involve using the superpage option (but probably not the PV code to set it up).

The superpages field is only used to populate memory of PV domains, AFAICT HVM domains will already try to use superpages by default in order to fill the p2m. I don't have any problem with it being removed.

There is a key difference between PV guests and HVM guests when it comes to superpages.

A PV guest needs to be explicitly capable of handling superpages, and it rules out things like migrate, etc.

HVM superpages are just EPT/NPT superpages, without a direct effect on guest.

I don't object to removing this field, but mistakenly equate PV and HVM guests in this regard.

~Andrew

#5 lore raw
Quoted 29 lines · Andrew Cooper
Quoted 19 lines · Roger Pau Monné

El 06/10/15 a les 10.56, Ian Campbell ha escrit:

Quoted 18 lines · Juergen Gross
Quoted 2 lines

Do we have any requirements to be compatible to old releases regarding the functions in tools/python/xen/lowlevel/xc/xc.c ?

IMHO, no.

There are also too many compatibility shims in front of the domain builder, i.e. all the stuff in tools/libxc/xc_dom_compat_linux.c which IMHO could be nuked too.

Quoted 3 lines

Especially pyxc_linux_build() isn't used anywhere in the tree. And this is the only function setting xc_dom_image.superpages, thus removing it would give us the chance to remove some code of the domain builder.

Right.

Removing the superpages option from the non-Python might cause concern for some. Adding Konrad since IIRC PV superpages is a thing Oracle implemented and might still care about.

Quoted 6 lines
Quoted 3 lines

Also adding Roger since he is reworking the HVM builder to use the PV one, which for all I know might involve using the superpage option (but probably not the PV code to set it up).

The superpages field is only used to populate memory of PV domains, AFAICT HVM domains will already try to use superpages by default in order to fill the p2m. I don't have any problem with it being removed.

There is a key difference between PV guests and HVM guests when it comes to superpages.

Quoted 8 lines

A PV guest needs to be explicitly capable of handling superpages, and it rules out things like migrate, etc.

HVM superpages are just EPT/NPT superpages, without a direct effect on guest.

I don't object to removing this field, but mistakenly equate PV and HVM guests in this regard.

Apologies. "but don't mistakenly"

~Andrew

#6 lore raw
Quoted 46 lines · Andrew Cooper
Quoted 45 lines · Andrew Cooper
Quoted 32 lines · Roger Pau Monné

El 06/10/15 a les 10.56, Ian Campbell ha escrit:

Quoted 26 lines · Juergen Gross
Quoted 3 lines

Do we have any requirements to be compatible to old releases regarding
the functions in tools/python/xen/lowlevel/xc/xc.c ?

IMHO, no.

There are also too many compatibility shims in front of the domain builder,
i.e. all the stuff in tools/libxc/xc_dom_compat_linux.c which IMHO could be
nuked too.

Quoted 6 lines

Especially pyxc_linux_build() isn't used anywhere in the tree. And this
is the only function setting xc_dom_image.superpages, thus removing it
would give us the chance to remove some code of the domain builder.

Right.

Removing the superpages option from the non-Python might cause concern for
some. Adding Konrad since IIRC PV superpages is a thing Oracle implemented
and might still care about.

Quoted 5 lines

Also adding Roger since he is reworking the HVM builder to use the PV one,
which for all I know might involve using the superpage option (but probably
not the PV code to set it up).

Quoted 4 lines

The superpages field is only used to populate memory of PV domains, AFAICT HVM domains will already try to use superpages by default in order to fill the p2m. I don't have any problem with it being removed.

There is a key difference between PV guests and HVM guests when it comes
to superpages.

A PV guest needs to be explicitly capable of handling superpages, and it
rules out things like migrate, etc.

Quoted 7 lines
Quoted 5 lines

HVM superpages are just EPT/NPT superpages, without a direct effect on guest.

I don't object to removing this field, but mistakenly equate PV and HVM guests in this regard.

Apologies. "but don't mistakenly"

Nobody was, the question was whether we could safely remove the superpages option from the PV dom builder API given that the HVM builder was in the process of being folded into it.

Roger explained that superpages are effectively non-optional for an HVM guest (as in you can't ask not to have them, because why would you) so there is no need to retain the interface for that purpose.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#7 lore raw
In reply to Ian Campbell
Quoted 9 lines · Ian Campbell
Quoted 2 lines · Juergen Gross

Do we have any requirements to be compatible to old releases regarding the functions in tools/python/xen/lowlevel/xc/xc.c ?

IMHO, no.

There are also too many compatibility shims in front of the domain builder, i.e. all the stuff in tools/libxc/xc_dom_compat_linux.c which IMHO could be nuked too.

Hmm, all of the functions there are defined in xenguest.h and are probably used by out-of-tree components.

xc_linux_build() is used in qemu-xen in file /hw/xenpv/xen_domainbuild.c

Is it really okay to remove all of this stuff?

Juergen

#8 lore raw
Quoted 14 lines · Juergen Gross
Quoted 5 lines · Ian Campbell
Quoted 3 lines · Juergen Gross

Do we have any requirements to be compatible to old releases regarding
the functions in tools/python/xen/lowlevel/xc/xc.c ?

Quoted 7 lines

IMHO, no.

There are also too many compatibility shims in front of the domain builder,
i.e. all the stuff in tools/libxc/xc_dom_compat_linux.c which IMHO could be
nuked too.

Quoted 6 lines

Hmm, all of the functions there are defined in xenguest.h and are probably used by out-of-tree components.

xc_linux_build() is used in qemu-xen in file /hw/xenpv/xen_domainbuild.c

Is it really okay to remove all of this stuff?

In general, yes, I think so. But in the specific case of xc_linux_build I suppose not, at least for now.

As part of my series to split up libxenctrl I noticed that the QEMU support for domain building couldn't possibly have worked (according to a code comment) since Xen 4.1 and I've got a patch to make it a compile time option.

Ian