All of lore.kernel.org
 help / color / mirror / Atom feed
* feature flags use
@ 2006-11-10 14:16 Jan Beulich
  2006-11-10 14:52 ` Gerd Hoffmann
       [not found] ` <C17A3E57.449F%keir@xensource.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Jan Beulich @ 2006-11-10 14:16 UTC (permalink / raw)
  To: xen-devel

Following the need to allocate a new feature flag I soon realized that
currently there is not even a place to store them - this to me is
particularly puzzling for XENFEAT_pae_pgdir_above_4gb, as I would
have expected that the CR3 handling in PAE mode gets adjusted
according to whether the guest has that flag set. Any reason for that
(other than *assuming* that guests without that flag will always pass
the low 12 bits of CR3 clear)? Namely, what's the purpose of having
the guest specify that flag if it doesn't really change anything?

So, in turn, it seems to me that I'll first have to create a domctl to
allow setting feature flags reported by the guest (and manually fill
them for dom0), and the tools then would have to follow. The
problematic part with this is that this must happen early enough to
make sure the hv didn't use any of the flag values, yet - much like
the (un-)setting of the compatibility mode flag, and that the hv has
to verify the call isn't made too late.

Such a new domctl could certainly be combined with the one setting
the mode (native or compat) of the (pv) guest - would that be
considered desirable?

Jan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: feature flags use
  2006-11-10 14:16 feature flags use Jan Beulich
@ 2006-11-10 14:52 ` Gerd Hoffmann
  2006-11-10 15:01   ` Jan Beulich
       [not found] ` <C17A3E57.449F%keir@xensource.com>
  1 sibling, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2006-11-10 14:52 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel

  Hi,

> Following the need to allocate a new feature flag I soon realized that
> currently there is not even a place to store them - this to me is
> particularly puzzling for XENFEAT_pae_pgdir_above_4gb, as I would
> have expected that the CR3 handling in PAE mode gets adjusted
> according to whether the guest has that flag set. Any reason for that
> (other than *assuming* that guests without that flag will always pass
> the low 12 bits of CR3 clear)? Namely, what's the purpose of having
> the guest specify that flag if it doesn't really change anything?

Works the other way around:  The flags are xen-specfic, not guest
specific.  The guest has to check whenever xen supports pgd's above 4GB
before placing them there.

cheers,
  Gerd

-- 
Gerd Hoffmann <kraxel@suse.de>
http://www.suse.de/~kraxel/julika-dora.jpeg

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: feature flags use
       [not found] ` <C17A3E57.449F%keir@xensource.com>
@ 2006-11-10 14:59   ` Jan Beulich
  2006-11-10 15:07     ` Ian Pratt
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2006-11-10 14:59 UTC (permalink / raw)
  To: xen-devel, Keir Fraser

>That flag is treated oddly. Actually we detect if the kernel uses Elf notes
>or whether it has the string PAE=yes[extended]. In either case we notify the
>hypervisor via *vm_assist*! This then decides whether or not we advertise
>the XENFEAT flag to the domU.

I was talking about XENFEAT_pae_pgdir_above_4gb - this flag appears to be
be useless.
Also, regardless of whether you advertise support for the feature to a domU,
the code inside Xen doesn't treat the two cases (kernel with and without this
flag set) differently.

>Anyway, what feature flag do you want to add? Is this to distinguish PV PAE
>guest from PV 64-bit guest?

At this point I was thinking about that hypervisor_virt_start change that the
kernel needs to advertise it can deal with.

Jan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: feature flags use
  2006-11-10 14:52 ` Gerd Hoffmann
@ 2006-11-10 15:01   ` Jan Beulich
  2006-11-10 15:09     ` Gerd Hoffmann
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2006-11-10 15:01 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: xen-devel

>Works the other way around:  The flags are xen-specfic, not guest
>specific.  The guest has to check whenever xen supports pgd's above 4GB
>before placing them there.

By itself, this makes sense, but what's the purpose of the guest advertising
it supports this via the feature string then?

Jan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: feature flags use
  2006-11-10 14:59   ` Jan Beulich
@ 2006-11-10 15:07     ` Ian Pratt
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Pratt @ 2006-11-10 15:07 UTC (permalink / raw)
  To: Jan Beulich, xen-devel, Keir Fraser

> >That flag is treated oddly. Actually we detect if the kernel uses Elf
> notes
> >or whether it has the string PAE=yes[extended]. In either case we
notify
> the
> >hypervisor via *vm_assist*! This then decides whether or not we
advertise
> >the XENFEAT flag to the domU.
> 
> I was talking about XENFEAT_pae_pgdir_above_4gb - this flag appears to
be
> be useless.
> Also, regardless of whether you advertise support for the feature to a
> domU,
> the code inside Xen doesn't treat the two cases (kernel with and
without
> this
> flag set) differently.

The xc_linux_restore code in the tools library needs to be able to read
the feature flag from Xen.

Ian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: feature flags use
  2006-11-10 15:01   ` Jan Beulich
@ 2006-11-10 15:09     ` Gerd Hoffmann
  0 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2006-11-10 15:09 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel

Jan Beulich wrote:
>> Works the other way around:  The flags are xen-specfic, not guest
>> specific.  The guest has to check whenever xen supports pgd's above 4GB
>> before placing them there.
> 
> By itself, this makes sense, but what's the purpose of the guest advertising
> it supports this via the feature string then?

Dunno.  Well, in theory the domain builder would be able to take care
then and allow placing the initial pgd above 4GB only if the guest (and
xen, but that is implicit due to xen and tools must match) can handle
it.  In practice the domain builder doesn't.

cheers,
  Gerd

-- 
Gerd Hoffmann <kraxel@suse.de>
http://www.suse.de/~kraxel/julika-dora.jpeg

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-11-10 15:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-10 14:16 feature flags use Jan Beulich
2006-11-10 14:52 ` Gerd Hoffmann
2006-11-10 15:01   ` Jan Beulich
2006-11-10 15:09     ` Gerd Hoffmann
     [not found] ` <C17A3E57.449F%keir@xensource.com>
2006-11-10 14:59   ` Jan Beulich
2006-11-10 15:07     ` Ian Pratt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.