]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4sys/include/__vm
update
[l4.git] / l4 / pkg / l4sys / include / __vm
1 // vi:ft=cpp
2 /**
3  * \file
4  * \brief X86 virtualization interface
5  */
6 /*
7  * (c) 2008-2010 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
8  *               Alexander Warg <warg@os.inf.tu-dresden.de>
9  *     economic rights: Technische Universität Dresden (Germany)
10  *
11  * This file is part of TUD:OS and distributed under the terms of the
12  * GNU General Public License 2.
13  * Please see the COPYING-GPL-2 file for details.
14  *
15  * As a special exception, you may use this file as part of a free software
16  * library without restriction.  Specifically, if other files instantiate
17  * templates or use macros or inline functions from this file, or you compile
18  * this file and link it with other files to produce an executable, this
19  * file does not by itself cause the resulting executable to be covered by
20  * the GNU General Public License.  This exception does not however
21  * invalidate any other reasons why the executable file might be covered by
22  * the GNU General Public License.
23  */
24
25 #pragma once
26
27 #include <l4/sys/vm.h>
28 #include <l4/sys/task>
29
30 namespace L4 {
31
32 /**
33  * \brief Virtual machine.
34  * \ingroup l4_vm_api
35  */
36 class Vm : public Kobject_t<Vm, Task, L4_PROTO_VM>
37 {
38 protected:
39   Vm();
40
41 private:
42   Vm(Vm const &);
43   void operator = (Vm const &);
44
45 public:
46   /**
47    * \copydoc l4_vm_gpregs()
48    */
49   static l4_vm_gpregs_t *gpregs(l4_utcb_t *u = l4_utcb()) throw()
50   { return l4_vm_gpregs_u(u); }
51
52   /**
53    * \copydoc l4_vm_run()
54    * \note \a dst_task is the implicit \a this pointer.
55    */
56    l4_msgtag_t run(l4_fpage_t const &vmcb_fpage,
57                        l4_utcb_t *utcb = l4_utcb()) throw()
58    { return l4_vm_run_u(cap(), vmcb_fpage, utcb); }
59 };
60
61 };