Skip to content
Commit 8ec1e8bf authored by Alexandru Elisei's avatar Alexandru Elisei Committed by Will Deacon
Browse files

arm64: Honor --vcpu-affinity for aarch32 guests



Commit 4639b72f ("arm64: Add --vcpu-affinity command line argument")
introduced the --vcpu-affinity command line argument to pin the VCPUs to a
given list of physical CPUs. Unfortunately, the affinity is set only for an
arm64 guest, leading to the following error when running a 32-bit guest on
a system with two or more PMUs:

KVM exit reason: 9 ("KVM_EXIT_FAIL_ENTRY")

 Registers:
 PC:    0x8000c608
 PSTATE:    0x200000d3
 SP_EL1:    0x0
 LR:    0x0

*pc:
 0x8000c608: 25 3f a0 e1  83 61 a0 e1
 0x8000c610: 83 31 98 e7  04 10 82 e1
 0x8000c618: 07 2c 81 e3  28 10 1b e5
 0x8000c620: 03 20 82 e3  03 00 a0 e1

*lr:
  Warning: unable to translate guest address 0x0 to host
 0x00000000: <unknown>
 0x00000008: <unknown>
 0x00000010: <unknown>
 0x00000018: <unknown>

  # KVM compatibility warning.
	virtio-net device was not detected.
	While you have requested a virtio-net device, the guest kernel did not initialize it.
	Please make sure that the guest kernel was compiled with CONFIG_VIRTIO_NET=y enabled in .config.

  # KVM session ended normally.

Make the error go away by setting the affinity of the VCPUs for both 32-bit
and 64-bit guests.

Fixes: 4639b72f ("arm64: Add --vcpu-affinity command line argument")
Signed-off-by: Alexandru Elisei's avatarAlexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20220525165704.186754-2-alexandru.elisei@arm.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 1a992bba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment