Skip to contentSkip to conversation

bimodal PAE and compatibility

DISCUSSION John Levon 3 participants 8 messages Jan 8, 2007

lore
Share & tools
lore

John Levon

author
#0 lore raw

We currently ship a PAE 32-bit domU that we can trivially make bimodal, except that if we set it to "bimodal", then older Xens will default to thinking the domU is not PAE:

353     dsi->pae_kernel = PAEKERN_no;
354     if ( dsi->__elfnote_section )
355     {

356 p = xen_elfnote_string(dsi, XEN_ELFNOTE_PAE_MODE);
357 if ( p != NULL && strncmp(p, "yes", 3) == 0 )
358 dsi->pae_kernel = PAEKERN_extended_cr3;

Could we have a new note instead?

thanks
john

#1 lore raw
Quoted 4 lines · John Levon

We currently ship a PAE 32-bit domU that we can trivially make bimodal, except that if we set it to "bimodal", then older Xens will default to thinking the domU is not PAE:

Quoted 8 lines
353     dsi->pae_kernel = PAEKERN_no;
354     if ( dsi->__elfnote_section )
355     {

356 p = xen_elfnote_string(dsi, XEN_ELFNOTE_PAE_MODE);
357 if ( p != NULL && strncmp(p, "yes", 3) == 0 )
358 dsi->pae_kernel = PAEKERN_extended_cr3;

Could we have a new note instead?

I don't think it improves the situation, for older Xens you need two kernels anyway, even if the only difference is the content of the pae_mode elf note ...

cheers,
Gerd

Signature · 1 line
Gerd Hoffmann <[email protected]>
author
#2 lore raw
Quoted 11 lines · Gerd Hoffmann
Quoted 11 lines

We currently ship a PAE 32-bit domU that we can trivially make bimodal, except that if we set it to "bimodal", then older Xens will default to thinking the domU is not PAE:

353     dsi->pae_kernel = PAEKERN_no;
354     if ( dsi->__elfnote_section )
355     {

356 p = xen_elfnote_string(dsi, XEN_ELFNOTE_PAE_MODE);
357 if ( p != NULL && strncmp(p, "yes", 3) == 0 )
358 dsi->pae_kernel = PAEKERN_extended_cr3;

Quoted 5 lines
Quoted 1 line

Could we have a new note instead?

I don't think it improves the situation, for older Xens you need two kernels anyway, even if the only difference is the content of the pae_mode elf note ...

What do you mean? Are you saying that Xen complains about an ELF note it doesn't understand? That would be unfortunate.

john

#3 lore raw
Quoted 13 lines · John Levon
Quoted 11 lines · Gerd Hoffmann
Quoted 11 lines

We currently ship a PAE 32-bit domU that we can trivially make bimodal, except that if we set it to "bimodal", then older Xens will default to thinking the domU is not PAE:

353     dsi->pae_kernel = PAEKERN_no;
354     if ( dsi->__elfnote_section )
355     {

356 p = xen_elfnote_string(dsi, XEN_ELFNOTE_PAE_MODE);
357 if ( p != NULL && strncmp(p, "yes", 3) == 0 )
358 dsi->pae_kernel = PAEKERN_extended_cr3;

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Could we have a new note instead?

I don't think it improves the situation, for older Xens you need two kernels anyway, even if the only difference is the content of the pae_mode elf note ...

What do you mean? Are you saying that Xen complains about an ELF note it doesn't understand?

No.

Moving the bimodal flag to another elf node doesn't fix the problem that older Xen versions don't support bimodal kernels, thus you still need a pae and a non-pae kernel. As older Xens consider bimodal kernels as non-pae one bimodal and one pae kernel works too. But you can't get that down to only one kernel unless you drop support for xen versions below 3.0.4 ...

cheers,
Gerd

Signature · 1 line
Gerd Hoffmann <[email protected]>
author
#4 lore raw
Quoted 2 lines · Gerd Hoffmann

Moving the bimodal flag to another elf node doesn't fix the problem that older Xen versions don't support bimodal kernels

I never said it did. What it /does/ do is allow you to specify a correct fallback rather than assuming that pae=no is the right one. It isn't for
us: currently we do not intend to ship a non-PAE kernel as we have no infrastructure for such an (alien to Solaris) restriction.

Quoted 3 lines

non-pae one bimodal and one pae kernel works too. But you can't get that down to only one kernel unless you drop support for xen versions below 3.0.4 ...

Or drop any support for non-PAE before 3.0.4 which is exactly what we were and are doing anyway.

regards
john

#6 lore raw
In reply to John Levon
Quoted 8 lines · John Levon
353     dsi->pae_kernel = PAEKERN_no;
354     if ( dsi->__elfnote_section )
355     {

356 p = xen_elfnote_string(dsi, XEN_ELFNOTE_PAE_MODE);
357 if ( p != NULL && strncmp(p, "yes", 3) == 0 )
358 dsi->pae_kernel = PAEKERN_extended_cr3;

Could we have a new note instead?

I'd take a patch to strstr for 'bimodal' instead of strncmping for it. Then you can put something like 'yes,bimodal' in your elf note.

-- Keir

author
#7 lore raw
In reply to Keir Fraser
Quoted 2 lines · Keir Fraser

I'd take a patch to strstr for 'bimodal' instead of strncmping for it. Then you can put something like 'yes,bimodal' in your elf note.

Good idea, thanks. I'll have to get Xen to compile again first though :)

john