Skip to content

Commit af669ac

Browse files
Andre-ARMMarc Zyngier
authored andcommitted
KVM: move iodev.h from virt/kvm/ to include/kvm
iodev.h contains definitions for the kvm_io_bus framework. This is needed both by the generic KVM code in virt/kvm as well as by architecture specific code under arch/. Putting the header file in virt/kvm and using local includes in the architecture part seems at least dodgy to me, so let's move the file into include/kvm, so that a more natural "#include <kvm/iodev.h>" can be used by all of the code. This also solves a problem later when using struct kvm_io_device in arm_vgic.h. Fixing up the FSF address in the GPL header and a wrong include path on the way. Signed-off-by: Andre Przywara <[email protected]> Acked-by: Christoffer Dall <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Reviewed-by: Marcelo Tosatti <[email protected]> Signed-off-by: Marc Zyngier <[email protected]>
1 parent e32edf4 commit af669ac

File tree

9 files changed

+10
-11
lines changed

9 files changed

+10
-11
lines changed

arch/powerpc/kvm/mpic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <asm/kvm_para.h>
3535
#include <asm/kvm_host.h>
3636
#include <asm/kvm_ppc.h>
37-
#include "iodev.h"
37+
#include <kvm/iodev.h>
3838

3939
#define MAX_CPU 32
4040
#define MAX_SRC 256

arch/x86/kvm/i8254.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <linux/kthread.h>
55

6-
#include "iodev.h"
6+
#include <kvm/iodev.h>
77

88
struct kvm_kpit_channel_state {
99
u32 count; /* can be 65536 */

arch/x86/kvm/ioapic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <linux/kvm_host.h>
55

6-
#include "iodev.h"
6+
#include <kvm/iodev.h>
77

88
struct kvm;
99
struct kvm_vcpu;

arch/x86/kvm/irq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <linux/kvm_host.h>
2828
#include <linux/spinlock.h>
2929

30-
#include "iodev.h"
30+
#include <kvm/iodev.h>
3131
#include "ioapic.h"
3232
#include "lapic.h"
3333

arch/x86/kvm/lapic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef __KVM_X86_LAPIC_H
22
#define __KVM_X86_LAPIC_H
33

4-
#include "iodev.h"
4+
#include <kvm/iodev.h>
55

66
#include <linux/kvm_host.h>
77

virt/kvm/iodev.h renamed to include/kvm/iodev.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@
99
* GNU General Public License for more details.
1010
*
1111
* You should have received a copy of the GNU General Public License
12-
* along with this program; if not, write to the Free Software
13-
* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
12+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1413
*/
1514

1615
#ifndef __KVM_IODEV_H__
1716
#define __KVM_IODEV_H__
1817

1918
#include <linux/kvm_types.h>
20-
#include <asm/errno.h>
19+
#include <linux/errno.h>
2120

2221
struct kvm_io_device;
2322
struct kvm_vcpu;

virt/kvm/coalesced_mmio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*/
1010

11-
#include "iodev.h"
11+
#include <kvm/iodev.h>
1212

1313
#include <linux/kvm_host.h>
1414
#include <linux/slab.h>

virt/kvm/eventfd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <linux/seqlock.h>
3737
#include <trace/events/kvm.h>
3838

39-
#include "iodev.h"
39+
#include <kvm/iodev.h>
4040

4141
#ifdef CONFIG_HAVE_KVM_IRQFD
4242
/*

virt/kvm/kvm_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
*/
1818

19-
#include "iodev.h"
19+
#include <kvm/iodev.h>
2020

2121
#include <linux/kvm_host.h>
2222
#include <linux/kvm.h>

0 commit comments

Comments
 (0)