Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Emulating & Virtualising ARM on amd64
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3655

PostPosted: Sat Jan 24, 2015 6:23 am    Post subject: Emulating & Virtualising ARM on amd64 Reply with quote

Hi,

I have a project for a Asterisk on ARM.

Despite I don't have ARM motherboard yet, I'd like to start prototyping however.

I plan to emulate and virtualise on VT-x able amd64.

Since I've been doing XEN for a while, I plan to investigate to integrate qemu upstream.

Feasibily wise, I beg for radvice to know whether I"m barking up the wrong tree or not, before starting to pull my hair out.

Moreover adequate links would be somehow appreciated, even if partial.

Thks 4 ur attention.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9696
Location: almost Mile High in the USA

PostPosted: Sat Jan 24, 2015 9:23 am    Post subject: Reply with quote

I'm not sure if VT-x will help amd64 processors emulate another architecture, it was designed to emulate x86/amd64 in amd64 at high speeds. Crossing architectures will resort to software emulation and there's nothing that really can help that.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3655

PostPosted: Sat Jan 24, 2015 11:30 am    Post subject: Reply with quote

HI,

I've just mentioned availability just in case of requirement...

Anyhow link http://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions at section
Quote:
Use of qemu-system-i386 on ARM
suggests x86 emulation on ARM architecture. I'm consequently wondering whether the contrary is possible or not...

Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9696
Location: almost Mile High in the USA

PostPosted: Sun Jan 25, 2015 4:09 am    Post subject: Reply with quote

As said of course you can emulate x86 on arm and arm on x86, but neither of these situations can use hardware helpers for emulation - so these extensions are simply useless.

The hardware helpers for emulation are only for virtualizing "expensive" calls such that they can return to the hypervisor context fast to be emulated. These expensive calls to emulate tend to be software interrupts, emulating hardware registers, and entering protected mode from usermode. On machines without VT extensions these are emulated by instruction traps which is why they are so slow - you can get one instruction taking thousands of instructions to implement. With hardware assistance the emulation traps drops to just hundreds of instructions, at least 10x faster. Of course overall speed is not 10x faster except if your code was triggering these instructions all of the time.

In software emulation the instruction emulation is so bad that these expensive calls aren't really even a concern, it will still be awful, even with dynamic translation. I've noticed that KVM that takes advantage of processor virtualization extensions and is still not quite up to native speeds but is very reasonable. Without virtualization, speed penalty can go down another half or so. With full instruction emulation, you're looking at 1/20th the speed of the host CPU or so, but a bit faster with DT.

I don't know if there are any multithreadded DT emulation engines out there, it may speed things up a bit on multiprocessor hosts, but for the mean time, you only can singlethread these emulations (unless you're emulating a SMP system of course.)
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum