[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS commun
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication. |
Date: |
Tue, 26 Aug 2008 22:30:54 +0300 |
User-agent: |
Thunderbird 2.0.0.16 (X11/20080723) |
Blue Swirl wrote:
>
> One problem with this IO method is that it is not SMP safe, because of
> the cur_entry selection and reading will not be atomic. Think of boot
> CPU waking up all other CPUs with broadcast interrupt and then these
> other CPUs all want to know the boot parameters at the same time. The
> same could happen with warm reset. Directly mapped ROM doesn't have
> this problem, but multiplexed ROM (or Sparc64 nvram used now) is also
> unsafe.
>
> I could think of a couple of solutions:
> - different IO port for each CPU (not possible on PC)
> - per-CPU cur_entry, the device "knows" the CPU index (not very beautiful)
> - lock mechanism: before access, the CPU must win lock and only then
> it can access the data. But IO ports don't support atomic
> instructions? How about some kind of MAC-like protocol? It gets pretty
> complex.
>
> Are there other solutions?
>
>
Put the lock in memory. Or even simpler, have the boot cpu extract the
parameters and place them in memory, and then wake up other cpus.
--
Do not meddle in the internals of kernels, for they are subtle and quick to
panic.
- [Qemu-devel] [PATCH v2 0/6] Add UUID command-line option, Gleb Natapov, 2008/08/25
- [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Gleb Natapov, 2008/08/25
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Anthony Liguori, 2008/08/25
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Gleb Natapov, 2008/08/25
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Blue Swirl, 2008/08/25
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Anthony Liguori, 2008/08/25
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Blue Swirl, 2008/08/25
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Gleb Natapov, 2008/08/26
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Blue Swirl, 2008/08/26
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication.,
Avi Kivity <=
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Blue Swirl, 2008/08/26
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Avi Kivity, 2008/08/27
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Gleb Natapov, 2008/08/27
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Blue Swirl, 2008/08/27
- Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Gleb Natapov, 2008/08/28
Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication., Anthony Liguori, 2008/08/25