~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/lguest.h

Version: ~ [ linux-5.14-rc3 ] ~ [ linux-5.13.5 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.53 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.135 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.198 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.240 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.276 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.276 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Things the lguest guest needs to know.  Note: like all lguest interfaces,
  3  * this is subject to wild and random change between versions.
  4  */
  5 #ifndef _LINUX_LGUEST_H
  6 #define _LINUX_LGUEST_H
  7 
  8 #ifndef __ASSEMBLY__
  9 #include <linux/time.h>
 10 #include <asm/irq.h>
 11 #include <asm/lguest_hcall.h>
 12 
 13 #define LG_CLOCK_MIN_DELTA      100UL
 14 #define LG_CLOCK_MAX_DELTA      ULONG_MAX
 15 
 16 /*G:031
 17  * The second method of communicating with the Host is to via "struct
 18  * lguest_data".  Once the Guest's initialization hypercall tells the Host where
 19  * this is, the Guest and Host both publish information in it.
 20 :*/
 21 struct lguest_data {
 22         /*
 23          * 512 == enabled (same as eflags in normal hardware).  The Guest
 24          * changes interrupts so often that a hypercall is too slow.
 25          */
 26         unsigned int irq_enabled;
 27         /* Fine-grained interrupt disabling by the Guest */
 28         DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS);
 29 
 30         /*
 31          * The Host writes the virtual address of the last page fault here,
 32          * which saves the Guest a hypercall.  CR2 is the native register where
 33          * this address would normally be found.
 34          */
 35         unsigned long cr2;
 36 
 37         /* Wallclock time set by the Host. */
 38         struct timespec time;
 39 
 40         /*
 41          * Interrupt pending set by the Host.  The Guest should do a hypercall
 42          * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF).
 43          */
 44         int irq_pending;
 45 
 46         /*
 47          * Async hypercall ring.  Instead of directly making hypercalls, we can
 48          * place them in here for processing the next time the Host wants.
 49          * This batching can be quite efficient.
 50          */
 51 
 52         /* 0xFF == done (set by Host), 0 == pending (set by Guest). */
 53         u8 hcall_status[LHCALL_RING_SIZE];
 54         /* The actual registers for the hypercalls. */
 55         struct hcall_args hcalls[LHCALL_RING_SIZE];
 56 
 57 /* Fields initialized by the Host at boot: */
 58         /* Memory not to try to access */
 59         unsigned long reserve_mem;
 60         /* KHz for the TSC clock. */
 61         u32 tsc_khz;
 62 
 63 /* Fields initialized by the Guest at boot: */
 64         /* Instruction to suppress interrupts even if enabled */
 65         unsigned long noirq_iret;
 66         /* Address above which page tables are all identical. */
 67         unsigned long kernel_address;
 68         /* The vector to try to use for system calls (0x40 or 0x80). */
 69         unsigned int syscall_vec;
 70 };
 71 extern struct lguest_data lguest_data;
 72 #endif /* __ASSEMBLY__ */
 73 #endif  /* _LINUX_LGUEST_H */
 74 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp