qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [PATCH 4/4] hw/arm/virt: Don't incorrectly claim architec


From: Peter Maydell
Subject: Re: [Qemu-arm] [PATCH 4/4] hw/arm/virt: Don't incorrectly claim architectural timer to be edge-triggered
Date: Sun, 11 Dec 2016 22:52:25 +0000

On 11 December 2016 at 16:35, Christoffer Dall
<address@hidden> wrote:
> On Fri, Dec 09, 2016 at 04:30:20PM +0000, Peter Maydell wrote:
>> +     * For backwards-compatibility, virt-2.8 and earlier will continue
>> +     * to say these are edge-triggered, but later machines will report
>> +     * the correct information.
>>       */
>
> Is this really necessary?

It's being conservative -- from the guest's point of view
(any guest, not necessarily just Linux) "virt-2.8" should behave
like the "virt" machine in the 2.8 QEMU release, including bugs,
not providing newer devices, and so on.

Andrew would be the expert on whether this is being unnecessarily
conservative in this specific case.

>>  static void virt_machine_2_8_options(MachineClass *mc)
>>  {
>> +    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
>> +
>>      virt_machine_2_9_options(mc);
>>      SET_MACHINE_COMPAT(mc, VIRT_COMPAT_2_8);
>> +    /* For 2.8 and earlier we falsely claimed in the DT that
>> +     * our timers were edge-triggered, not level-triggered.
>> +     */
>> +    vmc->claim_edge_triggered_timers = true;
>>  }
>>  DEFINE_VIRT_MACHINE(2, 8)
>>
> I don't understand this virt machine class version stuff.  In which case
> is the claim_edge_triggered_timers set to true?  (ok, appears to be when
> a 2.8 machine is created, but does that happen automatically or does the
> user specifically have to ask for it?)

If you say "-M virt-2.8" (or -2.7 or earlier, etc), it's set
to true. If you say "-M virt" or "-M virt-2.9" (or "-M virt-2.10"
or whatever we call the next release) it stays at the default
false.

thanks
-- PMM



reply via email to

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