All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
To: xen-ia64-devel@lists.xensource.com, xen-devel@lists.xensource.com
Subject: [PATCH 2/4][IA64][HVM] Windows crashdump support (take 2): Xen arch_ia64 side
Date: Tue, 13 Feb 2007 13:58:27 +0900	[thread overview]
Message-ID: <E3C74F2B9913D3kanno.masaki@jp.fujitsu.com> (raw)
In-Reply-To: <E7C74F2C630420kanno.masaki@jp.fujitsu.com> (TuruKame supplied)

[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 28 bytes --]

[2/4] Xen arch_ia64 side. 


[-- Attachment #2: xm_trigger.xen_arch_ia64.patch --]
[-- Type: application/octet-stream, Size: 3990 bytes --]

diff -r ad9bbd103034 xen/arch/ia64/vmx/vlsapic.c
--- a/xen/arch/ia64/vmx/vlsapic.c	Fri Feb 09 18:19:24 2007 +0000
+++ b/xen/arch/ia64/vmx/vlsapic.c	Tue Feb 13 13:15:09 2007 +0900
@@ -498,6 +498,18 @@ chk_irq_exit:
 }
 
 /*
+ * Set a INIT interruption request to vcpu[0] of target domain.
+ * The INIT interruption is injected into each vcpu by guest firmware.
+ */
+void vmx_pend_pal_init(struct domain *d)
+{
+    VCPU *vcpu;
+
+    vcpu = d->vcpu[0];
+    vcpu->arch.arch_vmx.pal_init_pending = 1;
+}
+
+/*
  * Only coming from virtualization fault.
  */
 void guest_write_eoi(VCPU *vcpu)
@@ -641,6 +653,14 @@ static void vlsapic_deliver_ipi(VCPU *vc
         panic_domain(NULL, "Deliver reserved IPI!\n");
         break;
     }
+}
+
+/*
+ * Deliver the INIT interruption to guest.
+ */
+void deliver_pal_init(VCPU *vcpu)
+{
+    vlsapic_deliver_ipi(vcpu, SAPIC_INIT, 0);
 }
 
 /*
diff -r ad9bbd103034 xen/arch/ia64/vmx/vmx_process.c
--- a/xen/arch/ia64/vmx/vmx_process.c	Fri Feb 09 18:19:24 2007 +0000
+++ b/xen/arch/ia64/vmx/vmx_process.c	Tue Feb 13 13:15:20 2007 +0900
@@ -229,6 +229,14 @@ void leave_hypervisor_tail(void)
         if (v->vcpu_id == 0) {
             unsigned long callback_irq =
                 d->arch.hvm_domain.params[HVM_PARAM_CALLBACK_IRQ];
+
+            if ( v->arch.arch_vmx.pal_init_pending ) {
+                /*inject INIT interruption to guest pal*/
+                v->arch.arch_vmx.pal_init_pending = 0;
+                deliver_pal_init(v);
+                return;
+            }
+
             /*
              * val[63:56] == 1: val[55:0] is a delivery PCI INTx line:
              *                  Domain = val[47:32], Bus  = val[31:16],
diff -r ad9bbd103034 xen/arch/ia64/xen/dom0_ops.c
--- a/xen/arch/ia64/xen/dom0_ops.c	Fri Feb 09 18:19:24 2007 +0000
+++ b/xen/arch/ia64/xen/dom0_ops.c	Tue Feb 13 13:15:30 2007 +0900
@@ -174,6 +174,46 @@ long arch_do_domctl(xen_domctl_t *op, XE
         put_domain(d);
     }
     break;
+
+    case XEN_DOMCTL_sendtrigger:
+    {
+        struct domain *d;
+        struct vcpu *v;
+
+        ret = -ESRCH;
+        d = get_domain_by_id(op->domain);
+        if ( d == NULL )
+            break;
+
+        ret = -EINVAL;
+        if ( op->u.sendtrigger.vcpu >= MAX_VIRT_CPUS )
+            goto sendtrigger_out;
+
+        ret = -ESRCH;
+        if ( (v = d->vcpu[op->u.sendtrigger.vcpu]) == NULL )
+            goto sendtrigger_out;
+
+        ret = 0;
+        switch (op->u.sendtrigger.trigger)
+        {
+        case XEN_DOMCTL_SENDTRIGGER_INIT:
+        {
+            if (VMX_DOMAIN(v))
+                vmx_pend_pal_init(d);
+            else
+                ret = -ENOSYS;
+        }
+        break;
+
+        default:
+            ret = -ENOSYS;
+        }
+
+    sendtrigger_out:
+        put_domain(d);
+    }
+    break;
+
     default:
         printk("arch_do_domctl: unrecognized domctl: %d!!!\n",op->cmd);
         ret = -ENOSYS;
diff -r ad9bbd103034 xen/include/asm-ia64/vmx.h
--- a/xen/include/asm-ia64/vmx.h	Fri Feb 09 18:19:24 2007 +0000
+++ b/xen/include/asm-ia64/vmx.h	Tue Feb 13 13:15:49 2007 +0900
@@ -55,6 +55,8 @@ extern void vmx_relinquish_vcpu_resource
 extern void vmx_relinquish_vcpu_resources(struct vcpu *v);
 extern void vmx_die_if_kernel(char *str, struct pt_regs *regs, long err);
 extern void vmx_send_assist_req(struct vcpu *v);
+extern void deliver_pal_init(struct vcpu *vcpu);
+extern void vmx_pend_pal_init(struct domain *d);
 
 static inline vcpu_iodata_t *get_vio(struct domain *d, unsigned long cpu)
 {
diff -r ad9bbd103034 xen/include/asm-ia64/vmx_vpd.h
--- a/xen/include/asm-ia64/vmx_vpd.h	Fri Feb 09 18:19:24 2007 +0000
+++ b/xen/include/asm-ia64/vmx_vpd.h	Tue Feb 13 13:15:59 2007 +0900
@@ -90,6 +90,7 @@ struct arch_vmx_struct {
     unsigned long   flags;
     unsigned long   xen_port;
     unsigned char   xtp;
+    unsigned char   pal_init_pending;
 #ifdef VTI_DEBUG
     unsigned long  ivt_current;
     struct ivt_debug ivt_debug[IVT_DEBUG_MAX];

[-- Attachment #3: Type: text/plain, Size: 152 bytes --]

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

  parent reply	other threads:[~2007-02-13  4:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-13  5:04 [PATCH 0/4][IA64][HVM] Windows crashdump support (take 2) Masaki Kanno
2007-02-13  4:58 ` [PATCH 1/4][IA64][HVM] Windows crashdump support (take 2): Xen common side Masaki Kanno
2007-02-13  4:58 ` Masaki Kanno [this message]
2007-02-13  4:58 ` [PATCH 3/4][IA64][HVM] Windows crashdump support (take 2): Linux arch_ia64 side Masaki Kanno
2007-02-13  4:58 ` [PATCH 4/4][IA64][HVM] Windows crashdump support (take 2): Tools side Masaki Kanno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E3C74F2B9913D3kanno.masaki@jp.fujitsu.com \
    --to=kanno.masaki@jp.fujitsu.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=xen-ia64-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.