mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 21:21:32 +00:00
pvh work
This commit is contained in:
@ -139,7 +139,9 @@ impl GuestLauncher {
|
|||||||
None
|
None
|
||||||
};
|
};
|
||||||
let cmdline_options = [
|
let cmdline_options = [
|
||||||
if request.debug { "debug" } else { "quiet" },
|
"earlycon=xen,keep",
|
||||||
|
"earlyprintk=xen,keep",
|
||||||
|
"debug",
|
||||||
"elevator=noop",
|
"elevator=noop",
|
||||||
];
|
];
|
||||||
let cmdline = cmdline_options.join(" ");
|
let cmdline = cmdline_options.join(" ");
|
||||||
|
@ -7,7 +7,7 @@ use log::error;
|
|||||||
use loopdev::LoopControl;
|
use loopdev::LoopControl;
|
||||||
use tokio::sync::Semaphore;
|
use tokio::sync::Semaphore;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
use xenclient::{x86pv::X86PvPlatform, XenClient};
|
use xenclient::{x86pvh::X86PvhPlatform, XenClient};
|
||||||
use xenstore::{XsdClient, XsdInterface};
|
use xenstore::{XsdClient, XsdInterface};
|
||||||
|
|
||||||
use self::{
|
use self::{
|
||||||
@ -21,6 +21,8 @@ pub mod channel;
|
|||||||
pub mod ip;
|
pub mod ip;
|
||||||
pub mod launch;
|
pub mod launch;
|
||||||
|
|
||||||
|
type RuntimePlatform = X86PvhPlatform;
|
||||||
|
|
||||||
pub struct GuestLoopInfo {
|
pub struct GuestLoopInfo {
|
||||||
pub device: String,
|
pub device: String,
|
||||||
pub file: String,
|
pub file: String,
|
||||||
@ -49,13 +51,13 @@ pub struct GuestInfo {
|
|||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct RuntimeContext {
|
pub struct RuntimeContext {
|
||||||
pub autoloop: AutoLoop,
|
pub autoloop: AutoLoop,
|
||||||
pub xen: XenClient<X86PvPlatform>,
|
pub xen: XenClient<RuntimePlatform>,
|
||||||
pub ipvendor: IpVendor,
|
pub ipvendor: IpVendor,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RuntimeContext {
|
impl RuntimeContext {
|
||||||
pub async fn new(host_uuid: Uuid) -> Result<Self> {
|
pub async fn new(host_uuid: Uuid) -> Result<Self> {
|
||||||
let xen = XenClient::open(0, X86PvPlatform::new()).await?;
|
let xen = XenClient::open(0, RuntimePlatform::new()).await?;
|
||||||
let ipv4_network = Ipv4Network::new(Ipv4Addr::new(10, 75, 80, 0), 24)?;
|
let ipv4_network = Ipv4Network::new(Ipv4Addr::new(10, 75, 80, 0), 24)?;
|
||||||
let ipv6_network = Ipv6Network::from_str("fdd4:1476:6c7e::/48")?;
|
let ipv6_network = Ipv6Network::from_str("fdd4:1476:6c7e::/48")?;
|
||||||
let ipvend =
|
let ipvend =
|
||||||
|
@ -377,8 +377,9 @@ pub struct acpi_info {
|
|||||||
pub pci_hi_len: uint64_t,
|
pub pci_hi_len: uint64_t,
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe extern "C" fn test_bit(mut _b: libc::c_uint, mut _p: *const libc::c_void) -> libc::c_int {
|
unsafe extern "C" fn test_bit(mut b: libc::c_uint, mut p: *const libc::c_void) -> libc::c_int {
|
||||||
panic!("Reached end of non-void function without returning");
|
let p = p as *const u8;
|
||||||
|
(*(p.offset((b >> 3) as isize)) & (1 << b & 7)) as i32
|
||||||
}
|
}
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub static mut ssdt_s3: [libc::c_uchar; 49] = [
|
pub static mut ssdt_s3: [libc::c_uchar; 49] = [
|
||||||
@ -29650,9 +29651,9 @@ pub unsafe extern "C" fn acpi_build_tables(
|
|||||||
)]);
|
)]);
|
||||||
i = 0 as libc::c_int;
|
i = 0 as libc::c_int;
|
||||||
while secondary_tables[i as usize] != 0 {
|
while secondary_tables[i as usize] != 0 {
|
||||||
(*addr_of_mut!((*xsdt).entry)
|
addr_of_mut!((*xsdt).entry)
|
||||||
.offset((i + 1 as libc::c_int) as isize))[0] =
|
.offset((i + 1 as libc::c_int) as isize)
|
||||||
secondary_tables[i as usize];
|
.write_unaligned([secondary_tables[i as usize]]);
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
(*xsdt).header.length =
|
(*xsdt).header.length =
|
||||||
|
Reference in New Issue
Block a user