From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwt2n-00085i-1c for qemu-devel@nongnu.org; Thu, 12 Nov 2015 09:40:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zwt2m-0000zA-5J for qemu-devel@nongnu.org; Thu, 12 Nov 2015 09:40:08 -0500 Received: from mail-vk0-x22e.google.com ([2607:f8b0:400c:c05::22e]:33173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwt2m-0000z1-1h for qemu-devel@nongnu.org; Thu, 12 Nov 2015 09:40:08 -0500 Received: by vkbk63 with SMTP id k63so11318329vkb.0 for ; Thu, 12 Nov 2015 06:40:07 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <784C0637-DC5D-45CA-B989-AF76378201D4@gmail.com> References: <784C0637-DC5D-45CA-B989-AF76378201D4@gmail.com> From: Peter Maydell Date: Thu, 12 Nov 2015 14:39:48 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] Attempt at Mac OS X acceleration using "Hypervisor.Framwork" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Assaf Gordon Cc: QEMU Developers , Alexander Graf On 12 November 2015 at 10:49, Assaf Gordon wrote: > Starting with Mac OS X version 10.10.3, Apple provides a system-level > hypervisor framework (similar to KVM's kernel driver functionality > on Linux). > This attached patch attempts to provide the infrastructure glue for > qemu to use this framework (when compiled on Mac OS X). It is not > yet functional, but enables the following: > > ./configure --enable-hvf --target-list=x86_64-softmmu > qemu-system-x86_64 -machine accel=hvf [...] > > Please advise as to whether this is the right approach, and whether > it's worth pursuing. I think it would be nice to be able to support hardware acceleration on OSX hosts, and I think the official Apple hypervisor APIs for this are the right way to do that. The questions I have are: * how much code are we going to end up with in QEMU to support that? (I've been told that the Apple APIs are very basic and low level, so a lot of the code that in KVM is in the kernel to handle irqchips, instruction emulation, etc, would need to also be in QEMU for the benefit of OSX. We could probably take a lot of that from KVM, but then maintenance and tracking bugfixes that go into the kernel code would be an immense pain in the future.) * is the code going to come with somebody who will stick around and help us maintain it for the long term? (At the moment OSX is only a minimally supported platform for QEMU, because so few of the core developers use it for day to day development, so we don't have the capacity to take on maintenance of a lot of new code without new people to help) There doesn't look to be anything particularly problematic with the skeleton code in your patch, but I think it would be easier to judge how the design should look if we had a discussion of what the differences between the KVM API and the hypervisor framework API are, where that would need more code in QEMU and how we'd handle that. thanks -- PMM