Changes in 4.9.321 vt: drop old FONT ioctls random: schedule mix_interrupt_randomness() less often ata: libata: add qc->flags in ata_qc_complete_template tracepoint dm era: commit metadata in postsuspend after worker stops random: quiet urandom warning ratelimit suppression message USB: serial: option: add Telit LE910Cx 0x1250 composition bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers x86/xen: Remove undefined behavior in setup_features() MIPS: Remove repetitive increase irq_err_count igb: Make DMA faster when CPU is active on the PCIe link iio: adc: vf610: fix conversion mode sysfs node name usb: chipidea: udc: check request status before setting device address iio:accel:bma180: rearrange iio trigger get and register iio: accel: mma8452: ignore the return value of reset operation iio: trigger: sysfs: fix use-after-free on remove xtensa: xtfpga: Fix refcount leak bug in setup xtensa: Fix refcount leak bug in time.c powerpc: Enable execve syscall exit tracepoint ARM: dts: imx6qdl: correct PU regulator ramp delay ARM: exynos: Fix refcount leak in exynos_map_pmu ARM: Fix refcount leak in axxia_boot_secondary ARM: cns3xxx: Fix refcount leak in cns3xxx_init modpost: fix section mismatch check for exported init/exit sections powerpc/pseries: wire up rng during setup_arch() drm: remove drm_fb_helper_modinit xen: unexport __init-annotated xen_xlate_map_ballooned_pages() fdt: Update CRC check for rng-seed kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add] swiotlb: skip swiotlb_bounce when orig_addr is zero Linux 4.9.321 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ie00bdc5e2dcd549184919936708d5b0783954b1e
34 lines
765 B
C
34 lines
765 B
C
/******************************************************************************
|
|
* features.c
|
|
*
|
|
* Xen feature flags.
|
|
*
|
|
* Copyright (c) 2006, Ian Campbell, XenSource Inc.
|
|
*/
|
|
#include <linux/types.h>
|
|
#include <linux/cache.h>
|
|
#include <linux/export.h>
|
|
|
|
#include <asm/xen/hypercall.h>
|
|
|
|
#include <xen/interface/xen.h>
|
|
#include <xen/interface/version.h>
|
|
#include <xen/features.h>
|
|
|
|
u8 xen_features[XENFEAT_NR_SUBMAPS * 32] __read_mostly;
|
|
EXPORT_SYMBOL_GPL(xen_features);
|
|
|
|
void xen_setup_features(void)
|
|
{
|
|
struct xen_feature_info fi;
|
|
int i, j;
|
|
|
|
for (i = 0; i < XENFEAT_NR_SUBMAPS; i++) {
|
|
fi.submap_idx = i;
|
|
if (HYPERVISOR_xen_version(XENVER_get_features, &fi) < 0)
|
|
break;
|
|
for (j = 0; j < 32; j++)
|
|
xen_features[i * 32 + j] = !!(fi.submap & 1U << j);
|
|
}
|
|
}
|