02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

08 Sep, 2017

1 commit

  • Pull xen updates from Juergen Gross:

    - the new pvcalls backend for routing socket calls from a guest to dom0

    - some cleanups of Xen code

    - a fix for wrong usage of {get,put}_cpu()

    * tag 'for-linus-4.14b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (27 commits)
    xen/mmu: set MMU_NORMAL_PT_UPDATE in remap_area_mfn_pte_fn
    xen: Don't try to call xen_alloc_p2m_entry() on autotranslating guests
    xen/events: events_fifo: Don't use {get,put}_cpu() in xen_evtchn_fifo_init()
    xen/pvcalls: use WARN_ON(1) instead of __WARN()
    xen: remove not used trace functions
    xen: remove unused function xen_set_domain_pte()
    xen: remove tests for pvh mode in pure pv paths
    xen-platform: constify pci_device_id.
    xen: cleanup xen.h
    xen: introduce a Kconfig option to enable the pvcalls backend
    xen/pvcalls: implement write
    xen/pvcalls: implement read
    xen/pvcalls: implement the ioworker functions
    xen/pvcalls: disconnect and module_exit
    xen/pvcalls: implement release command
    xen/pvcalls: implement poll command
    xen/pvcalls: implement accept command
    xen/pvcalls: implement listen command
    xen/pvcalls: implement bind command
    xen/pvcalls: implement connect command
    ...

    Linus Torvalds
     

31 Aug, 2017

1 commit


21 Aug, 2017

1 commit

  • Commit 971a69db7dc0 ("Xen: don't warn about 2-byte wchar_t in efi")
    added the --no-wchar-size-warning to the Makefile to avoid this
    harmless warning:

    arm-linux-gnueabi-ld: warning: drivers/xen/efi.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

    Changing kbuild to use thin archives instead of recursive linking
    unfortunately brings the same warning back during the final link.

    The kernel does not use wchar_t string literals at this point, and
    xen does not use wchar_t at all (only efi_char16_t), so the flag
    has no effect, but as pointed out by Jan Beulich, adding a wchar_t
    string literal would be bad here.

    Since wchar_t is always defined as u16, independent of the toolchain
    default, always passing -fshort-wchar is correct and lets us
    remove the Xen specific hack along with fixing the warning.

    Link: https://patchwork.kernel.org/patch/9275217/
    Fixes: 971a69db7dc0 ("Xen: don't warn about 2-byte wchar_t in efi")
    Signed-off-by: Arnd Bergmann
    Acked-by: David Vrabel
    Signed-off-by: Masahiro Yamada

    Arnd Bergmann
     

06 Jul, 2016

1 commit


24 May, 2016

1 commit

  • The XEN UEFI code has become available on the ARM architecture
    recently, but now causes a link-time warning:

    ld: warning: drivers/xen/efi.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

    This seems harmless, because the efi code only uses 2-byte
    characters when interacting with EFI, so we don't pass on those
    strings to elsewhere in the system, and we just need to
    silence the warning.

    It is not clear to me whether we actually need to build the file
    with the -fshort-wchar flag, but if we do, then we should also
    pass --no-wchar-size-warning to the linker, to avoid the warning.

    Signed-off-by: Arnd Bergmann
    Reviewed-by: Stefano Stabellini
    Fixes: 37060935dc04 ("ARM64: XEN: Add a function to initialize Xen specific UEFI runtime services")

    Arnd Bergmann
     

21 Dec, 2015

1 commit


23 Oct, 2015

1 commit

  • Build cpu_hotplug for ARM and ARM64 guests.

    Rename arch_(un)register_cpu to xen_(un)register_cpu and provide an
    empty implementation on ARM and ARM64. On x86 just call
    arch_(un)register_cpu as we are already doing.

    Initialize cpu_hotplug on ARM.

    Signed-off-by: Stefano Stabellini
    Reviewed-by: Julien Grall
    Reviewed-by: Boris Ostrovsky

    Stefano Stabellini
     

