All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: kvm@vger.kernel.org
Subject: [PATCH 15/24] Rename USE_KVM_* to CONFIG_KVM_*
Date: Fri, 18 Sep 2009 13:41:26 +0200	[thread overview]
Message-ID: <25f946668fd7b62904e1fb2f46eadf2afc0681d7.1253272938.git.quintela@redhat.com> (raw)
In-Reply-To: <cover.1253272938.git.quintela@redhat.com>
In-Reply-To: <cover.1253272938.git.quintela@redhat.com>

Once there, simplify Makefile.target with new syntax

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target  |   13 +++----------
 configure        |    4 ++--
 create_config    |    3 ---
 hw/ipf.c         |    4 ++--
 hw/pc.c          |    6 +++---
 hw/pci-hotplug.c |   14 +++++++-------
 hw/pci.c         |    4 ++--
 hw/pcspk.c       |    2 +-
 qemu-kvm.c       |    8 ++++----
 qemu-kvm.h       |    2 +-
 10 files changed, 25 insertions(+), 35 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 525a8c2..4a5352b 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -212,22 +212,15 @@ obj-i386-y += extboot.o
 obj-i386-y += ne2000-isa.o
 obj-i386-y += testdev.o

-ifeq ($(USE_KVM_PIT), 1)
-obj-i386-y += i8254-kvm.o
-endif
-ifeq ($(USE_KVM_DEVICE_ASSIGNMENT), 1)
-obj-i386-y += device-assignment.o
-endif
+obj-i386-$(CONFIG_KVM_PIT) += i8254-kvm.o
+obj-i386-$(CONFIG_KVM_DEVICE_ASSIGNMENT) += device-assignment.o

 # Hardware support
 obj-ia64-y += ide.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
 obj-ia64-y += fdc.o mc146818rtc.o serial.o i8259.o ipf.o
 obj-ia64-y += cirrus_vga.o parallel.o acpi.o piix_pci.o
 obj-ia64-y += usb-uhci.o
-
-ifeq ($(USE_KVM_DEVICE_ASSIGNMENT), 1)
-obj-ia64-y += device-assignment.o
-endif
+obj-ia64-$(CONFIG_KVM_DEVICE_ASSIGNMENT) += device-assignment.o

 # shared objects
 obj-ppc-y = ppc.o ide/core.o ide/isa.o ide/pci.o ide/macio.o
diff --git a/configure b/configure
index fc067a4..ef7d03d 100755
--- a/configure
+++ b/configure
@@ -2363,10 +2363,10 @@ case "$target_arch2" in
       echo "CONFIG_KVM=y" >> $config_mak
       echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
       if test $kvm_cap_pit = "yes" ; then
-        echo "USE_KVM_PIT=1" >> $config_mak
+        echo "CONFIG_KVM_PIT=y" >> $config_mak
       fi
       if test $kvm_cap_device_assignment = "yes" ; then
-        echo "USE_KVM_DEVICE_ASSIGNMENT=1" >> $config_mak
+        echo "CONFIG_KVM_DEVICE_ASSIGNMENT=y" >> $config_mak
       fi
     fi
 esac
diff --git a/create_config b/create_config
index 8d265d1..5bc8fb6 100755
--- a/create_config
+++ b/create_config
@@ -85,9 +85,6 @@ case $line in
     value=${line#*=}
     echo "#define $name $value"
     ;;
- USE_KVM_*)
-    echo "#define $(echo "$line" | sed 's/=/ /')"
-    ;;
 esac

 done # read
diff --git a/hw/ipf.c b/hw/ipf.c
index 04b7b2c..21cff72 100644
--- a/hw/ipf.c
+++ b/hw/ipf.c
@@ -636,10 +636,10 @@ static void ipf_init1(ram_addr_t ram_size,
 	}
     }

-#ifdef USE_KVM_DEVICE_ASSIGNMENT
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
     if (kvm_enabled())
 	add_assigned_devices(pci_bus, assigned_devices, assigned_devices_index);
