Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hurenkam committed Oct 30, 2024
1 parent 3178b8e commit 21cf65f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 1 addition & 7 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ pub struct Config {
gpu: Box<dyn Gpu>,
#[serde(default, deserialize_with = "default_when_missing")]
spice: Option<Spice>,
//#[serde(default, deserialize_with = "default_when_missing")]
//looking_glass: Option<LookingGlass>,
#[serde(default, deserialize_with = "default_when_missing")]
host: Option<Host>,
#[serde(default, deserialize_with = "default_when_missing")]
Expand Down Expand Up @@ -145,7 +143,6 @@ mod tests {
name: wakiza
system:
chipset: { type: "q35", version: "8.1" }
bios: { type: "ovmf", uuid: "04d064c3-66a1-4aa7-9589-f8b3ecf91cd7", file: "/dev/vm1/vm-108-efidisk" }
cpu: { model: "qemu64", sockets: 1, cores: 8, flags: "+aes,+pni,+popcnt,+sse4.1,+sse4.2,+ssse3,enforce" }
memory: { max: 16384, balloon: false }
Expand Down Expand Up @@ -242,10 +239,7 @@ mod tests {
name: gyndine
system:
chipset: { type: "q35", version: "8.1" }
bios: { type: "ovmf", uuid: "c0e240a5-859a-4378-a2d9-95088f531142", file: "/dev/vm1/vm-950-disk-0" }
cpu: { model: "qemu64", sockets: 1, cores: 8, flags: "+aes,+pni,+popcnt,+sse4.1,+sse4.2,+ssse3,enforce" }
memory: { max: 16384, balloon: false }
gpu:
type: "virtio-vga-gl"
Expand Down Expand Up @@ -287,7 +281,7 @@ mod tests {
"-drive", "if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/ezkvm/OVMF_CODE.secboot.4m.fd",
"-drive", "if=pflash,unit=1,id=drive-efidisk0,format=raw,file=/dev/vm1/vm-950-disk-0,size=540672",
"-m", "16384",
"-smp", "8,sockets=1,cores=8,maxcpus=8",
"-smp", "4,sockets=1,cores=4,maxcpus=4",
"-cpu", "qemu64,+aes,+pni,+popcnt,+sse4.1,+sse4.2,+ssse3,enforce",
"-display", "gtk,gl=on",
"-audiodev", "pipewire,id=audiodev0",
Expand Down
9 changes: 8 additions & 1 deletion src/config/display/looking_glass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,14 @@ mod tests {
window: None,
input: None,
};
let expected: Vec<String> = vec![];
let expected: Vec<String> = vec![
"-vga none".to_string(),
"-nographic".to_string(),
"-device virtio-mouse".to_string(),
"-device virtio-keyboard".to_string(),
"-device ivshmem-plain,memdev=ivshmem0,bus=pcie.0".to_string(),
"-object memory-backend-file,id=ivshmem0,share=on,mem-path=,size=".to_string(),
];
assert_eq!(display.get_qemu_args(0), expected);
}
}
2 changes: 1 addition & 1 deletion src/config/system/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl Memory {
impl Default for Memory {
fn default() -> Self {
Self {
max: 2048,
max: 16384,
balloon: None,
}
}
Expand Down

0 comments on commit 21cf65f

Please sign in to comment.