24 Apr, 2015

1 commit

  • Pull initial ACPI support for arm64 from Will Deacon:
    "This series introduces preliminary ACPI 5.1 support to the arm64
    kernel using the "hardware reduced" profile. We don't support any
    peripherals yet, so it's fairly limited in scope:

    - MEMORY init (UEFI)

    - ACPI discovery (RSDP via UEFI)

    - CPU init (FADT)

    - GIC init (MADT)

    - SMP boot (MADT + PSCI)

    - ACPI Kconfig options (dependent on EXPERT)

    ACPI for arm64 has been in development for a while now and hardware
    has been available that can boot with either FDT or ACPI tables. This
    has been made possible by both changes to the ACPI spec to cater for
    ARM-based machines (known as "hardware-reduced" in ACPI parlance) but
    also a Linaro-driven effort to get this supported on top of the Linux
    kernel. This pull request is the result of that work.

    These changes allow us to initialise the CPUs, interrupt controller,
    and timers via ACPI tables, with memory information and cmdline coming
    from EFI. We don't support a hybrid ACPI/FDT scheme. Of course,
    there is still plenty of work to do (a serial console would be nice!)
    but I expect that to happen on a per-driver basis after this core
    series has been merged.

    Anyway, the diff stat here is fairly horrible, but splitting this up
    and merging it via all the different subsystems would have been
    extremely painful. Instead, we've got all the relevant Acks in place
    and I've not seen anything other than trivial (Kconfig) conflicts in
    -next (for completeness, I've included my resolution below). Nearly
    half of the insertions fall under Documentation/.

    So, we'll see how this goes. Right now, it all depends on EXPERT and
    I fully expect people to use FDT by default for the immediate future"

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (31 commits)
    ARM64 / ACPI: make acpi_map_gic_cpu_interface() as void function
    ARM64 / ACPI: Ignore the return error value of acpi_map_gic_cpu_interface()
    ARM64 / ACPI: fix usage of acpi_map_gic_cpu_interface
    ARM64: kernel: acpi: honour acpi=force command line parameter
    ARM64: kernel: acpi: refactor ACPI tables init and checks
    ARM64: kernel: psci: let ACPI probe PSCI version
    ARM64: kernel: psci: factor out probe function
    ACPI: move arm64 GSI IRQ model to generic GSI IRQ layer
    ARM64 / ACPI: Don't unflatten device tree if acpi=force is passed
    ARM64 / ACPI: additions of ACPI documentation for arm64
    Documentation: ACPI for ARM64
    ARM64 / ACPI: Enable ARM64 in Kconfig
    XEN / ACPI: Make XEN ACPI depend on X86
    ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64
    clocksource / arch_timer: Parse GTDT to initialize arch timer
    irqchip: Add GICv2 specific ACPI boot support
    ARM64 / ACPI: Introduce ACPI_IRQ_MODEL_GIC and register device's gsi
    ACPI / processor: Make it possible to get CPU hardware ID via GICC
    ACPI / processor: Introduce phys_cpuid_t for CPU hardware ID
    ARM64 / ACPI: Parse MADT for SMP initialization
    ...

    Linus Torvalds
     

26 Mar, 2015

1 commit

  • When ACPI is enabled on ARM64, XEN ACPI will also compiled
    into the kernel, but XEN ACPI is x86 dependent, so introduce
    CONFIG_XEN_ACPI to make it depend on x86 before XEN ACPI is
    functional on ARM64.

    CC: Julien Grall
    CC: Konrad Rzeszutek Wilk
    CC: Boris Ostrovsky
    CC: David Vrabel
    Acked-by: Stefano Stabellini
    Signed-off-by: Hanjun Guo
    Signed-off-by: Will Deacon

    Hanjun Guo
     

16 Mar, 2015

1 commit

  • Auto-translated physmap guests (arm, arm64 and x86 PVHVM/PVH) map and
    unmap foreign GFNs using the same method (updating the physmap).
    Unify the two arm and x86 implementations into one commont one.

    Note that on arm and arm64, the correct error code will be returned
    (instead of always -EFAULT) and map/unmap failure warnings are no
    longer printed. These changes are required if the foreign domain is
    paging (-ENOENT failures are expected and must be propagated up to the
    caller).

    Signed-off-by: David Vrabel
    Reviewed-by: Stefano Stabellini

    David Vrabel
     

24 Feb, 2015

1 commit

  • Hypercalls submitted by user space tools via the privcmd driver can
    take a long time (potentially many 10s of seconds) if the hypercall
    has many sub-operations.

    A fully preemptible kernel may deschedule such as task in any upcall
    called from a hypercall continuation.

    However, in a kernel with voluntary or no preemption, hypercall
    continuations in Xen allow event handlers to be run but the task
    issuing the hypercall will not be descheduled until the hypercall is
    complete and the ioctl returns to user space. These long running
    tasks may also trigger the kernel's soft lockup detection.

    Add xen_preemptible_hcall_begin() and xen_preemptible_hcall_end() to
    bracket hypercalls that may be preempted. Use these in the privcmd
    driver.

    When returning from an upcall, call xen_maybe_preempt_hcall() which
    adds a schedule point if if the current task was within a preemptible
    hypercall.

    Since _cond_resched() can move the task to a different CPU, clear and
    set xen_in_preemptible_hcall around the call.

    Signed-off-by: David Vrabel
    Reviewed-by: Boris Ostrovsky

    David Vrabel
     

23 Sep, 2014

1 commit

  • Introduces the Xen pvSCSI backend. With pvSCSI it is possible for a
    Xen domU to issue SCSI commands to a SCSI LUN assigned to that
    domU. The SCSI commands are passed to the pvSCSI backend in a driver
    domain (usually Dom0) which is owner of the physical device. This
    allows e.g. to use SCSI tape drives in a Xen domU.

    The code is taken from the pvSCSI implementation in Xen done by
    Fujitsu based on Linux kernel 2.6.18.

    Changes from the original version are:
    - port to upstream kernel
    - put all code in just one source file
    - adapt to Linux style guide
    - use target core infrastructure instead doing pure pass-through
    - enable module unloading
    - support SG-list in grant page(s)
    - support task abort
    - remove redundant struct backend
    - allocate resources dynamically
    - correct minor error in scsiback_fast_flush_area
    - free allocated resources in case of error during I/O preparation
    - remove CDB emulation, now handled by target core infrastructure

    Signed-off-by: Juergen Gross
    Reviewed-by: Nicholas Bellinger
    Signed-off-by: David Vrabel

    Juergen Gross
     

19 Jul, 2014

1 commit

  • This patch enables EFI usage under Xen dom0. Standard EFI Linux
    Kernel infrastructure cannot be used because it requires direct
    access to EFI data and code. However, in dom0 case it is not possible
    because above mentioned EFI stuff is fully owned and controlled
    by Xen hypervisor. In this case all calls from dom0 to EFI must
    be requested via special hypercall which in turn executes relevant
    EFI code in behalf of dom0.

    When dom0 kernel boots it checks for EFI availability on a machine.
    If it is detected then artificial EFI system table is filled.
    Native EFI callas are replaced by functions which mimics them
    by calling relevant hypercall. Later pointer to EFI system table
    is passed to standard EFI machinery and it continues EFI subsystem
    initialization taking into account that there is no direct access
    to EFI boot services, runtime, tables, structures, etc. After that
    system runs as usual.

    This patch is based on Jan Beulich and Tang Liang work.

    Signed-off-by: Jan Beulich
    Signed-off-by: Tang Liang
    Signed-off-by: Daniel Kiper
    Reviewed-by: David Vrabel
    Acked-by: Stefano Stabellini

    Daniel Kiper
     

11 Feb, 2014

1 commit

  • Commit d52eefb47d4e ("ia64/xen: Remove Xen support for ia64") removed
    the Kconfig symbol XEN_XENCOMM. But it didn't remove the code depending
    on that symbol. Remove that code now.

    Signed-off-by: Paul Bolle
    Acked-by: David Vrabel
    Signed-off-by: Konrad Rzeszutek Wilk

    Paul Bolle
     

06 Jan, 2014

1 commit


29 Jul, 2013

2 commits


20 Feb, 2013

3 commits

  • This patch implement real Xen ACPI cpu hotplug driver as module.
    When loaded, it replaces Xen stub driver.

    For booting existed cpus, the driver enumerates them.
    For hotadded cpus, which added at runtime and notify OS via
    device or container event, the driver is invoked to add them,
    parsing cpu information, hypercalling to Xen hypervisor to add
    them, and finally setting up new /sys interface for them.

    Signed-off-by: Liu Jinsong
    Signed-off-by: Konrad Rzeszutek Wilk

    Liu Jinsong
     
  • This patch implements real Xen acpi memory hotplug driver as module.
    When loaded, it replaces Xen stub driver.

    When an acpi memory device hotadd event occurs, it notifies OS and
    invokes notification callback, adding related memory device and parsing
    memory information, finally hypercall to xen hypervisor to add memory.

    Signed-off-by: Liu Jinsong
    Signed-off-by: Konrad Rzeszutek Wilk

    Liu Jinsong
     
  • This patch create a file (xen-stub.c) for Xen stub drivers.
    Xen stub drivers are used to reserve space for Xen drivers, i.e.
    memory hotplug and cpu hotplug, and to block native drivers loaded,
    so that real Xen drivers can be modular and loaded on demand.

    This patch is specific for Xen memory hotplug (other Xen logic
    can add stub drivers on their own). The xen stub driver will
    occupied earlier via subsys_initcall (than native memory hotplug
    driver via module_init and so blocking native). Later real Xen
    memory hotplug logic will unregister the stub driver and register
    itself to take effect on demand.

    Signed-off-by: Liu Jinsong
    Signed-off-by: Konrad Rzeszutek Wilk

    Liu Jinsong
     

14 Dec, 2012

1 commit

  • Pull Xen updates from Konrad Rzeszutek Wilk:
    - Add necessary infrastructure to make balloon driver work under ARM.
    - Add /dev/xen/privcmd interfaces to work with ARM and PVH.
    - Improve Xen PCIBack wild-card parsing.
    - Add Xen ACPI PAD (Processor Aggregator) support - so can offline/
    online sockets depending on the power consumption.
    - PVHVM + kexec = use an E820_RESV region for the shared region so we
    don't overwrite said region during kexec reboot.
    - Cleanups, compile fixes.

    Fix up some trivial conflicts due to the balloon driver now working on
    ARM, and there were changes next to the previous work-arounds that are
    now gone.

    * tag 'stable/for-linus-3.8-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/PVonHVM: fix compile warning in init_hvm_pv_info
    xen: arm: implement remap interfaces needed for privcmd mappings.
    xen: correctly use xen_pfn_t in remap_domain_mfn_range.
    xen: arm: enable balloon driver
    xen: balloon: allow PVMMU interfaces to be compiled out
    xen: privcmd: support autotranslated physmap guests.
    xen: add pages parameter to xen_remap_domain_mfn_range
    xen/acpi: Move the xen_running_on_version_or_later function.
    xen/xenbus: Remove duplicate inclusion of asm/xen/hypervisor.h
    xen/acpi: Fix compile error by missing decleration for xen_domain.
    xen/acpi: revert pad config check in xen_check_mwait
    xen/acpi: ACPI PAD driver
    xen-pciback: reject out of range inputs
    xen-pciback: simplify and tighten parsing of device IDs
    xen PVonHVM: use E820_Reserved area for shared_info

    Linus Torvalds
     

01 Dec, 2012

1 commit

  • …to stable/for-linus-3.8

    * 'arm-privcmd-for-3.8' of git://xenbits.xen.org/people/ianc/linux:
    xen: arm: implement remap interfaces needed for privcmd mappings.
    xen: correctly use xen_pfn_t in remap_domain_mfn_range.
    xen: arm: enable balloon driver
    xen: balloon: allow PVMMU interfaces to be compiled out
    xen: privcmd: support autotranslated physmap guests.
    xen: add pages parameter to xen_remap_domain_mfn_range

    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

    Konrad Rzeszutek Wilk
     

29 Nov, 2012

1 commit

  • The code is now in a state where can just enable it.

    Drop the *_xenballloned_pages duplicates since these are now supplied
    by the balloon code.

    Signed-off-by: Ian Campbell
    Acked-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Ian Campbell
     

27 Nov, 2012

1 commit

  • PAD is acpi Processor Aggregator Device which provides a control point
    that enables the platform to perform specific processor configuration
    and control that applies to all processors in the platform.

    This patch is to implement Xen acpi pad logic. When running under Xen
    virt platform, native pad driver would not work. Instead Xen pad driver,
    a self-contained and thin logic level, would take over acpi pad logic.

    When acpi pad notify OSPM, xen pad logic intercept and parse _PUR object
    to get the expected idle cpu number, and then hypercall to hypervisor.
    Xen hypervisor would then do the rest work, say, core parking, to idle
    specific number of cpus on its own policy.

    Signed-off-by: Jan Beulich
    Signed-off-by: Liu Jinsong
    Signed-off-by: Konrad Rzeszutek Wilk

    Liu, Jinsong
     

07 Nov, 2012

1 commit

  • As there is no need for it (the fallback code is for older
    hypervisors and they only run under x86), and also b/c
    we get:

    drivers/xen/fallback.c: In function 'xen_event_channel_op_compat':
    drivers/xen/fallback.c:10:19: error: storage size of 'op' isn't known
    drivers/xen/fallback.c:15:2: error: implicit declaration of function '_hypercall1' [-Werror=implicit-function-declaration]
    drivers/xen/fallback.c:15:19: error: expected expression before 'int'
    drivers/xen/fallback.c:18:7: error: 'EVTCHNOP_close' undeclared (first use in this function)
    drivers/xen/fallback.c:18:7: note: each undeclared identifier is reported only once for each function it appears in
    .. and more

    [v1: Moved the enablement to be covered by CONFIG_X86 per Ian's suggestion]
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     

04 Nov, 2012

1 commit

  • While copying the argument structures in HYPERVISOR_event_channel_op()
    and HYPERVISOR_physdev_op() into the local variable is sufficiently
    safe even if the actual structure is smaller than the container one,
    copying back eventual output values the same way isn't: This may
    collide with on-stack variables (particularly "rc") which may change
    between the first and second memcpy() (i.e. the second memcpy() could
    discard that change).

    Move the fallback code into out-of-line functions, and handle all of
    the operations known by this old a hypervisor individually: Some don't
    require copying back anything at all, and for the rest use the
    individual argument structures' sizes rather than the container's.

    Reported-by: Dan Carpenter
    Signed-off-by: Jan Beulich
    [v2: Reduce #define/#undef usage in HYPERVISOR_physdev_op_compat().]
    [v3: Fix compile errors when modules use said hypercalls]
    [v4: Add xen_ prefix to the HYPERCALL_..]
    [v5: Alter the name and only EXPORT_SYMBOL_GPL one of them]
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     

07 Oct, 2012

1 commit

  • Pull ADM Xen support from Konrad Rzeszutek Wilk:

    Features:
    * Allow a Linux guest to boot as initial domain and as normal guests
    on Xen on ARM (specifically ARMv7 with virtualized extensions). PV
    console, block and network frontend/backends are working.
    Bug-fixes:
    * Fix compile linux-next fallout.
    * Fix PVHVM bootup crashing.

    The Xen-unstable hypervisor (so will be 4.3 in a ~6 months), supports
    ARMv7 platforms.

    The goal in implementing this architecture is to exploit the hardware
    as much as possible. That means use as little as possible of PV
    operations (so no PV MMU) - and use existing PV drivers for I/Os
    (network, block, console, etc). This is similar to how PVHVM guests
    operate in X86 platform nowadays - except that on ARM there is no need
    for QEMU. The end result is that we share a lot of the generic Xen
    drivers and infrastructure.

    Details on how to compile/boot/etc are available at this Wiki:

    http://wiki.xen.org/wiki/Xen_ARMv7_with_Virtualization_Extensions

    and this blog has links to a technical discussion/presentations on the
    overall architecture:

    http://blog.xen.org/index.php/2012/09/21/xensummit-sessions-new-pvh-virtualisation-mode-for-arm-cortex-a15arm-servers-and-x86/

    * tag 'stable/for-linus-3.7-arm-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (21 commits)
    xen/xen_initial_domain: check that xen_start_info is initialized
    xen: mark xen_init_IRQ __init
    xen/Makefile: fix dom-y build
    arm: introduce a DTS for Xen unprivileged virtual machines
    MAINTAINERS: add myself as Xen ARM maintainer
    xen/arm: compile netback
    xen/arm: compile blkfront and blkback
    xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree
    xen/arm: receive Xen events on ARM
    xen/arm: initialize grant_table on ARM
    xen/arm: get privilege status
    xen/arm: introduce CONFIG_XEN on ARM
    xen: do not compile manage, balloon, pci, acpi, pcpu and cpu_hotplug on ARM
    xen/arm: Introduce xen_ulong_t for unsigned long
    xen/arm: Xen detection and shared_info page mapping
    docs: Xen ARM DT bindings
    xen/arm: empty implementation of grant_table arch specific functions
    xen/arm: sync_bitops
    xen/arm: page.h definitions
    xen/arm: hypercalls
    ...

    Linus Torvalds
     

03 Oct, 2012

1 commit


19 Sep, 2012

1 commit

  • Just like for the in-tree early console debug port driver, the
    hypervisor - when using a debug port based console - also needs to be
    told about controller resets, so it can suppress using and then
    re-initialize the debug port accordingly.

    Other than the in-tree driver, the hypervisor driver actually cares
    about doing this only for the device where the debug is port actually
    in use, i.e. it needs to be told the coordinates of the device being
    reset (quite obviously, leveraging the addition done for that would
    likely benefit the in-tree driver too).

    Signed-off-by: Jan Beulich
    Acked-by: Konrad Rzeszutek Wilk
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Jan Beulich
     

14 Sep, 2012

1 commit


20 Jul, 2012

2 commits

  • This patch provide Xen physical cpus online/offline sys interface.
    User can use it for their own purpose, like power saving:
    by offlining some cpus when light workload it save power greatly.

    Its basic workflow is, user online/offline cpu via sys interface,
    then hypercall xen to implement, after done xen inject virq back to dom0,
    and then dom0 sync cpu status.

    Signed-off-by: Jiang, Yunhong
    Signed-off-by: Liu, Jinsong
    Signed-off-by: Konrad Rzeszutek Wilk

    Liu, Jinsong
     
  • When MCA error occurs, it would be handled by Xen hypervisor first,
    and then the error information would be sent to initial domain for logging.

    This patch gets error information from Xen hypervisor and convert
    Xen format error into Linux format mcelog. This logic is basically
    self-contained, not touching other kernel components.

    By using tools like mcelog tool users could read specific error information,
    like what they did under native Linux.

    To test follow directions outlined in Documentation/acpi/apei/einj.txt

    Acked-and-tested-by: Borislav Petkov
    Signed-off-by: Ke, Liping
    Signed-off-by: Jiang, Yunhong
    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Liu, Jinsong
    Signed-off-by: Konrad Rzeszutek Wilk

    Liu, Jinsong
     

08 May, 2012

1 commit

  • Provide the registration callback to call in the Xen's
    ACPI sleep functionality. This means that during S3/S5
    we make a hypercall XENPF_enter_acpi_sleep with the
    proper PM1A/PM1B registers.

    Based of Ke Yu's initial idea.
    [ From http://xenbits.xensource.com/linux-2.6.18-xen.hg
    change c68699484a65 ]

    [v1: Added Copyright and license]
    [v2: Added check if PM1A/B the 16-bits MSB contain something. The spec
    only uses 16-bits but might have more in future]
    Signed-off-by: Liang Tang
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     

15 Mar, 2012

1 commit

  • This driver solves three problems:
    1). Parse and upload ACPI0007 (or PROCESSOR_TYPE) information to the
    hypervisor - aka P-states (cpufreq data).
    2). Upload the the Cx state information (cpuidle data).
    3). Inhibit CPU frequency scaling drivers from loading.

    The reason for wanting to solve 1) and 2) is such that the Xen hypervisor
    is the only one that knows the CPU usage of different guests and can
    make the proper decision of when to put CPUs and packages in proper states.
    Unfortunately the hypervisor has no support to parse ACPI DSDT tables, hence it
    needs help from the initial domain to provide this information. The reason
    for 3) is that we do not want the initial domain to change P-states while the
    hypervisor is doing it as well - it causes rather some funny cases of P-states
    transitions.

    For this to work, the driver parses the Power Management data and uploads said
    information to the Xen hypervisor. It also calls acpi_processor_notify_smm()
    to inhibit the other CPU frequency scaling drivers from being loaded.

    Everything revolves around the 'struct acpi_processor' structure which
    gets updated during the bootup cycle in different stages. At the startup, when
    the ACPI parser starts, the C-state information is processed (processor_idle)
    and saved in said structure as 'power' element. Later on, the CPU frequency
    scaling driver (powernow-k8 or acpi_cpufreq), would call the the
    acpi_processor_* (processor_perflib functions) to parse P-states information
    and populate in the said structure the 'performance' element.

    Since we do not want the CPU frequency scaling drivers from loading
    we have to call the acpi_processor_* functions to parse the P-states and
    call "acpi_processor_notify_smm" to stop them from loading.

    There is also one oddity in this driver which is that under Xen, the
    physical online CPU count can be different from the virtual online CPU count.
    Meaning that the macros 'for_[online|possible]_cpu' would process only
    up to virtual online CPU count. We on the other hand want to process
    the full amount of physical CPUs. For that, the driver checks if the ACPI IDs
    count is different from the APIC ID count - which can happen if the user
    choose to use dom0_max_vcpu argument. In such a case a backup of the PM
    structure is used and uploaded to the hypervisor.

    [v1-v2: Initial RFC implementations that were posted]
    [v3: Changed the name to passthru suggested by Pasi Kärkkäinen ]
    [v4: Added vCPU != pCPU support - aka dom0_max_vcpus support]
    [v5: Cleaned up the driver, fix bug under Athlon XP]
    [v6: Changed the driver to a CPU frequency governor]
    [v7: Jan Beulich suggestion to make it a cpufreq scaling driver
    made me rework it as driver that inhibits cpufreq scaling driver]
    [v8: Per Jan's review comments, fixed up the driver]
    [v9: Allow to continue even if acpi_processor_preregister_perf.. fails]
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     

17 Dec, 2011

1 commit

  • Access to arbitrary hypercalls is currently provided via xenfs. This
    adds a standard character device to handle this. The support in xenfs
    remains for backward compatibility and uses the device driver code.

    Signed-off-by: Bastian Blank
    Acked-by: Ian Campbell
    Signed-off-by: Konrad Rzeszutek Wilk

    Bastian Blank
     

29 Sep, 2011

1 commit

  • Xen PVHVM needs xen-platform-pci, on the other hand xen-platform-pci is
    useless in any other cases.
    Therefore remove the XEN_PLATFORM_PCI config option and compile
    xen-platform-pci built-in if XEN_PVHVM is selected.

    Changes to v1:

    - remove xen-platform-pci.o and just use platform-pci.o since it is not
    externally visible anymore.

    Signed-off-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     

21 Jul, 2011

1 commit

  • * stable/xen-pciback-0.6.3:
    xen/pciback: Have 'passthrough' option instead of XEN_PCIDEV_BACKEND_PASS and XEN_PCIDEV_BACKEND_VPCI
    xen/pciback: Remove the DEBUG option.
    xen/pciback: Drop two backends, squash and cleanup some code.
    xen/pciback: Print out the MSI/MSI-X (PIRQ) values
    xen/pciback: Don't setup an fake IRQ handler for SR-IOV devices.
    xen: rename pciback module to xen-pciback.
    xen/pciback: Fine-grain the spinlocks and fix BUG: scheduling while atomic cases.
    xen/pciback: Allocate IRQ handler for device that is shared with guest.
    xen/pciback: Disable MSI/MSI-X when reseting a device
    xen/pciback: guest SR-IOV support for PV guest
    xen/pciback: Register the owner (domain) of the PCI device.
    xen/pciback: Cleanup the driver based on checkpatch warnings and errors.
    xen/pciback: xen pci backend driver.

    Conflicts:
    drivers/xen/Kconfig

    Konrad Rzeszutek Wilk
     

20 Jul, 2011

1 commit

  • This is the host side counterpart to the frontend driver in
    drivers/pci/xen-pcifront.c. The PV protocol is also implemented by
    frontend drivers in other OSes too, such as the BSDs.

    The PV protocol is rather simple. There is page shared with the guest,
    which has the 'struct xen_pci_sharedinfo' embossed in it. The backend
    has a thread that is kicked every-time the structure is changed and
    based on the operation field it performs specific tasks:

    XEN_PCI_OP_conf_[read|write]:
    Read/Write 0xCF8/0xCFC filtered data. (conf_space*.c)
    Based on which field is probed, we either enable/disable the PCI
    device, change power state, read VPD, etc. The major goal of this
    call is to provide a Physical IRQ (PIRQ) to the guest.

    The PIRQ is Xen hypervisor global IRQ value irrespective of the IRQ
    is tied in to the IO-APIC, or is a vector. For GSI type
    interrupts, the PIRQ==GSI holds. For MSI/MSI-X the
    PIRQ value != Linux IRQ number (thought PIRQ==vector).

    Please note, that with Xen, all interrupts (except those level shared ones)
    are injected directly to the guest - there is no host interaction.

    XEN_PCI_OP_[enable|disable]_msi[|x] (pciback_ops.c)
    Enables/disables the MSI/MSI-X capability of the device. These operations
    setup the MSI/MSI-X vectors for the guest and pass them to the frontend.

    When the device is activated, the interrupts are directly injected in the
    guest without involving the host.

    XEN_PCI_OP_aer_[detected|resume|mmio|slotreset]: In case of failure,
    perform the appropriate AER commands on the guest. Right now that is
    a cop-out - we just kill the guest.

    Besides implementing those commands, it can also

    - hide a PCI device from the host. When booting up, the user can specify
    xen-pciback.hide=(1:0:0)(BDF..) so that host does not try to use the
    device.

    The driver was lifted from linux-2.6.18.hg tree and fixed up
    so that it could compile under v3.0. Per suggestion from Jesse Barnes
    moved the driver to drivers/xen/xen-pciback.

    Signed-off-by: Konrad Rzeszutek Wilk
    Signed-off-by: Jeremy Fitzhardinge

    Konrad Rzeszutek Wilk
     

09 Jul, 2011

1 commit