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-changelog

[Xen-changelog] [xen-unstable] hvm: introduce HVM_PARAM_BUFIOREQ_EVTCHN

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvm: introduce HVM_PARAM_BUFIOREQ_EVTCHN
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Thu, 17 Nov 2011 00:33:29 +0000
Delivery-date: Wed, 16 Nov 2011 16:33:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1321456657 0
# Node ID a5f1d3b1612bb48e1cb09dc66b0909e3613dc855
# Parent  fd3567cafe1c7ccd0ddba0ad7fb067d435e13529
hvm: introduce HVM_PARAM_BUFIOREQ_EVTCHN

Introduce an event channel for buffered io event notifications,
advertise the port number using an hvm param.  This way the device
model is not forced to check the buffered io page for data several
times a second for the entire life of the VM (buffered io is mostly
used for stdvga emulation in Xen that is switched off after the guest
goes into graphical mode).

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r fd3567cafe1c -r a5f1d3b1612b xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Tue Nov 15 14:50:18 2011 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Wed Nov 16 15:17:37 2011 +0000
@@ -985,6 +985,16 @@
 
     /* Register ioreq event channel. */
     v->arch.hvm_vcpu.xen_port = rc;
+
+    if ( v->vcpu_id == 0 )
+    {
+        /* Create bufioreq event channel. */
+        rc = alloc_unbound_xen_event_channel(v, 0);
+        if ( rc < 0 )
+            goto fail2;
+        v->domain->arch.hvm_domain.params[HVM_PARAM_BUFIOREQ_EVTCHN] = rc;
+    }
+
     spin_lock(&v->domain->arch.hvm_domain.ioreq.lock);
     if ( v->domain->arch.hvm_domain.ioreq.va != NULL )
         get_ioreq(v)->vp_eport = v->arch.hvm_vcpu.xen_port;
@@ -3597,6 +3607,9 @@
                         if ( rc == 0 )
                             rc = nestedhvm_vcpu_initialise(v);
                 break;
+            case HVM_PARAM_BUFIOREQ_EVTCHN:
+                rc = -EINVAL;
+                break;
             }
 
             if ( rc == 0 ) 
diff -r fd3567cafe1c -r a5f1d3b1612b xen/arch/x86/hvm/io.c
--- a/xen/arch/x86/hvm/io.c     Tue Nov 15 14:50:18 2011 +0100
+++ b/xen/arch/x86/hvm/io.c     Wed Nov 16 15:17:37 2011 +0000
@@ -118,6 +118,8 @@
     wmb();
     pg->write_pointer += qw ? 2 : 1;
 
+    notify_via_xen_event_channel(v->domain,
+            v->domain->arch.hvm_domain.params[HVM_PARAM_BUFIOREQ_EVTCHN]);
     spin_unlock(&iorp->lock);
     
     return 1;
diff -r fd3567cafe1c -r a5f1d3b1612b xen/include/public/hvm/params.h
--- a/xen/include/public/hvm/params.h   Tue Nov 15 14:50:18 2011 +0100
+++ b/xen/include/public/hvm/params.h   Wed Nov 16 15:17:37 2011 +0000
@@ -52,6 +52,7 @@
 #define HVM_PARAM_IOREQ_PFN    5
 
 #define HVM_PARAM_BUFIOREQ_PFN 6
+#define HVM_PARAM_BUFIOREQ_EVTCHN 26
 
 #ifdef __ia64__
 
@@ -141,6 +142,6 @@
 /* Boolean: Enable nestedhvm (hvm only) */
 #define HVM_PARAM_NESTEDHVM    24
 
-#define HVM_NR_PARAMS          26
+#define HVM_NR_PARAMS          27
 
 #endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] hvm: introduce HVM_PARAM_BUFIOREQ_EVTCHN, Xen patchbot-unstable <=