Skip to contentSkip to conversation

qemuu only built with i386-softmmu

BUG? Steven Haigh 3 participants 6 messages Feb 4, 2016 – Feb 9, 2016

lore
Share & tools
lore
#0 lore raw

Hi all,

Looking specifically at 4.6.0.

It seems that the Makefile for qemuu uses the following:

        $$source/configure --enable-xen --target-list=i386-softmmu \
                $(QEMU_XEN_ENABLE_DEBUG) \
                --prefix=$(LIBEXEC) \
                --libdir=$(LIBEXEC_LIB) \
                --includedir=$(LIBEXEC_INC) \
                --source-path=$$source \
                --extra-cflags="-I$(XEN_ROOT)/tools/include \
                -I$(XEN_ROOT)/tools/libxc/include \
                -I$(XEN_ROOT)/tools/xenstore/include \
                -I$(XEN_ROOT)/tools/xenstore/compat/include \
                $(EXTRA_CFLAGS_QEMU_XEN)" \
                --extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
                -L$(XEN_ROOT)/tools/xenstore \
                $(QEMU_UPSTREAM_RPATH)" \
                --bindir=$(LIBEXEC_BIN) \
                --datadir=$(SHAREDIR)/qemu-xen \
                --localstatedir=$(localstatedir) \
                --disable-kvm \
                --disable-docs \
                --disable-guest-agent \
                --python=$(PYTHON) \
                $(CONFIG_QEMUU_EXTRA_ARGS) \
                --cpu=$(IOEMU_CPU_ARCH) \
                $(IOEMU_CONFIGURE_CROSS); \
        $(MAKE) all

As such, this only builds the 32 bit version of qemuu. It seems that starting a HVM with more than 4Gb of RAM fails:

libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch w=0xa4d188: deregister unregistered
xc: detail: elf_parse_binary: phdr: paddr=0x100000 memsz=0x5b3a4
xc: detail: elf_parse_binary: memory: 0x100000 -> 0x15b3a4
xc: detail: VIRTUAL MEMORY ARRANGEMENT:
xc: detail: Loader: 0000000000100000->000000000015b3a4
xc: detail: Modules: 0000000000000000->0000000000000000
xc: detail: TOTAL: 0000000000000000->000000017f000000
xc: detail: ENTRY: 0000000000100600
xc: detail: PHYSICAL MEMORY ALLOCATION:
xc: detail: 4KB PAGES: 0x0000000000000200
xc: detail: 2MB PAGES: 0x00000000000005f7
xc: detail: 1GB PAGES: 0x0000000000000003
xc: detail: elf_load_binary: phdr 0 at 0x7ff67320f000 -> 0x7ff673260910
xc: error: Could not clear special pages (22 = Invalid argument):
Internal error
libxl: error: libxl_dom.c:1003:libxl__build_hvm: hvm building failed

In building my Xen 4.6.0 packages, I disable qemu-traditional and ONLY build qemu-upstream - however as the value for i386-softmmu is not based on variables, I'm not sure this makes a difference.

My question is, should this also build x86_64-softmmu as well as i386-softmmu at a bare minimum?

Signature · 5 lines
Steven Haigh

Email: [email protected]
Web: https://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw
Quoted 3 lines · Steven Haigh

In building my Xen 4.6.0 packages, I disable qemu-traditional and ONLY build qemu-upstream - however as the value for i386-softmmu is not based on variables, I'm not sure this makes a difference.

QEMU in a Xen system only provides device model (DM) emulation and not any CPU instruction emulation, so the nominal arch doesn't actually matter and Xen build's i386 everywhere as a basically arbitrary choice.

It happens that the Xen DM part of QEMU is quite closely tied to the x86 scaffolding for various historical reasons, so we end up using qemu-system- i386 even e.g. on ARM!

This comes up a lot, So I've also pasted the two paras above into a new section in http://wiki.xenproject.org/wiki/QEMU_Upstream . If anyone thinks the above is inaccurate then please edit the wiki (and post here too if you like).

On thing I was sure on (so didn't write) is whether the second paragraph could have an extra sentence:

If you are using a distro supplied QEMU then the qemu-system-x86_64 could also be used, but it makes no practical difference to the functionality of the system.

I wasn't sure if that was true (I suspect it is) and in any case I think various bits of libxl etc will look for qemu-system-i386 in various paths so a user would need to try reasonably hard to do so by giving an explicit path and there is no real reason to do so maybe better not to muddy the waters?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
Quoted 9 lines · Ian Campbell
Quoted 3 lines · Steven Haigh

In building my Xen 4.6.0 packages, I disable qemu-traditional and ONLY build qemu-upstream - however as the value for i386-softmmu is not based on variables, I'm not sure this makes a difference.

QEMU in a Xen system only provides device model (DM) emulation and not any CPU instruction emulation, so the nominal arch doesn't actually matter and Xen build's i386 everywhere as a basically arbitrary choice.

Quoted 8 lines

It happens that the Xen DM part of QEMU is quite closely tied to the x86 scaffolding for various historical reasons, so we end up using qemu-system- i386 even e.g. on ARM!

This comes up a lot, So I've also pasted the two paras above into a new section in http://wiki.xenproject.org/wiki/QEMU_Upstream . If anyone thinks the above is inaccurate then please edit the wiki (and post here too if you like).

I think this is a great addition that explains the situation well. Documenting these is always a good thing.

Quoted 8 lines

On thing I was sure on (so didn't write) is whether the second paragraph could have an extra sentence:

If you are using a distro supplied QEMU then the qemu-system-x86_64 could also be used, but it makes no practical difference to the functionality of the system.

Quoted 5 lines

I wasn't sure if that was true (I suspect it is) and in any case I think various bits of libxl etc will look for qemu-system-i386 in various paths so a user would need to try reasonably hard to do so by giving an explicit path and there is no real reason to do so maybe better not to muddy the waters?

Maybe go along the lines of:

"There is no practical difference between qemu-system-i386 and qemu-system-x86_64 therefore both can be interchanged freely."

Signature · 5 lines
Steven Haigh

Email: [email protected]
Web: https://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
Quoted 18 lines · Steven Haigh
Quoted 9 lines

On thing I was sure on (so didn't write) is whether the second paragraph
could have an extra sentence:

    If you are using a distro supplied QEMU then the qemu-system-x86_64 could also be used, but it makes no practical difference to the functionality of the system.

Quoted 8 lines

I wasn't sure if that was true (I suspect it is) and in any case I think
various bits of libxl etc will look for qemu-system-i386 in various paths
so a user would need to try reasonably hard to do so by giving an explicit
path and there is no real reason to do so maybe better not to muddy the waters?

Quoted 4 lines

Maybe go along the lines of:

"There is no practical difference between qemu-system-i386 and qemu-system-x86_64 therefore both can be interchanged freely."

Thanks, this is a good wording if it is indeed true (I'll wait for confirmation of that before I write it on the wiki).

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#4 lore raw
Quoted 19 lines · Ian Campbell
Quoted 18 lines · Steven Haigh
Quoted 17 lines

On thing I was sure on (so didn't write) is whether the second paragraph
could have an extra sentence:

    If you are using a distro supplied QEMU then the qemu-system-x86_64 could also be used, but it makes no practical difference to the functionality of the system.

I wasn't sure if that was true (I suspect it is) and in any case I think
various bits of libxl etc will look for qemu-system-i386 in various paths
so a user would need to try reasonably hard to do so by giving an explicit
path and there is no real reason to do so maybe better not to muddy the waters?

Quoted 7 lines
Quoted 4 lines

Maybe go along the lines of:

"There is no practical difference between qemu-system-i386 and qemu-system-x86_64 therefore both can be interchanged freely."

Thanks, this is a good wording if it is indeed true (I'll wait for confirmation of that before I write it on the wiki).

Although it is technically true, within QEMU they are two different build targets (i386-softmmu and x86_64-softmmu) and we only tests i386-softmmu in OSSTest. It is possible that qemu-system-x86_64 might break due to upstream changes while qemu-system-i386 could still work and we might not notice.

I would write:

"There is no practical difference between qemu-system-i386 and qemu-system-x86_64, they should be interchangeable. However only qemu-system-i386 is regularly tested by OSSTest".

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw
Quoted 36 lines · Stefano Stabellini
Quoted 21 lines · Ian Campbell
Quoted 20 lines · Steven Haigh
Quoted 19 lines

On thing I was sure on (so didn't write) is whether the second paragraph
could have an extra sentence:

    If you are using a distro supplied QEMU then the qemu-system- x86_64
    could also be used, but it makes no practical difference to the functionality of the system.

I wasn't sure if that was true (I suspect it is) and in any case I think
various bits of libxl etc will look for qemu-system-i386 in various paths
so a user would need to try reasonably hard to do so by giving an explicit
path and there is no real reason to do so maybe better not to muddy the
waters?

Quoted 7 lines
Quoted 4 lines

Maybe go along the lines of:

"There is no practical difference between qemu-system-i386 and qemu-system-x86_64 therefore both can be interchanged freely."

Thanks, this is a good wording if it is indeed true (I'll wait for confirmation of that before I write it on the wiki).


Although it is technically true, within QEMU they are two different build targets (i386-softmmu and x86_64-softmmu) and we only tests i386-softmmu in OSSTest. It is possible that qemu-system-x86_64 might break due to upstream changes while qemu-system-i386 could still work and we might not notice.

Quoted 5 lines

I would write:

"There is no practical difference between qemu-system-i386 and qemu-system-x86_64, they should be interchangeable. However only qemu-system-i386 is regularly tested by OSSTest".

Done in the wiki as above but I said "...by XenProject (via osstest)".

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel