kvm: fix set_gsi_routing() test

We have to create irqchip in kernel before we are allowed to set up
routing.

BUG=None
TEST=cargo test -p kvm

Change-Id: Icee680ce3cc16af9cf4492c048f0b9b3cbe98d09
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1192230
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
This commit is contained in:
Dmitry Torokhov 2018-08-27 12:51:14 -07:00 committed by chrome-bot
parent f4afa06ac6
commit 45e6c843bb

View file

@ -1610,6 +1610,7 @@ mod tests {
let kvm = Kvm::new().unwrap();
let gm = GuestMemory::new(&vec![(GuestAddress(0), 0x10000)]).unwrap();
let vm = Vm::new(&kvm, gm).unwrap();
vm.create_irq_chip().unwrap();
vm.set_gsi_routing(&[]).unwrap();
vm.set_gsi_routing(&[IrqRoute {
gsi: 1,