[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem in Xen interface on i386 in xen 4.13


  • To: xen-users@xxxxxxxxxxxxx
  • From: Charles Gonçalves <charles.fg@xxxxxxxxx>
  • Date: Mon, 14 Dec 2020 16:43:58 +0000
  • Delivery-date: Mon, 14 Dec 2020 16:45:23 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>

Hello Guys,

I'm having issues using an hypercall directly under an LKM module on a
DOMU guest over an i386 Linux kernel 3.13.

When I try to compile a simple LKM module  (shown at botton) to list
xen version I get the following error:

make[1]: Entering directory `/usr/src/linux-headers-3.13.0-170-generic'
  CC [M]  /root/xen-utils/understand-xen/domU/x64/xc_Hypercall/km_xen_ver.o
In file included from
/usr/src/linux-headers-3.13.0-170-generic/arch/x86/include/asm/xen/interface.h:136:0,
                 from include/xen/interface/xen.h:12,
                 from include/xen/xen.h:23,
                 from
/usr/src/linux-headers-3.13.0-170-generic/arch/x86/include/asm/io.h:335,
                 from
/usr/src/linux-headers-3.13.0-170-generic/arch/x86/include/asm/realmode.h:5,
                 from
/usr/src/linux-headers-3.13.0-170-generic/arch/x86/include/asm/acpi.h:33,
                 from
/usr/src/linux-headers-3.13.0-170-generic/arch/x86/include/asm/fixmap.h:19,
                 from
/usr/src/linux-headers-3.13.0-170-generic/arch/x86/include/asm/apic.h:12,
                 from
/usr/src/linux-headers-3.13.0-170-generic/arch/x86/include/asm/smp.h:13,
                 from include/linux/smp.h:62,
                 from include/linux/topology.h:33,
                 from include/linux/gfp.h:7,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from
/root/xen-utils/understand-xen/domU/x64/xc_Hypercall/km_xen_ver.c:2:
/usr/src/linux-headers-3.13.0-170-generic/arch/x86/include/asm/xen/interface_32.h:48:1:
error: expected ‘;’, identifier or ‘(’ before ‘struct’
 struct cpu_user_regs {


I have a LKM module that has been working fine in x64 domU guests, but
I can't port it to i386. I then was trying even this simple code that
also fails:


#include <linux/module.h>
#include <linux/kernel.h>
#include <asm/Xen/hypercall.h>

static int __init hc_xen_ver_init(void) {

    unsigned long ret = 0;
    printk("Loading the hc_xen_ver : %s\n",__FUNCTION__);
    printk("Entering: %s\n",__FUNCTION__);
        ret = HYPERVISOR_xen_version(0, 0);
    printk("Xen version %ld.%ld\n", ret >> 16, ret & 0xffff);

    return 0;
}

static void __exit hc_xen_ver_exit(void) {
    printk(KERN_INFO "Exiting hc_xen_ver  module\n");
}

module_init(hc_xen_ver_init);




Atenciosamente,
Charles Ferreira Gonçalves



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.