Ignore:
Timestamp:
2006-08-01T17:27:11Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0fbfa0d
Parents:
e386cbf
Message:

xen32: use writable page tables, cleanup mm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/xen32/include/hypercall.h

    re386cbf re12ccc5  
    3636typedef uint16_t domid_t;
    3737
    38 typedef struct {
    39     uint64_t ptr;  /**< Machine address of PTE */
    40     uint64_t val;  /**< New contents of PTE */
    41 } mmu_update_t;
    42 
    43 typedef struct {
    44     unsigned int cmd;
    45     union {
    46         unsigned long mfn;
    47         unsigned long linear_addr;
    48     } arg1;
    49     union {
    50         unsigned int nr_ents;
    51         void *vcpumask;
    52     } arg2;
    53 } mmuext_op_t;
    54 
    55 
    56 #define XEN_MMU_UPDATE  1
    57 #define XEN_CONSOLE_IO  18
    58 #define XEN_MMUEXT_OP   26
     38
     39#define XEN_MMU_UPDATE                  1
     40#define XEN_UPDATE_VA_MAPPING   14
     41#define XEN_CONSOLE_IO                  18
     42#define XEN_VM_ASSIST                   21
     43#define XEN_MMUEXT_OP                   26
    5944
    6045
     
    8368
    8469
     70#define UVMF_NONE                               0        /**< No flushing at all */
     71#define UVMF_TLB_FLUSH                  1        /**< Flush entire TLB(s) */
     72#define UVMF_INVLPG                             2        /**< Flush only one entry */
     73#define UVMF_FLUSHTYPE_MASK             3
     74#define UVMF_MULTI                              0        /**< Flush subset of TLBs */
     75#define UVMF_LOCAL                              0        /**< Flush local TLB */
     76#define UVMF_ALL                                (1 << 2) /**< Flush all TLBs */
     77
     78
     79/*
     80 * Commands to XEN_VM_ASSIST
     81 */
     82#define VMASST_CMD_ENABLE                               0
     83#define VMASST_CMD_DISABLE                              1
     84#define VMASST_TYPE_4GB_SEGMENTS                0
     85#define VMASST_TYPE_4GB_SEGMENTS_NOTIFY 1
     86#define VMASST_TYPE_WRITABLE_PAGETABLES 2
     87
     88
    8589#define DOMID_SELF (0x7FF0U)
    8690#define DOMID_IO   (0x7FF1U)
     
    190194}
    191195
    192 static inline int xen_mmu_update(const mmu_update_t *req, const unsigned int count, unsigned int *success_count, domid_t domid)
     196static inline int xen_vm_assist(const unsigned int cmd, const unsigned int type)
    193197{
    194         return hypercall4(XEN_MMU_UPDATE, req, count, success_count, domid);
     198    return hypercall2(XEN_VM_ASSIST, cmd, type);
    195199}
    196200
    197 static inline int xen_mmuext_op(const mmuext_op_t *op, const unsigned int count, unsigned int *success_count, domid_t domid)
    198 {
    199         return hypercall4(XEN_MMUEXT_OP, op, count, success_count, domid);
    200 }
    201 
    202201#endif
Note: See TracChangeset for help on using the changeset viewer.