Displaying 20 results from an estimated 30 matches for "cpu_mask".
2010 Aug 27
0
[PATCH] Rename irq_cfg->domain to irq_cfg->cpu_mask
The name "domain" is quite confusion in Xen.
Hope I didn''t miss anything...
--
regards
Yang, Sheng
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
2013 Jan 15
0
[PATCH v2 2/2] xen/arm: initialize the GIC irq properties of interrupts routed to guests
...a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -174,12 +174,36 @@ static hw_irq_controller gic_guest_irq_type = {
.set_affinity = gic_irq_set_affinity,
};
+/* needs to be called with gic.lock held */
+static void gic_set_irq_properties(unsigned int irq, bool_t level,
+ unsigned int cpu_mask, unsigned int priority)
+{
+ volatile unsigned char *bytereg;
+ uint32_t cfg, edgebit;
+
+ /* Set edge / level */
+ cfg = GICD[GICD_ICFGR + irq / 16];
+ edgebit = 2u << (2 * (irq % 16));
+ if ( level )
+ cfg &= ~edgebit;
+ else
+ cfg |= edgebit;
+ GIC...
2007 Apr 28
3
[PATCH] i386: introduce voyager smp_ops, fix voyager build
...h a physical cpu mask */
static void
-flush_tlb_others (unsigned long cpumask, struct mm_struct *mm,
- unsigned long va)
+voyager_flush_tlb_others (unsigned long cpumask, struct mm_struct *mm,
+ unsigned long va)
{
int stuck = 50000;
@@ -937,7 +936,7 @@ flush_tlb_current_task(void)
cpu_mask = cpus_addr(mm->cpu_vm_mask)[0] & ~(1 << smp_processor_id());
local_flush_tlb();
if (cpu_mask)
- flush_tlb_others(cpu_mask, mm, FLUSH_ALL);
+ voyager_flush_tlb_others(cpu_mask, mm, FLUSH_ALL);
preempt_enable();
}
@@ -959,7 +958,7 @@ flush_tlb_mm (struct mm_struct * mm)
l...
2007 Apr 28
3
[PATCH] i386: introduce voyager smp_ops, fix voyager build
...h a physical cpu mask */
static void
-flush_tlb_others (unsigned long cpumask, struct mm_struct *mm,
- unsigned long va)
+voyager_flush_tlb_others (unsigned long cpumask, struct mm_struct *mm,
+ unsigned long va)
{
int stuck = 50000;
@@ -937,7 +936,7 @@ flush_tlb_current_task(void)
cpu_mask = cpus_addr(mm->cpu_vm_mask)[0] & ~(1 << smp_processor_id());
local_flush_tlb();
if (cpu_mask)
- flush_tlb_others(cpu_mask, mm, FLUSH_ALL);
+ voyager_flush_tlb_others(cpu_mask, mm, FLUSH_ALL);
preempt_enable();
}
@@ -959,7 +958,7 @@ flush_tlb_mm (struct mm_struct * mm)
l...
2013 Sep 26
8
[PATCH v5 0/7] Dissociate logical and gic/hardware CPU ID
Hi,
This is the fifth version of this patch series.
With the Versatile Express TC2, it''s possible to boot only with A7 or A15. If
the user choose to boot with only A7, the CPU ID will start at 0x100. As Xen
relies on it to set the logical ID and the GIC, it won''t be possible to use
Xen with this use case.
This patch series is divided in 3 parts:
- Patch 1: prepare Xen
2020 Aug 19
0
[PATCH v3 03/18] virtio: Add get_shm_region method
...al).
* @get_vq_affinity: get the affinity for a virtqueue (optional).
+ * @get_shm_region: get a shared memory region based on the index.
*/
typedef void vq_callback_t(struct virtqueue *);
struct virtio_config_ops {
@@ -89,6 +95,8 @@ struct virtio_config_ops {
const struct cpumask *cpu_mask);
const struct cpumask *(*get_vq_affinity)(struct virtio_device *vdev,
int index);
+ bool (*get_shm_region)(struct virtio_device *vdev,
+ struct virtio_shm_region *region, u8 id);
};
/* If driver didn't advertise the feature, it will never appear. */
@@ -251,6 +259,15 @@ int...
2013 Apr 24
3
[PATCH] xen/arm: Missing +1 when then number of interrupt lines for the GIC is computed
...h/arm/gic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 760c86b..389c217 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -216,7 +216,7 @@ static int gic_route_irq(unsigned int irq, bool_t level,
ASSERT(!(cpu_mask & ~0xff)); /* Targets bitmap only supports 8 CPUs */
ASSERT(priority <= 0xff); /* Only 8 bits of priority */
- ASSERT(irq < gic.lines + 32); /* Can''t route interrupts that don''t exist */
+ ASSERT(irq < gic.lines); /* Can''t route interrupt...
2023 Mar 28
0
[PATCH v4 05/11] vduse: Support set_vq_affinity callback
..._device_id[] = {
> VIRTIO_ID_BLOCK,
> @@ -708,6 +713,15 @@ static u32 vduse_vdpa_get_generation(struct vdpa_device *vdpa)
> return dev->generation;
> }
>
> +static int vduse_vdpa_set_vq_affinity(struct vdpa_device *vdpa, u16 idx,
> + const struct cpumask *cpu_mask)
> +{
> + struct vduse_dev *dev = vdpa_to_vduse(vdpa);
> +
> + cpumask_copy(&dev->vqs[idx]->irq_affinity, cpu_mask);
> + return 0;
> +}
> +
> static int vduse_vdpa_set_map(struct vdpa_device *vdpa,
> unsigned int asid,
> struct vhost_iotlb *iotl...
2023 Mar 16
0
[PATCH v3 03/11] vdpa: Add set_irq_affinity callback in vdpa_config_ops
...> * @set_group_asid: Set address space identifier for a
> * virtqueue group (optional)
> * @vdev: vdpa device
> @@ -353,6 +360,8 @@ struct vdpa_config_ops {
> const struct cpumask *cpu_mask);
> const struct cpumask *(*get_vq_affinity)(struct vdpa_device *vdev,
> u16 idx);
> + void (*set_irq_affinity)(struct vdpa_device *vdev,
> + struct irq_affinity *desc);
>
> /* DM...
2013 Jul 09
1
[PATCH V3] xen: arm: introduce Cortex-A7 support
...d __dummy__(void)
DEFINE(CPUINFO_sizeof, sizeof(struct cpu_info));
OFFSET(VCPU_arch_saved_context, struct vcpu, arch.saved_context);
+
+ BLANK();
+ DEFINE(PROCINFO_sizeof, sizeof(struct proc_info_list));
+ OFFSET(PROCINFO_cpu_val, struct proc_info_list, cpu_val);
+ OFFSET(PROCINFO_cpu_mask, struct proc_info_list, cpu_mask);
+ OFFSET(PROCINFO_cpu_init, struct proc_info_list, cpu_init);
}
/*
diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
index 0588d54..bec64c6 100644
--- a/xen/arch/arm/arm32/head.S
+++ b/xen/arch/arm/arm32/head.S
@@ -20,6 +20,7 @@
#include &l...
2019 Oct 29
2
[RFC PATCH 0/2] virtio: allow per vq DMA domain
We used to have use a single parent for all DMA operations. This tends
to complicate the mdev based hardware virtio datapath offloading which
may not implement the control path over datapath like ctrl vq in the
case of virtio-net.
So this series tries to intorduce per DMA domain by allowing trasnport
to specify the parent device for each virtqueue. Then for the case of
virtio-mdev device, it can
2011 May 09
1
Bug#625438: [PATCH] xen: ioapic: avoid gcc 4.6 warnings about uninitialised variables
...spin_unlock_irqrestore(&ioapic_lock, flags);
+ ioapic_write_entry(apic, pin, raw, entry);
}
static void clear_IO_APIC (void)
@@ -990,11 +1011,10 @@ static void __init setup_IO_APIC_irqs(vo
SET_DEST(entry.dest.dest32, entry.dest.logical.logical_dest,
cpu_mask_to_apicid(&cfg->cpu_mask));
spin_lock_irqsave(&ioapic_lock, flags);
- io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1));
- io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0));
+ __ioapic_write_entry(apic, pin, 0, entry);...
2011 May 09
1
Bug#625438: [PATCH] xen: ioapic: avoid gcc 4.6 warnings about uninitialised variables
...spin_unlock_irqrestore(&ioapic_lock, flags);
+ ioapic_write_entry(apic, pin, raw, entry);
}
static void clear_IO_APIC (void)
@@ -990,11 +1011,10 @@ static void __init setup_IO_APIC_irqs(vo
SET_DEST(entry.dest.dest32, entry.dest.logical.logical_dest,
cpu_mask_to_apicid(&cfg->cpu_mask));
spin_lock_irqsave(&ioapic_lock, flags);
- io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1));
- io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0));
+ __ioapic_write_entry(apic, pin, 0, entry);...
2011 Sep 20
0
[PATCH 4/4] x86: split MSI IRQ chip
...i_compose_msg(int irq, struct msi_msg *msg)
+void msi_compose_msg(struct irq_desc *desc, struct msi_msg *msg)
{
unsigned dest;
cpumask_t domain;
- struct irq_cfg *cfg = irq_cfg(irq);
+ struct irq_cfg *cfg = desc->chip_data;
int vector = cfg->vector;
domain = cfg->cpu_mask;
@@ -205,19 +205,6 @@ static void read_msi_msg(struct msi_desc
iommu_read_msi_from_ire(entry, msg);
}
-static int set_irq_msi(struct msi_desc *entry)
-{
- if ( entry->irq >= nr_irqs )
- {
- dprintk(XENLOG_ERR, "Trying to install msi data for irq %d\n",
-...
2007 Apr 18
2
refactoring io_apic.c
...(pin = 0; pin < nr_ioapic_registers[apic]; pin++)
- clear_IO_APIC_pin(apic, pin);
-}
-
-static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask)
-{
- unsigned long flags;
- int pin;
- struct irq_pin_list *entry = irq_2_pin + irq;
- unsigned int apicid_value;
-
- apicid_value = cpu_mask_to_apicid(cpumask);
- /* Prepare to do the io_apic_write */
- apicid_value = apicid_value << 24;
- spin_lock_irqsave(&ioapic_lock, flags);
- for (;;) {
- pin = entry->pin;
- if (pin == -1)
- break;
- io_apic_write(entry->apic, 0x10 + 1 + pin*2, apicid_value);
- if (!entry->...
2007 Apr 18
2
refactoring io_apic.c
...(pin = 0; pin < nr_ioapic_registers[apic]; pin++)
- clear_IO_APIC_pin(apic, pin);
-}
-
-static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask)
-{
- unsigned long flags;
- int pin;
- struct irq_pin_list *entry = irq_2_pin + irq;
- unsigned int apicid_value;
-
- apicid_value = cpu_mask_to_apicid(cpumask);
- /* Prepare to do the io_apic_write */
- apicid_value = apicid_value << 24;
- spin_lock_irqsave(&ioapic_lock, flags);
- for (;;) {
- pin = entry->pin;
- if (pin == -1)
- break;
- io_apic_write(entry->apic, 0x10 + 1 + pin*2, apicid_value);
- if (!entry->...
2007 Apr 18
17
[patch 00/17] paravirt_ops updates
Hi Andi,
This series of patches updates paravirt_ops in various ways. Some of the
changes are plain cleanups and improvements, and some add some interfaces
necessary for Xen.
The brief overview:
add-MAINTAINERS.patch - obvious
remove-CONFIG_DEBUG_PARAVIRT.patch - no longer needed
paravirt-nop.patch - mark nop operations consistently
paravirt-pte-accessors.patch - operations to pack/unpack
2007 Apr 18
17
[patch 00/17] paravirt_ops updates
Hi Andi,
This series of patches updates paravirt_ops in various ways. Some of the
changes are plain cleanups and improvements, and some add some interfaces
necessary for Xen.
The brief overview:
add-MAINTAINERS.patch - obvious
remove-CONFIG_DEBUG_PARAVIRT.patch - no longer needed
paravirt-nop.patch - mark nop operations consistently
paravirt-pte-accessors.patch - operations to pack/unpack
2019 Mar 13
2
virtio-blk: should num_vqs be limited by num_possible_cpus()?
...tional).
* @get_vq_affinity: get the affinity for a virtqueue (optional).
+ * @calc_num_vqs: calculate the number of virtqueue (optional)
*/
typedef void vq_callback_t(struct virtqueue *);
struct virtio_config_ops {
@@ -88,6 +89,7 @@ struct virtio_config_ops {
const struct cpumask *cpu_mask);
const struct cpumask *(*get_vq_affinity)(struct virtio_device *vdev,
int index);
+ unsigned short (*calc_num_vqs)(unsigned short num_vqs);
};
/* If driver didn't advertise the feature, it will never appear. */
@@ -207,6 +209,15 @@ int virtio_find_vqs_ctx(struct virtio_device *vdev,
u...
2019 Mar 13
2
virtio-blk: should num_vqs be limited by num_possible_cpus()?
...tional).
* @get_vq_affinity: get the affinity for a virtqueue (optional).
+ * @calc_num_vqs: calculate the number of virtqueue (optional)
*/
typedef void vq_callback_t(struct virtqueue *);
struct virtio_config_ops {
@@ -88,6 +89,7 @@ struct virtio_config_ops {
const struct cpumask *cpu_mask);
const struct cpumask *(*get_vq_affinity)(struct virtio_device *vdev,
int index);
+ unsigned short (*calc_num_vqs)(unsigned short num_vqs);
};
/* If driver didn't advertise the feature, it will never appear. */
@@ -207,6 +209,15 @@ int virtio_find_vqs_ctx(struct virtio_device *vdev,
u...