ia64/xen-unstable

changeset 6284:5a7efe0cf5fb

A really nasty workaround for a race.

Signed-off-by: Steven Smith, sos22@cam.ac.uk
author sos22@douglas.cl.cam.ac.uk
date Thu Aug 18 16:28:41 2005 +0000 (2005-08-18)
parents 7f9b024a509e
children 3d45fb64b064
files linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6-xen-sparse/arch/xen/i386/kernel/smp.c linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c linux-2.6-xen-sparse/arch/xen/kernel/reboot.c linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h xen/arch/x86/domain.c xen/arch/x86/mm.c xen/arch/x86/time.c xen/common/domain.c xen/common/event_channel.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c	Thu Aug 18 15:27:55 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c	Thu Aug 18 16:28:41 2005 +0000
     1.3 @@ -148,8 +148,6 @@ void cpu_idle (void)
     1.4  			rmb();
     1.5  
     1.6  			if (cpu_is_offline(cpu)) {
     1.7 -				printk("<0>Cpu %d going offline.\n",
     1.8 -				       cpu);
     1.9  				local_irq_disable();
    1.10  				/* Ack it.  From this point on until
    1.11  				   we get woken up, we're not allowed
    1.12 @@ -162,8 +160,6 @@ void cpu_idle (void)
    1.13  #endif
    1.14  				play_dead();
    1.15  				local_irq_enable();
    1.16 -				printk("<0>Cpu %d back online.\n",
    1.17 -				       cpu);
    1.18  			}
    1.19  
    1.20  			__get_cpu_var(irq_stat).idle_timestamp = jiffies;
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/smp.c	Thu Aug 18 15:27:55 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/smp.c	Thu Aug 18 16:28:41 2005 +0000
     2.3 @@ -129,8 +129,6 @@ static inline int __prepare_ICR2 (unsign
     2.4  
     2.5  DECLARE_PER_CPU(int, ipi_to_evtchn[NR_IPIS]);
     2.6  
     2.7 -unsigned uber_debug;
     2.8 -
     2.9  static inline void __send_IPI_one(unsigned int cpu, int vector)
    2.10  {
    2.11  	unsigned int evtchn;
    2.12 @@ -145,11 +143,7 @@ static inline void __send_IPI_one(unsign
    2.13  		       synch_test_bit(evtchn, &s->evtchn_mask[0]))
    2.14  			;
    2.15  #endif
    2.16 -		if (uber_debug)
    2.17 -			printk("<0>Notifying on evtchn %d.\n", evtchn);
    2.18 -		if ((r = notify_via_evtchn(evtchn)) != 0)
    2.19 -			printk("<0>Hypervisor stopped us sending an IPI: %d.\n",
    2.20 -			       r);
    2.21 +		notify_via_evtchn(evtchn);
    2.22  	} else
    2.23  		printk("send_IPI to unbound port %d/%d",
    2.24  		       cpu, vector);
    2.25 @@ -168,8 +162,6 @@ void __send_IPI_shortcut(unsigned int sh
    2.26  			if (cpu == smp_processor_id())
    2.27  				continue;
    2.28  			if (cpu_isset(cpu, cpu_online_map)) {
    2.29 -				if (uber_debug)
    2.30 -					printk("<0>Sending ipi to %d.\n", cpu);
    2.31  				__send_IPI_one(cpu, vector);
    2.32  			}
    2.33  		}
     3.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c	Thu Aug 18 15:27:55 2005 +0000
     3.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c	Thu Aug 18 16:28:41 2005 +0000
     3.3 @@ -1622,13 +1622,15 @@ DECLARE_PER_CPU(int, timer_irq);
     3.4  void _restore_vcpu(void)
     3.5  {
     3.6  	int cpu = smp_processor_id();
     3.7 +	extern atomic_t vcpus_rebooting;
     3.8 +
     3.9  	/* We are the first thing the vcpu runs when it comes back,
    3.10  	   and we are supposed to restore the IPIs and timer
    3.11  	   interrupts etc.  When we return, the vcpu's idle loop will
    3.12  	   start up again. */
    3.13 -	printk("<0>_restore_vcpu %d.\n", cpu);
    3.14  	_bind_virq_to_irq(VIRQ_TIMER, cpu, per_cpu(timer_irq, cpu));
    3.15  	_bind_virq_to_irq(VIRQ_DEBUG, cpu, per_cpu(ldebug_irq, cpu));
    3.16  	_bind_ipi_to_irq(RESCHEDULE_VECTOR, cpu, per_cpu(resched_irq, cpu) );
    3.17  	_bind_ipi_to_irq(CALL_FUNCTION_VECTOR, cpu, per_cpu(callfunc_irq, cpu) );
    3.18 +	atomic_dec(&vcpus_rebooting);
    3.19  }
     4.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c	Thu Aug 18 15:27:55 2005 +0000
     4.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c	Thu Aug 18 16:28:41 2005 +0000
     4.3 @@ -512,7 +512,6 @@ no_context:
     4.4  	printk("%08lx\n", regs->eip);
     4.5  	dump_fault_path(address);
     4.6  	die("Oops", regs, error_code);
     4.7 -	while(1);
     4.8  	bust_spinlocks(0);
     4.9  	do_exit(SIGKILL);
    4.10  
     5.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c	Thu Aug 18 15:27:55 2005 +0000
     5.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c	Thu Aug 18 16:28:41 2005 +0000
     5.3 @@ -134,8 +134,6 @@ void force_evtchn_callback(void)
     5.4      (void)HYPERVISOR_xen_version(0);
     5.5  }
     5.6  
     5.7 -extern unsigned uber_debug;
     5.8 -
     5.9  /* NB. Interrupts are disabled on entry. */
    5.10  asmlinkage void evtchn_do_upcall(struct pt_regs *regs)
    5.11  {
    5.12 @@ -147,8 +145,6 @@ asmlinkage void evtchn_do_upcall(struct 
    5.13  
    5.14      vcpu_info->evtchn_upcall_pending = 0;
    5.15      
    5.16 -    if (uber_debug && cpu != 0)
    5.17 -	printk("<0>evtchn_do_upcall on %d.\n", cpu);
    5.18      /* NB. No need for a barrier here -- XCHG is a barrier on x86. */
    5.19      l1 = xchg(&vcpu_info->evtchn_pending_sel, 0);
    5.20      while ( l1 != 0 )
    5.21 @@ -162,13 +158,9 @@ asmlinkage void evtchn_do_upcall(struct 
    5.22              l2 &= ~(1 << l2i);
    5.23              
    5.24              port = (l1i << 5) + l2i;
    5.25 -	    if (uber_debug && cpu != 0)
    5.26 -		printk("<0>Port %d.\n", port);
    5.27 -            if ( (irq = evtchn_to_irq[port]) != -1 ) {
    5.28 -		if (uber_debug && cpu != 0)
    5.29 -		    printk("<0>irq %d.\n", irq);
    5.30 +            if ( (irq = evtchn_to_irq[port]) != -1 )
    5.31                  do_IRQ(irq, regs);
    5.32 -	    } else
    5.33 +	    else
    5.34                  evtchn_device_upcall(port);
    5.35          }
    5.36      }
    5.37 @@ -286,7 +278,7 @@ void _bind_ipi_to_irq(int ipi, int vcpu,
    5.38  
    5.39      spin_unlock(&irq_mapping_update_lock);
    5.40  
    5.41 -    clear_bit(evtchn, HYPERVISOR_shared_info->evtchn_mask);
    5.42 +    clear_bit(evtchn, (unsigned long *)HYPERVISOR_shared_info->evtchn_mask);
    5.43  }
    5.44  
    5.45  void _bind_virq_to_irq(int virq, int cpu, int irq)
    5.46 @@ -314,8 +306,6 @@ void _bind_virq_to_irq(int virq, int cpu
    5.47      bind_evtchn_to_cpu(evtchn, cpu);
    5.48  
    5.49      spin_unlock(&irq_mapping_update_lock);
    5.50 -
    5.51 -    return irq;
    5.52  }
    5.53  
    5.54  int bind_ipi_to_irq(int ipi)
     6.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Thu Aug 18 15:27:55 2005 +0000
     6.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Thu Aug 18 16:28:41 2005 +0000
     6.3 @@ -73,13 +73,14 @@ static void save_vcpu_context(int vcpu, 
     6.4      BUG_ON(r != 0);
     6.5      gdt_pages = (ctxt->gdt_ents + 511) / 512;
     6.6      ctxt->ctrlreg[3] = machine_to_phys(ctxt->ctrlreg[3]);
     6.7 -    for (r = 0; r < gdt_pages; r++) {
     6.8 +    for (r = 0; r < gdt_pages; r++)
     6.9  	ctxt->gdt_frames[r] = mfn_to_pfn(ctxt->gdt_frames[r]);
    6.10 -    }
    6.11  }
    6.12  
    6.13  void _restore_vcpu(int cpu);
    6.14  
    6.15 +atomic_t vcpus_rebooting;
    6.16 +
    6.17  static void restore_vcpu_context(int vcpu, vcpu_guest_context_t *ctxt)
    6.18  {
    6.19      int r;
    6.20 @@ -88,26 +89,27 @@ static void restore_vcpu_context(int vcp
    6.21      /* This is kind of a hack, and implicitly relies on the fact that
    6.22         the vcpu stops in a place where all of the call clobbered
    6.23         registers are already dead. */
    6.24 -    printk("<0>regs.esp %x.\n", ctxt->user_regs.esp);
    6.25      ctxt->user_regs.esp -= 4;
    6.26      ((unsigned long *)ctxt->user_regs.esp)[0] = ctxt->user_regs.eip;
    6.27      ctxt->user_regs.eip = (unsigned long)_restore_vcpu;
    6.28  
    6.29      ctxt->ctrlreg[3] = phys_to_machine(ctxt->ctrlreg[3]);
    6.30 -    for (r = 0; r < gdt_pages; r++) {
    6.31 +    for (r = 0; r < gdt_pages; r++)
    6.32  	ctxt->gdt_frames[r] = pfn_to_mfn(ctxt->gdt_frames[r]);
    6.33 -    }
    6.34 +    atomic_set(&vcpus_rebooting, 1);
    6.35      r = HYPERVISOR_boot_vcpu(vcpu, ctxt);
    6.36      if (r != 0) {
    6.37  	printk(KERN_EMERG "Failed to reboot vcpu %d (%d)\n", vcpu, r);
    6.38  	return;
    6.39      }
    6.40 +    /* Hmm... slight hack: make sure the cpus come up in order,
    6.41 +       because that way they get the same evtchn numbers this time as
    6.42 +       they did last time, which works around a few bugs. */
    6.43 +    /* XXX */
    6.44 +    while (atomic_read(&vcpus_rebooting))
    6.45 +	barrier();
    6.46  }
    6.47  
    6.48 -/* Whoever decided that printk should call into the scheduler needs to
    6.49 -   be taken out and shot */
    6.50 -#define msg(x) HYPERVISOR_console_io(CONSOLEIO_write, sizeof(x), x)
    6.51 -
    6.52  extern unsigned uber_debug;
    6.53  
    6.54  static int __do_suspend(void *ignore)
    6.55 @@ -223,9 +225,7 @@ static int __do_suspend(void *ignore)
    6.56      smp_suspend();
    6.57  #endif
    6.58  
    6.59 -    msg("xenbus going down.\n");
    6.60      xenbus_suspend();
    6.61 -    msg("xenbus gone down.\n");
    6.62  
    6.63      ctrl_if_suspend();
    6.64  
    6.65 @@ -239,11 +239,9 @@ static int __do_suspend(void *ignore)
    6.66      memcpy(&suspend_record->resume_info, &xen_start_info,
    6.67             sizeof(xen_start_info));
    6.68  
    6.69 -    msg("Suspending...\n");
    6.70      /* We'll stop somewhere inside this hypercall.  When it returns,
    6.71         we'll start resuming after the restore. */
    6.72      HYPERVISOR_suspend(virt_to_machine(suspend_record) >> PAGE_SHIFT);
    6.73 -    msg("Back from suspension\n");
    6.74  
    6.75      shutting_down = SHUTDOWN_INVALID; 
    6.76  
    6.77 @@ -270,9 +268,7 @@ static int __do_suspend(void *ignore)
    6.78  
    6.79      ctrl_if_resume();
    6.80  
    6.81 -    msg("Here comes the xenbus...\n");
    6.82      xenbus_resume();
    6.83 -    msg("xenbus resumed.\n");
    6.84  
    6.85  #ifdef CONFIG_SMP
    6.86      smp_resume();
    6.87 @@ -286,32 +282,26 @@ static int __do_suspend(void *ignore)
    6.88  
    6.89      usbif_resume();
    6.90  
    6.91 -    msg("Restoring cpu contexts...\n");
    6.92      for (i = 0; i < NR_CPUS; i++)
    6.93  	if (cpu_isset(i, feasible_cpus))
    6.94  	    restore_vcpu_context(i, &suspended_cpu_records[i]);
    6.95 -    msg("All vcpus rebooted.\n");
    6.96  
    6.97 +    printk("<0>All cpus rebooted...\n");
    6.98      __sti();
    6.99  
   6.100   out_reenable_cpus:
   6.101 -    msg("Reenabling cpus.\n");
   6.102      while (!cpus_empty(feasible_cpus)) {
   6.103  	i = first_cpu(feasible_cpus);
   6.104 -	printk("<0>Bring up %d/%d.\n", i, num_online_cpus());
   6.105 -	printk("<0>17 preempt_count %x.\n", preempt_count());
   6.106 +	printk("<0>Bring %d up.\n", i);
   6.107  	j = cpu_up(i);
   6.108 -	printk("<0>18 preempt_count %x.\n", preempt_count());
   6.109 +	printk("<0>cpu_up(%d) -> %d.\n", i, j);
   6.110  	if (j != 0) {
   6.111  	    printk(KERN_CRIT "Failed to bring cpu %d back up (%d).\n",
   6.112  		   i, j);
   6.113  	    err = j;
   6.114  	}
   6.115 -	printk("<0>%d up.\n", i);
   6.116  	cpu_clear(i, feasible_cpus);
   6.117      }
   6.118 -    msg("Reenabled cpus.\n");
   6.119 -    uber_debug = 0;
   6.120  
   6.121   out:
   6.122      if ( suspend_record != NULL )
     7.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h	Thu Aug 18 15:27:55 2005 +0000
     7.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h	Thu Aug 18 16:28:41 2005 +0000
     7.3 @@ -529,6 +529,9 @@ HYPERVISOR_vcpu_down(
     7.4  {
     7.5      int ret;
     7.6      unsigned long ign1;
     7.7 +    /* Yes, I really do want to clobber edx here: when we resume a
     7.8 +       vcpu after unpickling a multi-processor domain, it returns
     7.9 +       here, but clobbers all of the call clobbered registers. */
    7.10      __asm__ __volatile__ (
    7.11          TRAP_INSTR
    7.12          : "=a" (ret), "=b" (ign1)
     8.1 --- a/xen/arch/x86/domain.c	Thu Aug 18 15:27:55 2005 +0000
     8.2 +++ b/xen/arch/x86/domain.c	Thu Aug 18 16:28:41 2005 +0000
     8.3 @@ -410,10 +410,8 @@ int arch_set_info_guest(
     8.4      if ( !(c->flags & VGCF_VMX_GUEST) )
     8.5      {
     8.6          if ( ((c->user_regs.cs & 3) == 0) ||
     8.7 -             ((c->user_regs.ss & 3) == 0) ) {
     8.8 -            printf("User regs.cs %x, ss %x.\n", c->user_regs.cs, c->user_regs.ss);
     8.9 +             ((c->user_regs.ss & 3) == 0) )
    8.10              return -EINVAL;
    8.11 -        }
    8.12      }
    8.13  
    8.14      clear_bit(_VCPUF_fpu_initialised, &v->vcpu_flags);
    8.15 @@ -458,10 +456,8 @@ int arch_set_info_guest(
    8.16  
    8.17      if ( shadow_mode_refcounts(d) )
    8.18      {
    8.19 -        if ( !get_page(&frame_table[phys_basetab>>PAGE_SHIFT], d) ) {
    8.20 -            printf("Bad phys_basetab %lx.\n", phys_basetab);
    8.21 +        if ( !get_page(&frame_table[phys_basetab>>PAGE_SHIFT], d) )
    8.22              return -EINVAL;
    8.23 -        }
    8.24      }
    8.25      else
    8.26      {
    8.27 @@ -469,16 +465,13 @@ int arch_set_info_guest(
    8.28          if ( !(c->flags & VGCF_VMX_GUEST) )
    8.29  #endif
    8.30              if ( !get_page_and_type(&frame_table[phys_basetab>>PAGE_SHIFT], d, 
    8.31 -                                    PGT_base_page_table) ) {
    8.32 -                printf("Bad phys_basetab2 %lx.\n", phys_basetab);
    8.33 +                                    PGT_base_page_table) )
    8.34                  return -EINVAL;
    8.35 -            }
    8.36      }
    8.37  
    8.38      if ( (rc = (int)set_gdt(v, c->gdt_frames, c->gdt_ents)) != 0 )
    8.39      {
    8.40          put_page_and_type(&frame_table[phys_basetab>>PAGE_SHIFT]);
    8.41 -        printf("Failed to set gdt, %d.\n", rc);
    8.42          return rc;
    8.43      }
    8.44  
    8.45 @@ -500,8 +493,6 @@ int arch_set_info_guest(
    8.46      /* Don't redo final setup */
    8.47      set_bit(_VCPUF_initialised, &v->vcpu_flags);
    8.48  
    8.49 -    printf("Arch set_info_guest succeeded.\n");
    8.50 -
    8.51      return 0;
    8.52  }
    8.53  
     9.1 --- a/xen/arch/x86/mm.c	Thu Aug 18 15:27:55 2005 +0000
     9.2 +++ b/xen/arch/x86/mm.c	Thu Aug 18 16:28:41 2005 +0000
     9.3 @@ -2631,24 +2631,17 @@ long set_gdt(struct vcpu *v,
     9.4      int i, nr_pages = (entries + 511) / 512;
     9.5      unsigned long pfn;
     9.6  
     9.7 -    if ( entries > FIRST_RESERVED_GDT_ENTRY ) {
     9.8 -        printf("Too many entries in gdt (%d).\n", entries);
     9.9 +    if ( entries > FIRST_RESERVED_GDT_ENTRY )
    9.10          return -EINVAL;
    9.11 -    }
    9.12 -    
    9.13 +
    9.14      shadow_sync_all(d);
    9.15  
    9.16      /* Check the pages in the new GDT. */
    9.17      for ( i = 0; i < nr_pages; i++ ) {
    9.18          pfn = frames[i];
    9.19 -        if (pfn >= max_page) {
    9.20 -            printf("GDT bad as %ld >= %ld.\n", pfn, max_page);
    9.21 +        if ((pfn >= max_page) ||
    9.22 +            !get_page_and_type(&frame_table[pfn], d, PGT_gdt_page) )
    9.23              goto fail;
    9.24 -        }
    9.25 -        if (!get_page_and_type(&frame_table[pfn], d, PGT_gdt_page) ) {
    9.26 -            printf("Frame %ld looks bad.\n", pfn);
    9.27 -            goto fail;
    9.28 -        }
    9.29      }
    9.30  
    9.31      /* Tear down the old GDT. */
    10.1 --- a/xen/arch/x86/time.c	Thu Aug 18 15:27:55 2005 +0000
    10.2 +++ b/xen/arch/x86/time.c	Thu Aug 18 16:28:41 2005 +0000
    10.3 @@ -831,7 +831,7 @@ static void local_time_calibration(void 
    10.4      tsc_elapsed32 = (u32)tsc_elapsed64;
    10.5  
    10.6      /* tsc_elapsed > stime_elapsed */
    10.7 -    //    ASSERT(tsc_elapsed32 != 0);
    10.8 +    ASSERT(tsc_elapsed32 != 0);
    10.9      while ( tsc_elapsed32 <= stime_elapsed32 )
   10.10      {
   10.11          tsc_elapsed32 <<= 1;
    11.1 --- a/xen/common/domain.c	Thu Aug 18 15:27:55 2005 +0000
    11.2 +++ b/xen/common/domain.c	Thu Aug 18 16:28:41 2005 +0000
    11.3 @@ -178,7 +178,6 @@ void domain_shutdown(u8 reason)
    11.4  {
    11.5      struct domain *d = current->domain;
    11.6      struct vcpu *v;
    11.7 -    int cntr;
    11.8  
    11.9      if ( d->domain_id == 0 )
   11.10      {
   11.11 @@ -209,17 +208,8 @@ void domain_shutdown(u8 reason)
   11.12      }
   11.13  
   11.14      /* Put every vcpu to sleep, but don't wait (avoids inter-vcpu deadlock). */
   11.15 -    cntr = 0;
   11.16 -    printf("Putting %d to sleep.\n", d->domain_id);
   11.17 -    for_each_vcpu ( d, v ) {
   11.18 -        if (test_bit(_VCPUF_down, &v->vcpu_flags)) {
   11.19 -            printf("vcpu %d is down.\n", v->vcpu_id);
   11.20 -        } else {
   11.21 -            printf("vcpu %d is up.\n", v->vcpu_id);
   11.22 -        }
   11.23 +    for_each_vcpu ( d, v )
   11.24          domain_sleep_nosync(v);
   11.25 -    }
   11.26 -    printf("Put %d vcpus to sleep for domain shutdown.\n", cntr);
   11.27  }
   11.28  
   11.29  
    12.1 --- a/xen/common/event_channel.c	Thu Aug 18 15:27:55 2005 +0000
    12.2 +++ b/xen/common/event_channel.c	Thu Aug 18 16:28:41 2005 +0000
    12.3 @@ -292,8 +292,6 @@ static long evtchn_bind_ipi(evtchn_bind_
    12.4          chn = evtchn_from_port(d, port);
    12.5          chn->state          = ECS_IPI;
    12.6          chn->notify_vcpu_id = current->vcpu_id;
    12.7 -        printf("Bound ipi on vcpu %d to port %d.\n", current->vcpu_id,
    12.8 -               port);
    12.9      }
   12.10  
   12.11      spin_unlock(&d->evtchn_lock);
   12.12 @@ -499,24 +497,9 @@ long evtchn_send(int lport)
   12.13          evtchn_set_pending(rd->vcpu[rchn->notify_vcpu_id], rport);
   12.14          break;
   12.15      case ECS_IPI:
   12.16 -        if (current->domain->domain_id != 0) {
   12.17 -            printf("Set %d pending on %d.\n", lport,
   12.18 -                   lchn->notify_vcpu_id);
   12.19 -            if (lport == 7) {
   12.20 -                struct vcpu *v = ld->vcpu[lchn->notify_vcpu_id];
   12.21 -                struct domain *d = v->domain;
   12.22 -                shared_info_t *s = d->shared_info;
   12.23 -                printf("pending %x, mask %x, pending_sel %x, upcall_pending %x.\n",
   12.24 -                       s->evtchn_pending[0],
   12.25 -                       s->evtchn_mask[0],
   12.26 -                       v->vcpu_info->evtchn_pending_sel,
   12.27 -                       v->vcpu_info->evtchn_upcall_pending);
   12.28 -            }
   12.29 -        }
   12.30          evtchn_set_pending(ld->vcpu[lchn->notify_vcpu_id], lport);
   12.31          break;
   12.32      default:
   12.33 -        printf("Failed to set %d pending: state %d.\n", lport, lchn->state);
   12.34          ret = -EINVAL;
   12.35      }
   12.36