* Complie issues with trinity-2013-06-17 on s390
@ 2013-06-18 7:07 Sravan V Dodla
2013-06-18 15:39 ` Dave Jones
0 siblings, 1 reply; 6+ messages in thread
From: Sravan V Dodla @ 2013-06-18 7:07 UTC (permalink / raw)
To: trinity
Hello,
I was trying to compile trinity-2013-06-17 build on s390x with kernel
3.9.4 and have hit the following issue:
CC syscalls/fcntl.o
syscalls/fcntl.c: In function ‘sanitise_fcntl’:
syscalls/fcntl.c:70:2: error: duplicate case value
case F_GETLK64:
^
syscalls/fcntl.c:65:2: error: previously used here
case F_GETLK:
^
syscalls/fcntl.c:72:2: error: duplicate case value
case F_SETLK64:
^
syscalls/fcntl.c:66:2: error: previously used here
case F_SETLK:
^
syscalls/fcntl.c:74:2: error: duplicate case value
case F_SETLKW64:
^
syscalls/fcntl.c:67:2: error: previously used here
case F_SETLKW:
^
make: *** [syscalls/fcntl.o] Error 1
Was this a known issue and I was not able to find anything related to
this in archived mails.
Thanks!
-Sravan.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Complie issues with trinity-2013-06-17 on s390
2013-06-18 7:07 Complie issues with trinity-2013-06-17 on s390 Sravan V Dodla
@ 2013-06-18 15:39 ` Dave Jones
2013-06-19 5:40 ` Sravan V Dodla
0 siblings, 1 reply; 6+ messages in thread
From: Dave Jones @ 2013-06-18 15:39 UTC (permalink / raw)
To: Sravan V Dodla; +Cc: trinity
On Tue, Jun 18, 2013 at 12:37:26PM +0530, Sravan V Dodla wrote:
> Hello,
>
> I was trying to compile trinity-2013-06-17 build on s390x with kernel
> 3.9.4 and have hit the following issue:
>
> CC syscalls/fcntl.o
> syscalls/fcntl.c: In function ‘sanitise_fcntl’:
> syscalls/fcntl.c:70:2: error: duplicate case value
> case F_GETLK64:
> ^
> syscalls/fcntl.c:65:2: error: previously used here
> case F_GETLK:
> ^
> syscalls/fcntl.c:72:2: error: duplicate case value
> case F_SETLK64:
> ^
> syscalls/fcntl.c:66:2: error: previously used here
> case F_SETLK:
> ^
> syscalls/fcntl.c:74:2: error: duplicate case value
> case F_SETLKW64:
> ^
> syscalls/fcntl.c:67:2: error: previously used here
> case F_SETLKW:
> ^
> make: *** [syscalls/fcntl.o] Error 1
>
> Was this a known issue and I was not able to find anything related to
> this in archived mails.
Does this help ?
diff --git a/syscalls/fcntl.c b/syscalls/fcntl.c
index 6eb2344..5d651af 100644
--- a/syscalls/fcntl.c
+++ b/syscalls/fcntl.c
@@ -23,6 +23,10 @@
#include "shm.h"
#include "compat.h"
+#if F_GETLK64 != F_GETLK
+#define HAVE_LK64
+#endif
+
void sanitise_fcntl(int childno)
{
switch (shm->a2[childno]) {
@@ -66,7 +70,7 @@ void sanitise_fcntl(int childno)
case F_SETLK:
case F_SETLKW:
break;
-#ifndef __x86_64__
+#ifdef HAVE_LK64
case F_GETLK64:
break;
case F_SETLK64:
@@ -122,7 +126,7 @@ struct syscall syscall_fcntl = {
.arg2name = "cmd",
.arg2type = ARG_OP,
.arg2list = {
-#ifdef __x86_64__
+#ifndef HAVE_LK64
.num = 20,
#else
.num = 23,
@@ -130,7 +134,7 @@ struct syscall syscall_fcntl = {
.values = { F_DUPFD, F_DUPFD_CLOEXEC, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETLK, F_SETLK,
F_SETLKW, F_GETOWN, F_SETOWN, F_GETOWN_EX, F_SETOWN_EX, F_GETSIG, F_SETSIG, F_GETLEASE,
F_SETLEASE, F_NOTIFY, F_SETPIPE_SZ, F_GETPIPE_SZ,
-#ifndef __x86_64__
+#ifdef HAVE_LK64
F_GETLK64, F_SETLK64, F_SETLKW64,
#endif
},
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Complie issues with trinity-2013-06-17 on s390
2013-06-18 15:39 ` Dave Jones
@ 2013-06-19 5:40 ` Sravan V Dodla
2013-06-19 6:28 ` Michael Ellerman
0 siblings, 1 reply; 6+ messages in thread
From: Sravan V Dodla @ 2013-06-19 5:40 UTC (permalink / raw)
To: Dave Jones; +Cc: trinity
On Tue, 2013-06-18 at 11:39 -0400, Dave Jones wrote:
> On Tue, Jun 18, 2013 at 12:37:26PM +0530, Sravan V Dodla wrote:
> Does this help ?
Thanks a lot Dave. That did help :)
Still compilation does not complete successfully. I'm seeing the
following issue on both ppc64 and s390x archs:
CC ioctls/hpet.o
CC ioctls/kvm.o
In file included from ioctls/kvm.c:8:0:
ioctls/kvm.c:15:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_memory_alias’
IOCTL(KVM_SET_MEMORY_ALIAS),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:29:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_pit_state’
IOCTL(KVM_GET_PIT),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:30:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_pit_state’
IOCTL(KVM_SET_PIT),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:35:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_irq_routing’
IOCTL(KVM_SET_GSI_ROUTING),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:47:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_xen_hvm_config’
IOCTL(KVM_XEN_HVM_CONFIG),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:50:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_pit_state2’
IOCTL(KVM_GET_PIT2),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:51:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_pit_state2’
IOCTL(KVM_SET_PIT2),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:76:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_msrs’
IOCTL(KVM_GET_MSRS),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:77:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_msrs’
IOCTL(KVM_SET_MSRS),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:78:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_cpuid’
IOCTL(KVM_SET_CPUID),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:82:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_lapic_state’
IOCTL(KVM_GET_LAPIC),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:83:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_lapic_state’
IOCTL(KVM_SET_LAPIC),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:84:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_cpuid2’
IOCTL(KVM_SET_CPUID2),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:85:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_cpuid2’
IOCTL(KVM_GET_CPUID2),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:90:2: error: large integer implicitly truncated to unsigned
type [-Werror=overflow]
IOCTL(KVM_S390_STORE_STATUS_NOADDR),
^
ioctls/kvm.c:91:2: error: large integer implicitly truncated to unsigned
type [-Werror=overflow]
IOCTL(KVM_S390_STORE_STATUS_PREFIXED),
^
In file included from ioctls/kvm.c:8:0:
ioctls/kvm.c:102:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_x86_mce’
IOCTL(KVM_X86_SET_MCE),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:105:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_vcpu_events’
IOCTL(KVM_GET_VCPU_EVENTS),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:106:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_vcpu_events’
IOCTL(KVM_SET_VCPU_EVENTS),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:107:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_debugregs’
IOCTL(KVM_GET_DEBUGREGS),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:108:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_debugregs’
IOCTL(KVM_SET_DEBUGREGS),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:110:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_xsave’
IOCTL(KVM_GET_XSAVE),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:111:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_xsave’
IOCTL(KVM_SET_XSAVE),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:112:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_xcrs’
IOCTL(KVM_GET_XCRS),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
ioctls/kvm.c:113:8: error: invalid application of ‘sizeof’ to incomplete
type ‘struct kvm_xcrs’
IOCTL(KVM_SET_XCRS),
^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
{ .request = _request, .name = #_request, }
^
cc1: all warnings being treated as errors
make: *** [ioctls/kvm.o] Error 1
>
> diff --git a/syscalls/fcntl.c b/syscalls/fcntl.c
> index 6eb2344..5d651af 100644
> --- a/syscalls/fcntl.c
> +++ b/syscalls/fcntl.c
> @@ -23,6 +23,10 @@
> #include "shm.h"
> #include "compat.h"
>
> +#if F_GETLK64 != F_GETLK
> +#define HAVE_LK64
> +#endif
> +
> void sanitise_fcntl(int childno)
> {
> switch (shm->a2[childno]) {
> @@ -66,7 +70,7 @@ void sanitise_fcntl(int childno)
> case F_SETLK:
> case F_SETLKW:
> break;
> -#ifndef __x86_64__
> +#ifdef HAVE_LK64
> case F_GETLK64:
> break;
> case F_SETLK64:
> @@ -122,7 +126,7 @@ struct syscall syscall_fcntl = {
> .arg2name = "cmd",
> .arg2type = ARG_OP,
> .arg2list = {
> -#ifdef __x86_64__
> +#ifndef HAVE_LK64
> .num = 20,
> #else
> .num = 23,
> @@ -130,7 +134,7 @@ struct syscall syscall_fcntl = {
> .values = { F_DUPFD, F_DUPFD_CLOEXEC, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETLK, F_SETLK,
> F_SETLKW, F_GETOWN, F_SETOWN, F_GETOWN_EX, F_SETOWN_EX, F_GETSIG, F_SETSIG, F_GETLEASE,
> F_SETLEASE, F_NOTIFY, F_SETPIPE_SZ, F_GETPIPE_SZ,
> -#ifndef __x86_64__
> +#ifdef HAVE_LK64
> F_GETLK64, F_SETLK64, F_SETLKW64,
> #endif
> },
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Complie issues with trinity-2013-06-17 on s390
2013-06-19 5:40 ` Sravan V Dodla
@ 2013-06-19 6:28 ` Michael Ellerman
2013-06-19 8:36 ` Sravan V Dodla
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2013-06-19 6:28 UTC (permalink / raw)
To: Sravan V Dodla; +Cc: Dave Jones, trinity
On Wed, 2013-06-19 at 11:10 +0530, Sravan V Dodla wrote:
> On Tue, 2013-06-18 at 11:39 -0400, Dave Jones wrote:
> > On Tue, Jun 18, 2013 at 12:37:26PM +0530, Sravan V Dodla wrote:
>
> > Does this help ?
> Thanks a lot Dave. That did help :)
> Still compilation does not complete successfully. I'm seeing the
> following issue on both ppc64 and s390x archs:
I have the following patch that I've been meaning to cleanup and send,
it works for me on ppc64.
cheers
diff --git a/include/compat.h b/include/compat.h
index 20455f3..bba5560 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -669,6 +669,42 @@ struct kvm_one_reg {
#define KVM_KVMCLOCK_CTRL _IO(KVMIO, 0xad)
#endif
+#ifndef KVM_PPC_GET_SMMU_INFO
+#define KVM_PPC_PAGE_SIZES_MAX_SZ 8
+
+struct kvm_ppc_one_page_size {
+ __u32 page_shift; /* Page shift (or 0) */
+ __u32 pte_enc; /* Encoding in the HPTE (>>12) */
+};
+
+struct kvm_ppc_one_seg_page_size {
+ __u32 page_shift; /* Base page shift of segment (or 0) */
+ __u32 slb_enc; /* SLB encoding for BookS */
+ struct kvm_ppc_one_page_size enc[KVM_PPC_PAGE_SIZES_MAX_SZ];
+};
+
+struct kvm_ppc_smmu_info {
+ __u64 flags;
+ __u32 slb_size;
+ __u32 pad;
+ struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ];
+};
+#define KVM_PPC_GET_SMMU_INFO _IOR(KVMIO, 0xa6, struct kvm_ppc_smmu_info)
+#endif
+
+#ifndef KVM_PPC_ALLOCATE_HTAB
+#define KVM_PPC_ALLOCATE_HTAB _IOWR(KVMIO, 0xa7, __u32)
+#endif
+
+#ifndef KVM_PPC_GET_HTAB_FD
+struct kvm_get_htab_fd {
+ __u64 flags;
+ __u64 start_index;
+ __u64 reserved[2];
+};
+#define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd)
+#endif
+
#ifndef EM_ARM
#define EM_ARM 40
#endif
diff --git a/ioctls/kvm.c b/ioctls/kvm.c
index 4620ca8..ffddee4 100644
--- a/ioctls/kvm.c
+++ b/ioctls/kvm.c
@@ -12,7 +12,6 @@ static const struct ioctl kvm_ioctls[] = {
IOCTL(KVM_SET_MEMORY_REGION),
IOCTL(KVM_CREATE_VCPU),
IOCTL(KVM_GET_DIRTY_LOG),
- IOCTL(KVM_SET_MEMORY_ALIAS),
IOCTL(KVM_SET_NR_MMU_PAGES),
IOCTL(KVM_GET_NR_MMU_PAGES),
IOCTL(KVM_SET_USER_MEMORY_REGION),
@@ -26,13 +25,10 @@ static const struct ioctl kvm_ioctls[] = {
IOCTL(KVM_GET_IRQCHIP),
IOCTL(KVM_SET_IRQCHIP),
IOCTL(KVM_CREATE_PIT),
- IOCTL(KVM_GET_PIT),
- IOCTL(KVM_SET_PIT),
IOCTL(KVM_IRQ_LINE_STATUS),
IOCTL(KVM_REGISTER_COALESCED_MMIO),
IOCTL(KVM_UNREGISTER_COALESCED_MMIO),
IOCTL(KVM_ASSIGN_PCI_DEVICE),
- IOCTL(KVM_SET_GSI_ROUTING),
IOCTL(KVM_ASSIGN_IRQ),
IOCTL(KVM_ASSIGN_DEV_IRQ),
IOCTL(KVM_REINJECT_CONTROL),
@@ -44,16 +40,38 @@ static const struct ioctl kvm_ioctls[] = {
IOCTL(KVM_CREATE_PIT2),
IOCTL(KVM_SET_BOOT_CPU_ID),
IOCTL(KVM_IOEVENTFD),
- IOCTL(KVM_XEN_HVM_CONFIG),
IOCTL(KVM_SET_CLOCK),
IOCTL(KVM_GET_CLOCK),
- IOCTL(KVM_GET_PIT2),
- IOCTL(KVM_SET_PIT2),
IOCTL(KVM_PPC_GET_PVINFO),
IOCTL(KVM_SET_TSC_KHZ),
IOCTL(KVM_GET_TSC_KHZ),
IOCTL(KVM_ASSIGN_SET_INTX_MASK),
IOCTL(KVM_SIGNAL_MSI),
+#ifdef X86
+ IOCTL(KVM_SET_MEMORY_ALIAS),
+ IOCTL(KVM_GET_PIT),
+ IOCTL(KVM_SET_PIT),
+ IOCTL(KVM_GET_PIT2),
+ IOCTL(KVM_SET_PIT2),
+ IOCTL(KVM_SET_GSI_ROUTING),
+ IOCTL(KVM_XEN_HVM_CONFIG),
+ IOCTL(KVM_GET_MSRS),
+ IOCTL(KVM_SET_MSRS),
+ IOCTL(KVM_SET_CPUID),
+ IOCTL(KVM_GET_LAPIC),
+ IOCTL(KVM_SET_LAPIC),
+ IOCTL(KVM_SET_CPUID2),
+ IOCTL(KVM_GET_CPUID2),
+ IOCTL(KVM_X86_SET_MCE),
+ IOCTL(KVM_GET_VCPU_EVENTS),
+ IOCTL(KVM_SET_VCPU_EVENTS),
+ IOCTL(KVM_GET_DEBUGREGS),
+ IOCTL(KVM_SET_DEBUGREGS),
+ IOCTL(KVM_GET_XSAVE),
+ IOCTL(KVM_SET_XSAVE),
+ IOCTL(KVM_GET_XCRS),
+ IOCTL(KVM_SET_XCRS),
+#endif
#if defined(__powerpc__)
IOCTL(KVM_PPC_GET_SMMU_INFO),
IOCTL(KVM_PPC_ALLOCATE_HTAB),
@@ -73,16 +91,9 @@ static const struct ioctl kvm_ioctls[] = {
IOCTL(KVM_TRANSLATE),
IOCTL(KVM_INTERRUPT),
IOCTL(KVM_DEBUG_GUEST),
- IOCTL(KVM_GET_MSRS),
- IOCTL(KVM_SET_MSRS),
- IOCTL(KVM_SET_CPUID),
IOCTL(KVM_SET_SIGNAL_MASK),
IOCTL(KVM_GET_FPU),
IOCTL(KVM_SET_FPU),
- IOCTL(KVM_GET_LAPIC),
- IOCTL(KVM_SET_LAPIC),
- IOCTL(KVM_SET_CPUID2),
- IOCTL(KVM_GET_CPUID2),
IOCTL(KVM_TPR_ACCESS_REPORTING),
IOCTL(KVM_SET_VAPIC_ADDR),
#if defined(__s390__)
@@ -99,18 +110,9 @@ static const struct ioctl kvm_ioctls[] = {
IOCTL(KVM_SET_GUEST_DEBUG),
IOCTL(KVM_X86_SETUP_MCE),
IOCTL(KVM_X86_GET_MCE_CAP_SUPPORTED),
- IOCTL(KVM_X86_SET_MCE),
IOCTL(KVM_IA64_VCPU_GET_STACK),
IOCTL(KVM_IA64_VCPU_SET_STACK),
- IOCTL(KVM_GET_VCPU_EVENTS),
- IOCTL(KVM_SET_VCPU_EVENTS),
- IOCTL(KVM_GET_DEBUGREGS),
- IOCTL(KVM_SET_DEBUGREGS),
IOCTL(KVM_ENABLE_CAP),
- IOCTL(KVM_GET_XSAVE),
- IOCTL(KVM_SET_XSAVE),
- IOCTL(KVM_GET_XCRS),
- IOCTL(KVM_SET_XCRS),
IOCTL(KVM_DIRTY_TLB),
IOCTL(KVM_GET_ONE_REG),
IOCTL(KVM_SET_ONE_REG),
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Complie issues with trinity-2013-06-17 on s390
2013-06-19 6:28 ` Michael Ellerman
@ 2013-06-19 8:36 ` Sravan V Dodla
2013-06-19 9:06 ` Michael Ellerman
0 siblings, 1 reply; 6+ messages in thread
From: Sravan V Dodla @ 2013-06-19 8:36 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Dave Jones, trinity
On Wed, 2013-06-19 at 16:28 +1000, Michael Ellerman wrote:
> On Wed, 2013-06-19 at 11:10 +0530, Sravan V Dodla wrote:
> > On Tue, 2013-06-18 at 11:39 -0400, Dave Jones wrote:
> > > On Tue, Jun 18, 2013 at 12:37:26PM +0530, Sravan V Dodla wrote:
> >
> > > Does this help ?
> > Thanks a lot Dave. That did help :)
> > Still compilation does not complete successfully. I'm seeing the
> > following issue on both ppc64 and s390x archs:
>
> I have the following patch that I've been meaning to cleanup and send,
> it works for me on ppc64.
>
Yes Michael, it worked for me on ppc64. Thank you.
I have also made the following changes to make it work for s390x, not
sure of the impact though!
--- kvm.c.orig 2013-06-19 14:04:37.814590066 +0530
+++ kvm.c 2013-06-19 14:04:43.306415094 +0530
@@ -87,8 +87,6 @@ static const struct ioctl kvm_ioctls[] =
IOCTL(KVM_SET_VAPIC_ADDR),
#if defined(__s390__)
IOCTL(KVM_S390_INTERRUPT),
- IOCTL(KVM_S390_STORE_STATUS_NOADDR),
- IOCTL(KVM_S390_STORE_STATUS_PREFIXED),
IOCTL(KVM_S390_STORE_STATUS),
IOCTL(KVM_S390_SET_INITIAL_PSW),
IOCTL(KVM_S390_INITIAL_RESET),
> cheers
>
>
> diff --git a/include/compat.h b/include/compat.h
> index 20455f3..bba5560 100644
> --- a/include/compat.h
> +++ b/include/compat.h
> @@ -669,6 +669,42 @@ struct kvm_one_reg {
> #define KVM_KVMCLOCK_CTRL _IO(KVMIO, 0xad)
> #endif
>
> +#ifndef KVM_PPC_GET_SMMU_INFO
> +#define KVM_PPC_PAGE_SIZES_MAX_SZ 8
> +
> +struct kvm_ppc_one_page_size {
> + __u32 page_shift; /* Page shift (or 0) */
> + __u32 pte_enc; /* Encoding in the HPTE (>>12) */
> +};
> +
> +struct kvm_ppc_one_seg_page_size {
> + __u32 page_shift; /* Base page shift of segment (or 0) */
> + __u32 slb_enc; /* SLB encoding for BookS */
> + struct kvm_ppc_one_page_size enc[KVM_PPC_PAGE_SIZES_MAX_SZ];
> +};
> +
> +struct kvm_ppc_smmu_info {
> + __u64 flags;
> + __u32 slb_size;
> + __u32 pad;
> + struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ];
> +};
> +#define KVM_PPC_GET_SMMU_INFO _IOR(KVMIO, 0xa6, struct kvm_ppc_smmu_info)
> +#endif
> +
> +#ifndef KVM_PPC_ALLOCATE_HTAB
> +#define KVM_PPC_ALLOCATE_HTAB _IOWR(KVMIO, 0xa7, __u32)
> +#endif
> +
> +#ifndef KVM_PPC_GET_HTAB_FD
> +struct kvm_get_htab_fd {
> + __u64 flags;
> + __u64 start_index;
> + __u64 reserved[2];
> +};
> +#define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd)
> +#endif
> +
> #ifndef EM_ARM
> #define EM_ARM 40
> #endif
> diff --git a/ioctls/kvm.c b/ioctls/kvm.c
> index 4620ca8..ffddee4 100644
> --- a/ioctls/kvm.c
> +++ b/ioctls/kvm.c
> @@ -12,7 +12,6 @@ static const struct ioctl kvm_ioctls[] = {
> IOCTL(KVM_SET_MEMORY_REGION),
> IOCTL(KVM_CREATE_VCPU),
> IOCTL(KVM_GET_DIRTY_LOG),
> - IOCTL(KVM_SET_MEMORY_ALIAS),
> IOCTL(KVM_SET_NR_MMU_PAGES),
> IOCTL(KVM_GET_NR_MMU_PAGES),
> IOCTL(KVM_SET_USER_MEMORY_REGION),
> @@ -26,13 +25,10 @@ static const struct ioctl kvm_ioctls[] = {
> IOCTL(KVM_GET_IRQCHIP),
> IOCTL(KVM_SET_IRQCHIP),
> IOCTL(KVM_CREATE_PIT),
> - IOCTL(KVM_GET_PIT),
> - IOCTL(KVM_SET_PIT),
> IOCTL(KVM_IRQ_LINE_STATUS),
> IOCTL(KVM_REGISTER_COALESCED_MMIO),
> IOCTL(KVM_UNREGISTER_COALESCED_MMIO),
> IOCTL(KVM_ASSIGN_PCI_DEVICE),
> - IOCTL(KVM_SET_GSI_ROUTING),
> IOCTL(KVM_ASSIGN_IRQ),
> IOCTL(KVM_ASSIGN_DEV_IRQ),
> IOCTL(KVM_REINJECT_CONTROL),
> @@ -44,16 +40,38 @@ static const struct ioctl kvm_ioctls[] = {
> IOCTL(KVM_CREATE_PIT2),
> IOCTL(KVM_SET_BOOT_CPU_ID),
> IOCTL(KVM_IOEVENTFD),
> - IOCTL(KVM_XEN_HVM_CONFIG),
> IOCTL(KVM_SET_CLOCK),
> IOCTL(KVM_GET_CLOCK),
> - IOCTL(KVM_GET_PIT2),
> - IOCTL(KVM_SET_PIT2),
> IOCTL(KVM_PPC_GET_PVINFO),
> IOCTL(KVM_SET_TSC_KHZ),
> IOCTL(KVM_GET_TSC_KHZ),
> IOCTL(KVM_ASSIGN_SET_INTX_MASK),
> IOCTL(KVM_SIGNAL_MSI),
> +#ifdef X86
> + IOCTL(KVM_SET_MEMORY_ALIAS),
> + IOCTL(KVM_GET_PIT),
> + IOCTL(KVM_SET_PIT),
> + IOCTL(KVM_GET_PIT2),
> + IOCTL(KVM_SET_PIT2),
> + IOCTL(KVM_SET_GSI_ROUTING),
> + IOCTL(KVM_XEN_HVM_CONFIG),
> + IOCTL(KVM_GET_MSRS),
> + IOCTL(KVM_SET_MSRS),
> + IOCTL(KVM_SET_CPUID),
> + IOCTL(KVM_GET_LAPIC),
> + IOCTL(KVM_SET_LAPIC),
> + IOCTL(KVM_SET_CPUID2),
> + IOCTL(KVM_GET_CPUID2),
> + IOCTL(KVM_X86_SET_MCE),
> + IOCTL(KVM_GET_VCPU_EVENTS),
> + IOCTL(KVM_SET_VCPU_EVENTS),
> + IOCTL(KVM_GET_DEBUGREGS),
> + IOCTL(KVM_SET_DEBUGREGS),
> + IOCTL(KVM_GET_XSAVE),
> + IOCTL(KVM_SET_XSAVE),
> + IOCTL(KVM_GET_XCRS),
> + IOCTL(KVM_SET_XCRS),
> +#endif
> #if defined(__powerpc__)
> IOCTL(KVM_PPC_GET_SMMU_INFO),
> IOCTL(KVM_PPC_ALLOCATE_HTAB),
> @@ -73,16 +91,9 @@ static const struct ioctl kvm_ioctls[] = {
> IOCTL(KVM_TRANSLATE),
> IOCTL(KVM_INTERRUPT),
> IOCTL(KVM_DEBUG_GUEST),
> - IOCTL(KVM_GET_MSRS),
> - IOCTL(KVM_SET_MSRS),
> - IOCTL(KVM_SET_CPUID),
> IOCTL(KVM_SET_SIGNAL_MASK),
> IOCTL(KVM_GET_FPU),
> IOCTL(KVM_SET_FPU),
> - IOCTL(KVM_GET_LAPIC),
> - IOCTL(KVM_SET_LAPIC),
> - IOCTL(KVM_SET_CPUID2),
> - IOCTL(KVM_GET_CPUID2),
> IOCTL(KVM_TPR_ACCESS_REPORTING),
> IOCTL(KVM_SET_VAPIC_ADDR),
> #if defined(__s390__)
> @@ -99,18 +110,9 @@ static const struct ioctl kvm_ioctls[] = {
> IOCTL(KVM_SET_GUEST_DEBUG),
> IOCTL(KVM_X86_SETUP_MCE),
> IOCTL(KVM_X86_GET_MCE_CAP_SUPPORTED),
> - IOCTL(KVM_X86_SET_MCE),
> IOCTL(KVM_IA64_VCPU_GET_STACK),
> IOCTL(KVM_IA64_VCPU_SET_STACK),
> - IOCTL(KVM_GET_VCPU_EVENTS),
> - IOCTL(KVM_SET_VCPU_EVENTS),
> - IOCTL(KVM_GET_DEBUGREGS),
> - IOCTL(KVM_SET_DEBUGREGS),
> IOCTL(KVM_ENABLE_CAP),
> - IOCTL(KVM_GET_XSAVE),
> - IOCTL(KVM_SET_XSAVE),
> - IOCTL(KVM_GET_XCRS),
> - IOCTL(KVM_SET_XCRS),
> IOCTL(KVM_DIRTY_TLB),
> IOCTL(KVM_GET_ONE_REG),
> IOCTL(KVM_SET_ONE_REG),
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Complie issues with trinity-2013-06-17 on s390
2013-06-19 8:36 ` Sravan V Dodla
@ 2013-06-19 9:06 ` Michael Ellerman
0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2013-06-19 9:06 UTC (permalink / raw)
To: Sravan V Dodla; +Cc: Dave Jones, trinity
On Wed, 2013-06-19 at 14:06 +0530, Sravan V Dodla wrote:
> On Wed, 2013-06-19 at 16:28 +1000, Michael Ellerman wrote:
> > On Wed, 2013-06-19 at 11:10 +0530, Sravan V Dodla wrote:
> > > On Tue, 2013-06-18 at 11:39 -0400, Dave Jones wrote:
> > > > On Tue, Jun 18, 2013 at 12:37:26PM +0530, Sravan V Dodla wrote:
> > >
> > > > Does this help ?
> > > Thanks a lot Dave. That did help :)
> > > Still compilation does not complete successfully. I'm seeing the
> > > following issue on both ppc64 and s390x archs:
> >
> > I have the following patch that I've been meaning to cleanup and send,
> > it works for me on ppc64.
> Yes Michael, it worked for me on ppc64. Thank you.
OK, see the two patches I sent to the list.
> I have also made the following changes to make it work for s390x, not
> sure of the impact though!
>--- kvm.c.orig 2013-06-19 14:04:37.814590066 +0530
> +++ kvm.c 2013-06-19 14:04:43.306415094 +0530
> @@ -87,8 +87,6 @@ static const struct ioctl kvm_ioctls[] =
> IOCTL(KVM_SET_VAPIC_ADDR),
> #if defined(__s390__)
> IOCTL(KVM_S390_INTERRUPT),
> - IOCTL(KVM_S390_STORE_STATUS_NOADDR),
> - IOCTL(KVM_S390_STORE_STATUS_PREFIXED),
> IOCTL(KVM_S390_STORE_STATUS),
> IOCTL(KVM_S390_SET_INITIAL_PSW),
> IOCTL(KVM_S390_INITIAL_RESET),
>
That looks correct. They are not actually ioctls, they are meant to be
used as arguments to the KVM_S390_STORE_STATUS ioctl. So I think that's
just a cut-and-paste bug in kvm.c.
You should send it as a proper patch.
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-06-19 9:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-18 7:07 Complie issues with trinity-2013-06-17 on s390 Sravan V Dodla
2013-06-18 15:39 ` Dave Jones
2013-06-19 5:40 ` Sravan V Dodla
2013-06-19 6:28 ` Michael Ellerman
2013-06-19 8:36 ` Sravan V Dodla
2013-06-19 9:06 ` Michael Ellerman
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.