* [PATCH] Fix kvm-svn/kernel build on 32-bit
@ 2007-02-04 0:55 Ben Collins
2007-02-04 3:23 ` richardvoigt-Re5JQEeQqe8AvxtiuMwx3w
2007-02-04 10:11 ` Avi Kivity
0 siblings, 2 replies; 4+ messages in thread
From: Ben Collins @ 2007-02-04 0:55 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Build currently fails with x86.
Index: kernel/kvm_main.c
===================================================================
--- kernel/kvm_main.c (revision 4381)
+++ kernel/kvm_main.c (working copy)
@@ -1148,6 +1148,7 @@
kvm_arch_ops->decache_regs(vcpu);
ret = -KVM_EINVAL;
+#ifdef CONFIG_X86_64
if (is_long_mode(vcpu)) {
nr = vcpu->regs[VCPU_REGS_RAX];
a0 = vcpu->regs[VCPU_REGS_RDI];
@@ -1156,7 +1157,9 @@
a3 = vcpu->regs[VCPU_REGS_RCX];
a4 = vcpu->regs[VCPU_REGS_R8];
a5 = vcpu->regs[VCPU_REGS_R9];
- } else {
+ } else
+#endif
+ {
nr = vcpu->regs[VCPU_REGS_RBX] & -1u;
a0 = vcpu->regs[VCPU_REGS_RAX] & -1u;
a1 = vcpu->regs[VCPU_REGS_RCX] & -1u;
--
Ubuntu: http://www.ubuntu.com/
Linux1394: http://www.linux1394.org/
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix kvm-svn/kernel build on 32-bit
2007-02-04 0:55 [PATCH] Fix kvm-svn/kernel build on 32-bit Ben Collins
@ 2007-02-04 3:23 ` richardvoigt-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <2e59e6970702031923k467c198asd20266093ef858d9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-02-04 10:11 ` Avi Kivity
1 sibling, 1 reply; 4+ messages in thread
From: richardvoigt-Re5JQEeQqe8AvxtiuMwx3w @ 2007-02-04 3:23 UTC (permalink / raw)
To: Ben Collins; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Does kvm try to support 64-bit guests on a 32-bit host kernel? (64-bit
CPU of course)
It looks to me like this patch might prevent that scenario.
On 2/3/07, Ben Collins <ben.collins-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org> wrote:
> Build currently fails with x86.
>
> Index: kernel/kvm_main.c
> ===================================================================
> --- kernel/kvm_main.c (revision 4381)
> +++ kernel/kvm_main.c (working copy)
> @@ -1148,6 +1148,7 @@
>
> kvm_arch_ops->decache_regs(vcpu);
> ret = -KVM_EINVAL;
> +#ifdef CONFIG_X86_64
> if (is_long_mode(vcpu)) {
> nr = vcpu->regs[VCPU_REGS_RAX];
> a0 = vcpu->regs[VCPU_REGS_RDI];
> @@ -1156,7 +1157,9 @@
> a3 = vcpu->regs[VCPU_REGS_RCX];
> a4 = vcpu->regs[VCPU_REGS_R8];
> a5 = vcpu->regs[VCPU_REGS_R9];
> - } else {
> + } else
> +#endif
> + {
> nr = vcpu->regs[VCPU_REGS_RBX] & -1u;
> a0 = vcpu->regs[VCPU_REGS_RAX] & -1u;
> a1 = vcpu->regs[VCPU_REGS_RCX] & -1u;
>
>
> --
> Ubuntu: http://www.ubuntu.com/
> Linux1394: http://www.linux1394.org/
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> kvm-devel mailing list
> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix kvm-svn/kernel build on 32-bit
[not found] ` <2e59e6970702031923k467c198asd20266093ef858d9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-02-04 3:31 ` Ben Collins
0 siblings, 0 replies; 4+ messages in thread
From: Ben Collins @ 2007-02-04 3:31 UTC (permalink / raw)
To: richardvoigt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Sat, 2007-02-03 at 21:23 -0600, richardvoigt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> Does kvm try to support 64-bit guests on a 32-bit host kernel? (64-bit
> CPU of course)
>
> It looks to me like this patch might prevent that scenario.
No it doesn't, but this patch wouldn't prevent it any more than other
parts of the code (where the VCPU_REGS_RX macros are already wrapped by
CONFIG_X86_64 ifdef's).
--
Ubuntu: http://www.ubuntu.com/
Linux1394: http://www.linux1394.org/
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix kvm-svn/kernel build on 32-bit
2007-02-04 0:55 [PATCH] Fix kvm-svn/kernel build on 32-bit Ben Collins
2007-02-04 3:23 ` richardvoigt-Re5JQEeQqe8AvxtiuMwx3w
@ 2007-02-04 10:11 ` Avi Kivity
1 sibling, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2007-02-04 10:11 UTC (permalink / raw)
To: Ben Collins; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Ben Collins wrote:
> Build currently fails with x86.
>
I just committed an identical patch from Anthony.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-02-04 10:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-04 0:55 [PATCH] Fix kvm-svn/kernel build on 32-bit Ben Collins
2007-02-04 3:23 ` richardvoigt-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <2e59e6970702031923k467c198asd20266093ef858d9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-02-04 3:31 ` Ben Collins
2007-02-04 10:11 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox