Skip to content

Commit 00cff7b

Browse files
committed
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
2 parents 0f5cc96 + 7bf9a6b commit 00cff7b

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

arch/arm/xen/enlighten.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ static int __init xen_guest_init(void)
484484
* for secondary CPUs as they are brought up.
485485
* For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
486486
*/
487-
xen_vcpu_info = alloc_percpu(struct vcpu_info);
487+
xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info),
488+
1 << fls(sizeof(struct vcpu_info) - 1));
488489
if (xen_vcpu_info == NULL)
489490
return -ENOMEM;
490491

drivers/xen/privcmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ struct privcmd_kernel_ioreq {
11151115
spinlock_t lock; /* Protects ioeventfds list */
11161116
struct list_head ioeventfds;
11171117
struct list_head list;
1118-
struct ioreq_port ports[0];
1118+
struct ioreq_port ports[] __counted_by(vcpus);
11191119
};
11201120

11211121
static irqreturn_t ioeventfd_interrupt(int irq, void *dev_id)

drivers/xen/swiotlb-xen.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,4 +405,5 @@ const struct dma_map_ops xen_swiotlb_dma_ops = {
405405
.get_sgtable = dma_common_get_sgtable,
406406
.alloc_pages = dma_common_alloc_pages,
407407
.free_pages = dma_common_free_pages,
408+
.max_mapping_size = swiotlb_max_mapping_size,
408409
};

0 commit comments

Comments
 (0)