Commit df97b92060e9f754a5dcaa81a762ea708aa087c7

Authored by Eduardo Habkost
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>
... ... @@ -1152,7 +1152,7 @@ static void pc_init1(ram_addr_t ram_size,
1152 1152 }
1153 1153  
1154 1154 /* Add virtio balloon device */
1155   - if (pci_enabled) {
  1155 + if (pci_enabled && !no_virtio_balloon) {
1156 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 681 ETEXI
682 682  
683 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 693 DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable,
685 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 695 " ACPI table description\n")
... ...
sysemu.h
... ... @@ -116,6 +116,7 @@ extern int win2k_install_hack;
116 116 extern int rtc_td_hack;
117 117 extern int alt_grab;
118 118 extern int usb_enabled;
  119 +extern int no_virtio_balloon;
119 120 extern int smp_cpus;
120 121 extern int cursor_hide;
121 122 extern int graphic_rotate;
... ...
... ... @@ -244,6 +244,7 @@ int smp_cpus = 1;
244 244 const char *vnc_display;
245 245 int acpi_enabled = 1;
246 246 int no_hpet = 0;
  247 +int no_virtio_balloon = 0;
247 248 int fd_bootchk = 1;
248 249 int no_reboot = 0;
249 250 int no_shutdown = 0;
... ... @@ -5551,6 +5552,9 @@ int main(int argc, char **argv, char **envp)
5551 5552 case QEMU_OPTION_no_hpet:
5552 5553 no_hpet = 1;
5553 5554 break;
  5555 + case QEMU_OPTION_no_virtio_balloon:
  5556 + no_virtio_balloon = 1;
  5557 + break;
5554 5558 #endif
5555 5559 case QEMU_OPTION_no_reboot:
5556 5560 no_reboot = 1;
... ...