mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
pvh: Initialize vCPU regs/sregs for PVH boot
Set the initial values of the KVM vCPU registers as specified in the PVH boot ABI: https://xenbits.xen.org/docs/unstable/misc/pvh.html Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
24f0e42e6a
commit
840a9a97ff
@@ -296,11 +296,16 @@ impl Vcpu {
|
||||
kernel_entry_point.entry_addr.raw_value(),
|
||||
arch::x86_64::layout::BOOT_STACK_POINTER.raw_value(),
|
||||
arch::x86_64::layout::ZERO_PAGE_START.raw_value(),
|
||||
kernel_entry_point.protocol,
|
||||
)
|
||||
.map_err(Error::REGSConfiguration)?;
|
||||
arch::x86_64::regs::setup_fpu(&self.fd).map_err(Error::FPUConfiguration)?;
|
||||
arch::x86_64::regs::setup_sregs(&vm_memory.memory(), &self.fd)
|
||||
.map_err(Error::SREGSConfiguration)?;
|
||||
arch::x86_64::regs::setup_sregs(
|
||||
&vm_memory.memory(),
|
||||
&self.fd,
|
||||
kernel_entry_point.protocol,
|
||||
)
|
||||
.map_err(Error::SREGSConfiguration)?;
|
||||
}
|
||||
arch::x86_64::interrupts::set_lint(&self.fd).map_err(Error::LocalIntConfiguration)?;
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user