|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH] provide opaque CPUState to files that are compiled once |
Date: | Fri, 02 Apr 2010 18:06:40 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3 |
qemu-kvm.h references CPUState and includes cpu.h, so with the latest changes all files that include qemu-kvm.h break, even if they don't require qemu-kvm.h. With this patch they instead get the opaque definition via hw/hw.h (which includes cpu-common.h), and qemu-kvm.h can avoid including cpu.h.This is why I added #ifndef NEED_CPU_H to kvm.h.
Yes, but adding NEED_CPU_H everywhere is just as bad, or worse.
Another example is the new apic.h file created by Blue Swirl. It references CPUState. It includes apic_get_irq_delivered, so I placed apic_set_irq_delivered there too. But apic_set_irq_delivered is used by i8259.c which is compiled once.But i8259.c is compiled per target, grep Makefile.target?
Hmm, that was something else, but apic.h was it. :-) Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |