linux/drivers/platform/x86/intel
Roger Pau Monné 2dbfb3f333 platform/x86/intel: pmc: Don't unconditionally attach Intel PMC when virtualized
The current logic in the Intel PMC driver will forcefully attach it
when detecting any CPU on the intel_pmc_core_platform_ids array,
even if the matching ACPI device is not present.

There's no checking in pmc_core_probe() to assert that the PMC device
is present, and hence on virtualized environments the PMC device
probes successfully, even if the underlying registers are not present.
Before commit 21ae435709 ("platform/x86: intel_pmc_core: Substitute PCI
with CPUID enumeration") the driver would check for the presence of a
specific PCI device, and that prevented the driver from attaching when
running virtualized.

Fix by only forcefully attaching the PMC device when not running
virtualized.  Note that virtualized platforms can still get the device
to load if the appropriate ACPI device is present on the tables
provided to the VM.

Make an exception for the Xen initial domain, which does have full
hardware access, and hence can attach to the PMC if present.

Fixes: 21ae435709 ("platform/x86: intel_pmc_core: Substitute PCI with CPUID enumeration")
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221110163145.80374-1-roger.pau@citrix.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-11-15 16:53:17 +01:00
..
atomisp2 platform/x86: intel_atomisp2_led: Also turn off the always-on camera LED on the Asus T100TAF 2022-07-10 19:37:19 +02:00
ifs platform/x86/intel/ifs: Mark as BROKEN 2022-07-10 17:35:37 +02:00
int1092 platform/x86: int1092: Fix non sequential device mode handling 2021-10-11 16:38:32 +02:00
int3472 More ACPI updates for 6.1-rc1 2022-10-10 13:28:06 -07:00
pmc platform/x86/intel: pmc: Don't unconditionally attach Intel PMC when virtualized 2022-11-15 16:53:17 +01:00
pmt platform/x86/intel/pmt: Sapphire Rapids PMT errata fix 2022-11-07 12:33:49 +01:00
speed_select_if platform/x86: ISST: PUNIT device mapping with Sub-NUMA clustering 2022-07-02 11:42:54 +02:00
telemetry platform/x86: intel_telemetry: Move to intel sub-directory 2021-08-20 20:08:09 +02:00
uncore-frequency platform/x86: intel-uncore-freq: Use sysfs_emit() to instead of scnprintf() 2022-09-27 15:06:32 +02:00
wmi platform/x86/intel/wmi: thunderbolt: Use dev_groups callback 2022-09-27 16:01:44 +02:00
Kconfig platform/x86: p2sb: Move out of X86_PLATFORM_DEVICES dependency 2022-08-01 16:26:38 +02:00
Makefile platform/x86: p2sb: Move out of X86_PLATFORM_DEVICES dependency 2022-08-01 16:26:38 +02:00
bxtwc_tmu.c platform/x86: intel_bxtwc_tmu: Move to intel sub-directory 2021-08-20 20:00:02 +02:00
chtdc_ti_pwrbtn.c platform/x86: intel_chtdc_ti_pwrbtn: Move to intel sub-directory 2021-08-20 20:00:02 +02:00
chtwc_int33fe.c platform/x86: intel_cht_int33fe: Fix comment according to the code flow 2022-09-01 14:50:09 +02:00
crystal_cove_charger.c platform/x86: intel_crystal_cove_charger: Fix IRQ masking / unmasking 2022-01-24 10:41:46 +01:00
hid.c platform/x86/intel/hid: Add some ACPI device IDs 2022-11-07 12:33:49 +01:00
int0002_vgpio.c platform/x86: intel_int0002_vgpio: Use generic_handle_irq_safe() 2022-09-19 15:08:38 +02:00
ishtp_eclite.c HID: intel-ish-hid: fix module device-id handling 2021-11-11 22:45:40 +01:00
mrfld_pwrbtn.c platform/x86: intel_mrfld_pwrbtn: Move to intel sub-directory 2021-08-20 20:00:02 +02:00
oaktrail.c platform/x86: use PLATFORM_DEVID_NONE instead of -1 2022-10-03 09:40:04 +02:00
punit_ipc.c platform/x86/intel: punit_ipc: Drop wrong use of ACPI_PTR() 2021-09-13 10:36:52 +02:00
rst.c platform/x86: intel-rst: Move to intel sub-directory 2021-08-20 20:09:43 +02:00
sdsi.c platform/x86/intel/sdsi: Fix bug in multi packet reads 2022-04-27 16:50:25 +02:00
smartconnect.c platform/x86: intel-smartconnect: Move to intel sub-directory 2021-08-20 20:11:12 +02:00
turbo_max_3.c platform/x86: intel_turbo_max_3: Move to intel sub-directory 2021-08-20 20:11:22 +02:00
vbtn.c platform/x86: Replace acpi_bus_get_device() 2022-02-03 11:55:57 +01:00
vsec.c platform/x86/intel/vsec: Fix wrong type for local status variables 2022-08-01 16:56:34 +02:00
vsec.h platform/x86/intel/vsec: Rework early hardware code 2022-07-02 11:49:39 +02:00