diff options
author | Jan Beulich <jbeulich@novell.com> | 2011-07-08 08:34:29 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2011-07-08 08:34:29 +0100 |
commit | fe15cd0fb6d1622dbd04c2c227a368593c23b9af (patch) | |
tree | 49240004680441cc49865594022306d110933ea4 /xen/common/kernel.c | |
parent | 4776f8ddd2f2ce957f4965d94709285621933dcc (diff) | |
download | xen-fe15cd0fb6d1622dbd04c2c227a368593c23b9af.tar.gz xen-fe15cd0fb6d1622dbd04c2c227a368593c23b9af.tar.bz2 xen-fe15cd0fb6d1622dbd04c2c227a368593c23b9af.zip |
add privileged/unprivileged kernel feature indication
With our switching away from supporting 32-bit Dom0 operation, users
complained that attempts (perhaps due to lack of knowledge of that
change) to boot the no longer privileged kernel in Dom0 resulted in
apparently silent failure. To make the mismatch explicit and visible,
add feature flags that the kernel can set to indicate operation in
what modes it supports. For backward compatibility, absence of both
feature flags is taken to indicate a kernel that may be capable of
operating in both modes.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/common/kernel.c')
-rw-r--r-- | xen/common/kernel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/common/kernel.c b/xen/common/kernel.c index 5558dc0712..45c900e335 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -278,7 +278,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE(void) arg) switch ( fi.submap_idx ) { case 0: - fi.submap = 0; + fi.submap = 1U << (IS_PRIV(current->domain) ? + XENFEAT_privileged : XENFEAT_unprivileged); if ( VM_ASSIST(d, VMASST_TYPE_pae_extended_cr3) ) fi.submap |= (1U << XENFEAT_pae_pgdir_above_4gb); if ( paging_mode_translate(current->domain) ) |