[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent? |
Date: |
Thu, 7 Dec 2017 17:48:32 +0100 |
On Thu, 7 Dec 2017 16:05:50 +0000
Peter Maydell <address@hidden> wrote:
> Hi; I'm currently writing '-cpu max' support for ARM. For that I'd
> like to be able to do the "probe host kernel for its supported feature
> set" in the CPU object's instance-init function, but I'd like to do
> it just once and cache the answer. Can I rely on something or other
> having the BQL or otherwise ensuring that two threads don't run
> the instance_init method in parallel (eg in a hotplug situation),
> or do I need to create and use my own mutex to protect the cached
> answer data?
considering cached data shouldn't change during qemu lifetime it
shouldn't be possible for instance_init() to clash at hotplug
time as object_new(cpu) calls serialized within monitor/qmp loop.
But why cpu's instance_init, we could cache host's value at
configure_accelerator() time (could be different depending on accel).
CCing Eduardo as he is the one who worked on -cpu max for x86
(If I recall correctly)
>
> thanks
> -- PMM
>
- [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?, Peter Maydell, 2017/12/07
- Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?,
Igor Mammedov <=
- Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?, Peter Maydell, 2017/12/07
- Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?, Eduardo Habkost, 2017/12/07
- Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?, Peter Maydell, 2017/12/07
- Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?, Peter Maydell, 2017/12/07
- Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?, Igor Mammedov, 2017/12/08
- Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?, Peter Maydell, 2017/12/08
- Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?, Igor Mammedov, 2017/12/08
- Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?, Peter Maydell, 2017/12/08
- Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?, Eduardo Habkost, 2017/12/08
- Re: [Qemu-devel] in a device or CPU instance init/realize, can I rely on something having the BQL or equivalent?, Igor Mammedov, 2017/12/08