* [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-06-22 20:06 ` Stuart Yoder
0 siblings, 0 replies; 26+ messages in thread
From: Stuart Yoder @ 2012-06-22 20:06 UTC (permalink / raw)
To: agraf, kvm-ppc, kvm
From: Liu Yu-B13201 <Yu.Liu@freescale.com>
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
---
-v11: no changes
arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
2 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
index 833ce2c..b8d9445 100644
--- a/arch/powerpc/include/asm/epapr_hcalls.h
+++ b/arch/powerpc/include/asm/epapr_hcalls.h
@@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
r5 = priority;
r6 = destination;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
: : EV_HCALL_CLOBBERS4
);
@@ -224,7 +224,7 @@ static inline unsigned int ev_int_get_config(unsigned int interrupt,
r11 = EV_HCALL_TOKEN(EV_INT_GET_CONFIG);
r3 = interrupt;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "=r" (r4), "=r" (r5), "=r" (r6)
: : EV_HCALL_CLOBBERS4
);
@@ -254,7 +254,7 @@ static inline unsigned int ev_int_set_mask(unsigned int interrupt,
r3 = interrupt;
r4 = mask;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -279,7 +279,7 @@ static inline unsigned int ev_int_get_mask(unsigned int interrupt,
r11 = EV_HCALL_TOKEN(EV_INT_GET_MASK);
r3 = interrupt;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "=r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -307,7 +307,7 @@ static inline unsigned int ev_int_eoi(unsigned int interrupt)
r11 = EV_HCALL_TOKEN(EV_INT_EOI);
r3 = interrupt;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -346,7 +346,7 @@ static inline unsigned int ev_byte_channel_send(unsigned int handle,
r7 = be32_to_cpu(p[2]);
r8 = be32_to_cpu(p[3]);
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3),
"+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7), "+r" (r8)
: : EV_HCALL_CLOBBERS6
@@ -385,7 +385,7 @@ static inline unsigned int ev_byte_channel_receive(unsigned int handle,
r3 = handle;
r4 = *count;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4),
"=r" (r5), "=r" (r6), "=r" (r7), "=r" (r8)
: : EV_HCALL_CLOBBERS6
@@ -423,7 +423,7 @@ static inline unsigned int ev_byte_channel_poll(unsigned int handle,
r11 = EV_HCALL_TOKEN(EV_BYTE_CHANNEL_POLL);
r3 = handle;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "=r" (r4), "=r" (r5)
: : EV_HCALL_CLOBBERS3
);
@@ -456,7 +456,7 @@ static inline unsigned int ev_int_iack(unsigned int handle,
r11 = EV_HCALL_TOKEN(EV_INT_IACK);
r3 = handle;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "=r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -480,7 +480,7 @@ static inline unsigned int ev_doorbell_send(unsigned int handle)
r11 = EV_HCALL_TOKEN(EV_DOORBELL_SEND);
r3 = handle;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -500,7 +500,7 @@ static inline unsigned int ev_idle(void)
r11 = EV_HCALL_TOKEN(EV_IDLE);
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "=r" (r3)
: : EV_HCALL_CLOBBERS1
);
diff --git a/arch/powerpc/include/asm/fsl_hcalls.h b/arch/powerpc/include/asm/fsl_hcalls.h
index 922d9b5..3abb583 100644
--- a/arch/powerpc/include/asm/fsl_hcalls.h
+++ b/arch/powerpc/include/asm/fsl_hcalls.h
@@ -96,7 +96,7 @@ static inline unsigned int fh_send_nmi(unsigned int vcpu_mask)
r11 = FH_HCALL_TOKEN(FH_SEND_NMI);
r3 = vcpu_mask;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -151,7 +151,7 @@ static inline unsigned int fh_partition_get_dtprop(int handle,
r9 = (uint32_t)propvalue_addr;
r10 = *propvalue_len;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11),
"+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7),
"+r" (r8), "+r" (r9), "+r" (r10)
@@ -205,7 +205,7 @@ static inline unsigned int fh_partition_set_dtprop(int handle,
r9 = (uint32_t)propvalue_addr;
r10 = propvalue_len;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11),
"+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7),
"+r" (r8), "+r" (r9), "+r" (r10)
@@ -229,7 +229,7 @@ static inline unsigned int fh_partition_restart(unsigned int partition)
r11 = FH_HCALL_TOKEN(FH_PARTITION_RESTART);
r3 = partition;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -262,7 +262,7 @@ static inline unsigned int fh_partition_get_status(unsigned int partition,
r11 = FH_HCALL_TOKEN(FH_PARTITION_GET_STATUS);
r3 = partition;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "=r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -295,7 +295,7 @@ static inline unsigned int fh_partition_start(unsigned int partition,
r4 = entry_point;
r5 = load;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5)
: : EV_HCALL_CLOBBERS3
);
@@ -317,7 +317,7 @@ static inline unsigned int fh_partition_stop(unsigned int partition)
r11 = FH_HCALL_TOKEN(FH_PARTITION_STOP);
r3 = partition;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -376,7 +376,7 @@ static inline unsigned int fh_partition_memcpy(unsigned int source,
#endif
r7 = count;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11),
"+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7)
: : EV_HCALL_CLOBBERS5
@@ -399,7 +399,7 @@ static inline unsigned int fh_dma_enable(unsigned int liodn)
r11 = FH_HCALL_TOKEN(FH_DMA_ENABLE);
r3 = liodn;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -421,7 +421,7 @@ static inline unsigned int fh_dma_disable(unsigned int liodn)
r11 = FH_HCALL_TOKEN(FH_DMA_DISABLE);
r3 = liodn;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -447,7 +447,7 @@ static inline unsigned int fh_vmpic_get_msir(unsigned int interrupt,
r11 = FH_HCALL_TOKEN(FH_VMPIC_GET_MSIR);
r3 = interrupt;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "=r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -469,7 +469,7 @@ static inline unsigned int fh_system_reset(void)
r11 = FH_HCALL_TOKEN(FH_SYSTEM_RESET);
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "=r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -506,7 +506,7 @@ static inline unsigned int fh_err_get_info(int queue, uint32_t *bufsize,
r6 = addr_lo;
r7 = peek;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6),
"+r" (r7)
: : EV_HCALL_CLOBBERS5
@@ -542,7 +542,7 @@ static inline unsigned int fh_get_core_state(unsigned int handle,
r3 = handle;
r4 = vcpu;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -572,7 +572,7 @@ static inline unsigned int fh_enter_nap(unsigned int handle, unsigned int vcpu)
r3 = handle;
r4 = vcpu;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -597,7 +597,7 @@ static inline unsigned int fh_exit_nap(unsigned int handle, unsigned int vcpu)
r3 = handle;
r4 = vcpu;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -618,7 +618,7 @@ static inline unsigned int fh_claim_device(unsigned int handle)
r11 = FH_HCALL_TOKEN(FH_CLAIM_DEVICE);
r3 = handle;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -645,7 +645,7 @@ static inline unsigned int fh_partition_stop_dma(unsigned int handle)
r11 = FH_HCALL_TOKEN(FH_PARTITION_STOP_DMA);
r3 = handle;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-06-22 20:06 ` Stuart Yoder
0 siblings, 0 replies; 26+ messages in thread
From: Stuart Yoder @ 2012-06-22 20:06 UTC (permalink / raw)
To: agraf, kvm-ppc, kvm
From: Liu Yu-B13201 <Yu.Liu@freescale.com>
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
---
-v11: no changes
arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
2 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
index 833ce2c..b8d9445 100644
--- a/arch/powerpc/include/asm/epapr_hcalls.h
+++ b/arch/powerpc/include/asm/epapr_hcalls.h
@@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
r5 = priority;
r6 = destination;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
: : EV_HCALL_CLOBBERS4
);
@@ -224,7 +224,7 @@ static inline unsigned int ev_int_get_config(unsigned int interrupt,
r11 = EV_HCALL_TOKEN(EV_INT_GET_CONFIG);
r3 = interrupt;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "=r" (r4), "=r" (r5), "=r" (r6)
: : EV_HCALL_CLOBBERS4
);
@@ -254,7 +254,7 @@ static inline unsigned int ev_int_set_mask(unsigned int interrupt,
r3 = interrupt;
r4 = mask;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -279,7 +279,7 @@ static inline unsigned int ev_int_get_mask(unsigned int interrupt,
r11 = EV_HCALL_TOKEN(EV_INT_GET_MASK);
r3 = interrupt;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "=r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -307,7 +307,7 @@ static inline unsigned int ev_int_eoi(unsigned int interrupt)
r11 = EV_HCALL_TOKEN(EV_INT_EOI);
r3 = interrupt;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -346,7 +346,7 @@ static inline unsigned int ev_byte_channel_send(unsigned int handle,
r7 = be32_to_cpu(p[2]);
r8 = be32_to_cpu(p[3]);
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3),
"+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7), "+r" (r8)
: : EV_HCALL_CLOBBERS6
@@ -385,7 +385,7 @@ static inline unsigned int ev_byte_channel_receive(unsigned int handle,
r3 = handle;
r4 = *count;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4),
"=r" (r5), "=r" (r6), "=r" (r7), "=r" (r8)
: : EV_HCALL_CLOBBERS6
@@ -423,7 +423,7 @@ static inline unsigned int ev_byte_channel_poll(unsigned int handle,
r11 = EV_HCALL_TOKEN(EV_BYTE_CHANNEL_POLL);
r3 = handle;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "=r" (r4), "=r" (r5)
: : EV_HCALL_CLOBBERS3
);
@@ -456,7 +456,7 @@ static inline unsigned int ev_int_iack(unsigned int handle,
r11 = EV_HCALL_TOKEN(EV_INT_IACK);
r3 = handle;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "=r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -480,7 +480,7 @@ static inline unsigned int ev_doorbell_send(unsigned int handle)
r11 = EV_HCALL_TOKEN(EV_DOORBELL_SEND);
r3 = handle;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -500,7 +500,7 @@ static inline unsigned int ev_idle(void)
r11 = EV_HCALL_TOKEN(EV_IDLE);
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "=r" (r3)
: : EV_HCALL_CLOBBERS1
);
diff --git a/arch/powerpc/include/asm/fsl_hcalls.h b/arch/powerpc/include/asm/fsl_hcalls.h
index 922d9b5..3abb583 100644
--- a/arch/powerpc/include/asm/fsl_hcalls.h
+++ b/arch/powerpc/include/asm/fsl_hcalls.h
@@ -96,7 +96,7 @@ static inline unsigned int fh_send_nmi(unsigned int vcpu_mask)
r11 = FH_HCALL_TOKEN(FH_SEND_NMI);
r3 = vcpu_mask;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -151,7 +151,7 @@ static inline unsigned int fh_partition_get_dtprop(int handle,
r9 = (uint32_t)propvalue_addr;
r10 = *propvalue_len;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11),
"+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7),
"+r" (r8), "+r" (r9), "+r" (r10)
@@ -205,7 +205,7 @@ static inline unsigned int fh_partition_set_dtprop(int handle,
r9 = (uint32_t)propvalue_addr;
r10 = propvalue_len;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11),
"+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7),
"+r" (r8), "+r" (r9), "+r" (r10)
@@ -229,7 +229,7 @@ static inline unsigned int fh_partition_restart(unsigned int partition)
r11 = FH_HCALL_TOKEN(FH_PARTITION_RESTART);
r3 = partition;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -262,7 +262,7 @@ static inline unsigned int fh_partition_get_status(unsigned int partition,
r11 = FH_HCALL_TOKEN(FH_PARTITION_GET_STATUS);
r3 = partition;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "=r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -295,7 +295,7 @@ static inline unsigned int fh_partition_start(unsigned int partition,
r4 = entry_point;
r5 = load;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5)
: : EV_HCALL_CLOBBERS3
);
@@ -317,7 +317,7 @@ static inline unsigned int fh_partition_stop(unsigned int partition)
r11 = FH_HCALL_TOKEN(FH_PARTITION_STOP);
r3 = partition;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -376,7 +376,7 @@ static inline unsigned int fh_partition_memcpy(unsigned int source,
#endif
r7 = count;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11),
"+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7)
: : EV_HCALL_CLOBBERS5
@@ -399,7 +399,7 @@ static inline unsigned int fh_dma_enable(unsigned int liodn)
r11 = FH_HCALL_TOKEN(FH_DMA_ENABLE);
r3 = liodn;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -421,7 +421,7 @@ static inline unsigned int fh_dma_disable(unsigned int liodn)
r11 = FH_HCALL_TOKEN(FH_DMA_DISABLE);
r3 = liodn;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -447,7 +447,7 @@ static inline unsigned int fh_vmpic_get_msir(unsigned int interrupt,
r11 = FH_HCALL_TOKEN(FH_VMPIC_GET_MSIR);
r3 = interrupt;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "=r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -469,7 +469,7 @@ static inline unsigned int fh_system_reset(void)
r11 = FH_HCALL_TOKEN(FH_SYSTEM_RESET);
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "=r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -506,7 +506,7 @@ static inline unsigned int fh_err_get_info(int queue, uint32_t *bufsize,
r6 = addr_lo;
r7 = peek;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6),
"+r" (r7)
: : EV_HCALL_CLOBBERS5
@@ -542,7 +542,7 @@ static inline unsigned int fh_get_core_state(unsigned int handle,
r3 = handle;
r4 = vcpu;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -572,7 +572,7 @@ static inline unsigned int fh_enter_nap(unsigned int handle, unsigned int vcpu)
r3 = handle;
r4 = vcpu;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -597,7 +597,7 @@ static inline unsigned int fh_exit_nap(unsigned int handle, unsigned int vcpu)
r3 = handle;
r4 = vcpu;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3), "+r" (r4)
: : EV_HCALL_CLOBBERS2
);
@@ -618,7 +618,7 @@ static inline unsigned int fh_claim_device(unsigned int handle)
r11 = FH_HCALL_TOKEN(FH_CLAIM_DEVICE);
r3 = handle;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
@@ -645,7 +645,7 @@ static inline unsigned int fh_partition_stop_dma(unsigned int handle)
r11 = FH_HCALL_TOKEN(FH_PARTITION_STOP_DMA);
r3 = handle;
- __asm__ __volatile__ ("sc 1"
+ asm volatile("bl epapr_hypercall_start"
: "+r" (r11), "+r" (r3)
: : EV_HCALL_CLOBBERS1
);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
2012-06-22 20:06 ` Stuart Yoder
@ 2012-07-02 12:30 ` Alexander Graf
-1 siblings, 0 replies; 26+ messages in thread
From: Alexander Graf @ 2012-07-02 12:30 UTC (permalink / raw)
To: Stuart Yoder; +Cc: kvm-ppc, kvm
On 22.06.2012, at 22:06, Stuart Yoder wrote:
> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
>
> Signed-off-by: Liu Yu <yu.liu@freescale.com>
> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
> ---
> -v11: no changes
>
> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
> 2 files changed, 29 insertions(+), 29 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
> index 833ce2c..b8d9445 100644
> --- a/arch/powerpc/include/asm/epapr_hcalls.h
> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
> r5 = priority;
> r6 = destination;
>
> - __asm__ __volatile__ ("sc 1"
> + asm volatile("bl epapr_hypercall_start"
> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
> : : EV_HCALL_CLOBBERS4
Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:
.global epapr_hypercall_start
epapr_hypercall_start:
li r3, -1
nop
nop
nop
blr
So I suppose for this to work, we'd have to store lr off to the stack before doing the hypercall in epapr_hypercall_start.
Alex
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-07-02 12:30 ` Alexander Graf
0 siblings, 0 replies; 26+ messages in thread
From: Alexander Graf @ 2012-07-02 12:30 UTC (permalink / raw)
To: Stuart Yoder; +Cc: kvm-ppc, kvm
On 22.06.2012, at 22:06, Stuart Yoder wrote:
> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
>
> Signed-off-by: Liu Yu <yu.liu@freescale.com>
> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
> ---
> -v11: no changes
>
> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
> 2 files changed, 29 insertions(+), 29 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
> index 833ce2c..b8d9445 100644
> --- a/arch/powerpc/include/asm/epapr_hcalls.h
> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
> r5 = priority;
> r6 = destination;
>
> - __asm__ __volatile__ ("sc 1"
> + asm volatile("bl epapr_hypercall_start"
> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
> : : EV_HCALL_CLOBBERS4
Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:
.global epapr_hypercall_start
epapr_hypercall_start:
li r3, -1
nop
nop
nop
blr
So I suppose for this to work, we'd have to store lr off to the stack before doing the hypercall in epapr_hypercall_start.
Alex
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
2012-07-02 12:30 ` Alexander Graf
@ 2012-07-02 17:10 ` Scott Wood
-1 siblings, 0 replies; 26+ messages in thread
From: Scott Wood @ 2012-07-02 17:10 UTC (permalink / raw)
To: Alexander Graf; +Cc: Stuart Yoder, kvm-ppc, kvm
On 07/02/2012 07:30 AM, Alexander Graf wrote:
>
> On 22.06.2012, at 22:06, Stuart Yoder wrote:
>
>> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
>>
>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
>> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
>> ---
>> -v11: no changes
>>
>> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
>> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
>> 2 files changed, 29 insertions(+), 29 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
>> index 833ce2c..b8d9445 100644
>> --- a/arch/powerpc/include/asm/epapr_hcalls.h
>> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
>> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
>> r5 = priority;
>> r6 = destination;
>>
>> - __asm__ __volatile__ ("sc 1"
>> + asm volatile("bl epapr_hypercall_start"
>> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
>> : : EV_HCALL_CLOBBERS4
>
> Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:
ePAPR 1.1 says LR is nonvolatile.
-Scott
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-07-02 17:10 ` Scott Wood
0 siblings, 0 replies; 26+ messages in thread
From: Scott Wood @ 2012-07-02 17:10 UTC (permalink / raw)
To: Alexander Graf; +Cc: Stuart Yoder, kvm-ppc, kvm
On 07/02/2012 07:30 AM, Alexander Graf wrote:
>
> On 22.06.2012, at 22:06, Stuart Yoder wrote:
>
>> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
>>
>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
>> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
>> ---
>> -v11: no changes
>>
>> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
>> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
>> 2 files changed, 29 insertions(+), 29 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
>> index 833ce2c..b8d9445 100644
>> --- a/arch/powerpc/include/asm/epapr_hcalls.h
>> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
>> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
>> r5 = priority;
>> r6 = destination;
>>
>> - __asm__ __volatile__ ("sc 1"
>> + asm volatile("bl epapr_hypercall_start"
>> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
>> : : EV_HCALL_CLOBBERS4
>
> Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:
ePAPR 1.1 says LR is nonvolatile.
-Scott
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
2012-07-02 17:10 ` Scott Wood
@ 2012-07-02 17:13 ` Alexander Graf
-1 siblings, 0 replies; 26+ messages in thread
From: Alexander Graf @ 2012-07-02 17:13 UTC (permalink / raw)
To: Scott Wood; +Cc: Stuart Yoder, kvm-ppc, kvm
On 02.07.2012, at 19:10, Scott Wood wrote:
> On 07/02/2012 07:30 AM, Alexander Graf wrote:
>>
>> On 22.06.2012, at 22:06, Stuart Yoder wrote:
>>
>>> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
>>>
>>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
>>> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
>>> ---
>>> -v11: no changes
>>>
>>> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
>>> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
>>> 2 files changed, 29 insertions(+), 29 deletions(-)
>>>
>>> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
>>> index 833ce2c..b8d9445 100644
>>> --- a/arch/powerpc/include/asm/epapr_hcalls.h
>>> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
>>> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
>>> r5 = priority;
>>> r6 = destination;
>>>
>>> - __asm__ __volatile__ ("sc 1"
>>> + asm volatile("bl epapr_hypercall_start"
>>> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
>>> : : EV_HCALL_CLOBBERS4
>>
>> Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:
>
> ePAPR 1.1 says LR is nonvolatile.
Why is it in the clobber list then? Not complaining - we need to have it in there for the bl to work out - but still surprised.
arch/powerpc/include/asm/epapr_hcalls.h:#define EV_HCALL_CLOBBERS "r0", "r12", "xer", "ctr", "lr", "cc", "memory"
Alex
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-07-02 17:13 ` Alexander Graf
0 siblings, 0 replies; 26+ messages in thread
From: Alexander Graf @ 2012-07-02 17:13 UTC (permalink / raw)
To: Scott Wood; +Cc: Stuart Yoder, kvm-ppc, kvm
On 02.07.2012, at 19:10, Scott Wood wrote:
> On 07/02/2012 07:30 AM, Alexander Graf wrote:
>>
>> On 22.06.2012, at 22:06, Stuart Yoder wrote:
>>
>>> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
>>>
>>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
>>> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
>>> ---
>>> -v11: no changes
>>>
>>> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
>>> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
>>> 2 files changed, 29 insertions(+), 29 deletions(-)
>>>
>>> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
>>> index 833ce2c..b8d9445 100644
>>> --- a/arch/powerpc/include/asm/epapr_hcalls.h
>>> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
>>> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
>>> r5 = priority;
>>> r6 = destination;
>>>
>>> - __asm__ __volatile__ ("sc 1"
>>> + asm volatile("bl epapr_hypercall_start"
>>> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
>>> : : EV_HCALL_CLOBBERS4
>>
>> Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:
>
> ePAPR 1.1 says LR is nonvolatile.
Why is it in the clobber list then? Not complaining - we need to have it in there for the bl to work out - but still surprised.
arch/powerpc/include/asm/epapr_hcalls.h:#define EV_HCALL_CLOBBERS "r0", "r12", "xer", "ctr", "lr", "cc", "memory"
Alex
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
2012-07-02 17:13 ` Alexander Graf
@ 2012-07-02 17:16 ` Scott Wood
-1 siblings, 0 replies; 26+ messages in thread
From: Scott Wood @ 2012-07-02 17:16 UTC (permalink / raw)
To: Alexander Graf; +Cc: Stuart Yoder, kvm-ppc, kvm
On 07/02/2012 12:13 PM, Alexander Graf wrote:
>
> On 02.07.2012, at 19:10, Scott Wood wrote:
>
>> On 07/02/2012 07:30 AM, Alexander Graf wrote:
>>>
>>> On 22.06.2012, at 22:06, Stuart Yoder wrote:
>>>
>>>> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
>>>>
>>>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
>>>> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
>>>> ---
>>>> -v11: no changes
>>>>
>>>> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
>>>> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
>>>> 2 files changed, 29 insertions(+), 29 deletions(-)
>>>>
>>>> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
>>>> index 833ce2c..b8d9445 100644
>>>> --- a/arch/powerpc/include/asm/epapr_hcalls.h
>>>> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
>>>> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
>>>> r5 = priority;
>>>> r6 = destination;
>>>>
>>>> - __asm__ __volatile__ ("sc 1"
>>>> + asm volatile("bl epapr_hypercall_start"
>>>> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
>>>> : : EV_HCALL_CLOBBERS4
>>>
>>> Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:
>>
>> ePAPR 1.1 says LR is nonvolatile.
>
> Why is it in the clobber list then?
Because the inline assembly code is clobbering it -- not the hv-provided
hcall instructions.
-Scott
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-07-02 17:16 ` Scott Wood
0 siblings, 0 replies; 26+ messages in thread
From: Scott Wood @ 2012-07-02 17:16 UTC (permalink / raw)
To: Alexander Graf; +Cc: Stuart Yoder, kvm-ppc, kvm
On 07/02/2012 12:13 PM, Alexander Graf wrote:
>
> On 02.07.2012, at 19:10, Scott Wood wrote:
>
>> On 07/02/2012 07:30 AM, Alexander Graf wrote:
>>>
>>> On 22.06.2012, at 22:06, Stuart Yoder wrote:
>>>
>>>> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
>>>>
>>>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
>>>> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
>>>> ---
>>>> -v11: no changes
>>>>
>>>> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
>>>> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
>>>> 2 files changed, 29 insertions(+), 29 deletions(-)
>>>>
>>>> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
>>>> index 833ce2c..b8d9445 100644
>>>> --- a/arch/powerpc/include/asm/epapr_hcalls.h
>>>> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
>>>> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
>>>> r5 = priority;
>>>> r6 = destination;
>>>>
>>>> - __asm__ __volatile__ ("sc 1"
>>>> + asm volatile("bl epapr_hypercall_start"
>>>> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
>>>> : : EV_HCALL_CLOBBERS4
>>>
>>> Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:
>>
>> ePAPR 1.1 says LR is nonvolatile.
>
> Why is it in the clobber list then?
Because the inline assembly code is clobbering it -- not the hv-provided
hcall instructions.
-Scott
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
2012-07-02 17:16 ` Scott Wood
@ 2012-07-02 17:17 ` Alexander Graf
-1 siblings, 0 replies; 26+ messages in thread
From: Alexander Graf @ 2012-07-02 17:17 UTC (permalink / raw)
To: Scott Wood; +Cc: Stuart Yoder, kvm-ppc, kvm
On 02.07.2012, at 19:16, Scott Wood wrote:
> On 07/02/2012 12:13 PM, Alexander Graf wrote:
>>
>> On 02.07.2012, at 19:10, Scott Wood wrote:
>>
>>> On 07/02/2012 07:30 AM, Alexander Graf wrote:
>>>>
>>>> On 22.06.2012, at 22:06, Stuart Yoder wrote:
>>>>
>>>>> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
>>>>>
>>>>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
>>>>> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
>>>>> ---
>>>>> -v11: no changes
>>>>>
>>>>> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
>>>>> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
>>>>> 2 files changed, 29 insertions(+), 29 deletions(-)
>>>>>
>>>>> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
>>>>> index 833ce2c..b8d9445 100644
>>>>> --- a/arch/powerpc/include/asm/epapr_hcalls.h
>>>>> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
>>>>> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
>>>>> r5 = priority;
>>>>> r6 = destination;
>>>>>
>>>>> - __asm__ __volatile__ ("sc 1"
>>>>> + asm volatile("bl epapr_hypercall_start"
>>>>> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
>>>>> : : EV_HCALL_CLOBBERS4
>>>>
>>>> Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:
>>>
>>> ePAPR 1.1 says LR is nonvolatile.
>>
>> Why is it in the clobber list then?
>
> Because the inline assembly code is clobbering it -- not the hv-provided
> hcall instructions.
Only after the change, not before it.
Alex
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-07-02 17:17 ` Alexander Graf
0 siblings, 0 replies; 26+ messages in thread
From: Alexander Graf @ 2012-07-02 17:17 UTC (permalink / raw)
To: Scott Wood; +Cc: Stuart Yoder, kvm-ppc, kvm
On 02.07.2012, at 19:16, Scott Wood wrote:
> On 07/02/2012 12:13 PM, Alexander Graf wrote:
>>
>> On 02.07.2012, at 19:10, Scott Wood wrote:
>>
>>> On 07/02/2012 07:30 AM, Alexander Graf wrote:
>>>>
>>>> On 22.06.2012, at 22:06, Stuart Yoder wrote:
>>>>
>>>>> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
>>>>>
>>>>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
>>>>> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
>>>>> ---
>>>>> -v11: no changes
>>>>>
>>>>> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
>>>>> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
>>>>> 2 files changed, 29 insertions(+), 29 deletions(-)
>>>>>
>>>>> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
>>>>> index 833ce2c..b8d9445 100644
>>>>> --- a/arch/powerpc/include/asm/epapr_hcalls.h
>>>>> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
>>>>> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
>>>>> r5 = priority;
>>>>> r6 = destination;
>>>>>
>>>>> - __asm__ __volatile__ ("sc 1"
>>>>> + asm volatile("bl epapr_hypercall_start"
>>>>> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
>>>>> : : EV_HCALL_CLOBBERS4
>>>>
>>>> Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:
>>>
>>> ePAPR 1.1 says LR is nonvolatile.
>>
>> Why is it in the clobber list then?
>
> Because the inline assembly code is clobbering it -- not the hv-provided
> hcall instructions.
Only after the change, not before it.
Alex
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
2012-07-02 17:17 ` Alexander Graf
@ 2012-07-02 17:25 ` Scott Wood
-1 siblings, 0 replies; 26+ messages in thread
From: Scott Wood @ 2012-07-02 17:25 UTC (permalink / raw)
To: Alexander Graf; +Cc: Stuart Yoder, kvm-ppc, kvm, Timur Tabi
On 07/02/2012 12:17 PM, Alexander Graf wrote:
>
> On 02.07.2012, at 19:16, Scott Wood wrote:
>
>> On 07/02/2012 12:13 PM, Alexander Graf wrote:
>>>
>>> On 02.07.2012, at 19:10, Scott Wood wrote:
>>>
>>>> On 07/02/2012 07:30 AM, Alexander Graf wrote:
>>>>>
>>>>> On 22.06.2012, at 22:06, Stuart Yoder wrote:
>>>>>
>>>>>> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
>>>>>>
>>>>>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
>>>>>> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
>>>>>> ---
>>>>>> -v11: no changes
>>>>>>
>>>>>> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
>>>>>> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
>>>>>> 2 files changed, 29 insertions(+), 29 deletions(-)
>>>>>>
>>>>>> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
>>>>>> index 833ce2c..b8d9445 100644
>>>>>> --- a/arch/powerpc/include/asm/epapr_hcalls.h
>>>>>> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
>>>>>> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
>>>>>> r5 = priority;
>>>>>> r6 = destination;
>>>>>>
>>>>>> - __asm__ __volatile__ ("sc 1"
>>>>>> + asm volatile("bl epapr_hypercall_start"
>>>>>> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
>>>>>> : : EV_HCALL_CLOBBERS4
>>>>>
>>>>> Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:
>>>>
>>>> ePAPR 1.1 says LR is nonvolatile.
>>>
>>> Why is it in the clobber list then?
>>
>> Because the inline assembly code is clobbering it -- not the hv-provided
>> hcall instructions.
>
> Only after the change, not before it.
Hmm. The comment says, "XER, CTR, and LR are currently listed as
clobbers because it's uncertain whether they will be clobbered." Maybe
it dates back to when the ABI was still being discussed? Timur, do you
recall?
In any case, LR is nonvolatile in the spec and in the implementations I
know about (KVM and Topaz).
-Scott
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-07-02 17:25 ` Scott Wood
0 siblings, 0 replies; 26+ messages in thread
From: Scott Wood @ 2012-07-02 17:25 UTC (permalink / raw)
To: Alexander Graf; +Cc: Stuart Yoder, kvm-ppc, kvm, Timur Tabi
On 07/02/2012 12:17 PM, Alexander Graf wrote:
>
> On 02.07.2012, at 19:16, Scott Wood wrote:
>
>> On 07/02/2012 12:13 PM, Alexander Graf wrote:
>>>
>>> On 02.07.2012, at 19:10, Scott Wood wrote:
>>>
>>>> On 07/02/2012 07:30 AM, Alexander Graf wrote:
>>>>>
>>>>> On 22.06.2012, at 22:06, Stuart Yoder wrote:
>>>>>
>>>>>> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
>>>>>>
>>>>>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
>>>>>> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
>>>>>> ---
>>>>>> -v11: no changes
>>>>>>
>>>>>> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
>>>>>> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
>>>>>> 2 files changed, 29 insertions(+), 29 deletions(-)
>>>>>>
>>>>>> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
>>>>>> index 833ce2c..b8d9445 100644
>>>>>> --- a/arch/powerpc/include/asm/epapr_hcalls.h
>>>>>> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
>>>>>> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
>>>>>> r5 = priority;
>>>>>> r6 = destination;
>>>>>>
>>>>>> - __asm__ __volatile__ ("sc 1"
>>>>>> + asm volatile("bl epapr_hypercall_start"
>>>>>> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
>>>>>> : : EV_HCALL_CLOBBERS4
>>>>>
>>>>> Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr staying alive:
>>>>
>>>> ePAPR 1.1 says LR is nonvolatile.
>>>
>>> Why is it in the clobber list then?
>>
>> Because the inline assembly code is clobbering it -- not the hv-provided
>> hcall instructions.
>
> Only after the change, not before it.
Hmm. The comment says, "XER, CTR, and LR are currently listed as
clobbers because it's uncertain whether they will be clobbered." Maybe
it dates back to when the ABI was still being discussed? Timur, do you
recall?
In any case, LR is nonvolatile in the spec and in the implementations I
know about (KVM and Topaz).
-Scott
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
2012-07-02 17:25 ` Scott Wood
@ 2012-07-02 17:34 ` Timur Tabi
-1 siblings, 0 replies; 26+ messages in thread
From: Timur Tabi @ 2012-07-02 17:34 UTC (permalink / raw)
To: Scott Wood; +Cc: Alexander Graf, Stuart Yoder, kvm-ppc, kvm
Scott Wood wrote:
> Hmm. The comment says, "XER, CTR, and LR are currently listed as
> clobbers because it's uncertain whether they will be clobbered." Maybe
> it dates back to when the ABI was still being discussed? Timur, do you
> recall?
Nope, sorry. I'm sure we discussed this and looked at the code. My guess
is that we weren't certain what the compiler was going to do at the time.
I'm still a little confused. Which inline assembly code is clobbering LR?
Are you talking about the "BL" instruction, which wasn't there before?
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-07-02 17:34 ` Timur Tabi
0 siblings, 0 replies; 26+ messages in thread
From: Timur Tabi @ 2012-07-02 17:34 UTC (permalink / raw)
To: Scott Wood; +Cc: Alexander Graf, Stuart Yoder, kvm-ppc, kvm
Scott Wood wrote:
> Hmm. The comment says, "XER, CTR, and LR are currently listed as
> clobbers because it's uncertain whether they will be clobbered." Maybe
> it dates back to when the ABI was still being discussed? Timur, do you
> recall?
Nope, sorry. I'm sure we discussed this and looked at the code. My guess
is that we weren't certain what the compiler was going to do at the time.
I'm still a little confused. Which inline assembly code is clobbering LR?
Are you talking about the "BL" instruction, which wasn't there before?
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
2012-07-02 17:34 ` Timur Tabi
@ 2012-07-02 17:43 ` Scott Wood
-1 siblings, 0 replies; 26+ messages in thread
From: Scott Wood @ 2012-07-02 17:43 UTC (permalink / raw)
To: Timur Tabi; +Cc: Alexander Graf, Stuart Yoder, kvm-ppc, kvm
On 07/02/2012 12:34 PM, Timur Tabi wrote:
> Scott Wood wrote:
>
>> Hmm. The comment says, "XER, CTR, and LR are currently listed as
>> clobbers because it's uncertain whether they will be clobbered." Maybe
>> it dates back to when the ABI was still being discussed? Timur, do you
>> recall?
>
> Nope, sorry. I'm sure we discussed this and looked at the code. My guess
> is that we weren't certain what the compiler was going to do at the time.
I'm not sure how the compiler is involved here -- we're just telling it
what our asm code (and the asm code in the hypervisor) will do.
> I'm still a little confused. Which inline assembly code is clobbering LR?
> Are you talking about the "BL" instruction, which wasn't there before?
Yes, I didn't realize that LR had been in the clobber list before that.
-Scott
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-07-02 17:43 ` Scott Wood
0 siblings, 0 replies; 26+ messages in thread
From: Scott Wood @ 2012-07-02 17:43 UTC (permalink / raw)
To: Timur Tabi; +Cc: Alexander Graf, Stuart Yoder, kvm-ppc, kvm
On 07/02/2012 12:34 PM, Timur Tabi wrote:
> Scott Wood wrote:
>
>> Hmm. The comment says, "XER, CTR, and LR are currently listed as
>> clobbers because it's uncertain whether they will be clobbered." Maybe
>> it dates back to when the ABI was still being discussed? Timur, do you
>> recall?
>
> Nope, sorry. I'm sure we discussed this and looked at the code. My guess
> is that we weren't certain what the compiler was going to do at the time.
I'm not sure how the compiler is involved here -- we're just telling it
what our asm code (and the asm code in the hypervisor) will do.
> I'm still a little confused. Which inline assembly code is clobbering LR?
> Are you talking about the "BL" instruction, which wasn't there before?
Yes, I didn't realize that LR had been in the clobber list before that.
-Scott
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
2012-07-02 17:43 ` Scott Wood
@ 2012-07-02 17:53 ` Timur Tabi
-1 siblings, 0 replies; 26+ messages in thread
From: Timur Tabi @ 2012-07-02 17:53 UTC (permalink / raw)
To: Scott Wood; +Cc: Alexander Graf, Stuart Yoder, kvm-ppc, kvm
Scott Wood wrote:
>> > I'm still a little confused. Which inline assembly code is clobbering LR?
>> > Are you talking about the "BL" instruction, which wasn't there before?
> Yes, I didn't realize that LR had been in the clobber list before that.
So are you saying that it was wrong before, but it's correct now?
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-07-02 17:53 ` Timur Tabi
0 siblings, 0 replies; 26+ messages in thread
From: Timur Tabi @ 2012-07-02 17:53 UTC (permalink / raw)
To: Scott Wood; +Cc: Alexander Graf, Stuart Yoder, kvm-ppc, kvm
Scott Wood wrote:
>> > I'm still a little confused. Which inline assembly code is clobbering LR?
>> > Are you talking about the "BL" instruction, which wasn't there before?
> Yes, I didn't realize that LR had been in the clobber list before that.
So are you saying that it was wrong before, but it's correct now?
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
2012-07-02 17:53 ` Timur Tabi
@ 2012-07-02 17:57 ` Scott Wood
-1 siblings, 0 replies; 26+ messages in thread
From: Scott Wood @ 2012-07-02 17:57 UTC (permalink / raw)
To: Timur Tabi; +Cc: Alexander Graf, Stuart Yoder, kvm-ppc, kvm
On 07/02/2012 12:53 PM, Timur Tabi wrote:
> Scott Wood wrote:
>>>> I'm still a little confused. Which inline assembly code is clobbering LR?
>>>> Are you talking about the "BL" instruction, which wasn't there before?
>
>> Yes, I didn't realize that LR had been in the clobber list before that.
>
> So are you saying that it was wrong before, but it's correct now?
Not really *wrong* before, but unnecessary.
-Scott
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-07-02 17:57 ` Scott Wood
0 siblings, 0 replies; 26+ messages in thread
From: Scott Wood @ 2012-07-02 17:57 UTC (permalink / raw)
To: Timur Tabi; +Cc: Alexander Graf, Stuart Yoder, kvm-ppc, kvm
On 07/02/2012 12:53 PM, Timur Tabi wrote:
> Scott Wood wrote:
>>>> I'm still a little confused. Which inline assembly code is clobbering LR?
>>>> Are you talking about the "BL" instruction, which wasn't there before?
>
>> Yes, I didn't realize that LR had been in the clobber list before that.
>
> So are you saying that it was wrong before, but it's correct now?
Not really *wrong* before, but unnecessary.
-Scott
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
2012-07-02 17:57 ` Scott Wood
@ 2012-07-02 18:02 ` Timur Tabi
-1 siblings, 0 replies; 26+ messages in thread
From: Timur Tabi @ 2012-07-02 18:02 UTC (permalink / raw)
To: Scott Wood; +Cc: Alexander Graf, Stuart Yoder, kvm-ppc, kvm
Scott Wood wrote:
>> > So are you saying that it was wrong before, but it's correct now?
> Not really *wrong* before, but unnecessary.
In that case, my code was really just ahead of its time. :-)
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-07-02 18:02 ` Timur Tabi
0 siblings, 0 replies; 26+ messages in thread
From: Timur Tabi @ 2012-07-02 18:02 UTC (permalink / raw)
To: Scott Wood; +Cc: Alexander Graf, Stuart Yoder, kvm-ppc, kvm
Scott Wood wrote:
>> > So are you saying that it was wrong before, but it's correct now?
> Not really *wrong* before, but unnecessary.
In that case, my code was really just ahead of its time. :-)
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
2012-07-02 17:25 ` Scott Wood
@ 2012-07-03 15:22 ` Yoder Stuart-B08248
-1 siblings, 0 replies; 26+ messages in thread
From: Yoder Stuart-B08248 @ 2012-07-03 15:22 UTC (permalink / raw)
To: Wood Scott-B07421, Alexander Graf
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, Tabi Timur-B04825
DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogV29vZCBTY290dC1CMDc0
MjENCj4gU2VudDogTW9uZGF5LCBKdWx5IDAyLCAyMDEyIDEyOjI1IFBNDQo+IFRvOiBBbGV4YW5k
ZXIgR3JhZg0KPiBDYzogWW9kZXIgU3R1YXJ0LUIwODI0ODsga3ZtLXBwY0B2Z2VyLmtlcm5lbC5v
cmc7IGt2bUB2Z2VyLmtlcm5lbC5vcmc7IFRhYmkgVGltdXItQjA0ODI1DQo+IFN1YmplY3Q6IFJl
OiBbUEFUQ0ggdjExIDgvOF0gUFBDOiBEb24ndCB1c2UgaGFyZGNvZGVkIG9wY29kZSBmb3IgZVBB
UFIgaGNhbGwgaW52b2NhdGlvbg0KPiANCj4gT24gMDcvMDIvMjAxMiAxMjoxNyBQTSwgQWxleGFu
ZGVyIEdyYWYgd3JvdGU6DQo+ID4NCj4gPiBPbiAwMi4wNy4yMDEyLCBhdCAxOToxNiwgU2NvdHQg
V29vZCB3cm90ZToNCj4gPg0KPiA+PiBPbiAwNy8wMi8yMDEyIDEyOjEzIFBNLCBBbGV4YW5kZXIg
R3JhZiB3cm90ZToNCj4gPj4+DQo+ID4+PiBPbiAwMi4wNy4yMDEyLCBhdCAxOToxMCwgU2NvdHQg
V29vZCB3cm90ZToNCj4gPj4+DQo+ID4+Pj4gT24gMDcvMDIvMjAxMiAwNzozMCBBTSwgQWxleGFu
ZGVyIEdyYWYgd3JvdGU6DQo+ID4+Pj4+DQo+ID4+Pj4+IE9uIDIyLjA2LjIwMTIsIGF0IDIyOjA2
LCBTdHVhcnQgWW9kZXIgd3JvdGU6DQo+ID4+Pj4+DQo+ID4+Pj4+PiBGcm9tOiBMaXUgWXUtQjEz
MjAxIDxZdS5MaXVAZnJlZXNjYWxlLmNvbT4NCj4gPj4+Pj4+DQo+ID4+Pj4+PiBTaWduZWQtb2Zm
LWJ5OiBMaXUgWXUgPHl1LmxpdUBmcmVlc2NhbGUuY29tPg0KPiA+Pj4+Pj4gU2lnbmVkLW9mZi1i
eTogU3R1YXJ0IFlvZGVyIDxzdHVhcnQueW9kZXJAZnJlZXNjYWxlLmNvbT4NCj4gPj4+Pj4+IC0t
LQ0KPiA+Pj4+Pj4gLXYxMTogbm8gY2hhbmdlcw0KPiA+Pj4+Pj4NCj4gPj4+Pj4+IGFyY2gvcG93
ZXJwYy9pbmNsdWRlL2FzbS9lcGFwcl9oY2FsbHMuaCB8ICAgMjIgKysrKysrKysrLS0tLS0tLS0t
DQo+ID4+Pj4+PiBhcmNoL3Bvd2VycGMvaW5jbHVkZS9hc20vZnNsX2hjYWxscy5oICAgfCAgIDM2
ICsrKysrKysrKysrKysrKy0tLS0tLS0tLS0tLS0tLQ0KPiA+Pj4+Pj4gMiBmaWxlcyBjaGFuZ2Vk
LCAyOSBpbnNlcnRpb25zKCspLCAyOSBkZWxldGlvbnMoLSkNCj4gPj4+Pj4+DQo+ID4+Pj4+PiBk
aWZmIC0tZ2l0IGEvYXJjaC9wb3dlcnBjL2luY2x1ZGUvYXNtL2VwYXByX2hjYWxscy5oIGIvYXJj
aC9wb3dlcnBjL2luY2x1ZGUvYXNtL2VwYXByX2hjYWxscy5oDQo+ID4+Pj4+PiBpbmRleCA4MzNj
ZTJjLi5iOGQ5NDQ1IDEwMDY0NA0KPiA+Pj4+Pj4gLS0tIGEvYXJjaC9wb3dlcnBjL2luY2x1ZGUv
YXNtL2VwYXByX2hjYWxscy5oDQo+ID4+Pj4+PiArKysgYi9hcmNoL3Bvd2VycGMvaW5jbHVkZS9h
c20vZXBhcHJfaGNhbGxzLmgNCj4gPj4+Pj4+IEBAIC0xOTUsNyArMTk1LDcgQEAgc3RhdGljIGlu
bGluZSB1bnNpZ25lZCBpbnQgZXZfaW50X3NldF9jb25maWcodW5zaWduZWQgaW50IGludGVycnVw
dCwNCj4gPj4+Pj4+IAlyNSAgPSBwcmlvcml0eTsNCj4gPj4+Pj4+IAlyNiAgPSBkZXN0aW5hdGlv
bjsNCj4gPj4+Pj4+DQo+ID4+Pj4+PiAtCV9fYXNtX18gX192b2xhdGlsZV9fICgic2MgMSINCj4g
Pj4+Pj4+ICsJYXNtIHZvbGF0aWxlKCJibAllcGFwcl9oeXBlcmNhbGxfc3RhcnQiDQo+ID4+Pj4+
PiAJCTogIityIiAocjExKSwgIityIiAocjMpLCAiK3IiIChyNCksICIrciIgKHI1KSwgIityIiAo
cjYpDQo+ID4+Pj4+PiAJCTogOiBFVl9IQ0FMTF9DTE9CQkVSUzQNCj4gPj4+Pj4NCj4gPj4+Pj4g
SHJtLiBlUEFQUiBoeXBlcmNhbGxzIGFyZSBhbGxvd2VkIHRvIGNsb2JiZXIgbHIsIHJpZ2h0PyBC
dXQgb3VyIGh5cGVyY2FsbCBlbnRyeSBjb2RlIGRlcGVuZHMgb24gbHINCj4gc3RheWluZyBhbGl2
ZToNCj4gPj4+Pg0KPiA+Pj4+IGVQQVBSIDEuMSBzYXlzIExSIGlzIG5vbnZvbGF0aWxlLg0KPiA+
Pj4NCj4gPj4+IFdoeSBpcyBpdCBpbiB0aGUgY2xvYmJlciBsaXN0IHRoZW4/DQo+ID4+DQo+ID4+
IEJlY2F1c2UgdGhlIGlubGluZSBhc3NlbWJseSBjb2RlIGlzIGNsb2JiZXJpbmcgaXQgLS0gbm90
IHRoZSBodi1wcm92aWRlZA0KPiA+PiBoY2FsbCBpbnN0cnVjdGlvbnMuDQo+ID4NCj4gPiBPbmx5
IGFmdGVyIHRoZSBjaGFuZ2UsIG5vdCBiZWZvcmUgaXQuDQo+IA0KPiBIbW0uICBUaGUgY29tbWVu
dCBzYXlzLCAiWEVSLCBDVFIsIGFuZCBMUiBhcmUgY3VycmVudGx5IGxpc3RlZCBhcw0KPiBjbG9i
YmVycyBiZWNhdXNlIGl0J3MgdW5jZXJ0YWluIHdoZXRoZXIgdGhleSB3aWxsIGJlIGNsb2JiZXJl
ZC4iICBNYXliZQ0KPiBpdCBkYXRlcyBiYWNrIHRvIHdoZW4gdGhlIEFCSSB3YXMgc3RpbGwgYmVp
bmcgZGlzY3Vzc2VkPyAgVGltdXIsIGRvIHlvdQ0KPiByZWNhbGw/DQo+IA0KPiBJbiBhbnkgY2Fz
ZSwgTFIgaXMgbm9udm9sYXRpbGUgaW4gdGhlIHNwZWMgYW5kIGluIHRoZSBpbXBsZW1lbnRhdGlv
bnMgSQ0KPiBrbm93IGFib3V0IChLVk0gYW5kIFRvcGF6KS4NCg0KQmFzZWQgb24gdGhpcyB0aHJl
YWQgSSBhbSBnb2luZyB0byBsZWF2ZSB0aGlzIHBhdGNoIGFzIGlzLg0KDQpTdHVhcnQNCg=
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
@ 2012-07-03 15:22 ` Yoder Stuart-B08248
0 siblings, 0 replies; 26+ messages in thread
From: Yoder Stuart-B08248 @ 2012-07-03 15:22 UTC (permalink / raw)
To: Wood Scott-B07421, Alexander Graf
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, Tabi Timur-B04825
> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Monday, July 02, 2012 12:25 PM
> To: Alexander Graf
> Cc: Yoder Stuart-B08248; kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; Tabi Timur-B04825
> Subject: Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation
>
> On 07/02/2012 12:17 PM, Alexander Graf wrote:
> >
> > On 02.07.2012, at 19:16, Scott Wood wrote:
> >
> >> On 07/02/2012 12:13 PM, Alexander Graf wrote:
> >>>
> >>> On 02.07.2012, at 19:10, Scott Wood wrote:
> >>>
> >>>> On 07/02/2012 07:30 AM, Alexander Graf wrote:
> >>>>>
> >>>>> On 22.06.2012, at 22:06, Stuart Yoder wrote:
> >>>>>
> >>>>>> From: Liu Yu-B13201 <Yu.Liu@freescale.com>
> >>>>>>
> >>>>>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
> >>>>>> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
> >>>>>> ---
> >>>>>> -v11: no changes
> >>>>>>
> >>>>>> arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++---------
> >>>>>> arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++---------------
> >>>>>> 2 files changed, 29 insertions(+), 29 deletions(-)
> >>>>>>
> >>>>>> diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
> >>>>>> index 833ce2c..b8d9445 100644
> >>>>>> --- a/arch/powerpc/include/asm/epapr_hcalls.h
> >>>>>> +++ b/arch/powerpc/include/asm/epapr_hcalls.h
> >>>>>> @@ -195,7 +195,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt,
> >>>>>> r5 = priority;
> >>>>>> r6 = destination;
> >>>>>>
> >>>>>> - __asm__ __volatile__ ("sc 1"
> >>>>>> + asm volatile("bl epapr_hypercall_start"
> >>>>>> : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
> >>>>>> : : EV_HCALL_CLOBBERS4
> >>>>>
> >>>>> Hrm. ePAPR hypercalls are allowed to clobber lr, right? But our hypercall entry code depends on lr
> staying alive:
> >>>>
> >>>> ePAPR 1.1 says LR is nonvolatile.
> >>>
> >>> Why is it in the clobber list then?
> >>
> >> Because the inline assembly code is clobbering it -- not the hv-provided
> >> hcall instructions.
> >
> > Only after the change, not before it.
>
> Hmm. The comment says, "XER, CTR, and LR are currently listed as
> clobbers because it's uncertain whether they will be clobbered." Maybe
> it dates back to when the ABI was still being discussed? Timur, do you
> recall?
>
> In any case, LR is nonvolatile in the spec and in the implementations I
> know about (KVM and Topaz).
Based on this thread I am going to leave this patch as is.
Stuart
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2012-07-03 15:22 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-22 20:06 [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation Stuart Yoder
2012-06-22 20:06 ` Stuart Yoder
2012-07-02 12:30 ` Alexander Graf
2012-07-02 12:30 ` Alexander Graf
2012-07-02 17:10 ` Scott Wood
2012-07-02 17:10 ` Scott Wood
2012-07-02 17:13 ` Alexander Graf
2012-07-02 17:13 ` Alexander Graf
2012-07-02 17:16 ` Scott Wood
2012-07-02 17:16 ` Scott Wood
2012-07-02 17:17 ` Alexander Graf
2012-07-02 17:17 ` Alexander Graf
2012-07-02 17:25 ` Scott Wood
2012-07-02 17:25 ` Scott Wood
2012-07-02 17:34 ` Timur Tabi
2012-07-02 17:34 ` Timur Tabi
2012-07-02 17:43 ` Scott Wood
2012-07-02 17:43 ` Scott Wood
2012-07-02 17:53 ` Timur Tabi
2012-07-02 17:53 ` Timur Tabi
2012-07-02 17:57 ` Scott Wood
2012-07-02 17:57 ` Scott Wood
2012-07-02 18:02 ` Timur Tabi
2012-07-02 18:02 ` Timur Tabi
2012-07-03 15:22 ` Yoder Stuart-B08248
2012-07-03 15:22 ` Yoder Stuart-B08248
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.