All of lore.kernel.org
 help / color / mirror / Atom feed
* Please check ia64 patch for core files to be affected
@ 2005-10-13 20:23 Magenheimer, Dan (HP Labs Fort Collins)
  2005-10-14  3:06 ` David Hopwood
  2005-10-14  8:36 ` Keir Fraser
  0 siblings, 2 replies; 4+ messages in thread
From: Magenheimer, Dan (HP Labs Fort Collins) @ 2005-10-13 20:23 UTC (permalink / raw)
  To: xen-devel

As part of a general cleanup/bug-fix patch, I've got
the following changes to core files included in the
next round of ia64 changes.  Since these are VT-related
and may affect x86 VT, I wanted to post them for
general xen-devel review first.

Jun, Keir, others -- If you have any problems/concerns
with these please let me know and I will remove them
from the ia64 tree before asking for the next pull
from the ia64 tree.

Thanks,
Dan

============
Signed-off-by Kevin Tian <kevin.tian@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>

diff -r 54b112b314fe -r a88955bbbc90 xen/Rules.mk
--- a/xen/Rules.mk	Wed Oct 12 23:12:59 2005
+++ b/xen/Rules.mk	Thu Oct 13 08:59:03 2005
@@ -47,6 +47,7 @@
 
 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
 
+CFLAGS += -D__HYPERVISOR__
 ifneq ($(debug),y)
 CFLAGS += -DNDEBUG
 ifeq ($(verbose),y)
diff -r 54b112b314fe -r a88955bbbc90 xen/include/public/io/ioreq.h
--- a/xen/include/public/io/ioreq.h	Wed Oct 12 23:12:59 2005
+++ b/xen/include/public/io/ioreq.h	Thu Oct 13 08:59:03 2005
@@ -35,6 +35,13 @@
 #define IOREQ_TYPE_OR		3
 #define IOREQ_TYPE_XOR		4
 
+#ifdef __HYPERVISOR__
+#include <public/io/vmx_vlapic.h>
+#else
+#include <xen/io/vmx_vlapic.h>
+#endif
+
+
 /*
  * VMExit dispatcher should cooperate with instruction decoder to
  * prepare this structure and notify service OS and DM by sending
@@ -55,10 +62,6 @@
     u8      type;		/* I/O type			*/
 } ioreq_t;
 
-#define MAX_VECTOR    256
-#define BITS_PER_BYTE   8
-#define INTR_LEN        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u64)))
-
 typedef struct {
     u64   pic_intr[INTR_LEN];
     u64   pic_mask[INTR_LEN];
@@ -67,10 +70,11 @@
 
 typedef struct {
     ioreq_t         vp_ioreq;
-    unsigned long   vp_intr[INTR_LEN];
+    vl_apic_info    apic_intr;
 } vcpu_iodata_t;
 
 typedef struct {
+    int vcpu_number;
     global_iodata_t     sp_global;
     vcpu_iodata_t       vcpu_iodata[1];
 } shared_iopage_t;
diff -r 54b112b314fe -r a88955bbbc90 xen/include/public/io/vmx_vlapic.h
--- a/xen/include/public/io/vmx_vlapic.h	Wed Oct 12 23:12:59 2005
+++ b/xen/include/public/io/vmx_vlapic.h	Thu Oct 13 08:59:03 2005
@@ -1,57 +1,29 @@
 #ifndef _VMX_VLAPIC_H
 #define _VMX_VLAPIC_H
 
-/*
-   We extended one bit for PIC type
- */
 #define VLAPIC_DELIV_MODE_FIXED          0x0
 #define VLAPIC_DELIV_MODE_LPRI           0x1
 #define VLAPIC_DELIV_MODE_SMI            0x2
+#define VLAPIC_DELIV_MODE_PMI            0x2
 #define VLAPIC_DELIV_MODE_NMI            0x4
 #define VLAPIC_DELIV_MODE_INIT           0x5
 #define VLAPIC_DELIV_MODE_STARTUP        0x6
 #define VLAPIC_DELIV_MODE_EXT            0x7
 #define VLAPIC_DELIV_MODE_MASK            0x8
 
-#define VLAPIC_MSG_LEVEL                4
-
-#define INTR_EXT   0
-#define INTR_APIC   1
-#define INTR_LAPIC  2
-
-#define VL_STATE_EOI    1
-#define VL_STATE_EXT_LOCK   2
-#define VL_STATE_MSG_LOCK   3
-#define VL_STATE_EOI_LOCK   3
-
-#define VLOCAL_APIC_MAX_INTS             256
-#define VLAPIC_INT_COUNT
(VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(u64)))
-#define VLAPIC_INT_COUNT_32
(VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(u32)))
-
-struct vapic_bus_message{
-   u8   deliv_mode:4;   /* deliver mode, including fixed, LPRI, etc */
-   u8   level:1;        /* level or edge */
-   u8   trig_mod:1;    /* assert or disassert */
-   u8   reserved:2;
-   u8   vector;
-};
+#define MAX_VECTOR    256
+#define BITS_PER_BYTE   8
+#define INTR_LEN        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u64)))
+#define INTR_LEN_32        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u32)))
 
 typedef struct {
-    /* interrupt for PIC and ext type IOAPIC interrupt */
-    u64   vl_ext_intr[VLAPIC_INT_COUNT];
-    u64   vl_ext_intr_mask[VLAPIC_INT_COUNT];
-    u64   vl_apic_intr[VLAPIC_INT_COUNT];
-    u64   vl_apic_tmr[VLAPIC_INT_COUNT];
-    u64   vl_eoi[VLAPIC_INT_COUNT];
     u32   vl_lapic_id;
-    u32   direct_intr;
     u32   vl_apr;
     u32   vl_logical_dest;
     u32   vl_dest_format;
     u32   vl_arb_id;
-    u32   vl_state;
-    u32   apic_msg_count;
-    struct vapic_bus_message  vl_apic_msg[24];
-} vlapic_info;
+    u64   irr[INTR_LEN];
+    u64   tmr[INTR_LEN];
+}vl_apic_info;
 
 #endif /* _VMX_VLAPIC_H_ */

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

