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] Catch up for PV_on_HVM

To: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] Catch up for PV_on_HVM
From: DOI Tsunehisa <Doi.Tsunehisa@xxxxxxxxxxxxxx>
Date: Fri, 18 Aug 2006 21:45:31 +0900
Delivery-date: Fri, 18 Aug 2006 05:46:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)
Hi all,

  We are porting Steven Smith's para drivers for full-VM to IPF.
In the xen-unstable.hg, a part of the patch was applied.

 [overview of pv-on-hvm(rev9) status]
  * for only x86 code.
    + 01.early_map_shared.diff:     applied (cs:10973)
      - Move the mapping of the shared IO page slightly earlier
  * common code
    + 06.copy_grant_refs.diff:      applied (cs:11058)
      - Add a new type of grant copy operation.
    + 07.netback_tidyup.diff:       applied (cs:11078)
      - Tidy up and remove communications via references to global
        structures.
    + 11.add_hvm_h.diff:            applied (cs:11080)
      - Add a header file with wrappers for hvm_op hypercall.
    + 15.xenbus_no_start_info.diff: applied (cs:11083)
      - Avoid direct use of xen_start_info. It's unevailable when
  * need to catchup for IPF
    + 02.ioemu_xen_evtchns.diff:    applied (cs:10974-10976) *not yet*
      - Flip the device model over to using the new Xen event channels
    + 04.hvm_inter.diff:            applied (cs:11057)
      - Add support for sending event channel interrupts to HVM guests.
    + 10.hvm_op_hypercall.diff:     applied (cs:11079)
      - Add stubs to Linux for the new hvm_op hypercall.
    + 12.add_maddr_h.diff:          applied (cs:11081)       *not yet*
      - Split useful bits of page.h into new header maddr.h.
    + **hvm_op fixup**:             applied (cs:11070)
      - HVMOP_get_param return parameter value within the provided
        parameter struct

  We want to catch up this common feature. We don't complete to catch
up, yet. But I'll post patches which we wrote already.

  This patch includes:

  * catch up `hvm_op fixup'
    - This patch modifies HYPERVISOR_hvm_op().
  * catch up `hvm_inter'
    - This patch adds support for sending event channel interrupts
      to VT-i guests.
  * catch up `hvm_op_hypercall'
    - This patch includes HYPERVISOR_hvm_op() stabs for linux.

  We'll catch up other features, as soon as possible.

Thanks,
- Tsunehisa Doi
# HG changeset patch
# User Doi.Tsunehisa@xxxxxxxxxxxxxx
# Node ID f63ba5c40d2ce0c45126e66c7e396b1bd102767b
# Parent  8c6bb45901e7679462bb5edbfb69ee34d8616e95
HMVOP_get_param  return parameter value within the provided parameter struct 
for IPF

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@xxxxxxxxxxxxxx>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@xxxxxxxxxxxxxx>

diff -r 8c6bb45901e7 -r f63ba5c40d2c xen/arch/ia64/vmx/vmx_hypercall.c
--- a/xen/arch/ia64/vmx/vmx_hypercall.c Wed Aug 16 14:28:57 2006 -0600
+++ b/xen/arch/ia64/vmx/vmx_hypercall.c Fri Aug 18 21:37:29 2006 +0900
@@ -59,21 +59,23 @@ do_hvm_op(unsigned long op, XEN_GUEST_HA
         }
         else if (IS_PRIV(current->domain)) {
             d = find_domain_by_id(a.domid);
-            if (!d)
+            if (d == NULL)
                 return -ESRCH;
         }
         else
             return -EPERM;
 
         if (op == HVMOP_set_param) {
+            d->arch.hvm_domain.params[a.index] = a.value;
             rc = 0;
-            d->arch.hvm_domain.params[a.index] = a.value;
         }
-        else
-            rc = d->arch.hvm_domain.params[a.index];
+        else {
+            a.value = d->arch.hvm_domain.params[a.index];
+            rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
+        }
 
         put_domain(d);
-        return rc;
+        break;
     }
 
     default:
# HG changeset patch
# User Doi.Tsunehisa@xxxxxxxxxxxxxx
# Node ID c3b56e0838d4c65539995ad6ac4d48bcbbadd462
# Parent  9e023c4766ffed703b6419d10044564a8688ce2d
Add support for sending event channel interrupts to VT-i guest

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@xxxxxxxxxxxxxx>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@xxxxxxxxxxxxxx>

diff -r 9e023c4766ff -r c3b56e0838d4 xen/arch/ia64/vmx/vmx_process.c
--- a/xen/arch/ia64/vmx/vmx_process.c   Fri Aug 18 17:55:10 2006 +0900
+++ b/xen/arch/ia64/vmx/vmx_process.c   Fri Aug 18 18:16:12 2006 +0900
@@ -186,6 +186,7 @@ void leave_hypervisor_tail(struct pt_reg
 {
     struct domain *d = current->domain;
     struct vcpu *v = current;
+    int callback_irq;
     // FIXME: Will this work properly if doing an RFI???
     if (!is_idle_domain(d) ) { // always comes from guest
 //        struct pt_regs *user_regs = vcpu_regs(current);
@@ -212,6 +213,13 @@ void leave_hypervisor_tail(struct pt_reg
 //           VCPU(v, irr[0]) |= 1UL << 0x10;
 //           v->arch.irq_new_pending = 1;
 //       }
+
+        callback_irq = d->arch.hvm_domain.params[HVM_PARAM_CALLBACK_IRQ];
+        if (callback_irq != 0 && local_events_need_delivery()) {
+            /*inject para-device call back irq*/
+            v->vcpu_info->evtchn_upcall_mask = 1;
+            vmx_vcpu_pend_interrupt(v, callback_irq);
+        }
 
         if ( v->arch.irq_new_pending ) {
             v->arch.irq_new_pending = 0;
# HG changeset patch
# User Doi.Tsunehisa@xxxxxxxxxxxxxx
# Node ID 033856bff49cdbdf5ac8d094ea3353930af0df56
# Parent  c3b56e0838d4c65539995ad6ac4d48bcbbadd462
Add stubs to Linux/IPF for the new hvm_op hypercall.

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@xxxxxxxxxxxxxx>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@xxxxxxxxxxxxxx>

diff -r c3b56e0838d4 -r 033856bff49c 
linux-2.6-xen-sparse/include/asm-ia64/hypercall.h
--- a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h Fri Aug 18 18:16:12 
2006 +0900
+++ b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h Fri Aug 18 18:32:47 
2006 +0900
@@ -292,6 +292,13 @@ HYPERVISOR_vcpu_op(
 
 extern int HYPERVISOR_suspend(unsigned long srec);
 
+static inline unsigned long
+HYPERVISOR_hvm_op(
+       int cmd, void *arg)
+{
+        return _hypercall2(unsigned long, hvm_op, cmd, arg);
+}
+
 static inline int
 HYPERVISOR_callback_op(
        int cmd, void *arg)
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>