qemu-devel
[Top][All Lists]
Advanced

[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: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH v2 1/6] Use IO port for qemu<->guest BIOS communication.
Date: Tue, 26 Aug 2008 22:43:35 +0300

On 8/26/08, Avi Kivity <address@hidden> wrote:
> 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.

Where in the memory? What about reset, when all CPUs are online? And
CPUs would need to know if they are the boot CPU or not without
disturbing our IO port.




reply via email to

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