Thread (75 messages) 75 messages, 6 authors, 2012-10-08

Re: [Qemu-ppc] [RFC PATCH 12/17] PowerPC: booke64: Add DO_KVM kernel hooks

flat view

From: Alexander Graf <hidden>
Date: 2012-07-06 23:11:24
Also in: kvm

On 07.07.2012, at 00:33, Caraman Mihai Claudiu-B02008 wrote:
quoted
-----Original Message-----
From: Benjamin Herrenschmidt [mailto:benh@kernel.crashing.org]
Sent: Thursday, July 05, 2012 1:26 AM
To: Alexander Graf
Cc: Caraman Mihai Claudiu-B02008; <redacted>; KVM =
list;
quoted
linuxppc-dev; qemu-ppc@nongnu.org List
Subject: Re: [Qemu-ppc] [RFC PATCH 12/17] PowerPC: booke64: Add =
DO_KVM
quoted
kernel hooks
=20
On Wed, 2012-07-04 at 16:29 +0200, Alexander Graf wrote:
=20
quoted
quoted
+#ifdef CONFIG_KVM_BOOKE_HV
+#define KVM_BOOKE_HV_MFSPR(reg, spr)				=
\
quoted
quoted
quoted
+	BEGIN_FTR_SECTION					\
+		mfspr	reg, spr;			  	\
+	END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
+#else
+#define KVM_BOOKE_HV_MFSPR(reg, spr)
+#endif
=20
Bleks - this is ugly. Do we really need to open-code the #ifdef =
here?
quoted
quoted
Can't the feature section code determine that the feature is =
disabled
quoted
quoted
and just always not include the code?
=20
You can't but in any case I don't see the point of the conditional =
here,
quoted
we'll eventually have to load srr1 no ? We can move the load up to =
here
quoted
in all cases or can't we ?=20
=20
I like the idea, but there is a problem with addition macros which may =
clobber
r11 and PROLOG_ADDITION_MASKABLE_GEN is such a case.
Mike -v please :)


Alex
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help