mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
pdb: execution_domain -> vcpu
This commit is contained in:
1 parent
cb1cb38544
commit
d850b8fed3
3 files changed
+14
-14
No files matched your search
@@ -13,28 +13,28 @@ open Intel
|
||||
type context_t =
|
||||
{
|
||||
mutable domain : int;
|
||||
mutable execution_domain : int
|
||||
mutable vcpu : int
|
||||
}
|
||||
|
||||
let default_context = { domain = 0; execution_domain = 0 }
|
||||
let default_context = { domain = 0; vcpu = 0 }
|
||||
|
||||
let new_context dom exec_dom = {domain = dom; execution_domain = exec_dom}
|
||||
let new_context new_dom new_vcpu = {domain = new_dom; vcpu = new_vcpu}
|
||||
|
||||
let set_domain ctx value =
|
||||
ctx.domain <- value
|
||||
|
||||
let set_execution_domain ctx value =
|
||||
ctx.execution_domain <- value
|
||||
let set_vcpu ctx value =
|
||||
ctx.vcpu <- value
|
||||
|
||||
let get_domain ctx =
|
||||
ctx.domain
|
||||
|
||||
let get_execution_domain ctx =
|
||||
ctx.execution_domain
|
||||
let get_vcpu ctx =
|
||||
ctx.vcpu
|
||||
|
||||
let string_of_context ctx =
|
||||
Printf.sprintf "{domain} domain: %d, execution_domain: %d"
|
||||
ctx.domain ctx.execution_domain
|
||||
Printf.sprintf "{domain} domain: %d, vcpu: %d"
|
||||
ctx.domain ctx.vcpu
|
||||
|
||||
external read_registers : context_t -> registers = "dom_read_registers"
|
||||
external write_register : context_t -> register -> int32 -> unit =
|
||||
|
||||
@@ -17,8 +17,8 @@ val new_context : int -> int -> context_t
|
||||
|
||||
val set_domain : context_t -> int -> unit
|
||||
val get_domain : context_t -> int
|
||||
val set_execution_domain : context_t -> int -> unit
|
||||
val get_execution_domain : context_t -> int
|
||||
val set_vcpu : context_t -> int -> unit
|
||||
val get_vcpu : context_t -> int
|
||||
|
||||
val string_of_context : context_t -> string
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ let find_domain dom vcpu =
|
||||
match ctx with
|
||||
| Domain d ->
|
||||
if (((Domain.get_domain d) = dom) &&
|
||||
((Domain.get_execution_domain d) = vcpu))
|
||||
((Domain.get_vcpu d) = vcpu))
|
||||
then
|
||||
key :: list
|
||||
else
|
||||
@@ -93,7 +93,7 @@ let find_xen_domain_context domain =
|
||||
let attach_debugger ctx =
|
||||
match ctx with
|
||||
| Domain d -> Domain.attach_debugger (Domain.get_domain d)
|
||||
(Domain.get_execution_domain d)
|
||||
(Domain.get_vcpu d)
|
||||
| Process p ->
|
||||
begin
|
||||
let xdom_sock = find_xen_domain_context (Process.get_domain p) in
|
||||
@@ -108,7 +108,7 @@ let attach_debugger ctx =
|
||||
let detach_debugger ctx =
|
||||
match ctx with
|
||||
| Domain d -> Domain.detach_debugger (Domain.get_domain d)
|
||||
(Domain.get_execution_domain d)
|
||||
(Domain.get_vcpu d)
|
||||
| Process p -> Process.detach_debugger p
|
||||
| _ -> raise (Unimplemented "detach debugger")
|
||||
|
||||
|
||||