* RE: Please check ia64 patch for core files to be affected
@ 2005-10-13 21:59 Magenheimer, Dan (HP Labs Fort Collins)
  0 siblings, 0 replies; 4+ messages in thread
From: Magenheimer, Dan (HP Labs Fort Collins) @ 2005-10-13 21:59 UTC (permalink / raw)
  To: xen-devel

Here's another couple changes to core files needed
for ia64.  Here, dsize is a size_t so gcc doesn't
allow it to be printf'd by a %i on ia64 where size_t
is 64-bits (and int is 32 bits).  Unless there
are objections (or a better fix suggested), these
will also be included in the next ia64 pull.

Dan

===========

# User tristan.gingold@bull.net
# Node ID 276744d6f43efc3a2f885d5ade6b9a56733df81c
# Parent  74d56b7ff46cb07fbf7dbb72cad4e14e9d22324f
Modify to be able to compile on ia64.
Width arguments of printf ("%*") should be an int.

diff -r 74d56b7ff46c -r 276744d6f43e tools/xenstore/xs_tdb_dump.c
--- a/tools/xenstore/xs_tdb_dump.c	Tue Oct 11 22:57:44 2005
+++ b/tools/xenstore/xs_tdb_dump.c	Wed Oct 12 12:51:31 2005
@@ -53,17 +53,17 @@
 		hdr = (void *)data.dptr;
 		if (data.dsize < sizeof(*hdr))
 			fprintf(stderr, "%.*s: BAD truncated\n",
-				key.dsize, key.dptr);
+				(int)key.dsize, key.dptr);
 		else if (data.dsize != total_size(hdr))
 			fprintf(stderr, "%.*s: BAD length %i for
%i/%i/%i (%i)\n",
-				key.dsize, key.dptr, data.dsize,
+				(int)key.dsize, key.dptr,
(int)data.dsize,
 				hdr->num_perms, hdr->datalen,
 				hdr->childlen, total_size(hdr));
 		else {
 			unsigned int i;
 			char *p;
 
-			printf("%.*s: ", key.dsize, key.dptr);
+			printf("%.*s: ", (int)key.dsize, key.dptr);
 			for (i = 0; i < hdr->num_perms; i++)
 				printf("%s%c%i",
 				       i == 0 ? "" : ",",
diff -r 74d56b7ff46c -r 276744d6f43e tools/xenstore/xsls.c
--- a/tools/xenstore/xsls.c	Tue Oct 11 22:57:44 2005
+++ b/tools/xenstore/xsls.c	Wed Oct 12 12:51:31 2005
@@ -25,7 +25,7 @@
         if (val == NULL)
             printf(":\n");
         else if ((unsigned)len > (151 - strlen(e[i])))
-            printf(" = \"%.*s...\"\n", 148 - strlen(e[i]), val);
+            printf(" = \"%.*s...\"\n", 148 - (int)strlen(e[i]), val);
         else
             printf(" = \"%s\"\n", val);
         free(val);

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

* Re: Please check ia64 patch for core files to be affected
  2005-10-13 20:23 Please check ia64 patch for core files to be affected Magenheimer, Dan (HP Labs Fort Collins)
@ 2005-10-14  3:06 ` David Hopwood
  2005-10-14  8:36 ` Keir Fraser
  1 sibling, 0 replies; 4+ messages in thread
From: David Hopwood @ 2005-10-14  3:06 UTC (permalink / raw)
  To: xen-devel

Magenheimer, Dan (HP Labs Fort Collins) wrote:
>  #define VLAPIC_DELIV_MODE_FIXED          0x0
>  #define VLAPIC_DELIV_MODE_LPRI           0x1
>  #define VLAPIC_DELIV_MODE_SMI            0x2
> +#define VLAPIC_DELIV_MODE_PMI            0x2
>  #define VLAPIC_DELIV_MODE_NMI            0x4
>  #define VLAPIC_DELIV_MODE_INIT           0x5

Is that right? 0x2, not 0x3?

-- 
David Hopwood <david.nospam.hopwood@blueyonder.co.uk>

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

* Re: Please check ia64 patch for core files to be affected
  2005-10-13 20:23 Please check ia64 patch for core files to be affected Magenheimer, Dan (HP Labs Fort Collins)
  2005-10-14  3:06 ` David Hopwood
@ 2005-10-14  8:36 ` Keir Fraser
  1 sibling, 0 replies; 4+ messages in thread
From: Keir Fraser @ 2005-10-14  8:36 UTC (permalink / raw)
  To: Magenheimer, Dan (HP Labs Fort Collins); +Cc: xen-devel


On 13 Oct 2005, at 21:23, Magenheimer, Dan (HP Labs Fort Collins) wrote:

> Jun, Keir, others -- If you have any problems/concerns
> with these please let me know and I will remove them
> from the ia64 tree before asking for the next pull
> from the ia64 tree.

No need for -D__HYPERVISOR__. There are plenty of examples of including 
public header files for other public header files in 
xen/include/public, without resorting to that hack.

  -- Keir

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

end of thread, other threads:[~2005-10-14  8:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-13 20:23 Please check ia64 patch for core files to be affected Magenheimer, Dan (HP Labs Fort Collins)
2005-10-14  3:06 ` David Hopwood
2005-10-14  8:36 ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2005-10-13 21:59 Magenheimer, Dan (HP Labs Fort Collins)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.