Re: [PATCH 2/3] kvmppc: add hypercall infrastructure - guest part v3

2008-10-13 Thread Kumar Gala


On Oct 13, 2008, at 12:29 PM, Hollis Blanchard wrote:


On Mon, 2008-10-13 at 11:42 -0500, Kumar Gala wrote:

+
+/* Hypercalls use the beat ABI */
+#define KVM_HYPERCALL_BIN 0x4422


Any reason this isn't 'sc' ?

Also, can we make this "sc 1" so its works when we have HW hypervisor
support?


Actually, it is "sc 1".

Many versions of as (including 2.16.1) don't recognize that  
instruction.

This is the standard workaround for situations like that.


Ahh, we'll than can we add that to the comment, and rename  
'KVM_HYPERCALL_BIN' to something like 'EPAPR_HYPERCALL_INSTR'


- k
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/3] kvmppc: add hypercall infrastructure - guest part v3

2008-10-13 Thread Hollis Blanchard
On Mon, 2008-10-13 at 11:42 -0500, Kumar Gala wrote:
> > +
> > +/* Hypercalls use the beat ABI */
> > +#define KVM_HYPERCALL_BIN 0x4422
> 
> Any reason this isn't 'sc' ?
> 
> Also, can we make this "sc 1" so its works when we have HW hypervisor  
> support?

Actually, it is "sc 1".

Many versions of as (including 2.16.1) don't recognize that instruction.
This is the standard workaround for situations like that.

-- 
Hollis Blanchard
IBM Linux Technology Center

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/3] kvmppc: add hypercall infrastructure - guest part v3

2008-10-13 Thread Kumar Gala


On Sep 16, 2008, at 1:27 AM, [EMAIL PROTECTED] wrote:


From: Christian Ehrhardt <[EMAIL PROTECTED]>

This adds the guest portion of the hypercall infrastructure.

Version 3 now follows the beat ABI, but proposes a new  
implementation style as
static inline asm functions instead of pure assembler code. That  
should allow

the compiler to be more flexible and therefore a better optimization.

If people agree on that new implementation style we might merge this  
code.

The current implementation of beat style hypercalls can be found in
arch/powerpc/platforms/cell/beat_hvCall.S

Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]>
---

[diffstat]
epapr_hcalls.h |   59 +++ 
++

1 file changed, 59 insertions(+)

[diff]

diff --git a/include/asm-powerpc/epapr_hcalls.h b/include/asm- 
powerpc/epapr_hcalls.h

new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/epapr_hcalls.h
@@ -0,0 +1,59 @@
+/*
+ * This program is free software; you can redistribute it and/or  
modify
+ * it under the terms of the GNU General Public License, version 2,  
as

+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA   
02110-1301, USA.

+ *
+ * Copyright IBM Corp. 2008
+ *
+ * Authors:
+ * Christian Ehrhardt <[EMAIL PROTECTED]>
+ */
+
+#ifndef __POWERPC_EPAPR_HCALLS_H__
+#define __POWERPC_EPAPR_HCALLS_H__
+
+#ifdef __KERNEL__
+
+/* Hypercalls use the beat ABI */
+#define KVM_HYPERCALL_BIN 0x4422


Any reason this isn't 'sc' ?

Also, can we make this "sc 1" so its works when we have HW hypervisor  
support?


- k
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev