x86_64: call set_lint() for BIOS as well

This configures the IRQ chip and is not called anywhere else for the
normal BIOS path, so it should be moved above the `if has_bios` check.

BUG=b:237095693
TEST=crosvm run --bios u-boot.rom --disk test.img # virtio-blk works

Change-Id: I1813d59d7921a824c46a49de98d272f639cc5c07
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3723801
Reviewed-by: Steven Richman <srichman@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
This commit is contained in:
Daniel Verkamp 2022-06-24 15:46:26 -07:00 committed by Chromeos LUCI
parent ad3914cd9a
commit 814114c64c

View file

@ -823,6 +823,8 @@ impl arch::LinuxArch for X8664arch {
vcpu.set_msrs(&msrs).map_err(Error::SetupMsrs)?;
interrupts::set_lint(vcpu_id, irq_chip).map_err(Error::SetLint)?;
if has_bios {
regs::set_reset_vector(vcpu).map_err(Error::SetupRegs)?;
return Ok(());
@ -831,7 +833,6 @@ impl arch::LinuxArch for X8664arch {
let guest_mem = vm.get_memory();
vcpu.set_regs(&vcpu_init.regs).map_err(Error::WriteRegs)?;
regs::setup_sregs(guest_mem, vcpu).map_err(Error::SetupSregs)?;
interrupts::set_lint(vcpu_id, irq_chip).map_err(Error::SetLint)?;
Ok(())
}