qemu-arm
[Top][All Lists]
Advanced

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

RE: [PATCH V3 01/10] accel/kvm: Extract common KVM vCPU {creation,parkin


From: Salil Mehta
Subject: RE: [PATCH V3 01/10] accel/kvm: Extract common KVM vCPU {creation,parking} code
Date: Mon, 9 Oct 2023 15:34:42 +0000

> From: David Hildenbrand <david@redhat.com>
> Sent: Monday, October 9, 2023 4:21 PM
> To: Salil Mehta <salil.mehta@huawei.com>; qemu-devel@nongnu.org; qemu-
> arm@nongnu.org
> Cc: maz@kernel.org; jean-philippe@linaro.org; Jonathan Cameron
> <jonathan.cameron@huawei.com>; lpieralisi@kernel.org;
> peter.maydell@linaro.org; richard.henderson@linaro.org;
> imammedo@redhat.com; andrew.jones@linux.dev; philmd@linaro.org;
> eric.auger@redhat.com; oliver.upton@linux.dev; pbonzini@redhat.com;
> mst@redhat.com; will@kernel.org; gshan@redhat.com; rafael@kernel.org;
> alex.bennee@linaro.org; linux@armlinux.org.uk;
> darren@os.amperecomputing.com; ilkka@os.amperecomputing.com;
> vishnu@os.amperecomputing.com; karl.heubaum@oracle.com;
> miguel.luis@oracle.com; salil.mehta@opnsrc.net; zhukeqian
> <zhukeqian1@huawei.com>; wangxiongfeng (C) <wangxiongfeng2@huawei.com>;
> wangyanan (Y) <wangyanan55@huawei.com>; jiakernel2@gmail.com;
> maobibo@loongson.cn; lixianglai@loongson.cn; Linuxarm <linuxarm@huawei.com>
> Subject: Re: [PATCH V3 01/10] accel/kvm: Extract common KVM vCPU
> {creation,parking} code
> 
> >
> >>
> >> kvm_precreate_vcpu
> >
> > pre-creation is very much specific to ARM right now. I am not sure
> > if it is right to have an API with this name in the code which is
> > common to other architectures.
> 
> I don't like exposing the concept of "parking" CPUs externally, which is
> so far handled completely internally.


I understand your point of view. There is a subtle difference in the
way parking logic has been used till now, say in x86 world and how it
is being used in the ARM in the RFC patches being proposed. AFAICS, in
x86 world we have a liberty to delay the creation of the vCPUs in KVM
for the first time but once they are created cannot be destroyed in the
KVM so are (un)parked for subsequent use during hot(un)plug.

Because of the ARM CPU architecture limitations and that of GIC, we
are not allowed to do this. Hence, we have to pre-create all the
KVM vCPUs and size VGIC during initialization. Since some of the
KVM vCPUs wont have any QOM CPU objects because they are
'yet-to-be-plugged' so need to be parked. Hence, we require that
common parking logic.



> 
> [...]
> 
> >
> >
> >> kvm_create_vcpu
> >> kvm_destroy_vcpu
> >>
> >> One could even make kvm_create_vcpu() fail on ARM if the VCPU hasn't
> >> been pre-created.
> >
> > Right now, we abort the CPU initialization process if this happens. I
> > am planning to change abort() into 'fatal_error' in RFC V3 though.
> >
> >
> >
> >>
> >> Or did I get it all wrong? :)
> >
> > I won't say that it is just another point of view which is absolutely
> > fine. But I would like to stick to current APIs.
> 
> No really strong opinion, I wouldn't do it that way. I'll let others
> chime in if they have an opinion.

Ok, Thanks.

Salil.

reply via email to

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