WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] Re: [PATCH][PVOPS] No MCA support

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: [Xen-ia64-devel] Re: [PATCH][PVOPS] No MCA support
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Tue, 18 Mar 2008 11:25:00 +0900
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 17 Mar 2008 19:25:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1205786614.7008.40.camel@lappy>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1205786614.7008.40.camel@lappy>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
Hi Alex.
Thank you very much for those unexpected patches.
I'm very glad to see those and applied your other patches.


Yes, MCA is for dom0. however "cat /proc/sal/*/data" triggers
those code paths.
So presumably we have to replace some functions with nop operations
for domU. Or domU issues a sal hypercall with bad argument.

If there is such a patch (I guess, no at this moment),
I'll apply both sequentially.
Otherwise please wait until someone (or I) address on that.
I'd like to leave it as a marker until that.

On Mon, Mar 17, 2008 at 02:43:34PM -0600, Alex Williamson wrote:
> Hi Isaku,
> 
>    I believe this MCA/xencomm code is for dom0, not domU, so we can
> remove it for now.  Thanks,
> 
>       Alex
> 
> Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
> ---
> 
>  arch/ia64/kernel/mca.c     |   22 ----------------------
>  arch/ia64/kernel/salinfo.c |   44 
> --------------------------------------------
>  include/asm-ia64/sal.h     |   36 ------------------------------------
>  3 files changed, 102 deletions(-)
> 
> diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
> index 94f1023..6e17aed 100644
> --- a/arch/ia64/kernel/mca.c
> +++ b/arch/ia64/kernel/mca.c
> @@ -339,33 +339,11 @@ typedef struct ia64_state_log_s
>  
>  static ia64_state_log_t ia64_state_log[IA64_MAX_LOG_TYPES];
>  
> -#ifdef CONFIG_XEN
> -DEFINE_SPINLOCK(ia64_mca_xencomm_lock);
> -LIST_HEAD(ia64_mca_xencomm_list);
> -
> -#define IA64_MCA_XENCOMM_ALLOCATE(rec, desc) \
> -     if (is_running_on_xen()) { \
> -             ia64_mca_xencomm_t *entry; \
> -             entry = alloc_bootmem(sizeof(ia64_mca_xencomm_t)); \
> -             entry->record = rec; \
> -             entry->handle = desc; \
> -             list_add(&entry->list, &ia64_mca_xencomm_list); \
> -     }
> -#define IA64_LOG_ALLOCATE(it, size) \
> -     {ia64_err_rec_t *rec; \
> -     ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)] = rec = \
> -             (ia64_err_rec_t *)alloc_bootmem(size); \
> -     IA64_MCA_XENCOMM_ALLOCATE(rec, xencomm_map(rec, size)); \
> -     ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)] = rec = \
> -             (ia64_err_rec_t *)alloc_bootmem(size); \
> -     IA64_MCA_XENCOMM_ALLOCATE(rec, xencomm_map(rec, size));}
> -#else
>  #define IA64_LOG_ALLOCATE(it, size) \
>       {ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)] = \
>               (ia64_err_rec_t *)alloc_bootmem(size); \
>       ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)] = \
>               (ia64_err_rec_t *)alloc_bootmem(size);}
> -#endif
>  #define IA64_LOG_LOCK_INIT(it) spin_lock_init(&ia64_state_log[it].isl_lock)
>  #define IA64_LOG_LOCK(it)      
> spin_lock_irqsave(&ia64_state_log[it].isl_lock, s)
>  #define IA64_LOG_UNLOCK(it)    
> spin_unlock_irqrestore(&ia64_state_log[it].isl_lock,s)
> diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
> index 91bc631..779c3cc 100644
> --- a/arch/ia64/kernel/salinfo.c
> +++ b/arch/ia64/kernel/salinfo.c
> @@ -378,25 +378,6 @@ salinfo_log_open(struct inode *inode, struct file *file)
>               data->open = 0;
>               return -ENOMEM;
>       }
> -#ifdef CONFIG_XEN
> -     if (is_running_on_xen()) {
> -             ia64_mca_xencomm_t *entry;
> -             unsigned long flags;
> -
> -             entry = vmalloc(sizeof(ia64_mca_xencomm_t));
> -             if (!entry) {
> -                     data->open = 0;
> -                     vfree(data->log_buffer);
> -                     return -ENOMEM;
> -             }
> -             entry->record = data->log_buffer;
> -             entry->handle = xencomm_map(data->log_buffer,
> -                                     
> ia64_sal_get_state_info_size(data->type));
> -             spin_lock_irqsave(&ia64_mca_xencomm_lock, flags);
> -             list_add(&entry->list, &ia64_mca_xencomm_list);
> -             spin_unlock_irqrestore(&ia64_mca_xencomm_lock, flags);
> -     }
> -#endif
>  
>       return 0;
>  }
> @@ -408,31 +389,6 @@ salinfo_log_release(struct inode *inode, struct file 
> *file)
>       struct salinfo_data *data = entry->data;
>  
>       if (data->state == STATE_NO_DATA) {
> -#ifdef CONFIG_XEN
> -             if (is_running_on_xen()) {
> -                     struct list_head *pos, *n;
> -                     ia64_mca_xencomm_t *found_entry = NULL;
> -                     unsigned long flags;
> -
> -                     spin_lock_irqsave(&ia64_mca_xencomm_lock, flags);
> -                     list_for_each_safe(pos, n, &ia64_mca_xencomm_list) {
> -                             ia64_mca_xencomm_t *entry;
> -
> -                             entry = list_entry(pos, ia64_mca_xencomm_t,
> -                                                list);
> -                             if (entry->record == data->log_buffer) {
> -                                     list_del(&entry->list);
> -                                     found_entry = entry;
> -                                     break;
> -                             }
> -                     }
> -                     spin_unlock_irqrestore(&ia64_mca_xencomm_lock, flags);
> -                     if (found_entry) {
> -                             xencomm_free(found_entry->handle);
> -                             vfree(found_entry);
> -                     }
> -             }
> -#endif
>               vfree(data->log_buffer);
>               vfree(data->oemdata);
>               data->log_buffer = NULL;
> diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h
> index 2965112..f4904db 100644
> --- a/include/asm-ia64/sal.h
> +++ b/include/asm-ia64/sal.h
> @@ -42,9 +42,6 @@
>  #include <asm/pal.h>
>  #include <asm/system.h>
>  #include <asm/fpu.h>
> -#ifdef CONFIG_XEN
> -#include <asm/xen/xencomm.h>
> -#endif
>  
>  extern spinlock_t sal_lock;
>  
> @@ -682,43 +679,10 @@ ia64_sal_clear_state_info (u64 sal_info_type)
>  /* Get the processor and platform information logged by SAL with respect to 
> the machine
>   * state at the time of the MCAs, INITs, CMCs, or CPEs.
>   */
> -#ifdef CONFIG_XEN
> -static inline u64 ia64_sal_get_state_info_size (u64 sal_info_type);
> -typedef struct ia64_mca_xencomm_t {
> -     void *record;
> -     struct xencomm_handle *handle;
> -     struct list_head list;
> -} ia64_mca_xencomm_t;
> -extern struct list_head ia64_mca_xencomm_list;
> -extern spinlock_t ia64_mca_xencomm_lock;
> -#endif
> -
>  static inline u64
>  ia64_sal_get_state_info (u64 sal_info_type, u64 *sal_info)
>  {
>       struct ia64_sal_retval isrv;
> -#ifdef CONFIG_XEN
> -     if (is_running_on_xen()) {
> -             ia64_mca_xencomm_t *entry;
> -             struct xencomm_handle *desc = NULL;
> -             unsigned long flags;
> -
> -             spin_lock_irqsave(&ia64_mca_xencomm_lock, flags);
> -             list_for_each_entry(entry, &ia64_mca_xencomm_list, list) {
> -                     if (entry->record == sal_info) {
> -                             desc = entry->handle;
> -                             break;
> -                     }
> -             }
> -             spin_unlock_irqrestore(&ia64_mca_xencomm_lock, flags);
> -
> -             if (desc == NULL)
> -                     return 0;
> -
> -             SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
> -                                desc, 0, 0, 0, 0);
> -     } else
> -#endif
>       SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
>                     sal_info, 0, 0, 0, 0);
>       if (isrv.status)
> 
> 
> 

-- 
yamahata

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

<Prev in Thread] Current Thread [Next in Thread>