summaryrefslogtreecommitdiffstats
path: root/mcp/scripts/virsh_net/net_public.xml.j2
blob: a9e8349f43298fcc2d4e834b7658f92680427c76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!--
 Copyright (c) 2018 Mirantis Inc., Enea AB and others.

 All rights reserved. This program and the accompanying materials
 are made available under the terms of the Apache License, Version 2.0
 which accompanies this distribution, and is available at
 http://www.apache.org/licenses/LICENSE-2.0
-->
{%- import 'net_map.j2' as nm with context %}
<network>
  <name>public</name>
  <bridge name="public"/>
{%- if nm.cluster.has_virtual_nodes %}
{#- Ideally, jumpserver would have a real Linux bridge we will hook to.
    In case it doesn't, we use this virsh network as a *mock* public.
    The *mock* public should NOT overlap with the real public in any way. #}
  <forward mode="nat"/>
  <ip address="{{ nm.net_public | ipnet_hostmin }}" netmask="{{ nm.net_public | ipnet_netmask }}"/>
{%- endif %}
</network>
class="cm"> * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * This header file contains the interface of the interrupt remapping code to * the x86 interrupt management code. */ #ifndef __X86_IRQ_REMAPPING_H #define __X86_IRQ_REMAPPING_H #include <asm/irqdomain.h> #include <asm/hw_irq.h> #include <asm/io_apic.h> struct msi_msg; struct irq_alloc_info; enum irq_remap_cap { IRQ_POSTING_CAP = 0, }; struct vcpu_data { u64 pi_desc_addr; /* Physical address of PI Descriptor */ u32 vector; /* Guest vector of the interrupt */ }; #ifdef CONFIG_IRQ_REMAP extern bool irq_remapping_cap(enum irq_remap_cap cap); extern void set_irq_remapping_broken(void); extern int irq_remapping_prepare(void); extern int irq_remapping_enable(void); extern void irq_remapping_disable(void); extern int irq_remapping_reenable(int); extern int irq_remap_enable_fault_handling(void); extern void panic_if_irq_remap(const char *msg); extern struct irq_domain * irq_remapping_get_ir_irq_domain(struct irq_alloc_info *info); extern struct irq_domain * irq_remapping_get_irq_domain(struct irq_alloc_info *info); /* Create PCI MSI/MSIx irqdomain, use @parent as the parent irqdomain. */ extern struct irq_domain *arch_create_msi_irq_domain(struct irq_domain *parent); /* Get parent irqdomain for interrupt remapping irqdomain */ static inline struct irq_domain *arch_get_ir_parent_domain(void) { return x86_vector_domain; } #else /* CONFIG_IRQ_REMAP */ static inline bool irq_remapping_cap(enum irq_remap_cap cap) { return 0; } static inline void set_irq_remapping_broken(void) { } static inline int irq_remapping_prepare(void) { return -ENODEV; } static inline int irq_remapping_enable(void) { return -ENODEV; } static inline void irq_remapping_disable(void) { } static inline int irq_remapping_reenable(int eim) { return -ENODEV; } static inline int irq_remap_enable_fault_handling(void) { return -ENODEV; } static inline void panic_if_irq_remap(const char *msg) { } static inline struct irq_domain * irq_remapping_get_ir_irq_domain(struct irq_alloc_info *info) { return NULL; } static inline struct irq_domain * irq_remapping_get_irq_domain(struct irq_alloc_info *info) { return NULL; } #endif /* CONFIG_IRQ_REMAP */ #endif /* __X86_IRQ_REMAPPING_H */