-#endif /* USE_KVM_DEVICE_ASSIGNMENT */
+#endif /* CONFIG_KVM_DEVICE_ASSIGNMENT */

 }

diff --git a/hw/pc.c b/hw/pc.c
index 5f892c7..7e2a502 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1344,7 +1344,7 @@ static void pc_init1(ram_addr_t ram_size,
         isa_irq_state->ioapic = ioapic_init();
         ioapic_irq_hack = isa_irq;
     }
-#ifdef USE_KVM_PIT
+#ifdef CONFIG_KVM_PIT
     if (kvm_enabled() && qemu_kvm_pit_in_kernel())
 	pit = kvm_pit_init(0x40, isa_reserve_irq(0));
     else
@@ -1468,12 +1468,12 @@ static void pc_init1(ram_addr_t ram_size,
         }
     }

-#ifdef USE_KVM_DEVICE_ASSIGNMENT
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
     if (kvm_enabled()) {
         add_assigned_devices(pci_bus, assigned_devices, assigned_devices_index);
         assigned_dev_load_option_roms(pci_option_rom_offset);
     }
-#endif /* USE_KVM_DEVICE_ASSIGNMENT */
+#endif /* CONFIG_KVM_DEVICE_ASSIGNMENT */
 }

 static void pc_init_pci(ram_addr_t ram_size,
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index b8ea9ae..eab0756 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -155,7 +155,7 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
     return dev;
 }

-#ifdef USE_KVM_DEVICE_ASSIGNMENT
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
 static PCIDevice *qemu_pci_hot_assign_device(Monitor *mon,
                                              const char *devaddr,
                                              const char *opts)
@@ -192,7 +192,7 @@ static void qemu_pci_hot_deassign_device(Monitor *mon, AssignedDevInfo *adev)
                    "(\"%s\") from guest\n",
                    adev->bus, adev->dev, adev->func, adev->name);
 }
-#endif /* USE_KVM_DEVICE_ASSIGNMENT */
+#endif /* CONFIG_KVM_DEVICE_ASSIGNMENT */

 void pci_device_hot_add(Monitor *mon, const QDict *qdict)
 {
@@ -217,10 +217,10 @@ void pci_device_hot_add(Monitor *mon, const QDict *qdict)
         dev = qemu_pci_hot_add_nic(mon, pci_addr, opts);
     else if (strcmp(type, "storage") == 0)
         dev = qemu_pci_hot_add_storage(mon, pci_addr, opts);
-#ifdef USE_KVM_DEVICE_ASSIGNMENT
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
     else if (strcmp(type, "host") == 0)
         dev = qemu_pci_hot_assign_device(mon, pci_addr, opts);
-#endif /* USE_KVM_DEVICE_ASSIGNMENT */
+#endif /* CONFIG_KVM_DEVICE_ASSIGNMENT */
     else
         monitor_printf(mon, "invalid type: %s\n", type);

@@ -274,7 +274,7 @@ void pci_device_hot_remove_success(int pcibus, int slot)
 {
     PCIDevice *d = pci_find_device(pcibus, slot, 0);
     int class_code;
-#ifdef USE_KVM_DEVICE_ASSIGNMENT
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
     AssignedDevInfo *adev;
 #endif

@@ -283,13 +283,13 @@ void pci_device_hot_remove_success(int pcibus, int slot)
         return;
     }

-#ifdef USE_KVM_DEVICE_ASSIGNMENT
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
     adev = get_assigned_device(pcibus, slot);
     if (adev) {
         qemu_pci_hot_deassign_device(cur_mon, adev);
         return;
     }
-#endif /* USE_KVM_DEVICE_ASSIGNMENT */
+#endif /* CONFIG_KVM_DEVICE_ASSIGNMENT */

     class_code = d->config_read(d, PCI_CLASS_DEVICE+1, 1);

diff --git a/hw/pci.c b/hw/pci.c
index 9c22a67..3da5ade 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -650,12 +650,12 @@ void pci_default_write_config(PCIDevice *d, uint32_t addr, uint32_t val, int l)
         d->config[addr] = (d->config[addr] & ~wmask) | (val & wmask);
     }

