misc cleanups for x86_64 disabling config settings
cover misc cleanups for x86_64 disabling config settings
David Ahern (8):
fix 'no such file' error from make_device_config.sh x86_64 config: fix compile for CONFIG_VMWARE_VGA=n x86_64 config: fix compile for CONFIG_PARALLEL=n remove unused parallel_* variables from pc.c x86_64 config: fix compile for CONFIG_NE2000_ISA=n x86_64 config: fix compile for CONFIG_VGA_ISA=n x86_64 config: fix compile for CONFIG_IDE_ISA=n x86_64 config: fix compile for CONFIG_FDC=n
hw/pc.c | 21 ++++++++++++++++++--- hw/pc_piix.c | 11 +++++++++++ make_device_config.sh | 2 +- 3 files changed, 30 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.3.4
PATCH 1/8 fix 'no such file' error from make_device_config.sh
make_device_config currently emits an error:
make config-all-devices.mak
GEN x86_64-softmmu/config-devices.mak/home/dsa/kvm/releases/qemu.git/make_device_config.sh: line 21: /home/dsa/kvm/releases/qemu.git/default-configs/pci.mak : No such file or directory
/bin/sh does not like the file redirection for tr so change it to cat.
--- make_device_config.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
make_device_config.sh +1 -1
@@ -18,7 +18,7 @@ process_includes () { f=$src while [ -n "$f" ] ; do - f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` + f=`cat $f | tr -d '\r' | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` [ $? = 0 ] || exit 1 all_includes="$all_includes $f" done
Signature · 1 line
1.7.3.4
Re: [Qemu-devel] [PATCH 1/8] fix 'no such file' error from make_device_config.sh
Quoted 18 lines · David Ahern
make_device_configcurrently emits an error:make config-all-devices.mak
GEN x86_64-softmmu/config-devices.mak/home/dsa/kvm/releases/qemu.git/make_device_config.sh: line 21:/home/dsa/kvm/releases/qemu.git/default-configs/pci.mak: No such file or directory
/bin/shdoes not like the file redirection for tr so change it to cat.Signed-off-by David Ahern <[email protected]>--- make_device_config.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)make_device_config.sh +0
-0
make_device_config.sh process_includes () { · line 24
Quoted 8 lines
make_device_config.sh +1
-1@@ -18,7 +18,7 @@ process_includes () { f=$src while [ -n "$f" ] ; do - f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` + f=`cat $f | tr -d '\r' | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` [ $? = 0 ] || exit 1 all_includes="$all_includes $f" done
This sweeps the real error under the carpet: $f has a trailing space.
What about:
make_device_config.sh +1 -1
@@ -18,7 +18,7 @@ process_includes () { f=$src while [ -n "$f" ] ; do - f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` + f=`tr -d '\r' <"$f" | awk '/^include / {print "'$src_dir'/" $2}'` [ $? = 0 ] || exit 1 all_includes="$all_includes $f" done
Re: [Qemu-devel] [PATCH 1/8] fix 'no such file' error from make_device_config.sh
Quoted 38 lines · Markus Armbruster
Quoted 18 lines · David Ahern
make_device_configcurrently emits an error:make config-all-devices.mak
GEN x86_64-softmmu/config-devices.mak/home/dsa/kvm/releases/qemu.git/make_device_config.sh: line 21:/home/dsa/kvm/releases/qemu.git/default-configs/pci.mak: No such file or directory
/bin/shdoes not like the file redirection for tr so change it to cat.Signed-off-by David Ahern <[email protected]>--- make_device_config.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)make_device_config.sh +0
-0make_device_config.sh process_includes () { · line 24
Quoted 8 lines
make_device_config.sh +1
-1@@ -18,7 +18,7 @@ process_includes () { f=$src while [ -n "$f" ] ; do - f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` + f=`cat $f | tr -d '\r' | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` [ $? = 0 ] || exit 1 all_includes="$all_includes $f" doneThis sweeps the real error under the carpet: $f has a trailing space.
What about:
make_device_config.sh +0
-0
make_device_config.sh process_includes () { · line 24
Quoted 8 lines
make_device_config.sh +1
-1@@ -18,7 +18,7 @@ process_includes () { f=$src while [ -n "$f" ] ; do - f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` + f=`tr -d '\r' <"$f" | awk '/^include / {print "'$src_dir'/" $2}'` [ $? = 0 ] || exit 1 all_includes="$all_includes $f" done
That works too.
Any idea why the '%/config-devices.mak' rule does not work for a build directory != src directory?
e.g., src=/my/qemu.git, build=/tmp/build-qemu
x86_64-softmmu/config-devices.mak is not created, so config-all-devices.mak is empty and the build blows up.
David
Re: [Qemu-devel] [PATCH 1/8] fix 'no such file' error from make_device_config.sh
Quoted 40 lines · David Ahern
Quoted 39 lines · Markus Armbruster
Quoted 18 lines · David Ahern
make_device_configcurrently emits an error:make config-all-devices.mak
GEN x86_64-softmmu/config-devices.mak/home/dsa/kvm/releases/qemu.git/make_device_config.sh: line 21:/home/dsa/kvm/releases/qemu.git/default-configs/pci.mak: No such file or directory
/bin/shdoes not like the file redirection for tr so change it to cat.Signed-off-by David Ahern <[email protected]>--- make_device_config.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)make_device_config.sh +0
-0make_device_config.sh process_includes () { · line 24
Quoted 8 lines
make_device_config.sh +1
-1@@ -18,7 +18,7 @@ process_includes () { f=$src while [ -n "$f" ] ; do - f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` + f=`cat $f | tr -d '\r' | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` [ $? = 0 ] || exit 1 all_includes="$all_includes $f" doneThis sweeps the real error under the carpet: $f has a trailing space.
What about:
make_device_config.sh +0
-0@@ -18,7 +18,7 @@ process_includes () {
Quoted 9 lines
make_device_config.sh process_includes () { · line 24
Quoted 7 lines
make_device_config.sh +1
-1f=$src while [ -n "$f" ] ; do - f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` + f=`tr -d '\r' <"$f" | awk '/^include / {print "'$src_dir'/" $2}'` [ $? = 0 ] || exit 1 all_includes="$all_includes $f" doneThat works too.
Care to respin your patch?
Quoted 7 lines
Any idea why the '%/config-devices.mak' rule does not work for a build directory != src directory?
e.g., src=/my/qemu.git, build=/tmp/build-qemu
x86_64-softmmu/config-devices.mak is not created, so config-all-devices.mak is empty and the build blows up.
Should be debuggable :)
"mkdir bld && cd bld && ./configure --disable-werror && make" works for me. config-all-devices.mak has some 80 entries.
Re: [Qemu-devel] [PATCH 1/8] fix 'no such file' error from make_device_config.sh
Quoted 18 lines · Markus Armbruster
Quoted 8 lines
Quoted 8 lines
What about:
make_device_config.sh +0
-0@@ -18,7 +18,7 @@ process_includes () {Quoted 9 lines
make_device_config.sh process_includes () { · line 24
Quoted 7 lines
make_device_config.sh +1
-1f=$src while [ -n "$f" ] ; do - f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` + f=`tr -d '\r' <"$f" | awk '/^include / {print "'$src_dir'/" $2}'` [ $? = 0 ] || exit 1 all_includes="$all_includes $f" doneThat works too.
Quoted 1 line
Care to respin your patch?
done.
Quoted 6 lines
Quoted 6 lines
Any idea why the '%/config-devices.mak' rule does not work for a build directory != src directory?
e.g., src=/my/qemu.git, build=/tmp/build-qemu
Quoted 7 lines
Quoted 2 lines
x86_64-softmmu/config-devices.mak is not created, so config-all-devices.mak is empty and the build blows up.
Should be debuggable :)
"mkdir bld && cd bld && ./configure --disable-werror && make" works for me. config-all-devices.mak has some 80 entries.
And it works for me too. Must have been an 11pm phenomenon.
David
Re: [Qemu-devel] [PATCH 1/8] fix 'no such file' error from make_device_config.sh
In reply to David AhernAm 13.01.2011 07:34, schrieb David Ahern:
Quoted 19 lines
make_device_configcurrently emits an error:make config-all-devices.mak
GEN x86_64-softmmu/config-devices.mak/home/dsa/kvm/releases/qemu.git/make_device_config.sh: line 21:/home/dsa/kvm/releases/qemu.git/default-configs/pci.mak: No such file or directory
/bin/shdoes not like the file redirection for tr so change it to cat.Signed-off-by David Ahern<[email protected]>--- make_device_config.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)make_device_config.sh +0
-0
make_device_config.sh process_includes () { · line 24
Quoted 8 lines
make_device_config.sh +1
-1@@ -18,7 +18,7 @@ process_includes () { f=$src while [ -n "$f" ] ; do - f=`tr -d '\r'< $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` + f=`cat $f | tr -d '\r' | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` [ $? = 0 ] || exit 1 all_includes="$all_includes $f" done
Hello Blue,
a patch from last year which fixes the same problem is still waiting for being committed to qemu master. See
http://patchwork.ozlabs.org/patch/77021/
Thanks,
Stefan
Blue Swirl
AppliedRe: [Qemu-devel] [PATCH 1/8] fix 'no such file' error from make_device_config.sh
Quoted 36 lines · Stefan Weil
Am 13.01.2011 07:34, schrieb David Ahern:
Quoted 23 lines
make_device_configcurrently emits an error:make config-all-devices.mak
GEN x86_64-softmmu/config-devices.mak/home/dsa/kvm/releases/qemu.git/make_device_config.sh: line 21:/home/dsa/kvm/releases/qemu.git/default-configs/pci.mak: No such file or directory
/bin/shdoes not like the file redirection for tr so change it to cat.Signed-off-by David Ahern<[email protected]>---
make_device_config.sh | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)make_device_config.sh +0
-0@@ -18,7 +18,7 @@ process_includes () {f=$src
Quoted 9 lines
while [ -n "$f" ] ; do
- f=tr -d '\r'< $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'
+ f=cat $f | tr -d '\r' | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'
[ $? = 0 ] || exit 1
all_includes="$all_includes $f"
doneHello Blue,
Quoted 3 lines
a patch from last year which fixes the same problem is still waiting for being committed to qemu master. See
http://patchwork.ozlabs.org/patch/77021/
Thanks, applied.
PATCH 2/8 x86_64 config: fix compile for CONFIG_VMWARE_VGA=n
In reply to David Ahern--- hw/pc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
hw/pc.c +2 -0
@@ -1069,11 +1069,13 @@ void pc_vga_init(PCIBus *pci_bus) }else {isa_cirrus_vga_init (); } +#ifdef CONFIG_VMWARE_VGA }else if (vmsvga_enabled) {if (pci_bus)pci_vmsvga_init (pci_bus);else fprintf (stderr,"%s: vmware_vga: no PCI bus\n" , __FUNCTION__); +#endif #ifdef CONFIG_SPICE }else if (qxl_enabled) {if (pci_bus)
Signature · 1 line
1.7.3.4
PATCH 3/8 x86_64 config: fix compile for CONFIG_PARALLEL=n
In reply to David Ahern--- hw/pc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
hw/pc.c +2 -0
@@ -1138,11 +1138,13 @@ void pc_basic_device_init(qemu_irq *isa_irq, } } +#ifdef CONFIG_PARALLEL for (i =0 ; i <MAX_PARALLEL_PORTS ; i++) {if (parallel_hds[i]) {parallel_init (i, parallel_hds[i]); } } +#endif a20_line =qemu_allocate_irqs (handle_a20_line_change, first_cpu,2 ); i8042 =isa_create_simple ("i8042" );
Signature · 1 line
1.7.3.4
PATCH 4/8 remove unused parallel_* variables from pc.c
In reply to David Ahern--- hw/pc.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
hw/pc.c +0 -3
@@ -826,9 +826,6 @@ static const int ne2000_io[NE2000_NB_MAX] = { 0x300, 0x320, 0x340, 0x360, 0x280, 0x380 };static const int ne2000_irq[NE2000_NB_MAX ] = {9 ,10 ,11 ,3 ,4 ,5 }; -static const int parallel_io[MAX_PARALLEL_PORTS ] = {0x378 ,0x278 ,0x3bc }; -static const int parallel_irq[MAX_PARALLEL_PORTS ] = {7 ,7 ,7 }; -void pc_audio_init (PCIBus *pci_bus,qemu_irq *pic) {struct soundhw *c;
Signature · 1 line
1.7.3.4
PATCH 5/8 x86_64 config: fix compile for CONFIG_NE2000_ISA=n
In reply to David Ahern--- hw/pc.c | 4 ++++ hw/pc_piix.c | 2 ++ 2 files changed, 6 insertions(+), 0 deletions(-)
hw/pc.c +4 -0
@@ -822,9 +822,11 @@ static void load_linux(void *fw_cfg,#define NE2000_NB_MAX 6 +#ifdef CONFIG_NE2000_ISA static const int ne2000_io[NE2000_NB_MAX ] = {0x300 ,0x320 ,0x340 ,0x360 ,0x280 ,0x380 };static const int ne2000_irq[NE2000_NB_MAX ] = {9 ,10 ,11 ,3 ,4 ,5 }; +#endif void pc_audio_init (PCIBus *pci_bus,qemu_irq *pic) {
@@ -843,6 +845,7 @@ void pc_audio_init (PCIBus *pci_bus, qemu_irq *pic) } } +#ifdef CONFIG_NE2000_ISA void pc_init_ne2k_isa (NICInfo *nd) {static int nb_ne2k =0 ;
@@ -853,6 +856,7 @@ void pc_init_ne2k_isa(NICInfo *nd) ne2000_irq[nb_ne2k], nd); nb_ne2k++; } +#endif int cpu_is_bsp (CPUState *env) {
hw/pc_piix.c +2 -0
@@ -119,9 +119,11 @@ static void pc_init1(ram_addr_t ram_size,for (i =0 ; i < nb_nics; i++) {NICInfo *nd = &nd_table[i]; +#ifdef CONFIG_NE2000_ISA if (!pci_enabled || (nd->model &&strcmp (nd->model,"ne2k_isa" ) ==0 ))pc_init_ne2k_isa (nd); else +#endif pci_nic_init_nofail (nd,"e1000" ,NULL ); }
Signature · 1 line
1.7.3.4
PATCH 6/8 x86_64 config: fix compile for CONFIG_VGA_ISA=n
In reply to David Ahern--- hw/pc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
hw/pc.c +2 -0
@@ -1087,8 +1087,10 @@ void pc_vga_init(PCIBus *pci_bus) }else if (std_vga_enabled) {if (pci_bus) {pci_vga_init (pci_bus); +#ifdef CONFIG_VGA_ISA }else {isa_vga_init (); +#endif } } }
Signature · 1 line
1.7.3.4
[Qemu-devel] Re: [PATCH 6/8] x86_64 config: fix compile for CONFIG_VGA_ISA=n
Quoted 10 lines · David Ahern
Signed-off-by David Ahern<[email protected]>--- hw/pc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)hw/pc.c +0
-0
hw/pc.c void pc_vga_init(PCIBus *pci_bus) · line 1093
Quoted 7 lines
hw/pc.c +2
-0@@ -1087,8 +1087,10 @@ void pc_vga_init(PCIBus *pci_bus) }else if (std_vga_enabled) {if (pci_bus) {pci_vga_init (pci_bus); +#ifdef CONFIG_VGA_ISA }else {isa_vga_init (); +#endif
Should this be an abort for #ifndef CONFIG_VGA_ISA? And maybe the isapc machine should be disabled altogether?
Paolo
[Qemu-devel] Re: [PATCH 6/8] x86_64 config: fix compile for CONFIG_VGA_ISA=n
Quoted 22 lines · Paolo Bonzini
Quoted 10 lines · David Ahern
Signed-off-by David Ahern<[email protected]>--- hw/pc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)hw/pc.c +0
-0hw/pc.c void pc_vga_init(PCIBus *pci_bus) · line 1093
Quoted 7 lines
hw/pc.c +2
-0@@ -1087,8 +1087,10 @@ void pc_vga_init(PCIBus *pci_bus) }else if (std_vga_enabled) {if (pci_bus) {pci_vga_init (pci_bus); +#ifdef CONFIG_VGA_ISA }else {isa_vga_init (); +#endif Should this be an abort for #ifndef
CONFIG_VGA_ISA? And maybe the isapc machine should be disabled altogether?
Quoted 1 line
Paolo
If that's desired I can change that to:
#ifdef CONFIG_VGA_ISA
} else {
isa_vga_init();
#else
abort();#endif
David
[Qemu-devel] Re: [PATCH 6/8] x86_64 config: fix compile for CONFIG_VGA_ISA=n
Quoted 14 lines · David Ahern
Quoted 12 lines
hw/pc.c void pc_vga_init(PCIBus *pci_bus) · line 1093
Quoted 8 lines
hw/pc.c +2
-0@@ -1087,8 +1087,10 @@ void pc_vga_init(PCIBus *pci_bus) }else if (std_vga_enabled) {if (pci_bus) {pci_vga_init (pci_bus); +#ifdef CONFIG_VGA_ISA }else {isa_vga_init (); +#endif Should this be an abort for #ifndef
CONFIG_VGA_ISA? And maybe the isapc machine should be disabled altogether?Quoted 1 line
Paolo
Quoted 8 lines
If that's desired I can change that to:
#ifdef CONFIG_VGA_ISA } else { isa_vga_init(); #else abort();#endif
Please check if you can trigger the abort via -M isapc (I think so, but I'm not sure). If I am correct, the better solution is to disable isapc.
Paolo
[Qemu-devel] Re: [PATCH 6/8] x86_64 config: fix compile for CONFIG_VGA_ISA=n
Quoted 24 lines · Paolo Bonzini
Quoted 14 lines · David Ahern
Quoted 12 lines
hw/pc.c void pc_vga_init(PCIBus *pci_bus) · line 1093
Quoted 8 lines
hw/pc.c +2
-0@@ -1087,8 +1087,10 @@ void pc_vga_init(PCIBus *pci_bus) }else if (std_vga_enabled) {if (pci_bus) {pci_vga_init (pci_bus); +#ifdef CONFIG_VGA_ISA }else {isa_vga_init (); +#endif Should this be an abort for #ifndef
CONFIG_VGA_ISA? And maybe the isapc machine should be disabled altogether?Quoted 1 line
Paolo
Quoted 8 lines
If that's desired I can change that to:
#ifdef CONFIG_VGA_ISA } else { isa_vga_init(); #else abort();#endif
Quoted 4 lines
Please check if you can trigger the abort via -M isapc (I think so, but I'm not sure). If I am correct, the better solution is to disable isapc.
Paolo
Yes, it would trigger the abort.
And, that test case exposed a larger issue: config-devices.mak and config-all-devices.mak are not added to the config-host.h and x86_64-softmmu/config-target.h config files which means the addition of the ifdef makes it disabled all the time -- regardless of the y/n setting in the config*.mak file. ie., a patch is needed to get the config*device.mak options added to the config*.h file.
David
PATCH 7/8 x86_64 config: fix compile for CONFIG_IDE_ISA=n
In reply to David Ahern--- hw/pc_piix.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
hw/pc_piix.c +9 -0
@@ -38,9 +38,11 @@#define MAX_IDE_BUS 2 +#ifdef CONFIG_IDE_ISA static const int ide_iobase[MAX_IDE_BUS ] = {0x1f0 ,0x170 };static const int ide_iobase2[MAX_IDE_BUS ] = {0x3f6 ,0x376 };static const int ide_irq[MAX_IDE_BUS ] = {14 ,15 }; +#endif static void ioapic_init (IsaIrqState *isa_irq_state) {
@@ -141,6 +143,7 @@ static void pc_init1(ram_addr_t ram_size, dev =pci_piix3_ide_init (pci_bus, hd, piix3_devfn +1 ); idebus[0 ] =qdev_get_child_bus (&dev->qdev,"ide.0" ); idebus[1 ] =qdev_get_child_bus (&dev->qdev,"ide.1" ); +#ifdef CONFIG_IDE_ISA }else {for (i =0 ; i <MAX_IDE_BUS ; i++) {ISADevice *dev;
@@ -149,6 +152,12 @@ static void pc_init1(ram_addr_t ram_size, idebus[i] = qdev_get_child_bus(&dev->qdev, "ide.0"); } } +#else + }else { + idebus[0 ] =NULL ; + idebus[1 ] =NULL ; + } +#endif pc_audio_init (pci_enabled ? pci_bus :NULL , isa_irq);
Signature · 1 line
1.7.3.4
PATCH 8/8 x86_64 config: fix compile for CONFIG_FDC=n
In reply to David Ahern--- hw/pc.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
hw/pc.c +8 -0
@@ -189,6 +189,7 @@ static void pic_irq_request(void *opaque, int irq, int level)/* PC cmos mappings */ +#ifdef CONFIG_FDC #define REG_EQUIPMENT_BYTE 0x14static int cmos_get_fd_drive_type (int fd0)
@@ -214,6 +215,7 @@ static int cmos_get_fd_drive_type(int fd0) }return val; } +#endif static void cmos_init_hd (int type_ofs,int info_ofs,BlockDriverState *hd,ISADevice *s)
@@ -335,7 +337,9 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size, FDCtrl *floppy_controller, ISADevice *s) {int val; +#ifdef CONFIG_FDC int fd0, fd1, nb; +#endif static pc_cmos_init_late_arg arg;/* various important CMOS locations needed by PC/Bochs bios */
@@ -376,6 +380,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,exit (1 ); } +#ifdef CONFIG_FDC /* floppy type */ fd0 =fdctrl_get_drive_type (floppy_controller,0 );
@@ -403,6 +408,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size, val |=0x02 ;/* FPU is there */ val |=0x04 ;/* PS/2 mouse installed */ rtc_set_memory (s,REG_EQUIPMENT_BYTE , val); +#endif /* hard drives */ arg.rtc_state = s;
@@ -1162,7 +1168,9 @@ void pc_basic_device_init(qemu_irq *isa_irq,for (i =0 ; i <MAX_FD ; i++) { fd[i] =drive_get (IF_FLOPPY ,0 , i); } +#ifdef CONFIG_FDC *floppy_controller =fdctrl_init_isa (fd); +#endif }void pc_pci_device_init (PCIBus *pci_bus)
Signature · 1 line
1.7.3.4
[Qemu-devel] Re: [PATCH 8/8] x86_64 config: fix compile for CONFIG_FDC=n
hw/pc.c void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size, · line 411
Quoted 10 lines · David Ahern
hw/pc.c +2
-0+#ifdef CONFIG_FDC /* floppy type */ fd0 =fdctrl_get_drive_type (floppy_controller,0 );@@ -403,6 +408,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size, val |=0x02 ;/* FPU is there */ val |=0x04 ;/* PS/2 mouse installed */ rtc_set_memory (s,REG_EQUIPMENT_BYTE , val); +#endif
Isn't it a bit too eager? The equipment byte should still be set, or have you checked with a real machine?
Paolo
[Qemu-devel] Re: [PATCH 8/8] x86_64 config: fix compile for CONFIG_FDC=n
Quoted 16 lines · Paolo Bonzini
hw/pc.c void pc_cmos_init(ram_addr_t ram_size, ram_addr_t · line 412
Quoted 11 lines · David Ahern
hw/pc.c +2
-0+#ifdef CONFIG_FDC /* floppy type */ fd0 =fdctrl_get_drive_type (floppy_controller,0 );@@ -403,6 +408,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size, val |=0x02 ;/* FPU is there */ val |=0x04 ;/* PS/2 mouse installed */ rtc_set_memory (s,REG_EQUIPMENT_BYTE , val); +#endif Isn't it a bit too eager? The equipment byte should still be set, or have you checked with a real machine?
Quoted 1 line
Paolo
A bit to eager. I'll fix.
David
How about creating stub functions instead of #ifdefs? something like
pc-stubs.c
#ifndef CONFIG_VMWARE_VGApci_vmsvga_init()
{
error ...
}#endif
#ifndef CONFIG_...
...
Quoted 19 lines · David Ahern
David Ahern (8):
fix 'no such file' error frommake_device_config.shx86_64config: fix compile forCONFIG_VMWARE_VGA=nx86_64config: fix compile forCONFIG_PARALLEL=nremove unused parallel_* variables frompc.cx86_64config: fix compile forCONFIG_NE2000_ISA=nx86_64config: fix compile forCONFIG_VGA_ISA=nx86_64config: fix compile forCONFIG_IDE_ISA=nx86_64config: fix compile forCONFIG_FDC=nhw/pc.c | 21 ++++++++++++++++++--- hw/pc_piix.c | 11 +++++++++++ make_device_config.sh | 2 +- 3 files changed, 30 insertions(+), 4 deletions(-)Signature · 1 line
1.7.3.4
Signature · 1 line
yamahata
Quoted 6 lines · Isaku Yamahata
How about creating stub functions instead of #ifdefs? something like
pc-stubs.c
#ifndefCONFIG_VMWARE_VGApci_vmsvga_init()
Quoted 6 lines
{ error ... }#endif
#ifndefCONFIG_...
...
I wasn't trying to re-architect how the CONFIG_XXXX is implemented; I only wanted the existing design to actually work. There are a number of CONFIG settings which exist in name, but cannot in fact be disabled.
David
Quoted 23 lines · David Ahern
Quoted 19 lines
David Ahern (8):
fix 'no such file' error frommake_device_config.shx86_64config: fix compile forCONFIG_VMWARE_VGA=nx86_64config: fix compile forCONFIG_PARALLEL=nremove unused parallel_* variables frompc.cx86_64config: fix compile forCONFIG_NE2000_ISA=nx86_64config: fix compile forCONFIG_VGA_ISA=nx86_64config: fix compile forCONFIG_IDE_ISA=nx86_64config: fix compile forCONFIG_FDC=nhw/pc.c | 21 ++++++++++++++++++--- hw/pc_piix.c | 11 +++++++++++ make_device_config.sh | 2 +- 3 files changed, 30 insertions(+), 4 deletions(-)Signature · 1 line
1.7.3.4
Quoted 1 line · Isaku Yamahata
How about creating stub functions instead of #ifdefs?
I think David's #ifdef's are okay. Ultimately what you'd want is to drive all this from configuration files, and if this were done you wouldn't need stub functions.
Paolo