This is the framework for using XIVE in a PowerVM guest. The support is very similar to the native one in a much simpler form. Each source is associated with an Event State Buffer (ESB). This is a two bit state machine which is used to trigger events. The bits are named "P" (pending) and "Q" (queued) and can be controlled by MMIO. The Guest OS registers event (or notifications) queues on which the HW will post event data for a target to notify. Instead of OPAL calls, a set of Hypervisors call are used to configure the interrupt sources and the event/notification queues of the guest: - H_INT_GET_SOURCE_INFO used to obtain the address of the MMIO page of the Event State Buffer (PQ bits) entry associated with the source. - H_INT_SET_SOURCE_CONFIG assigns a source to a "target". - H_INT_GET_SOURCE_CONFIG determines to which "target" and "priority" is assigned to a source - H_INT_GET_QUEUE_INFO returns the address of the notification management page associated with the specified "target" and "priority". - H_INT_SET_QUEUE_CONFIG sets or resets the event queue for a given "target" and "priority". It is also used to set the notification config associated with the queue, only unconditional notification for the moment. Reset is performed with a queue size of 0 and queueing is disabled in that case. - H_INT_GET_QUEUE_CONFIG returns the queue settings for a given "target" and "priority". - H_INT_RESET resets all of the partition's interrupt exploitation structures to their initial state, losing all configuration set via the hcalls H_INT_SET_SOURCE_CONFIG and H_INT_SET_QUEUE_CONFIG. - H_INT_SYNC issue a synchronisation on a source to make sure sure all notifications have reached their queue. As for XICS, the XIVE interface for the guest is described in the device tree under the "interrupt-controller" node. A couple of new properties are specific to XIVE : - "reg" contains the base address and size of the thread interrupt managnement areas (TIMA), also called rings, for the User level and for the Guest OS level. Only the Guest OS level is taken into account today. - "ibm,xive-eq-sizes" the size of the event queues. One cell per size supported, contains log2 of size, in ascending order. - "ibm,xive-lisn-ranges" the interrupt numbers ranges assigned to the guest. These are allocated using a simple bitmap. and also : - "/ibm,plat-res-int-priorities" contains a list of priorities that the hypervisor has reserved for its own use. Tested with a QEMU XIVE model for pseries and with the Power hypervisor. Signed-off-by: Cédric Le Goater <clg@kaod.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
142 lines
4.3 KiB
Plaintext
142 lines
4.3 KiB
Plaintext
config PPC_PSERIES
|
|
depends on PPC64 && PPC_BOOK3S
|
|
bool "IBM pSeries & new (POWER5-based) iSeries"
|
|
select HAVE_PCSPKR_PLATFORM
|
|
select MPIC
|
|
select OF_DYNAMIC
|
|
select PCI
|
|
select PCI_MSI
|
|
select PPC_XICS
|
|
select PPC_XIVE_SPAPR
|
|
select PPC_ICP_NATIVE
|
|
select PPC_ICP_HV
|
|
select PPC_ICS_RTAS
|
|
select PPC_I8259
|
|
select PPC_RTAS
|
|
select PPC_RTAS_DAEMON
|
|
select RTAS_ERROR_LOGGING
|
|
select PPC_UDBG_16550
|
|
select PPC_NATIVE
|
|
select PPC_DOORBELL
|
|
select HOTPLUG_CPU
|
|
select ARCH_RANDOM
|
|
select PPC_DOORBELL
|
|
select FORCE_SMP
|
|
default y
|
|
|
|
config PPC_SPLPAR
|
|
depends on PPC_PSERIES
|
|
bool "Support for shared-processor logical partitions"
|
|
default n
|
|
help
|
|
Enabling this option will make the kernel run more efficiently
|
|
on logically-partitioned pSeries systems which use shared
|
|
processors, that is, which share physical processors between
|
|
two or more partitions.
|
|
|
|
config DTL
|
|
bool "Dispatch Trace Log"
|
|
depends on PPC_SPLPAR && DEBUG_FS
|
|
help
|
|
SPLPAR machines can log hypervisor preempt & dispatch events to a
|
|
kernel buffer. Saying Y here will enable logging these events,
|
|
which are accessible through a debugfs file.
|
|
|
|
Say N if you are unsure.
|
|
|
|
config PSERIES_ENERGY
|
|
tristate "pSeries energy management capabilities driver"
|
|
depends on PPC_PSERIES
|
|
default y
|
|
help
|
|
Provides interface to platform energy management capabilities
|
|
on supported PSERIES platforms.
|
|
Provides: /sys/devices/system/cpu/pseries_(de)activation_hint_list
|
|
and /sys/devices/system/cpu/cpuN/pseries_(de)activation_hint
|
|
|
|
config SCANLOG
|
|
tristate "Scanlog dump interface"
|
|
depends on RTAS_PROC && PPC_PSERIES
|
|
|
|
config IO_EVENT_IRQ
|
|
bool "IO Event Interrupt support"
|
|
depends on PPC_PSERIES
|
|
default y
|
|
help
|
|
Select this option, if you want to enable support for IO Event
|
|
interrupts. IO event interrupt is a mechanism provided by RTAS
|
|
to return information about hardware error and non-error events
|
|
which may need OS attention. RTAS returns events for multiple
|
|
event types and scopes. Device drivers can register their handlers
|
|
to receive events.
|
|
|
|
This option will only enable the IO event platform code. You
|
|
will still need to enable or compile the actual drivers
|
|
that use this infrastructure to handle IO event interrupts.
|
|
|
|
Say Y if you are unsure.
|
|
|
|
config LPARCFG
|
|
bool "LPAR Configuration Data"
|
|
depends on PPC_PSERIES
|
|
help
|
|
Provide system capacity information via human readable
|
|
<key word>=<value> pairs through a /proc/ppc64/lparcfg interface.
|
|
|
|
config PPC_PSERIES_DEBUG
|
|
depends on PPC_PSERIES && PPC_EARLY_DEBUG
|
|
bool "Enable extra debug logging in platforms/pseries"
|
|
help
|
|
Say Y here if you want the pseries core to produce a bunch of
|
|
debug messages to the system log. Select this if you are having a
|
|
problem with the pseries core and want to see more of what is
|
|
going on. This does not enable debugging in lpar.c, which must
|
|
be manually done due to its verbosity.
|
|
default y
|
|
|
|
config PPC_SMLPAR
|
|
bool "Support for shared-memory logical partitions"
|
|
depends on PPC_PSERIES
|
|
select LPARCFG
|
|
default n
|
|
help
|
|
Select this option to enable shared memory partition support.
|
|
With this option a system running in an LPAR can be given more
|
|
memory than physically available and will allow firmware to
|
|
balance memory across many LPARs.
|
|
|
|
config CMM
|
|
tristate "Collaborative memory management"
|
|
depends on PPC_SMLPAR
|
|
default y
|
|
help
|
|
Select this option, if you want to enable the kernel interface
|
|
to reduce the memory size of the system. This is accomplished
|
|
by allocating pages of memory and put them "on hold". This only
|
|
makes sense for a system running in an LPAR where the unused pages
|
|
will be reused for other LPARs. The interface allows firmware to
|
|
balance memory across many LPARs.
|
|
|
|
config HV_PERF_CTRS
|
|
bool "Hypervisor supplied PMU events (24x7 & GPCI)"
|
|
default y
|
|
depends on PERF_EVENTS && PPC_PSERIES
|
|
help
|
|
Enable access to hypervisor supplied counters in perf. Currently,
|
|
this enables code that uses the hcall GetPerfCounterInfo and 24x7
|
|
interfaces to retrieve counters. GPCI exists on Power 6 and later
|
|
systems. 24x7 is available on Power 8 and later systems.
|
|
|
|
If unsure, select Y.
|
|
|
|
config IBMVIO
|
|
depends on PPC_PSERIES
|
|
bool
|
|
default y
|
|
|
|
config IBMEBUS
|
|
depends on PPC_PSERIES && !CPU_LITTLE_ENDIAN
|
|
bool "Support for GX bus based adapters"
|
|
help
|
|
Bus device driver for GX bus based adapters.
|