[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/15] cpu: add helper cpu_exists(), to check if
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 02/15] cpu: add helper cpu_exists(), to check if CPU with specified id exists |
Date: |
Thu, 25 Apr 2013 17:46:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 |
Am 25.04.2013 16:05, schrieb Igor Mammedov:
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
> v3:
> * use qemu_for_each_cpu() instead of recursion
> v2:
> * s/get_firmware_id()/get_arch_id()/ rebase fixup
> * remove check for get_arch_id being NULL, since it's always defined
> ---
> include/qom/cpu.h | 10 ++++++++++
> qom/cpu.c | 26 ++++++++++++++++++++++++++
> 2 files changed, 36 insertions(+), 0 deletions(-)
Thanks, applied to qom-cpu (with gtk-doc and Coding Style fixes below):
https://github.com/afaerber/qemu-cpu/commits/qom-cpu
Andreas
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index d7746dd..e54579b 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -236,11 +236,11 @@ CPUState *qemu_get_cpu(int index);
/**
* cpu_exists:
- * @id - guest exposed CPU ID to lookup
+ * @id: Guest-exposed CPU ID to lookup.
*
* Search for CPU with specified ID.
*
- * Returns: true - CPU is found, false - CPU isn't found
+ * Returns: %true - CPU is found, %false - CPU isn't found.
*/
bool cpu_exists(int64_t id);
diff --git a/qom/cpu.c b/qom/cpu.c
index 3f79398..3dc8208 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -24,15 +24,15 @@
#include "qemu/notify.h"
#include "sysemu/sysemu.h"
-typedef struct CPU_exists_args {
+typedef struct CPUExistsArgs {
int64_t id;
bool found;
-} CPU_exists_args;
+} CPUExistsArgs;
static void cpu_exist_cb(CPUState *cpu, void *data)
{
CPUClass *klass = CPU_GET_CLASS(cpu);
- CPU_exists_args *arg = data;
+ CPUExistsArgs *arg = data;
if (klass->get_arch_id(cpu) == arg->id) {
arg->found = true;
@@ -41,7 +41,7 @@ static void cpu_exist_cb(CPUState *cpu, void *data)
bool cpu_exists(int64_t id)
{
- CPU_exists_args data = {
+ CPUExistsArgs data = {
.id = id,
.found = false,
};
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- Re: [Qemu-devel] [PATCH 04/15] target-i386: introduce apic-id property, (continued)
- Re: [Qemu-devel] [PATCH 04/15] target-i386: introduce apic-id property, Eduardo Habkost, 2013/04/26
- Re: [Qemu-devel] [PATCH 04/15] target-i386: introduce apic-id property, Andreas Färber, 2013/04/26
- [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id one CPU is realized, Igor Mammedov, 2013/04/26
- Re: [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id one CPU is realized, Andreas Färber, 2013/04/26
- Re: [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id one CPU is realized, Igor Mammedov, 2013/04/26
- [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id once CPU is realized, Igor Mammedov, 2013/04/26
- Re: [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id once CPU is realized, Andreas Färber, 2013/04/27
- Re: [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id one CPU is realized, Eduardo Habkost, 2013/04/26
[Qemu-devel] [PATCH 02/15] cpu: add helper cpu_exists(), to check if CPU with specified id exists, Igor Mammedov, 2013/04/25
- Re: [Qemu-devel] [PATCH 02/15] cpu: add helper cpu_exists(), to check if CPU with specified id exists,
Andreas Färber <=
[Qemu-devel] [PATCH 05/15] target-i386: introduce ICC bus/device/bridge, Igor Mammedov, 2013/04/25
[Qemu-devel] [PATCH 06/15] target-i386: cpu: attach ICC bus to CPU on its creation, Igor Mammedov, 2013/04/25
[Qemu-devel] [PATCH 07/15] target-i386: replace MSI_SPACE_SIZE with APIC_SPACE_SIZE, Igor Mammedov, 2013/04/25
[Qemu-devel] [PATCH 08/15] target-i386: kvmvapic: make expilict dependency on sysbus.h, Igor Mammedov, 2013/04/25
[Qemu-devel] [PATCH 09/15] target-i386: move APIC to ICC bus, Igor Mammedov, 2013/04/25
[Qemu-devel] [PATCH 10/15] extend memory_region_find() and use it in kvm/ioapic, Igor Mammedov, 2013/04/25
[Qemu-devel] [PATCH 13/15] add hot_add_cpu hook to QEMUMachine and export machine_args, Igor Mammedov, 2013/04/25