summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-11-25 17:32:44 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2023-11-25 17:32:44 +0100
commit00cff7b29b1dbc4ff48ae9278eb1aa4dc0bfad6a (patch)
tree8def7e05c792cf1dffd8884edcae745ceacf13ee /arch
parentMerge tag 's390-6.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/... (diff)
parentarm/xen: fix xen_vcpu_info allocation alignment (diff)
downloadlinux-00cff7b29b1dbc4ff48ae9278eb1aa4dc0bfad6a.tar.xz
linux-00cff7b29b1dbc4ff48ae9278eb1aa4dc0bfad6a.zip
Merge tag 'for-linus-6.7a-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fixes from Juergen Gross: - A small cleanup patch for the Xen privcmd driver - A fix for the swiotlb-xen driver which was missing the advertising of the maximum mapping length - A fix for Xen on Arm for a longstanding bug, which happened to occur only recently: a structure in percpu memory crossed a page boundary, which was rejected by the hypervisor * tag 'for-linus-6.7a-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: arm/xen: fix xen_vcpu_info allocation alignment xen: privcmd: Replace zero-length array with flex-array member and use __counted_by swiotlb-xen: provide the "max_mapping_size" method
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/xen/enlighten.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index 9afdc4c4a5dc..a395b6c0aae2 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -484,7 +484,8 @@ static int __init xen_guest_init(void)
* for secondary CPUs as they are brought up.
* For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
*/
- xen_vcpu_info = alloc_percpu(struct vcpu_info);
+ xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info),
+ 1 << fls(sizeof(struct vcpu_info) - 1));
if (xen_vcpu_info == NULL)
return -ENOMEM;