From f6e4852ec92838a73486355bdb14baf774b8045a Mon Sep 17 00:00:00 2001 From: Eduardo Habkost <ehabkost@redhat.com> Date: Wed, 31 Mar 2010 21:08:30 -0300 Subject: [PATCH] Build an additional bios without hotplug support RH-Author: Eduardo Habkost <ehabkost@redhat.com> Message-id: <1270069711-6283-2-git-send-email-ehabkost@redhat.com> Patchwork-id: 8277 O-Subject: [PATCH KVM 5.6 5.5 1/2] Build an additional bios without hotplug support Bugzilla: 498774 RH-Acked-by: Marcelo Tosatti <mtosatti@redhat.com> RH-Acked-by: Dor Laor <dlaor@redhat.com> RH-Acked-by: Juan Quintela <quintela@redhat.com> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=498774 This is the solution #1 proposed at https://bugzilla.redhat.com/498774#c50 > 1.add an additional bios.bin with pci hot plug disabled. > It will be the rhev default using vdsm flag/path since rhev does not use hot > plug while it is required in rhel. We add a parameter for it (with the > additional bios) The new bios image can be selected by VDSM by using "-bios bios-nohotplug.bin" on the qemu command-line. Please ACK for 5.6, 5.5.z, and (possibly) 5.4.z. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- Makefile | 6 +++- bios/Makefile | 7 ++++- bios/acpi-dsdt.dsl | 74 ++++++++++++++++++++++++++++++--------------------- 3 files changed, 54 insertions(+), 33 deletions(-) Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- Makefile | 6 +++- bios/Makefile | 7 ++++- bios/acpi-dsdt.dsl | 74 ++++++++++++++++++++++++++++++--------------------- 3 files changed, 54 insertions(+), 33 deletions(-) diff --git a/Makefile b/Makefile index e82fa9c..3fa926d 100644 --- a/Makefile +++ b/Makefile @@ -40,8 +40,12 @@ header-sync-y: ln -sf asm-$(sane-arch) kernel/include/asm bios: - $(MAKE) -C $@ + $(MAKE) -C bios clean + $(MAKE) -C bios cp bios/BIOS-bochs-latest qemu/pc-bios/bios.bin + $(MAKE) -C bios clean + $(MAKE) -C bios DSDT_CPPFLAGS=-DNO_HOTPLUG + cp bios/BIOS-bochs-latest qemu/pc-bios/bios-nohotplug.bin vgabios: $(MAKE) -C $@ diff --git a/bios/Makefile b/bios/Makefile index 2d1f40d..a12086e 100644 --- a/bios/Makefile +++ b/bios/Makefile @@ -57,6 +57,11 @@ LOCAL_CXXFLAGS = BUILDDATE = `date '+%m/%d/%y'` BIOS_BUILD_DATE = "-DBIOS_BUILD_DATE=\"$(BUILDDATE)\"" + +DSDT_CPPFLAGS = +# use the following to disable hotplug on all slots on the DSDT +#DSDT_CPPFLAGS = -DNO_HOTPLUG + # # -------- end configurable options -------------------------- # @@ -112,7 +117,7 @@ rombios32.o: rombios32.c acpi-dsdt.hex $(GCC) -m32 -O2 -Wall -c -o $@ $< acpi-dsdt.hex: acpi-dsdt.dsl - cpp -P $< $<.i + cpp $(DSDT_CPPFLAGS) -P $< $<.i iasl -tc -p $@ $<.i sed -i -e's/^unsigned/const unsigned/' $@ rm $<.i diff --git a/bios/acpi-dsdt.dsl b/bios/acpi-dsdt.dsl index bd657b5..9658be9 100755 --- a/bios/acpi-dsdt.dsl +++ b/bios/acpi-dsdt.dsl @@ -230,37 +230,49 @@ DefinitionBlock ( Name (_SUN, name) \ } - hotplug_slot(1, 0x0001) - hotplug_slot(2, 0x0002) - hotplug_slot(3, 0x0003) - hotplug_slot(4, 0x0004) - hotplug_slot(5, 0x0005) - hotplug_slot(6, 0x0006) - hotplug_slot(7, 0x0007) - hotplug_slot(8, 0x0008) - hotplug_slot(9, 0x0009) - hotplug_slot(10, 0x000a) - hotplug_slot(11, 0x000b) - hotplug_slot(12, 0x000c) - hotplug_slot(13, 0x000d) - hotplug_slot(14, 0x000e) - hotplug_slot(15, 0x000f) - hotplug_slot(16, 0x0010) - hotplug_slot(17, 0x0011) - hotplug_slot(18, 0x0012) - hotplug_slot(19, 0x0013) - hotplug_slot(20, 0x0014) - hotplug_slot(21, 0x0015) - hotplug_slot(22, 0x0016) - hotplug_slot(23, 0x0017) - hotplug_slot(24, 0x0018) - hotplug_slot(25, 0x0019) - hotplug_slot(26, 0x001a) - hotplug_slot(27, 0x001b) - hotplug_slot(28, 0x001c) - hotplug_slot(29, 0x001d) - hotplug_slot(30, 0x001e) - hotplug_slot(31, 0x001f) +#define nohotplug_slot(name, nr) \ + Device (S##name) { \ + Name (_ADR, nr##0000) \ + Name (_SUN, name) \ + } + +#ifdef NO_HOTPLUG +#define slot(name, nr) nohotplug_slot(name, nr) +#else +#define slot(name, nr) hotplug_slot(name, nr) +#endif + + slot(1, 0x0001) + slot(2, 0x0002) + slot(3, 0x0003) + slot(4, 0x0004) + slot(5, 0x0005) + slot(6, 0x0006) + slot(7, 0x0007) + slot(8, 0x0008) + slot(9, 0x0009) + slot(10, 0x000a) + slot(11, 0x000b) + slot(12, 0x000c) + slot(13, 0x000d) + slot(14, 0x000e) + slot(15, 0x000f) + slot(16, 0x0010) + slot(17, 0x0011) + slot(18, 0x0012) + slot(19, 0x0013) + slot(20, 0x0014) + slot(21, 0x0015) + slot(22, 0x0016) + slot(23, 0x0017) + slot(24, 0x0018) + slot(25, 0x0019) + slot(26, 0x001a) + slot(27, 0x001b) + slot(28, 0x001c) + slot(29, 0x001d) + slot(30, 0x001e) + slot(31, 0x001f) Name (_CRS, ResourceTemplate () { -- 1.7.0.3