Commit 00cff7b2 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 0f5cc96c 7bf9a6b4
...@@ -484,7 +484,8 @@ static int __init xen_guest_init(void) ...@@ -484,7 +484,8 @@ static int __init xen_guest_init(void)
* for secondary CPUs as they are brought up. * for secondary CPUs as they are brought up.
* For uniformity we use VCPUOP_register_vcpu_info even on cpu0. * 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) if (xen_vcpu_info == NULL)
return -ENOMEM; return -ENOMEM;
......
...@@ -1115,7 +1115,7 @@ struct privcmd_kernel_ioreq { ...@@ -1115,7 +1115,7 @@ struct privcmd_kernel_ioreq {
spinlock_t lock; /* Protects ioeventfds list */ spinlock_t lock; /* Protects ioeventfds list */
struct list_head ioeventfds; struct list_head ioeventfds;
struct list_head list; struct list_head list;
struct ioreq_port ports[0]; struct ioreq_port ports[] __counted_by(vcpus);
}; };
static irqreturn_t ioeventfd_interrupt(int irq, void *dev_id) static irqreturn_t ioeventfd_interrupt(int irq, void *dev_id)
......
...@@ -405,4 +405,5 @@ const struct dma_map_ops xen_swiotlb_dma_ops = { ...@@ -405,4 +405,5 @@ const struct dma_map_ops xen_swiotlb_dma_ops = {
.get_sgtable = dma_common_get_sgtable, .get_sgtable = dma_common_get_sgtable,
.alloc_pages = dma_common_alloc_pages, .alloc_pages = dma_common_alloc_pages,
.free_pages = dma_common_free_pages, .free_pages = dma_common_free_pages,
.max_mapping_size = swiotlb_max_mapping_size,
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment