Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Oct 2014 19:03:07 +0000 (UTC)
From:      Neel Natu <neel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273706 - in head/sys/amd64/vmm: . io
Message-ID:  <201410261903.s9QJ37OX062792@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: neel
Date: Sun Oct 26 19:03:06 2014
New Revision: 273706
URL: https://svnweb.freebsd.org/changeset/base/273706

Log:
  Change the type of the first argument to the I/O emulation handlers to
  'struct vm *'. Previously it used to be a 'void *' but there is no reason
  to hide the actual type from the handler.
  
  Discussed with:	tychon
  MFC after:	1 week

Modified:
  head/sys/amd64/vmm/io/vatpic.c
  head/sys/amd64/vmm/io/vatpic.h
  head/sys/amd64/vmm/io/vatpit.c
  head/sys/amd64/vmm/io/vatpit.h
  head/sys/amd64/vmm/io/vpmtmr.c
  head/sys/amd64/vmm/io/vpmtmr.h
  head/sys/amd64/vmm/vmm_ioport.h

Modified: head/sys/amd64/vmm/io/vatpic.c
==============================================================================
--- head/sys/amd64/vmm/io/vatpic.c	Sun Oct 26 18:46:03 2014	(r273705)
+++ head/sys/amd64/vmm/io/vatpic.c	Sun Oct 26 19:03:06 2014	(r273706)
@@ -641,7 +641,7 @@ vatpic_write(struct vatpic *vatpic, stru
 }
 
 int
-vatpic_master_handler(void *vm, int vcpuid, bool in, int port, int bytes,
+vatpic_master_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
     uint32_t *eax)
 {
 	struct vatpic *vatpic;
@@ -661,7 +661,7 @@ vatpic_master_handler(void *vm, int vcpu
 }
 
 int
-vatpic_slave_handler(void *vm, int vcpuid, bool in, int port, int bytes,
+vatpic_slave_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
     uint32_t *eax)
 {
 	struct vatpic *vatpic;
@@ -681,7 +681,7 @@ vatpic_slave_handler(void *vm, int vcpui
 }
 
 int
-vatpic_elc_handler(void *vm, int vcpuid, bool in, int port, int bytes,
+vatpic_elc_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
     uint32_t *eax)
 {
 	struct vatpic *vatpic;

Modified: head/sys/amd64/vmm/io/vatpic.h
==============================================================================
--- head/sys/amd64/vmm/io/vatpic.h	Sun Oct 26 18:46:03 2014	(r273705)
+++ head/sys/amd64/vmm/io/vatpic.h	Sun Oct 26 19:03:06 2014	(r273706)
@@ -39,11 +39,11 @@
 struct vatpic *vatpic_init(struct vm *vm);
 void vatpic_cleanup(struct vatpic *vatpic);
 
-int vatpic_master_handler(void *vm, int vcpuid, bool in, int port, int bytes,
-    uint32_t *eax);
-int vatpic_slave_handler(void *vm, int vcpuid, bool in, int port, int bytes,
-    uint32_t *eax);
-int vatpic_elc_handler(void *vm, int vcpuid, bool in, int port, int bytes,
+int vatpic_master_handler(struct vm *vm, int vcpuid, bool in, int port,
+    int bytes, uint32_t *eax);
+int vatpic_slave_handler(struct vm *vm, int vcpuid, bool in, int port,
+    int bytes, uint32_t *eax);
+int vatpic_elc_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
     uint32_t *eax);
 
 int vatpic_assert_irq(struct vm *vm, int irq);

Modified: head/sys/amd64/vmm/io/vatpit.c
==============================================================================
--- head/sys/amd64/vmm/io/vatpit.c	Sun Oct 26 18:46:03 2014	(r273705)
+++ head/sys/amd64/vmm/io/vatpit.c	Sun Oct 26 19:03:06 2014	(r273706)
@@ -317,7 +317,7 @@ vatpit_update_mode(struct vatpit *vatpit
 }
 
 int
-vatpit_handler(void *vm, int vcpuid, bool in, int port, int bytes,
+vatpit_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
     uint32_t *eax)
 {
 	struct vatpit *vatpit;
@@ -400,7 +400,7 @@ vatpit_handler(void *vm, int vcpuid, boo
 }
 
 int
-vatpit_nmisc_handler(void *vm, int vcpuid, bool in, int port, int bytes,
+vatpit_nmisc_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
     uint32_t *eax)
 {
 	struct vatpit *vatpit;

Modified: head/sys/amd64/vmm/io/vatpit.h
==============================================================================
--- head/sys/amd64/vmm/io/vatpit.h	Sun Oct 26 18:46:03 2014	(r273705)
+++ head/sys/amd64/vmm/io/vatpit.h	Sun Oct 26 19:03:06 2014	(r273706)
@@ -37,9 +37,9 @@
 struct vatpit *vatpit_init(struct vm *vm);
 void vatpit_cleanup(struct vatpit *vatpit);
 
-int vatpit_handler(void *vm, int vcpuid, bool in, int port, int bytes,
-    uint32_t *eax);
-int vatpit_nmisc_handler(void *vm, int vcpuid, bool in, int port, int bytes,
+int vatpit_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
     uint32_t *eax);
+int vatpit_nmisc_handler(struct vm *vm, int vcpuid, bool in, int port,
+    int bytes, uint32_t *eax);
 
 #endif	/* _VATPIT_H_ */

Modified: head/sys/amd64/vmm/io/vpmtmr.c
==============================================================================
--- head/sys/amd64/vmm/io/vpmtmr.c	Sun Oct 26 18:46:03 2014	(r273705)
+++ head/sys/amd64/vmm/io/vpmtmr.c	Sun Oct 26 19:03:06 2014	(r273706)
@@ -79,7 +79,7 @@ vpmtmr_cleanup(struct vpmtmr *vpmtmr)
 }
 
 int
-vpmtmr_handler(void *vm, int vcpuid, bool in, int port, int bytes,
+vpmtmr_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
     uint32_t *val)
 {
 	struct vpmtmr *vpmtmr;

Modified: head/sys/amd64/vmm/io/vpmtmr.h
==============================================================================
--- head/sys/amd64/vmm/io/vpmtmr.h	Sun Oct 26 18:46:03 2014	(r273705)
+++ head/sys/amd64/vmm/io/vpmtmr.h	Sun Oct 26 19:03:06 2014	(r273706)
@@ -36,7 +36,7 @@ struct vpmtmr;
 struct vpmtmr *vpmtmr_init(struct vm *vm);
 void vpmtmr_cleanup(struct vpmtmr *pmtmr);
 
-int vpmtmr_handler(void *vm, int vcpuid, bool in, int port, int bytes,
+int vpmtmr_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
     uint32_t *val);
 
 #endif

Modified: head/sys/amd64/vmm/vmm_ioport.h
==============================================================================
--- head/sys/amd64/vmm/vmm_ioport.h	Sun Oct 26 18:46:03 2014	(r273705)
+++ head/sys/amd64/vmm/vmm_ioport.h	Sun Oct 26 19:03:06 2014	(r273706)
@@ -29,7 +29,7 @@
 #ifndef	_VMM_IOPORT_H_
 #define	_VMM_IOPORT_H_
 
-typedef int (*ioport_handler_func_t)(void *vm, int vcpuid,
+typedef int (*ioport_handler_func_t)(struct vm *vm, int vcpuid,
     bool in, int port, int bytes, uint32_t *val);
 
 int vm_handle_inout(struct vm *vm, int vcpuid, struct vm_exit *vme, bool *retu);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410261903.s9QJ37OX062792>