-#ifdef USE_KVM_DEVICE_ASSIGNMENT
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
     if (kvm_enabled() && qemu_kvm_irqchip_in_kernel() &&
         addr >= PIIX_CONFIG_IRQ_ROUTE &&
 	addr < PIIX_CONFIG_IRQ_ROUTE + 4)
         assigned_dev_update_irqs();
-#endif /* USE_KVM_DEVICE_ASSIGNMENT */
+#endif /* CONFIG_KVM_DEVICE_ASSIGNMENT */

     if (memcmp(orig + PCI_BASE_ADDRESS_0, d->config + PCI_BASE_ADDRESS_0, 24)
         || ((orig[PCI_COMMAND] ^ d->config[PCI_COMMAND])
diff --git a/hw/pcspk.c b/hw/pcspk.c
index 3d3eba4..128836b 100644
--- a/hw/pcspk.c
+++ b/hw/pcspk.c
@@ -50,7 +50,7 @@ typedef struct {
 static const char *s_spk = "pcspk";
 static PCSpkState pcspk_state;

-#ifdef USE_KVM_PIT
+#ifdef CONFIG_KVM_PIT
 static void kvm_get_pit_ch2(PITState *pit,
                             struct kvm_pit_state *inkernel_state)
 {
diff --git a/qemu-kvm.c b/qemu-kvm.c
index aaaafd7..5d8d8e2 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -66,7 +66,7 @@ static CPUState *kvm_debug_cpu_requested;

 static uint64_t phys_ram_size;

-#ifdef USE_KVM_DEVICE_ASSIGNMENT
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
 /* The list of ioperm_data */
 static QLIST_HEAD(, ioperm_data) ioperm_head;
 #endif
@@ -1831,7 +1831,7 @@ static void *ap_main_loop(void *_env)
 {
     CPUState *env = _env;
     sigset_t signals;
-#ifdef USE_KVM_DEVICE_ASSIGNMENT
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
     struct ioperm_data *data = NULL;
 #endif

@@ -1841,7 +1841,7 @@ static void *ap_main_loop(void *_env)
     sigprocmask(SIG_BLOCK, &signals, NULL);
     env->kvm_cpu_state.vcpu_ctx = kvm_create_vcpu(env, env->cpu_index);

-#ifdef USE_KVM_DEVICE_ASSIGNMENT
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
     /* do ioperm for io ports of assigned devices */
     QLIST_FOREACH(data, &ioperm_head, entries)
         on_vcpu(env, kvm_arch_do_ioperm, data);
@@ -2424,7 +2424,7 @@ void kvm_mutex_lock(void)
     cpu_single_env = NULL;
 }

-#ifdef USE_KVM_DEVICE_ASSIGNMENT
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
 void kvm_add_ioperm_data(struct ioperm_data *data)
 {
     QLIST_INSERT_HEAD(&ioperm_head, data, entries);
diff --git a/qemu-kvm.h b/qemu-kvm.h
index 0091a16..ac150d6 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -1060,7 +1060,7 @@ int kvm_arch_init_irq_routing(void);
 int kvm_mmio_read(void *opaque, uint64_t addr, uint8_t * data, int len);
 int kvm_mmio_write(void *opaque, uint64_t addr, uint8_t * data, int len);

-#ifdef USE_KVM_DEVICE_ASSIGNMENT
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
 struct ioperm_data;

 void kvm_ioperm(CPUState *env, void *data);
-- 
1.6.2.5


  parent reply	other threads:[~2009-09-18 11:42 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-18 11:41 [PATCH 00/24] configure and Makefile cleanup Juan Quintela
2009-09-18 11:41 ` [PATCH 01/24] Don't disable werror unconditionally Juan Quintela
2009-09-18 19:02   ` Marcelo Tosatti
2009-09-19 10:13     ` Avi Kivity
2009-09-19 11:14       ` Jan Kiszka
2009-09-19 11:41         ` Juan Quintela
2009-09-18 11:41 ` [PATCH 02/24] extboot.bin is a generated file Juan Quintela
2009-09-18 11:41 ` [PATCH 03/24] Remove merge artifacts Juan Quintela
2009-09-18 11:41 ` [PATCH 04/24] piix4_dev is not used for pc's Juan Quintela
2009-09-18 19:05   ` Marcelo Tosatti
2009-09-18 21:42     ` Juan Quintela
2009-09-21  9:10       ` Avi Kivity
2009-09-21  9:37         ` Juan Quintela
2009-09-21  9:45           ` Avi Kivity
2009-09-18 11:41 ` [PATCH 05/24] compatfd is included before, and it is compiled unconditionally Juan Quintela
2009-09-22 13:19   ` Christoph Hellwig
2009-09-22 13:25     ` Juan Quintela
2009-09-22 13:34       ` Christoph Hellwig
2009-10-01 11:58         ` Juan Quintela
2009-10-01 12:05           ` Christoph Hellwig
2009-10-01 14:24             ` Anthony Liguori
2009-10-01 14:23           ` Anthony Liguori
2009-10-01 14:44             ` Avi Kivity
2009-10-01 16:50               ` Anthony Liguori
2009-10-01 17:00                 ` Avi Kivity
2009-10-05 20:48                 ` KVM Support for windows Saksena, Abhishek
2009-10-06 10:51                   ` Avi Kivity
2009-09-18 11:41 ` [PATCH 06/24] Use common style for signalfd Juan Quintela
2009-09-18 11:41 ` [PATCH 07/24] One CONFIG_EVENTFD should be enough Juan Quintela
2009-09-18 11:41 ` [PATCH 08/24] Bring ia64 to current arch selection code Juan Quintela
2009-09-18 11:41 ` [PATCH 09/24] Use configure way of enabling kvm Juan Quintela
2009-09-18 11:41 ` [PATCH 10/24] Prin kvm options values as everything else Juan Quintela
2009-09-18 11:41 ` [PATCH 11/24] KVM temp hack not needed anymore Juan Quintela
2009-09-18 11:41 ` [PATCH 12/24] Introduce libs_softmmu to device assignment code Juan Quintela
2009-09-18 11:41 ` [PATCH 13/24] Use compile_prog function in thee missing compilations Juan Quintela
2009-09-18 11:41 ` [PATCH 14/24] Test for libpci, not only for header Juan Quintela
2009-09-18 11:41 ` Juan Quintela [this message]
2009-09-18 11:41 ` [PATCH 16/24] Move kvm specific tests after main kvm test Juan Quintela
2009-09-18 11:41 ` [PATCH 17/24] Add kvm-cap-pit command line flags Juan Quintela
2009-09-18 11:41 ` [PATCH 18/24] Add kvm-cap-device-assignment " Juan Quintela
2009-09-18 11:41 ` [PATCH 19/24] Fix compilation without device assignment Juan Quintela
2009-09-18 11:41 ` [PATCH 20/24] Only print kvm options when kvm is enabled Juan Quintela
2009-09-18 19:42   ` Marcelo Tosatti
2009-09-18 21:43     ` Juan Quintela
2009-09-18 11:41 ` [PATCH 21/24] __user is not used anywhere in qemu sources Juan Quintela
2009-09-18 11:41 ` [PATCH 22/24] fix mis-merge (we define pkgversion 3 lines above Juan Quintela
2009-09-18 11:41 ` [PATCH 23/24] Get CONFIG_CPU_EMULATION back to life Juan Quintela
2009-09-18 19:54   ` Marcelo Tosatti
2009-09-18 21:44     ` Juan Quintela
2009-09-21  9:13       ` Avi Kivity
2009-09-21  9:36         ` Juan Quintela
2009-09-18 11:41 ` [PATCH 24/24] Remove build-targets-* rules that are always empty Juan Quintela
2009-09-18 19:57 ` [PATCH 00/24] configure and Makefile cleanup Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25f946668fd7b62904e1fb2f46eadf2afc0681d7.1253272938.git.quintela@redhat.com \
    --to=quintela@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.