ia64/xen-unstable

changeset 13958:b0aeca575dfb

[IA64] vcpu hot-plug/remove for VTi

Return to SAL added for VTi by adding a new SAL (OEM defined) function.
Using this patch I was able to hot-add/hot-remove under linux (in fact
virtualized hot).

Signed-off-by: Tristan Gingold <tgingold@free.fr>
author awilliam@xenbuild2.aw
date Fri Feb 16 15:49:05 2007 -0700 (2007-02-16)
parents 9529d667d042
children 3fa7489f87bb
files xen/arch/ia64/vmx/vlsapic.c xen/arch/ia64/xen/fw_emul.c xen/include/asm-ia64/dom_fw.h
line diff
     1.1 --- a/xen/arch/ia64/vmx/vlsapic.c	Thu Feb 15 14:09:39 2007 -0700
     1.2 +++ b/xen/arch/ia64/vmx/vlsapic.c	Fri Feb 16 15:49:05 2007 -0700
     1.3 @@ -672,7 +672,9 @@ static void vlsapic_write_ipi(VCPU *vcpu
     1.4      if (targ == NULL)
     1.5          panic_domain(NULL, "Unknown IPI cpu\n");
     1.6  
     1.7 -    if (!test_bit(_VCPUF_initialised, &targ->vcpu_flags)) {
     1.8 +    if (!test_bit(_VCPUF_initialised, &targ->vcpu_flags) ||
     1.9 +        test_bit(_VCPUF_down, &targ->vcpu_flags)) {
    1.10 +
    1.11          struct pt_regs *targ_regs = vcpu_regs(targ);
    1.12          struct vcpu_guest_context c;
    1.13  
     2.1 --- a/xen/arch/ia64/xen/fw_emul.c	Thu Feb 15 14:09:39 2007 -0700
     2.2 +++ b/xen/arch/ia64/xen/fw_emul.c	Fri Feb 16 15:49:05 2007 -0700
     2.3 @@ -371,6 +371,10 @@ sal_emulator (long index, unsigned long 
     2.4  	    case SAL_UPDATE_PAL:
     2.5  		printk("*** CALLED SAL_UPDATE_PAL.  IGNORED...\n");
     2.6  		break;
     2.7 +	    case SAL_XEN_SAL_RETURN:
     2.8 +	        if (!test_and_set_bit(_VCPUF_down, &current->vcpu_flags))
     2.9 +			vcpu_sleep_nosync(current);
    2.10 +		break;
    2.11  	    default:
    2.12  		printk("*** CALLED SAL_ WITH UNKNOWN INDEX.  IGNORED...\n");
    2.13  		status = -1;
     3.1 --- a/xen/include/asm-ia64/dom_fw.h	Thu Feb 15 14:09:39 2007 -0700
     3.2 +++ b/xen/include/asm-ia64/dom_fw.h	Fri Feb 16 15:49:05 2007 -0700
     3.3 @@ -180,6 +180,9 @@
     3.4  
     3.5  #define EFI_MEMDESC_VERSION		1
     3.6  
     3.7 +/* Additionnal OEM SAL.  */
     3.8 +#define SAL_XEN_SAL_RETURN	0x02000000
     3.9 +
    3.10  extern struct ia64_pal_retval xen_pal_emulator(u64, u64, u64, u64);
    3.11  extern struct sal_ret_values sal_emulator (long index, unsigned long in1, unsigned long in2, unsigned long in3, unsigned long in4, unsigned long in5, unsigned long in6, unsigned long in7);
    3.12  extern struct ia64_pal_retval pal_emulator_static (unsigned long);