Use the non-raw smp_processor_id() in the low hardware enable/disable
helpers as KVM absolutely relies on the CPU being stable, e.g. KVM would
end up with incorrect state if the task were migrated between accessing
cpus_hardware_enabled and actually enabling/disabling hardware.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <
20221130230934.
1014142-44-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
static void hardware_enable_nolock(void *junk)
{
- int cpu = raw_smp_processor_id();
+ int cpu = smp_processor_id();
int r;
if (cpumask_test_cpu(cpu, cpus_hardware_enabled))
static void hardware_disable_nolock(void *junk)
{
- int cpu = raw_smp_processor_id();
+ int cpu = smp_processor_id();
if (!cpumask_test_cpu(cpu, cpus_hardware_enabled))
return;