Merge branch 'arrakis'
authorSimon Gerber <simon.gerber@inf.ethz.ch>
Fri, 14 Aug 2015 06:46:05 +0000 (08:46 +0200)
committerSimon Gerber <simon.gerber@inf.ethz.ch>
Fri, 14 Aug 2015 06:46:05 +0000 (08:46 +0200)
Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

15 files changed:
1  2 
devices/Hakefile
errors/errno.fugu
hake/RuleDefs.hs
hake/symbolic_targets.mk
include/arch/x86_64/barrelfish/invocations_arch.h
include/barrelfish/ump_impl.h
include/barrelfish/vregion.h
include/barrelfish_kpi/capabilities.h
kernel/Hakefile
kernel/arch/x86_64/syscall.c
kernel/dispatch.c
kernel/include/target/x86_64/paging_kernel_target.h
tools/harness/barrelfish.py
usr/pci/pci.c
usr/pci/pci_service.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -30,17 -30,17 +30,18 @@@ __BEGIN_DECL
  // XXX: figure out how to do this arch-independent(?) -SG, 2014-06-16
  #define VREGION_FLAGS_LARGE    0x40 // Map large pages, if possible
  #define VREGION_FLAGS_HUGE     0x80 // Map huge pages, if possible
 -#define VREGION_FLAGS_MASK     0xff // Mask of all individual VREGION_FLAGS
 +#define VREGION_FLAGS_WRITE_COMBINING   0x100 // Write-combining caching
 +#define VREGION_FLAGS_MASK     0x1ff // Mask of all individual VREGION_FLAGS
+ #define VREGION_FLAGS_VTD_SNOOP  0x800 // Snooping (for pages) allowed by VT-d
  
  #define VREGION_FLAGS_READ_WRITE \
-     (VREGION_FLAGS_READ | VREGION_FLAGS_WRITE)
+     (VREGION_FLAGS_READ | VREGION_FLAGS_WRITE | VREGION_FLAGS_VTD_SNOOP)
  #define VREGION_FLAGS_READ_EXECUTE \
-     (VREGION_FLAGS_READ | VREGION_FLAGS_EXECUTE)
+     (VREGION_FLAGS_READ | VREGION_FLAGS_EXECUTE | VREGION_FLAGS_VTD_SNOOP)
  #define VREGION_FLAGS_READ_WRITE_NOCACHE \
-     (VREGION_FLAGS_READ | VREGION_FLAGS_WRITE | VREGION_FLAGS_NOCACHE)
+     (VREGION_FLAGS_READ | VREGION_FLAGS_WRITE | VREGION_FLAGS_NOCACHE | VREGION_FLAGS_VTD_SNOOP)
  #define VREGION_FLAGS_READ_WRITE_MPB \
-     (VREGION_FLAGS_READ | VREGION_FLAGS_WRITE | VREGION_FLAGS_MPB)
+     (VREGION_FLAGS_READ | VREGION_FLAGS_WRITE | VREGION_FLAGS_MPB | VREGION_FLAGS_VTD_SNOOP)
  
  struct vspace;
  struct memobj;
@@@ -219,7 -220,10 +220,11 @@@ enum dispatcher_cmd 
      DispatcherCmd_PerfMon,          ///< Performance monitoring
      DispatcherCmd_SetupGuest,       ///< Set up the DCB of a guest domain
      DispatcherCmd_DumpPTables,      ///< Dump hw page tables of dispatcher
 +    DispatcherCmd_DumpCapabilities  ///< Dump capabilities of dispatcher
