xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [QUESTION] x86_64 -> i386/i686 CPU translation between xl and qemu binary?
@ 2016-02-04 22:06 Alex Braunegg
  2016-02-04 22:22 ` Andrew Cooper
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Braunegg @ 2016-02-04 22:06 UTC (permalink / raw)
  To: xen-devel

Hi all,

Following on from Steven's question
(http://lists.xen.org/archives/html/xen-devel/2016-02/msg00801.html) - I
have a question around xl's usage of the 'qemu-system-i386' binary

When I was testing the changes required for enabling websockets, I was
testing qemu by itself (to validate that vnc & websockets were working
through qemu) by using the a command similar to the following:

	/usr/lib/xen/bin/qemu-system-i386 -boot d -cdrom
/storage0/data-shares/iso/CentOS-6.5-x86_64-minimal.iso -vnc
:1,websocket,x509=/etc/pki/xen

In this case, proceeding past the 'Install' selection of the ISO Grub menu
always resulted in the following error:

	This kernel requires an x86_64 CPU but only detected an i686 CPU
	Unable to boot - please use a kernel appropriate for your CPU

I get this and understand why - I invoked qemu using 'qemu-system-i386'
which is emulating an i386 / i686 system.

This is where things get interesting - consider the following HVM
configuration (test2.cfg):

------------------------------------------

builder='hvm'
memory = 512
shadow_memory = 8
uuid = '4789b84d-3cdd-409f-9899-88bb13652176'
name = 'test2'
vif = [ 'bridge=br0, mac=00:16:3e:f1:48:8c' ]
disk = [
'/dev/zvol/storage0/xen/test2/disk_sda,,hda','/storage0/data-shares/iso/Cent
OS-6.5-x86_64-minimal.iso,,hdc,cdrom' ]
boot='cd'
sdl=0
vnc=1
vncconsole=1
vnclisten='0.0.0.0'
stdvga=1
serial='pty'
usbdevice='tablet'
vncpasswd='12fDKOkCEZ'
vncdisplay=0
localtime=1
audio='1'
soundhw='ac97'

------------------------------------------

When the configuration file is used via 'xl':

	xl create /etc/xen/config/test2.cfg

The virtual machine starts without issue, there is no problem installing the
system, there is no OS warning about the CPU type. 

Looking at the ps output:

------------------------------------------

root     30511 46.4  0.1 398728  1860 ?        RLsl 08:47   0:27
/usr/lib/xen/bin/qemu-system-i386 -xen-domid 6 -chardev
socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-6,server,n
owait -no-shutdown -mon chardev=libxl-cmd,mode=control -chardev
socket,id=libxenstat-cmd,path=/var/run/xen/qmp-libxenstat-6,server,nowait
-mon chardev=libxenstat-cmd,mode=control
-nodefaults -name test2 -vnc
0.0.0.0:0,websocket,x509=/etc/pki/xen,password,to=99 -display none -serial
pty -device VGA,vgamem_mb=16 -boot order=cd -usb -usbdevice tablet -soundhw
 ac97 -device rtl8139,id=nic0,netdev=net0,mac=00:16:3e:f1:48:8c -netdev
type=tap,id=net0,ifname=vif6.0-emu,script=no,downscript=no -machine xenfv -m
496 -drive file=/dev/zvol/stor
age0/xen/test2/disk_sda,if=ide,index=0,media=disk,format=raw,cache=writeback
-drive
file=/storage0/data-shares/iso/CentOS-6.5-x86_64-minimal.iso,if=ide,index=2,
readonly=on,media=c
drom,format=raw,cache=writeback,id=ide-5632

------------------------------------------

So - to me it appears that xl is performing some sort of x86_64 -> i386/i686
instruction translation to make things work.

Would this not be introducing a performance impediment by having some sort
of extra translation processing going on between xl and the qemu binary?




Best regards,

Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-02-05  9:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-04 22:06 [QUESTION] x86_64 -> i386/i686 CPU translation between xl and qemu binary? Alex Braunegg
2016-02-04 22:22 ` Andrew Cooper
2016-02-04 23:14   ` Steven Haigh
2016-02-05  0:12     ` Andrew Cooper
2016-02-05  9:56       ` Ian Campbell
2016-02-04 23:44   ` Alex Braunegg
2016-02-05  0:04     ` Andrew Cooper
2016-02-05  0:18       ` Alex Braunegg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).