On 04/27/2014 04:41 PM, Paolo Bonzini wrote: > Il 27/04/2014 13:40, Toralf Förster ha scritto: >> Ah, so the following would work, but looks too ugly, right ? : >> >> >> #ifdef CONFIG_X86_64 >> if (!longmode) { >> #endif >> param = ((u64)kvm_register_read(vcpu, VCPU_REGS_RDX) << 32) | >> (kvm_register_read(vcpu, VCPU_REGS_RAX) & 0xffffffff); >> ingpa = ((u64)kvm_register_read(vcpu, VCPU_REGS_RBX) << 32) | >> (kvm_register_read(vcpu, VCPU_REGS_RCX) & 0xffffffff); >> outgpa = ((u64)kvm_register_read(vcpu, VCPU_REGS_RDI) << 32) | >> (kvm_register_read(vcpu, VCPU_REGS_RSI) & 0xffffffff); >> #ifdef CONFIG_X86_64 >> } >> else { >> param = kvm_register_read(vcpu, VCPU_REGS_RCX); >> ingpa = kvm_register_read(vcpu, VCPU_REGS_RDX); >> outgpa = kvm_register_read(vcpu, VCPU_REGS_R8); >> } >> #endif >> > > Yep. :) Note that GCC correctly reports no warning, because it looks > through is_long_mode. In the end, #ifdef in the code can just be > removed. Please compile-test it on 32-bit though (well, I will too > before committing but...). > > Paolo > Will send out a patch, which was compile tested and runtime tested using a tails KVM image udner a stable 32 bit Gentoo Linux -- Toralf -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html