Add VMware machine
PATCH 1/1 Add VMware machine
Hi,
Attached patch adds a 'vmware' machine type.
This one automatically uses VMware display card, and enables VMware mouse. In non VMware machine types (ie 'pc' and 'isapc' types), VMware backdoor and VMware mouse are disabled [1]
I added an enum with PC types in pc.c . This system can be extended later to add more PC types.
Please comment.
Hervé
[1] This has the same effect that the switch '-no-vmport' proposed by Ian Kirk in http://marc.info/?l=qemu-devel&m=121957847306185&w=2
boards.h +1 -0
@@ -29,6 +29,7 @@/* pc.c */ extern QEMUMachine pc_machine;extern QEMUMachine isapc_machine; +extern QEMUMachine vmware_machine;/* ppc.c */ extern QEMUMachine prep_machine;
pc.c +99 -54
276 lines not on this page · raw message
pc.h +2 -1
@@ -69,7 +69,8 @@/* pckbd.c */ -void i8042_init (qemu_irq kbd_irq,qemu_irq mouse_irq,uint32_t io_base); +void i8042_init (qemu_irq kbd_irq,qemu_irq mouse_irq,uint32_t io_base, +int vmmouse);void i8042_mm_init (qemu_irq kbd_irq,qemu_irq mouse_irq,target_phys_addr_t base,int it_shift);
pckbd.c +4 -5
@@ -365,7 +365,8 @@return 0 ; } -void i8042_init (qemu_irq kbd_irq,qemu_irq mouse_irq,uint32_t io_base) +void i8042_init (qemu_irq kbd_irq,qemu_irq mouse_irq,uint32_t io_base, +int vmmouse) {KBDState *s = &kbd_state;
@@ -382,7 +383,8 @@ s->kbd =ps2_kbd_init (kbd_update_kbd_irq, s); s->mouse =ps2_mouse_init (kbd_update_aux_irq, s);#ifdef TARGET_I386 -vmmouse_init (s->mouse); +if (vmmouse) +vmmouse_init (s->mouse);#endif qemu_register_reset (kbd_reset, s); }
@@ -446,8 +448,5 @@ s->kbd =ps2_kbd_init (kbd_update_kbd_irq, s); s->mouse =ps2_mouse_init (kbd_update_aux_irq, s); -#ifdef TARGET_I386 -vmmouse_init (s->mouse); -#endif qemu_register_reset (kbd_reset, s); }
machine.c +1 -0
@@ -9,6 +9,7 @@ {qemu_register_machine (&pc_machine);qemu_register_machine (&isapc_machine); +qemu_register_machine (&vmware_machine); }static void cpu_put_seg (QEMUFile *f,SegmentCache *dt)
vl.c +1 -0
@@ -8632,6 +8632,7 @@ vmsvga_enabled =0 ;break ;case QEMU_OPTION_vmsvga: +printf ("qemu: you should use 'vmware' machine type instead (see -M option)\n" ); cirrus_vga_enabled =0 ; vmsvga_enabled =1 ;break ;
Quoted 11 lines · Hervé Poussineau
Hi,
Attached patch adds a 'vmware' machine type.
This one automatically uses VMware display card, and enables VMware mouse. In non VMware machine types (ie 'pc' and 'isapc' types), VMware backdoor and VMware mouse are disabled [1]I added an enum with PC types in
pc.c. This system can be extended later to add more PC types.Please comment.
Please take a look at the hwdef structure in hw/sun4m.c, maybe it makes the code simpler if instead of checking if the machine type matches a set, you'd check if the feature is enabled in the the structure instance.
Quoted 5 lines · Hervé Poussineau
Hi,
Attached patch adds a 'vmware' machine type.
This one automatically uses VMware display card, and enables VMware mouse.
I really don't like the idea of proliferating machine types in the absence of a configuration file system.
Quoted 3 lines
In non VMware machine types (ie 'pc' and 'isapc' types), VMware backdoor and VMware mouse are disabled [1]
Why would we want to disable these things?
Regards,
Anthony Liguori
Quoted 10 lines
I added an enum with PC types in
pc.c. This system can be extended later to add more PC types.Please comment.
Hervé
[1] This has the same effect that the switch '-no-vmport' proposed by Ian Kirk in http://marc.info/?l=qemu-devel&m=121957847306185&w=2