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