Displaying 20 results from an estimated 85 matches for "set_intr_g".
2020 Jul 14
0
[PATCH v4 28/75] x86/idt: Split idt_data setup out of set_intr_gate()
From: Joerg Roedel <jroedel at suse.de>
The code to setup idt_data is needed for early exception handling, but
set_intr_gate() can't be used that early because it has pv-ops in its
code path, which don't work that early.
Split out the idt_data initialization part from set_intr_gate() so
that it can be used separatly.
Signed-off-by: Joerg Roedel <jroedel at suse.de>
---
arch/x86/kernel/idt.c | 22 +++++...
2020 Aug 24
0
[PATCH v6 29/76] x86/idt: Split idt_data setup out of set_intr_gate()
From: Joerg Roedel <jroedel at suse.de>
The code to setup idt_data is needed for early exception handling, but
set_intr_gate() can't be used that early because it has pv-ops in its
code path, which don't work that early.
Split out the idt_data initialization part from set_intr_gate() so
that it can be used separatly.
Signed-off-by: Joerg Roedel <jroedel at suse.de>
Reviewed-by: Kees Cook <keescook a...
2011 Sep 07
10
[PATCH] IRQ: Group IRQ_MOVE_CLEANUP_VECTOR with other hypervisor IPIs
...iff -r 0268e7380953 -r c7884dbb6f7d xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c Mon Sep 05 15:10:28 2011 +0100
+++ b/xen/arch/x86/smpboot.c Wed Sep 07 16:00:55 2011 +0100
@@ -1027,7 +1027,7 @@ void __init smp_intr_init(void)
}
/* IPI for cleanuping vectors after irq move */
- set_intr_gate(IRQ_MOVE_CLEANUP_VECTOR, irq_move_cleanup_interrupt);
+ set_intr_gate(MOVE_CLEANUP_VECTOR, irq_move_cleanup_interrupt);
/* IPI for event checking. */
set_intr_gate(EVENT_CHECK_VECTOR, event_check_interrupt);
diff -r 0268e7380953 -r c7884dbb6f7d xen/include/asm-x86/mach-default/irq...
2012 Mar 23
7
LWP Interrupt Handler
...cify an interrupt vector in LWP_CFG MSR; the interrupt will be
triggered when event buffer overflows. For HVM guests, I want to
re-inject this interrupt back into the guest VM. Here is one idea
similar to virtualized PMU: It first registers a special interrupt
handler (say on vector 0xf6) using set_intr_gate(). When triggered, this
handler injects an IRQ (with vector copied from LWP_CFG) into guest VM
via virtual local APIC. This worked from my test.
But adding a interrupt handler seems to be an overkill. Is there any
better way to create a dummy interrupt receiver on be-behalf of guest
VMs? I...
2020 Aug 29
1
[PATCH v6 36/76] x86/head/64: Load IDT earlier
On Mon, Aug 24, 2020 at 10:54:31AM +0200, Joerg Roedel wrote:
> @@ -385,3 +386,25 @@ void __init alloc_intr_gate(unsigned int n, const void *addr)
> if (!WARN_ON(test_and_set_bit(n, system_vectors)))
> set_intr_gate(n, addr);
> }
> +
> +void __init early_idt_setup_early_handler(unsigned long physaddr)
I wonder if you could drop one of the "early"es:
idt_setup_early_handler()
for example looks ok to me. Or
early_setup_idt_handler()
if you wanna have "early" as prefix...
--...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...(dpl<<13)+(type<<8))), \
- "3" ((char *) (addr)),"2" ((seg) << 16)); \
-} while (0)
-
-
/*
* This needs to use 'idt_table' rather than 'idt', and
* thus use the _nonmapped_ version of the IDT, as the
@@ -1065,7 +1051,7 @@ do { \
*/
void set_intr_gate(unsigned int n, void *addr)
{
- _set_gate(idt_table+n,14,0,addr,__KERNEL_CS);
+ _set_gate(n, DESCTYPE_INT, addr, __KERNEL_CS);
}
/*
@@ -1073,22 +1059,22 @@ void set_intr_gate(unsigned int n, void
*/
static inline void set_system_intr_gate(unsigned int n, void *addr)
{
- _set_gate(idt_t...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...(dpl<<13)+(type<<8))), \
- "3" ((char *) (addr)),"2" ((seg) << 16)); \
-} while (0)
-
-
/*
* This needs to use 'idt_table' rather than 'idt', and
* thus use the _nonmapped_ version of the IDT, as the
@@ -1065,7 +1051,7 @@ do { \
*/
void set_intr_gate(unsigned int n, void *addr)
{
- _set_gate(idt_table+n,14,0,addr,__KERNEL_CS);
+ _set_gate(n, DESCTYPE_INT, addr, __KERNEL_CS);
}
/*
@@ -1073,22 +1059,22 @@ void set_intr_gate(unsigned int n, void
*/
static inline void set_system_intr_gate(unsigned int n, void *addr)
{
- _set_gate(idt_t...
2007 Apr 18
0
[PATCH 7/9] Fix nohz compile.patch
...struct
ts->tv_sec = wallclock;
}
-static void update_xtime_from_wallclock(void)
-{
- struct timespec ts;
- vmi_get_wallclock_ts(&ts);
- do_settimeofday(&ts);
-}
-
unsigned long vmi_get_wallclock(void)
{
struct timespec ts;
@@ -197,18 +190,10 @@ void __init vmi_time_init(void)
set_intr_gate(LOCAL_TIMER_VECTOR, apic_vmi_timer_interrupt);
#endif
- no_sync_cmos_clock = 1;
-
- vmi_get_wallclock_ts(&xtime);
- set_normalized_timespec(&wall_to_monotonic,
- -xtime.tv_sec, -xtime.tv_nsec);
-
real_cycles_accounted_system = read_real_cycles();
- update_xtime_from_wallclock();...
2007 Apr 18
0
[PATCH 5/12] desc-cleanup
...e_idt(dtr) asm ("sidtl %0":"=m" (*dtr))
+#define store_tr(tr) asm ("str %0":"=mr" (tr))
+#define store_ldt(ldt) asm ("sldt %0":"=mr" (ldt))
/*
* This is the ldt that every process will get unless we need
@@ -52,7 +52,7 @@
extern void set_intr_gate(unsigned int irq, void * addr);
#define _set_tssldt_desc(n,addr,limit,type) \
-__asm__ __volatile__ ("movw %w3,0(%2)\n\t" \
+asm volatile ("movw %w3,0(%2)\n\t" \
"movw %w1,2(%2)\n\t" \
"rorl $16,%1\n\t" \
"movb %b1,4(%2)\n\t" \
2007 Apr 18
0
[PATCH 6/12] early-clobber-tss
...=================================================================
--- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 15:41:11.000000000 -0700
+++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 15:47:01.000000000 -0700
@@ -51,17 +51,21 @@
extern struct desc_struct default_ldt[];
extern void set_intr_gate(unsigned int irq, void * addr);
-#define _set_tssldt_desc(n,addr,limit,type) \
-asm volatile ("movw %w3,0(%2)\n\t" \
- "movw %w1,2(%2)\n\t" \
- "rorl $16,%1\n\t" \
- "movb %b1,4(%2)\n\t" \
- "movb %4,5(%2)\n\t" \
- "movb $0,6(%2)\n\t"...
2007 Apr 18
1
[PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
...=================================================================
--- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-09 18:59:10.000000000 -0700
+++ linux-2.6.13/include/asm-i386/desc.h 2005-08-10 20:42:20.000000000 -0700
@@ -34,17 +34,21 @@
extern struct desc_struct default_ldt[];
extern void set_intr_gate(unsigned int irq, void * addr);
-#define _set_tssldt_desc(n,addr,limit,type) \
-__asm__ __volatile__ ("movw %w3,0(%2)\n\t" \
- "movw %w1,2(%2)\n\t" \
- "rorl $16,%1\n\t" \
- "movb %b1,4(%2)\n\t" \
- "movb %4,5(%2)\n\t" \
- "movb $0,6(%2)\n...
2007 Apr 18
0
[PATCH 5/12] desc-cleanup
...e_idt(dtr) asm ("sidtl %0":"=m" (*dtr))
+#define store_tr(tr) asm ("str %0":"=mr" (tr))
+#define store_ldt(ldt) asm ("sldt %0":"=mr" (ldt))
/*
* This is the ldt that every process will get unless we need
@@ -52,7 +52,7 @@
extern void set_intr_gate(unsigned int irq, void * addr);
#define _set_tssldt_desc(n,addr,limit,type) \
-__asm__ __volatile__ ("movw %w3,0(%2)\n\t" \
+asm volatile ("movw %w3,0(%2)\n\t" \
"movw %w1,2(%2)\n\t" \
"rorl $16,%1\n\t" \
"movb %b1,4(%2)\n\t" \
2007 Apr 18
0
[PATCH 6/12] early-clobber-tss
...=================================================================
--- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 15:41:11.000000000 -0700
+++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 15:47:01.000000000 -0700
@@ -51,17 +51,21 @@
extern struct desc_struct default_ldt[];
extern void set_intr_gate(unsigned int irq, void * addr);
-#define _set_tssldt_desc(n,addr,limit,type) \
-asm volatile ("movw %w3,0(%2)\n\t" \
- "movw %w1,2(%2)\n\t" \
- "rorl $16,%1\n\t" \
- "movb %b1,4(%2)\n\t" \
- "movb %4,5(%2)\n\t" \
- "movb $0,6(%2)\n\t"...
2007 Apr 18
1
[PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
...=================================================================
--- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-09 18:59:10.000000000 -0700
+++ linux-2.6.13/include/asm-i386/desc.h 2005-08-10 20:42:20.000000000 -0700
@@ -34,17 +34,21 @@
extern struct desc_struct default_ldt[];
extern void set_intr_gate(unsigned int irq, void * addr);
-#define _set_tssldt_desc(n,addr,limit,type) \
-__asm__ __volatile__ ("movw %w3,0(%2)\n\t" \
- "movw %w1,2(%2)\n\t" \
- "rorl $16,%1\n\t" \
- "movb %b1,4(%2)\n\t" \
- "movb %4,5(%2)\n\t" \
- "movb $0,6(%2)\n...
2007 Apr 18
0
[PATCH 7/9] Fix nohz compile.patch
...struct
ts->tv_sec = wallclock;
}
-static void update_xtime_from_wallclock(void)
-{
- struct timespec ts;
- vmi_get_wallclock_ts(&ts);
- do_settimeofday(&ts);
-}
-
unsigned long vmi_get_wallclock(void)
{
struct timespec ts;
@@ -197,18 +190,10 @@ void __init vmi_time_init(void)
set_intr_gate(LOCAL_TIMER_VECTOR, apic_vmi_timer_interrupt);
#endif
- no_sync_cmos_clock = 1;
-
- vmi_get_wallclock_ts(&xtime);
- set_normalized_timespec(&wall_to_monotonic,
- -xtime.tv_sec, -xtime.tv_nsec);
-
real_cycles_accounted_system = read_real_cycles();
- update_xtime_from_wallclock();...
2007 Apr 18
3
[PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops
(Andrew, please sit these in the -mm tree for cooking)
Create a paravirt.h header for (almost) all the critical operations
which need to be replaced with hypervisor calls.
For the moment, this simply includes no_paravirt.h, where all the
native implementations now live.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Zachary Amsden <zach@vmware.com>
2007 Apr 18
3
[PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops
(Andrew, please sit these in the -mm tree for cooking)
Create a paravirt.h header for (almost) all the critical operations
which need to be replaced with hypervisor calls.
For the moment, this simply includes no_paravirt.h, where all the
native implementations now live.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Zachary Amsden <zach@vmware.com>
2020 Aug 24
0
[PATCH v6 36/76] x86/head/64: Load IDT earlier
...nclude <asm/proto.h>
#include <asm/desc.h>
#include <asm/hw_irq.h>
+#include <asm/setup.h>
struct idt_data {
unsigned int vector;
@@ -385,3 +386,25 @@ void __init alloc_intr_gate(unsigned int n, const void *addr)
if (!WARN_ON(test_and_set_bit(n, system_vectors)))
set_intr_gate(n, addr);
}
+
+void __init early_idt_setup_early_handler(unsigned long physaddr)
+{
+ gate_desc *idt;
+ int i;
+
+ idt = fixup_pointer(idt_table, physaddr);
+
+ for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) {
+ struct idt_data data;
+ gate_desc desc;
+
+ init_idt_data(&data, i, early_id...
2020 Jul 14
0
[PATCH v4 29/75] x86/idt: Move two function from k/idt.c to i/a/desc.h
...t_data(struct idt_data *data, unsigned int n,
- const void *addr)
-{
- BUG_ON(n > 0xFF);
-
- memset(data, 0, sizeof(*data));
- data->vector = n;
- data->addr = addr;
- data->segment = __KERNEL_CS;
- data->bits.type = GATE_INTERRUPT;
- data->bits.p = 1;
-}
-
static __init void set_intr_gate(unsigned int n, const void *addr)
{
struct idt_data data;
--
2.27.0
2007 Apr 18
0
[PATCH 2/5] Interrupts subarch cleanup.patch
...t native_init_IRQ(void)
{
int i;
- /* all the set up before the call gates are initialised */
- pre_intr_init_hook();
-
/*
* Cover the whole vector space, no vector can escape
* us. (some of these will be overridden and become
@@ -398,10 +406,16 @@ void __init native_init_IRQ(void)
set_intr_gate(vector, interrupt[i]);
}
- /* setup after call gates are initialised (usually add in
- * the architecture specific gates)
+ /*
+ * setup after interrupt gates are initialised (usually add in
+ * the architecture specific gates) and initialize controllers
*/
intr_init_hook();
+#ifdef...