public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* rename KVM_CAP_PIC to KVM_CAP_IRQCHIP
@ 2007-07-19  0:28 Dong, Eddie
       [not found] ` <10EA09EFD8728347A513008B6B0DA77A01C730FC-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Dong, Eddie @ 2007-07-19  0:28 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: Type: text/plain, Size: 3331 bytes --]


        Rename KVM_CREATE_PIC to KVM_CREATE_IRQCHIP
        KVM_CAP_PIC to KVM_PIC_IRQCHIP since now it is not only PIC.
    
        Signed-off-by: Yaozu (Eddie) Dong <eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

	against lapic2 branch.


diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index d7e16ba..3ce3e48 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -430,7 +430,6 @@ struct kvm_memory_slot {
 	unsigned long *dirty_bitmap;
 };
 
-struct kvm_pic;
 struct kvm {
 	spinlock_t lock; /* protects everything except vcpus */
 	int naliases;
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 4535c63..bd96a69 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -2864,7 +2864,7 @@ static long kvm_vm_ioctl(struct file *filp,
 			goto out;
 		break;
 	}
-	case KVM_CREATE_PIC:
+	case KVM_CREATE_IRQCHIP:
 		r = -ENOMEM;
 		kvm->vpic = kvm_create_pic(kvm);
 		if (kvm->vpic) {
@@ -3010,7 +3010,7 @@ static long kvm_dev_ioctl(struct file *filp,
 		int ext = (long)argp;
 
 		switch (ext) {
-		case KVM_CAP_PIC:
+		case KVM_CAP_IRQCHIP:
 		case KVM_CAP_HLT:
 			r = 1;
 			break;
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 5307ba3..e5d0f6f 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -287,7 +287,7 @@ struct kvm_signal_mask {
 /*
  * Extension capability list.
  */
-#define KVM_CAP_PIC	  0
+#define KVM_CAP_IRQCHIP	  0
 #define KVM_CAP_HLT	  1
 
 /*
@@ -302,7 +302,7 @@ struct kvm_signal_mask {
 #define KVM_GET_DIRTY_LOG         _IOW(KVMIO, 0x42, struct
kvm_dirty_log)
 #define KVM_SET_MEMORY_ALIAS      _IOW(KVMIO, 0x43, struct
kvm_memory_alias)
 /* Device model IOC */
-#define KVM_CREATE_PIC		  _IO(KVMIO,  0x60)
+#define KVM_CREATE_IRQCHIP	  _IO(KVMIO,  0x60)
 #define KVM_IRQ_LINE		  _IOW(KVMIO, 0x61, struct
kvm_irq_level)
 
 /*



diff --git a/qemu/cpu-defs.h b/qemu/cpu-defs.h
index 67ba41e..0b49c89 100644
--- a/qemu/cpu-defs.h
+++ b/qemu/cpu-defs.h
@@ -75,7 +75,6 @@ typedef unsigned long ram_addr_t;
 #define EXCP_HLT        0x10001 /* hlt instruction reached */
 #define EXCP_DEBUG      0x10002 /* cpu stopped after a breakpoint or
singlestep */
 #define EXCP_HALTED     0x10003 /* cpu is halted (waiting for external
event) */
-#define EXCP_IO_WINDOW  0x10004 /* IO Window for user irq injection */
 #define MAX_BREAKPOINTS 32
 
 #define TB_JMP_CACHE_BITS 12
diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index a5f3492..6ec6e96 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -610,7 +610,6 @@ static int kvm_writeq(void *opaque, uint64_t addr,
uint64_t data)
 
 static int kvm_io_window(void *opaque)
 {
-    env->exception_index = EXCP_IO_WINDOW;
     return 1;
 }
 
diff --git a/user/kvmctl.c b/user/kvmctl.c
index 51ab82d..995e3ed 100644
--- a/user/kvmctl.c
+++ b/user/kvmctl.c
@@ -290,9 +290,9 @@ int kvm_create(kvm_context_t kvm, unsigned long
memory, void **vm_mem)
 	close(zfd);
 
 	kvm->irqchip_in_kernel = 0;
-	r = ioctl(kvm->fd, KVM_CHECK_EXTENSION, KVM_CAP_PIC);
+	r = ioctl(kvm->fd, KVM_CHECK_EXTENSION, KVM_CAP_IRQCHIP);
 	if (r > 0) {	/* kernel irqchip supported */
-		r = ioctl(fd, KVM_CREATE_PIC);
+		r = ioctl(fd, KVM_CREATE_IRQCHIP);
 		if (r >= 0)
 			kvm->irqchip_in_kernel = 1;
 		else

[-- Attachment #2: irqchip-cleanup-user.patch --]
[-- Type: application/octet-stream, Size: 1689 bytes --]

commit 16e00b6086ee18dc202986a30f8fb5311132c11e
Author: root <root@vt32-pae.(none)>
Date:   Thu Jul 19 08:25:32 2007 +0800

    Rename KVM_CREATE_PIC to KVM_CREATE_IRQCHIP
    KVM_CAP_PIC to KVM_PIC_IRQCHIP
    and remove some hack.
    
    Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com>

diff --git a/qemu/cpu-defs.h b/qemu/cpu-defs.h
index 67ba41e..0b49c89 100644
--- a/qemu/cpu-defs.h
+++ b/qemu/cpu-defs.h
@@ -75,7 +75,6 @@ typedef unsigned long ram_addr_t;
 #define EXCP_HLT        0x10001 /* hlt instruction reached */
 #define EXCP_DEBUG      0x10002 /* cpu stopped after a breakpoint or singlestep */
 #define EXCP_HALTED     0x10003 /* cpu is halted (waiting for external event) */
-#define EXCP_IO_WINDOW  0x10004 /* IO Window for user irq injection */
 #define MAX_BREAKPOINTS 32
 
 #define TB_JMP_CACHE_BITS 12
diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index a5f3492..6ec6e96 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -610,7 +610,6 @@ static int kvm_writeq(void *opaque, uint64_t addr, uint64_t data)
 
 static int kvm_io_window(void *opaque)
 {
-    env->exception_index = EXCP_IO_WINDOW;
     return 1;
 }
 
diff --git a/user/kvmctl.c b/user/kvmctl.c
index 51ab82d..995e3ed 100644
--- a/user/kvmctl.c
+++ b/user/kvmctl.c
@@ -290,9 +290,9 @@ int kvm_create(kvm_context_t kvm, unsigned long memory, void **vm_mem)
 	close(zfd);
 
 	kvm->irqchip_in_kernel = 0;
-	r = ioctl(kvm->fd, KVM_CHECK_EXTENSION, KVM_CAP_PIC);
+	r = ioctl(kvm->fd, KVM_CHECK_EXTENSION, KVM_CAP_IRQCHIP);
 	if (r > 0) {	/* kernel irqchip supported */
-		r = ioctl(fd, KVM_CREATE_PIC);
+		r = ioctl(fd, KVM_CREATE_IRQCHIP);
 		if (r >= 0)
 			kvm->irqchip_in_kernel = 1;
 		else

[-- Attachment #3: irqchip-cleanup-kernel.patch --]
[-- Type: application/octet-stream, Size: 1861 bytes --]

commit bbf4443ca52b8746047d8444d664b22113227d15
Author: root <root@vt32-pae.(none)>
Date:   Thu Jul 19 08:26:26 2007 +0800

        Rename KVM_CREATE_PIC to KVM_CREATE_IRQCHIP
        KVM_CAP_PIC to KVM_PIC_IRQCHIP
    
        Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com>

diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index d7e16ba..3ce3e48 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -430,7 +430,6 @@ struct kvm_memory_slot {
 	unsigned long *dirty_bitmap;
 };
 
-struct kvm_pic;
 struct kvm {
 	spinlock_t lock; /* protects everything except vcpus */
 	int naliases;
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 4535c63..bd96a69 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -2864,7 +2864,7 @@ static long kvm_vm_ioctl(struct file *filp,
 			goto out;
 		break;
 	}
-	case KVM_CREATE_PIC:
+	case KVM_CREATE_IRQCHIP:
 		r = -ENOMEM;
 		kvm->vpic = kvm_create_pic(kvm);
 		if (kvm->vpic) {
@@ -3010,7 +3010,7 @@ static long kvm_dev_ioctl(struct file *filp,
 		int ext = (long)argp;
 
 		switch (ext) {
-		case KVM_CAP_PIC:
+		case KVM_CAP_IRQCHIP:
 		case KVM_CAP_HLT:
 			r = 1;
 			break;
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 5307ba3..e5d0f6f 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -287,7 +287,7 @@ struct kvm_signal_mask {
 /*
  * Extension capability list.
  */
-#define KVM_CAP_PIC	  0
+#define KVM_CAP_IRQCHIP	  0
 #define KVM_CAP_HLT	  1
 
 /*
@@ -302,7 +302,7 @@ struct kvm_signal_mask {
 #define KVM_GET_DIRTY_LOG         _IOW(KVMIO, 0x42, struct kvm_dirty_log)
 #define KVM_SET_MEMORY_ALIAS      _IOW(KVMIO, 0x43, struct kvm_memory_alias)
 /* Device model IOC */
-#define KVM_CREATE_PIC		  _IO(KVMIO,  0x60)
+#define KVM_CREATE_IRQCHIP	  _IO(KVMIO,  0x60)
 #define KVM_IRQ_LINE		  _IOW(KVMIO, 0x61, struct kvm_irq_level)
 
 /*

[-- Attachment #4: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #5: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: rename KVM_CAP_PIC to KVM_CAP_IRQCHIP
       [not found] ` <10EA09EFD8728347A513008B6B0DA77A01C730FC-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-07-19  9:14   ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2007-07-19  9:14 UTC (permalink / raw)
  To: Dong, Eddie; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Dong, Eddie wrote:
>         Rename KVM_CREATE_PIC to KVM_CREATE_IRQCHIP
>         KVM_CAP_PIC to KVM_PIC_IRQCHIP since now it is not only PIC.
>     
>   

Applied & pushed both, thanks.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-19  9:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-19  0:28 rename KVM_CAP_PIC to KVM_CAP_IRQCHIP Dong, Eddie
     [not found] ` <10EA09EFD8728347A513008B6B0DA77A01C730FC-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-07-19  9:14   ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox