Live data from Hacker News

About the Rosetta Translation Environment

developer.apple.com

11–20 of 249 posts

Re: About the Rosetta Translation Environment

#11
post #4

>However, Rosetta doesn’t translate the following executables: Virtual Machine apps that virtualize x86_64 computer platforms How will this impact docker? Does this mean you can't run x86 docker containers on new Apple laptops?

Not sure about the details for how this works, but they specifically mentioned Docker to be supported at the keynote.

Docker already runs fine on ARM64, like on Raspberry Pis, so there would be no Rosetta translation needed for ARM64 images. If Rosetta could translate binaries in x86/AMD64 images, that would be very helpful indeed.

Likewise, will it support CLI programs at all?

Re: About the Rosetta Translation Environment

#12
post #4

>However, Rosetta doesn’t translate the following executables: Virtual Machine apps that virtualize x86_64 computer platforms How will this impact docker? Does this mean you can't run x86 docker containers on new Apple laptops?

Docker on ARM will work, Docker for x86 will not. The State of the Union showed a demo of Hypervisor.framework with Parallels, and they made it clear that Debian AArch64 was running (uname -a). Since Docker runs inside a VM on the Mac, it'll have to be an ARM VM with ARM containers.

(Presumably, running docker build with your Dockerfile will make it work just fine, unless you need x86 specific libraries).

Re: About the Rosetta Translation Environment

#13
post #8

Earlier quoted context omitted.

I would assume you’d only be able to run ARM Docker containers.

Which is less than ideal if you're using x86 servers since you no longer have the same dev containers as production containers.

Yeah. I predict a sudden increase of ARM servers as well.

Re: About the Rosetta Translation Environment

#15
I thought this was the most interesting paragraph.

> What Can't Be Translated?

> Rosetta can translate most Intel-based apps, including apps that contain just-in-time (JIT) compilers.

I guess translation of JIT compiled stuff implies this isn't a once of translation. I guess translating plugins implies that too.

It sounds like very clever stuff to me!

> However, Rosetta doesn’t translate the following executables: > > Kernel extensions

Fair enough

> Virtual Machine apps that virtualize x86_64 computer platforms

I guess most VMs rely on hardware virtualization which would be tricky to translate well.

> Rosetta translates all x86_64 instructions, but it doesn’t support the execution of some newer instruction sets and processor features, such as AVX, AVX2, and AVX512 vector instructions. If you include these newer instructions in your code, execute them only after verifying that they are available. For example, to determine if AVX512 vector instructions are available, use the sysctlbyname function to check the hw.optional.avx512f attribute.

These sound like they should be relatively straight forward to translate. I wonder why they didn't? Lack of time? Or perhaps because translating them means that they don't run fast enough to be useful and the fallback paths are likely to run quicker.

Re: About the Rosetta Translation Environment

#16
post #4

>However, Rosetta doesn’t translate the following executables: Virtual Machine apps that virtualize x86_64 computer platforms How will this impact docker? Does this mean you can't run x86 docker containers on new Apple laptops?

They haven’t clarified if Docker is ARM all the way down or if they are using QEMU to emulate x86 somewhere on the stack.

Re: About the Rosetta Translation Environment

#17
>Rosetta translates all x86_64 instructions, but it doesn’t support the execution of some newer instruction sets and processor features, such as AVX, AVX2, and AVX512 vector instructions.

No AVX will probably mean that the vast majority of pro/graphics intensive apps won't work out of the box with Rosetta.

Re: About the Rosetta Translation Environment

#18

Are the limitations on x86_64 virtualization likely to be for technical reasons, or patent reasons? I read a comment on here alluding to some patents on x86_64 virtualization expiring later this year: https://news.ycombinator.com/item?id=23612256 - could that mean that there is a chance this might happen and they are keeping it quiet for now, or are patents likely unrelated?

If I had to guess it's because Rosetta isn't fully emulating an x86_64 instruction set but rather dynamically translating API calls for the most part.

Re: About the Rosetta Translation Environment

#19
post #4

>However, Rosetta doesn’t translate the following executables: Virtual Machine apps that virtualize x86_64 computer platforms How will this impact docker? Does this mean you can't run x86 docker containers on new Apple laptops?

Apple mentioned they are specifically "working with Docker to support 'these things' in coming months". Confirmed with some Docker folks they are working on "something". All very nondescript, but they said they can't talk about it yet.

Re: About the Rosetta Translation Environment

#20
post #15

I thought this was the most interesting paragraph. > What Can't Be Translated? > Rosetta can translate most Intel-based apps, including apps that contain just-in-time (JIT) compilers. I guess translation of JIT compiled stuff implies this isn't a once of translation. I guess translating plugins implies that too. It sounds like very clever stuff to me! > However, Rosetta doesn’t translate the following executables: >…

RE AVX and above: My guess is that they are licensing the Transmeta IP which doesn't include those licenses IIRC. So unless they wanted to get sued they'd have to be careful. I suspect some SSE instructions may also not be supported as I don't recall if Transmeta had a license up to SSE4.
Post reply on HN