+     DispatcherCmd_Vmread,           ///< Execute vmread on the current and active VMCS      
+     DispatcherCmd_Vmwrite,          ///< Execute vmwrite on the current and active VMCS
+     DispatcherCmd_Vmptrld,          ///< Make VMCS clear and inactive
+     DispatcherCmd_Vmclear           ///< Make VMCS current and active 
  };
  
  /**
diff --cc kernel/Hakefile
Simple merge
@@@ -927,7 -1018,10 +1034,11 @@@ static invocation_handler_t invocations
          [DispatcherCmd_SetupGuest] = handle_dispatcher_setup_guest,
  #endif
          [DispatcherCmd_DumpPTables]  = dispatcher_dump_ptables,
 +        [DispatcherCmd_DumpCapabilities] = dispatcher_dump_capabilities
+       [DispatcherCmd_Vmread] = handle_vmread,
+       [DispatcherCmd_Vmwrite] = handle_vmwrite,
+       [DispatcherCmd_Vmptrld] = handle_vmptrld,
+       [DispatcherCmd_Vmclear] = handle_vmclear,
      },
      [ObjType_KernelControlBlock] = {
          [FrameCmd_Identify] = handle_kcb_identify,
Simple merge
@@@ -265,8 -268,9 +268,9 @@@ static inline void paging_x86_64_map_la
      tmp.large.attr_index = bitmap & X86_64_PTABLE_ATTR_INDEX ? 1 : 0;
      tmp.large.execute_disable = bitmap & X86_64_PTABLE_EXECUTE_DISABLE ? 1 : 0;
      tmp.large.always1 = 1;
+     tmp.large.vtd_snoop = bitmap & X86_64_VTD_PAGE_SNOOP ? 1 : 0;
      tmp.large.base_addr = base >> 21;
 -    
 +
      *entry = tmp;
  }
  
@@@ -133,24 -132,17 +133,24 @@@ def default_bootmodules(build, machine)
          m.add_module("%s/sbin/routing_setup" %a, ["boot"])
          m.add_module("%s/sbin/corectrl" % a, ["auto"])
  
 +        is_babybel = 0
 +        if re.search("babybel[1-4]|xeon_phi_[1-4]", machine.name) :
 +            is_babybel = 1
 +
          if machine.name == "sbrinz1" or machine.name == "sbrinz2" \
          or machine.name == "tomme1" or machine.name == "tomme2" \
 -        or machine.name == "babybel1" or machine.name == "babybel2" \
 -        or machine.name == "babybel3" :
 +        or is_babybel == 1 :
              # PCI allocation broken, use BIOS plan
              m.add_module("%s/sbin/pci" % a, ["auto",
-                                              "skb_bridge_program=bridge_bios"])
+                                              "skb_bridge_program=bridge_bios"] + machine.get_pci_args())
          else:
-             m.add_module("%s/sbin/pci" % a, ["auto"])
+             m.add_module("%s/sbin/pci" % a, ["auto"] + machine.get_pci_args())
  
 +        if is_babybel :
 +            m.add_module("%s/sbin/kaluga" % a, ["boot", "eth0=4:0:0"])
 +        else :
 +            m.add_module("%s/sbin/kaluga" % a, ["boot"])
 +
      if a == "armv7":
        if machine.get_ncores() == 2:
                m.add_module("corectrl", ["boot", "1"])
diff --cc usr/pci/pci.c
Simple merge
@@@ -204,24 -201,9 +204,9 @@@ XXX: I/O-Cap?
          }
  */
  
 -        get_cap_response_cont(b, SYS_ERR_OK, cap, type);
 +        get_cap_response_cont(b, SYS_ERR_OK, cap, type, bar_nr);
      }
  }
- static void reregister_interrupt_handler(struct pci_binding *b,
-                                     uint32_t class_code, uint32_t sub_class,
-                                     uint32_t prog_if, uint32_t vendor_id,
-                                     uint32_t device_id,
-                                     uint32_t bus, uint32_t dev, uint32_t fun,
-                                     coreid_t coreid, uint32_t vector)
- {
-     errval_t err;
-     err = device_reregister_interrupt(coreid, vector,
-                       class_code, sub_class, prog_if, vendor_id, device_id,
-                       &bus, &dev, &fun);
-     err = b->tx_vtbl.reregister_interrupt_response(b, NOP_CONT, err);
-     assert(err_is_ok(err));
- }
  /*
  static void get_vbe_bios_cap(struct pci_binding *b)
  {