qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/6] Adding the Android Emulator hypervisor driver accelerato


From: Haitao Shan
Subject: Re: [PATCH 0/6] Adding the Android Emulator hypervisor driver accelerator
Date: Tue, 18 Apr 2023 09:54:48 -0700

On Tue, Apr 4, 2023 at 4:55 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 3/3/23 18:39, Haitao Shan wrote:
> >> No, we're always open to new proposals. It merely means that it
> >> might be harder to justify why the new hypervisor is a net benefit
> >> for QEMU, when there is a competing solution supported by the OS
> >> vendor.
> >
> > Thanks for the clarification. It is great that the door is not shut 
> > completely.
>
> Hi,
>
> sorry for not answering before.
Thanks for your reply. I was taking a long vacation and did not see
your reply earlier.

>
> I think in general QEMU should be open to merging work from the Android
> Emulator.  If AEHD is useful to the Android emulator, I would consider
> it interesting for QEMU as well.
Thanks for being open to us. For patchset V1, the most important
feedback we can have is that our work can be useful to the community
(not just the android emulator).

>
> However, I would rather have it as an extension to KVM if possible
> rather than a completely new emulator.  One possibility is to introduce
> a new file that encapsulates all KVM ioctls, with a struct that
> encapsulates the Unix file descriptor/Windows HANDLE.  For example
>
> int kvm_ioctl_get_supported_cpuid(KVMState *s, struct kvm_cpuid *cpuid,
>                                    int max)
> {
>      cpuid->nent = max;
> #ifdef CONFIG_POSIX
>      return ioctl(s, KVM_GET_SUPPORTED_VCPUID, cpuid);
> #else
>      size_t size = sizeof(*cpuid) + max * sizeof(*cpuid->entries);
>      return aehd_ioctl(s, AEHD_GET_SUPPORTED_CPUID, cpuid, size, cpuid,
> size);
> #endif
> }
>
> int kvm_ioctl_create_vcpu(KVMState *s, int vcpu_id, CPUState *out)
> {
> #ifdef CONFIG_POSIX
>      out.kvm_fd = kvm_vm_ioctl(KVM_CREATE_VCPU, vcpu_id);
>      return out.kvm_fd;
> #else
>      return aehd_vm_ioctl(s, AEHD_CREATE_VCPU, &vcpu_id, sizeof(vcpu_id),
>                           &out.kvm_fd, sizeof(out.kvm_fd));
> #endif
> }
>
> etc.
>
> These are just general examples, the actual level of abstraction is up
> to you.
I will work on the new patchset. And most likely it will take some time.

>
> Paolo
>


-- 
Haitao @Google



reply via email to

[Prev in Thread] Current Thread [Next in Thread]