[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 23/28] kvm: Make KVMState be the TYPE_KVM_ACCEL i
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PULL 23/28] kvm: Make KVMState be the TYPE_KVM_ACCEL instance struct |
Date: |
Fri, 10 Oct 2014 12:09:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 |
Il 10/10/2014 11:11, Cornelia Huck ha scritto:
> On Fri, 10 Oct 2014 10:47:09 +0200
> Cornelia Huck <address@hidden> wrote:
>
>> On Thu, 9 Oct 2014 12:17:30 +0200
>> Paolo Bonzini <address@hidden> wrote:
>>
>>> From: Eduardo Habkost <address@hidden>
>>>
>>> Now that we create an accel object before calling machine_init, we can
>>> simply use the accel object to save all KVMState data, instead of
>>> allocationg KVMState manually.
>>>
>>> Reviewed-by: Paolo Bonzini <address@hidden>
>>> Signed-off-by: Eduardo Habkost <address@hidden>
>>> Signed-off-by: Paolo Bonzini <address@hidden>
>>> ---
>>> kvm-all.c | 13 +++++++++----
>>> 1 file changed, 9 insertions(+), 4 deletions(-)
>>
>> This patch breaks compilation on s390 for me:
>>
>> CC s390x-softmmu/kvm-all.o
>> /home/cohuck/git/qemu/kvm-all.c:110: error: redefinition of typedef
>> ‘KVMState’
>> /home/cohuck/git/qemu/include/sysemu/kvm.h:161: error: previous declaration
>> of ‘KVMState’ was here
>
> Seems to be compiler version dependant. With the SLES11SP3 compiler
> (calls itself 4.3.4), I get the failure above. With newer compilers
> (4.6+), it builds fine.
Can you check that this fixes it?
diff --git a/kvm-all.c b/kvm-all.c
index e98a7c7..44a5e72 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -71,7 +71,7 @@ typedef struct KVMSlot
typedef struct kvm_dirty_log KVMDirtyLog;
-typedef struct KVMState
+struct KVMState
{
AccelState parent_obj;
@@ -107,7 +107,7 @@ typedef struct KVMState
QTAILQ_HEAD(msi_hashtab, KVMMSIRoute) msi_hashtab[KVM_MSI_HASHTAB_SIZE];
bool direct_msi;
#endif
-} KVMState;
+};
#define TYPE_KVM_ACCEL ACCEL_CLASS_NAME("kvm")
Paolo
- [Qemu-devel] [PULL 18/28] accel: Remove tcg_available() function, (continued)
- [Qemu-devel] [PULL 18/28] accel: Remove tcg_available() function, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 19/28] accel: Move accel init/allowed code to separate function, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 20/28] accel: Rename 'init' method to 'init_machine', Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 22/28] accel: Create accel object when initializing machine, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 21/28] accel: Pass MachineState object to accel init functions, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 26/28] qemu-error: Add error_vreport(), Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 27/28] qemu-sockets: Add error to non-blocking connect handler, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 23/28] kvm: Make KVMState be the TYPE_KVM_ACCEL instance struct, Paolo Bonzini, 2014/10/09
- Re: [Qemu-devel] [PULL 23/28] kvm: Make KVMState be the TYPE_KVM_ACCEL instance struct, Gonglei, 2014/10/10
[Qemu-devel] [PULL 28/28] qemu-char: Fix reconnect socket error reporting, Paolo Bonzini, 2014/10/09
[Qemu-devel] [PULL 25/28] virtio-scsi: fix use-after-free of VirtIOSCSIReq, Paolo Bonzini, 2014/10/09
[Qemu-devel] [PULL 24/28] linuxboot: compute initrd loading address, Paolo Bonzini, 2014/10/09
[Qemu-devel] [PULL 07/28] vl.c: Small coding style fix, Paolo Bonzini, 2014/10/09
[Qemu-devel] [PULL 16/28] accel: Move Xen registration code to xen-common.c, Paolo Bonzini, 2014/10/09
[Qemu-devel] [PULL 15/28] accel: Move KVM accel registration to kvm-all.c, Paolo Bonzini, 2014/10/09
[Qemu-devel] [PULL 10/28] accel: Simplify configure_accelerator() using AccelType *acc variable, Paolo Bonzini, 2014/10/09
[Qemu-devel] [PULL 11/28] accel: Move accel name lookup to separate function, Paolo Bonzini, 2014/10/09