KVM: MMU: Remove user access when allowing kernel access to gpte.w=0 page
[safe/jmp/linux-2.6] / include / rdma / ib_verbs.h
index 10ebaaa..f3e8f3c 100644 (file)
@@ -91,7 +91,7 @@ enum ib_device_cap_flags {
        IB_DEVICE_RC_RNR_NAK_GEN        = (1<<12),
        IB_DEVICE_SRQ_RESIZE            = (1<<13),
        IB_DEVICE_N_NOTIFY_CQ           = (1<<14),
-       IB_DEVICE_ZERO_STAG             = (1<<15),
+       IB_DEVICE_LOCAL_DMA_LKEY        = (1<<15),
        IB_DEVICE_RESERVED              = (1<<16), /* old SEND_W_INV */
        IB_DEVICE_MEM_WINDOW            = (1<<17),
        /*
@@ -104,6 +104,7 @@ enum ib_device_cap_flags {
        IB_DEVICE_UD_IP_CSUM            = (1<<18),
        IB_DEVICE_UD_TSO                = (1<<19),
        IB_DEVICE_MEM_MGT_EXTENSIONS    = (1<<21),
+       IB_DEVICE_BLOCK_MULTICAST_LOOPBACK = (1<<22),
 };
 
 enum ib_atomic_cap {
@@ -135,6 +136,7 @@ struct ib_device_attr {
        int                     max_qp_init_rd_atom;
        int                     max_ee_init_rd_atom;
        enum ib_atomic_cap      atomic_cap;
+       enum ib_atomic_cap      masked_atomic_cap;
        int                     max_ee;
        int                     max_rdd;
        int                     max_mw;
@@ -387,7 +389,7 @@ enum {
        IB_MULTICAST_QPN = 0xffffff
 };
 
-#define IB_LID_PERMISSIVE      __constant_htons(0xFFFF)
+#define IB_LID_PERMISSIVE      cpu_to_be16(0xFFFF)
 
 enum ib_ah_flags {
        IB_AH_GRH       = 1
@@ -466,6 +468,8 @@ enum ib_wc_opcode {
        IB_WC_LSO,
        IB_WC_LOCAL_INV,
        IB_WC_FAST_REG_MR,
+       IB_WC_MASKED_COMP_SWAP,
+       IB_WC_MASKED_FETCH_ADD,
 /*
  * Set value of IB_WC_RECV so consumers can test if a completion is a
  * receive by testing (opcode & IB_WC_RECV).
@@ -555,7 +559,8 @@ enum ib_qp_type {
 };
 
 enum ib_qp_create_flags {
-       IB_QP_CREATE_IPOIB_UD_LSO       = 1 << 0,
+       IB_QP_CREATE_IPOIB_UD_LSO               = 1 << 0,
+       IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK   = 1 << 1,
 };
 
 struct ib_qp_init_attr {
@@ -687,6 +692,8 @@ enum ib_wr_opcode {
        IB_WR_RDMA_READ_WITH_INV,
        IB_WR_LOCAL_INV,
        IB_WR_FAST_REG_MR,
+       IB_WR_MASKED_ATOMIC_CMP_AND_SWP,
+       IB_WR_MASKED_ATOMIC_FETCH_AND_ADD,
 };
 
 enum ib_send_flags {
@@ -729,6 +736,8 @@ struct ib_send_wr {
                        u64     remote_addr;
                        u64     compare_add;
                        u64     swap;
+                       u64     compare_add_mask;
+                       u64     swap_mask;
                        u32     rkey;
                } atomic;
                struct {
@@ -982,9 +991,9 @@ struct ib_device {
        struct list_head              event_handler_list;
        spinlock_t                    event_handler_lock;
 
+       spinlock_t                    client_data_lock;
        struct list_head              core_list;
        struct list_head              client_data_list;
-       spinlock_t                    client_data_lock;
 
        struct ib_cache               cache;
        int                          *pkey_tbl_len;
@@ -1142,11 +1151,12 @@ struct ib_device {
                IB_DEV_UNREGISTERED
        }                            reg_state;
 
-       u64                          uverbs_cmd_mask;
        int                          uverbs_abi_ver;
+       u64                          uverbs_cmd_mask;
 
        char                         node_desc[64];
        __be64                       node_guid;
+       u32                          local_dma_lkey;
        u8                           node_type;
        u8                           phys_port_cnt;
 };
@@ -1162,7 +1172,9 @@ struct ib_client {
 struct ib_device *ib_alloc_device(size_t size);
 void ib_dealloc_device(struct ib_device *device);
 
-int ib_register_device   (struct ib_device *device);
+int ib_register_device(struct ib_device *device,
+                      int (*port_callback)(struct ib_device *,
+                                           u8, struct kobject *));
 void ib_unregister_device(struct ib_device *device);
 
 int ib_register_client   (struct ib_client *client);
@@ -1422,6 +1434,11 @@ int ib_destroy_qp(struct ib_qp *qp);
  * @send_wr: A list of work requests to post on the send queue.
  * @bad_send_wr: On an immediate failure, this parameter will reference
  *   the work request that failed to be posted on the QP.
+ *
+ * While IBA Vol. 1 section 11.4.1.1 specifies that if an immediate
+ * error is returned, the QP state shall not be affected,
+ * ib_post_send() will return an immediate error after queueing any
+ * earlier work requests in the list.
  */
 static inline int ib_post_send(struct ib_qp *qp,
                               struct ib_send_wr *send_wr,
@@ -1587,7 +1604,7 @@ static inline int ib_dma_mapping_error(struct ib_device *dev, u64 dma_addr)
 {
        if (dev->dma_ops)
                return dev->dma_ops->mapping_error(dev, dma_addr);
-       return dma_mapping_error(dma_addr);
+       return dma_mapping_error(dev->dma_device, dma_addr);
 }
 
 /**