[IA64] move evtchn_vector to shared_info

Move evtchn_vector from vcpu_info to shared_info.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
This commit is contained in:
awilliam@xenbuild.aw committed 2006-05-15 10:53:23 -06:00
1 parent c7b2d5a31b
commit 0b5ba3777d
9 files changed
+16 -34

No files matched your search

@@ -246,25 +246,14 @@ static struct irqaction evtchn_irqaction = {
.name = "xen-event-channel"
};
int evtchn_irq = 0xe9;
static int evtchn_irq = 0xe9;
void __init evtchn_init(void)
{
shared_info_t *s = HYPERVISOR_shared_info;
vcpu_info_t *vcpu_info = &s->vcpu_info[smp_processor_id()];
#if 0
int ret;
irq = assign_irq_vector(AUTO_ASSIGN);
ret = request_irq(irq, evtchn_interrupt, 0, "xen-event-channel", NULL);
if (ret < 0)
{
printk("xen-event-channel unable to get irq %d (%d)\n", irq, ret);
return;
}
#endif
register_percpu_irq(evtchn_irq, &evtchn_irqaction);
vcpu_info->arch.evtchn_vector = evtchn_irq;
s->arch.evtchn_vector = evtchn_irq;
printk("xen-event-channel using irq %d\n", evtchn_irq);
spin_lock_init(&irq_mapping_update_lock);
@@ -247,7 +247,7 @@ GLOBAL_ENTRY(xen_set_kr)
XEN_RESTORE_PSR_IC
;;
br.ret.sptk.many rp
END(xen_set_rr)
END(xen_set_kr)
GLOBAL_ENTRY(xen_fc)
movl r8=running_on_xen;;
+1 -1
View File
@@ -723,7 +723,7 @@ int xc_hvm_build(int xc_handle,
ctxt->flags = VGCF_VMX_GUEST;
ctxt->regs.cr_iip = 0x80000000ffffffb0UL;
ctxt->vcpu.privregs = 0;
ctxt->privregs = 0;
memset( &launch_op, 0, sizeof(launch_op) );
+1 -1
View File
@@ -1114,7 +1114,7 @@ static int xc_linux_build_internal(int xc_handle,
ctxt->regs.ar_fpsr = xc_ia64_fpsr_default();
/* currently done by hypervisor, should move here */
/* ctxt->regs.r28 = dom_fw_setup(); */
ctxt->vcpu.privregs = 0;
ctxt->privregs = 0;
ctxt->sys_pgnr = 3;
i = 0; /* silence unused variable warning */
#else /* x86 */
+4 -9
View File
@@ -269,11 +269,7 @@ fail_nomem:
void arch_getdomaininfo_ctxt(struct vcpu *v, struct vcpu_guest_context *c)
{
struct pt_regs *regs = vcpu_regs (v);
c->regs = *regs;
c->vcpu.evtchn_vector = v->vcpu_info->arch.evtchn_vector;
c->regs = *vcpu_regs (v);
c->shared = v->domain->shared_info->arch;
}
@@ -312,11 +308,10 @@ int arch_set_info_guest(struct vcpu *v, struct vcpu_guest_context *c)
}
new_thread(v, regs->cr_iip, 0, 0);
v->vcpu_info->arch.evtchn_vector = c->vcpu.evtchn_vector;
if ( c->vcpu.privregs && copy_from_user(v->arch.privregs,
c->vcpu.privregs, sizeof(mapped_regs_t))) {
if ( c->privregs && copy_from_user(v->arch.privregs,
c->privregs, sizeof(mapped_regs_t))) {
printk("Bad ctxt address in arch_set_info_guest: %p\n",
c->vcpu.privregs);
c->privregs);
return -EFAULT;
}
-3
View File
@@ -153,9 +153,6 @@ fw_hypercall_ipi (struct pt_regs *regs)
c.regs.cr_iip = targ_regs->cr_iip;
c.regs.r1 = targ_regs->r1;
/* Copy from vcpu 0. */
c.vcpu.evtchn_vector =
current->domain->vcpu[0]->vcpu_info->arch.evtchn_vector;
if (arch_set_info_guest (targ, &c) != 0) {
printf ("arch_boot_vcpu: failure\n");
return;
+2 -2
View File
@@ -682,9 +682,9 @@ UINT64 vcpu_check_pending_interrupts(VCPU *vcpu)
*/
check_start:
if (event_pending(vcpu) &&
!test_bit(vcpu->vcpu_info->arch.evtchn_vector,
!test_bit(vcpu->domain->shared_info->arch.evtchn_vector,
&PSCBX(vcpu, insvc[0])))
vcpu_pend_interrupt(vcpu, vcpu->vcpu_info->arch.evtchn_vector);
vcpu_pend_interrupt(vcpu, vcpu->domain->shared_info->arch.evtchn_vector);
p = &PSCBX(vcpu,irr[3]);
r = &PSCBX(vcpu,insvc[3]);
+1 -1
View File
@@ -29,7 +29,7 @@ static inline void evtchn_notify(struct vcpu *v)
smp_send_event_check_cpu(v->processor);
if(!VMX_DOMAIN(v))
vcpu_pend_interrupt(v, v->vcpu_info->arch.evtchn_vector);
vcpu_pend_interrupt(v, v->domain->shared_info->arch.evtchn_vector);
}
/* Note: Bitwise operations result in fast code with no branches. */
+4 -3
View File
@@ -293,8 +293,6 @@ typedef struct {
} mapped_regs_t;
typedef struct {
mapped_regs_t *privregs;
int evtchn_vector;
} arch_vcpu_info_t;
typedef mapped_regs_t vpd_t;
@@ -302,6 +300,9 @@ typedef mapped_regs_t vpd_t;
typedef struct {
unsigned int flags;
unsigned long start_info_pfn;
/* Interrupt vector for event channel. */
int evtchn_vector;
} arch_shared_info_t;
typedef struct {
@@ -321,7 +322,7 @@ typedef struct vcpu_guest_context {
unsigned long vm_assist; /* VMASST_TYPE_* bitmap, now none on IPF */
cpu_user_regs_t regs;
arch_vcpu_info_t vcpu;
mapped_regs_t *privregs;
arch_shared_info_t shared;
arch_initrd_info_t initrd;
char cmdline[IA64_COMMAND_LINE_SIZE];
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.