Commit df97b92060e9f754a5dcaa81a762ea708aa087c7
Committed by
Anthony Liguori
1 parent
6693665a
Add -no-virtio-balloon command-line option
This new option may be used to disable the virtio-balloon device. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
4 changed files
with
15 additions
and
1 deletions
hw/pc.c
@@ -1152,7 +1152,7 @@ static void pc_init1(ram_addr_t ram_size, | @@ -1152,7 +1152,7 @@ static void pc_init1(ram_addr_t ram_size, | ||
1152 | } | 1152 | } |
1153 | 1153 | ||
1154 | /* Add virtio balloon device */ | 1154 | /* Add virtio balloon device */ |
1155 | - if (pci_enabled) { | 1155 | + if (pci_enabled && !no_virtio_balloon) { |
1156 | pci_create_simple(pci_bus, -1, "virtio-balloon-pci"); | 1156 | pci_create_simple(pci_bus, -1, "virtio-balloon-pci"); |
1157 | } | 1157 | } |
1158 | 1158 |
qemu-options.hx
@@ -681,6 +681,15 @@ Disable HPET support. | @@ -681,6 +681,15 @@ Disable HPET support. | ||
681 | ETEXI | 681 | ETEXI |
682 | 682 | ||
683 | #ifdef TARGET_I386 | 683 | #ifdef TARGET_I386 |
684 | +DEF("no-virtio-balloon", 0, QEMU_OPTION_no_virtio_balloon, | ||
685 | + "-no-virtio-balloon disable virtio balloon device\n") | ||
686 | +#endif | ||
687 | +STEXI | ||
688 | +@item -no-virtio-balloon | ||
689 | +Disable virtio-balloon device. | ||
690 | +ETEXI | ||
691 | + | ||
692 | +#ifdef TARGET_I386 | ||
684 | DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable, | 693 | DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable, |
685 | "-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,data=file1[:file2]...]\n" | 694 | "-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,data=file1[:file2]...]\n" |
686 | " ACPI table description\n") | 695 | " ACPI table description\n") |
sysemu.h
@@ -116,6 +116,7 @@ extern int win2k_install_hack; | @@ -116,6 +116,7 @@ extern int win2k_install_hack; | ||
116 | extern int rtc_td_hack; | 116 | extern int rtc_td_hack; |
117 | extern int alt_grab; | 117 | extern int alt_grab; |
118 | extern int usb_enabled; | 118 | extern int usb_enabled; |
119 | +extern int no_virtio_balloon; | ||
119 | extern int smp_cpus; | 120 | extern int smp_cpus; |
120 | extern int cursor_hide; | 121 | extern int cursor_hide; |
121 | extern int graphic_rotate; | 122 | extern int graphic_rotate; |
vl.c
@@ -244,6 +244,7 @@ int smp_cpus = 1; | @@ -244,6 +244,7 @@ int smp_cpus = 1; | ||
244 | const char *vnc_display; | 244 | const char *vnc_display; |
245 | int acpi_enabled = 1; | 245 | int acpi_enabled = 1; |
246 | int no_hpet = 0; | 246 | int no_hpet = 0; |
247 | +int no_virtio_balloon = 0; | ||
247 | int fd_bootchk = 1; | 248 | int fd_bootchk = 1; |
248 | int no_reboot = 0; | 249 | int no_reboot = 0; |
249 | int no_shutdown = 0; | 250 | int no_shutdown = 0; |
@@ -5551,6 +5552,9 @@ int main(int argc, char **argv, char **envp) | @@ -5551,6 +5552,9 @@ int main(int argc, char **argv, char **envp) | ||
5551 | case QEMU_OPTION_no_hpet: | 5552 | case QEMU_OPTION_no_hpet: |
5552 | no_hpet = 1; | 5553 | no_hpet = 1; |
5553 | break; | 5554 | break; |
5555 | + case QEMU_OPTION_no_virtio_balloon: | ||
5556 | + no_virtio_balloon = 1; | ||
5557 | + break; | ||
5554 | #endif | 5558 | #endif |
5555 | case QEMU_OPTION_no_reboot: | 5559 | case QEMU_OPTION_no_reboot: |
5556 | no_reboot = 1; | 5560 | no_reboot = 1; |