mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 13:11:31 +00:00
fix domain info struct layout
This commit is contained in:
@ -44,6 +44,7 @@ impl DomainControl<'_> {
|
|||||||
shr_pages: 0,
|
shr_pages: 0,
|
||||||
paged_pages: 0,
|
paged_pages: 0,
|
||||||
shared_info_frame: 0,
|
shared_info_frame: 0,
|
||||||
|
cpu_time: 0,
|
||||||
number_online_vcpus: 0,
|
number_online_vcpus: 0,
|
||||||
max_vcpu_id: 0,
|
max_vcpu_id: 0,
|
||||||
ssidref: 0,
|
ssidref: 0,
|
||||||
|
@ -278,6 +278,7 @@ pub struct GetDomainInfo {
|
|||||||
pub shr_pages: u64,
|
pub shr_pages: u64,
|
||||||
pub paged_pages: u64,
|
pub paged_pages: u64,
|
||||||
pub shared_info_frame: u64,
|
pub shared_info_frame: u64,
|
||||||
|
pub cpu_time: u64,
|
||||||
pub number_online_vcpus: u32,
|
pub number_online_vcpus: u32,
|
||||||
pub max_vcpu_id: u32,
|
pub max_vcpu_id: u32,
|
||||||
pub ssidref: u32,
|
pub ssidref: u32,
|
||||||
|
@ -18,8 +18,8 @@ fn main() -> Result<(), XenClientError> {
|
|||||||
let kernel_image_path = args.get(1).expect("argument not specified");
|
let kernel_image_path = args.get(1).expect("argument not specified");
|
||||||
let call = XenCall::open()?;
|
let call = XenCall::open()?;
|
||||||
let domctl = DomainControl::new(&call);
|
let domctl = DomainControl::new(&call);
|
||||||
let domid = domctl.create_domain(CreateDomain::default())?;
|
let domain = CreateDomain { max_vcpus: 2, ..Default::default() };
|
||||||
domctl.set_max_vcpus(domid, 1)?;
|
let domid = domctl.create_domain(domain)?;
|
||||||
let result = boot(domid, kernel_image_path.as_str(), &call, &domctl);
|
let result = boot(domid, kernel_image_path.as_str(), &call, &domctl);
|
||||||
domctl.destroy_domain(domid)?;
|
domctl.destroy_domain(domid)?;
|
||||||
result?;
|
result?;
|
||||||
|
Reference in New Issue
Block a user