All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arun Sharma <arun.sharma@intel.com>
To: Ian Pratt <Ian.Pratt@cl.cam.ac.uk>,
	Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: [PATCH][5/5] Register the portio handler only once.
Date: Fri, 1 Jul 2005 11:57:42 -0700	[thread overview]
Message-ID: <20050701185742.GA32302@intel.com> (raw)

Register the portio handler only once.

Signed-off-by: Arun Sharma <arun.sharma@intel.com>

diff -r d7bcd6f56b15 -r 63fd76ad669f xen/arch/x86/vmx_intercept.c
--- a/xen/arch/x86/vmx_intercept.c	Thu Jun 30 22:27:41 2005
+++ b/xen/arch/x86/vmx_intercept.c	Thu Jun 30 23:22:26 2005
@@ -216,7 +216,7 @@
     shared_iopage_t *sp = get_sp(d->domain);
     u64 *intr = &(sp->sp_global.pic_intr[0]);
     struct vmx_virpit_t *vpit = &(d->domain->arch.vmx_platform.vmx_pit);
-    int rw_mode;
+    int rw_mode, reinit = 0;
 
     /* load init count*/
     if (p->state == STATE_IORESP_HOOK) { 
@@ -224,6 +224,7 @@
         if ( active_ac_timer(&(vpit->pit_timer)) ) {
             VMX_DBG_LOG(DBG_LEVEL_1, "VMX_PIT: guest reset PIT with channel %lx!\n", (unsigned long) ((p->u.data >> 24) & 0x3) );
             rem_ac_timer(&(vpit->pit_timer));
+            reinit = 1;
         }
         else
             init_ac_timer(&vpit->pit_timer, pit_timer_fn, vpit, 0);
@@ -268,7 +269,8 @@
         p->state = STATE_IORESP_READY;
 
 	/* register handler to intercept the PIT io when vm_exit */
-	register_portio_handler(0x40, 4, intercept_pit_io); 
+        if (!reinit)
+	    register_portio_handler(0x40, 4, intercept_pit_io); 
     }
 
 }

                 reply	other threads:[~2005-07-01 18:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050701185742.GA32302@intel.com \
    --to=arun.sharma@intel.com \
    --cc=Ian.Pratt@cl.cam.ac.uk \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=xen-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.