qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] hw/arm/virt: 2.9 machtype, fix timer dt info
@ 2016-12-09 16:30 Peter Maydell
  2016-12-09 16:30 ` [Qemu-devel] [PATCH 1/4] hw/arm/virt: add 2.9 machine type Peter Maydell
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Peter Maydell @ 2016-12-09 16:30 UTC (permalink / raw)
  To: qemu-arm, qemu-devel; +Cc: Andrew Jones, Christoffer Dall

This patchset fixes an error in how we were reporting the
architectural timers in the device tree for the virt board.
Old KVM host kernels (before 4.4) implemented these timers
as edge-triggered, which led us to decide to report them in
the DT as edge triggered. However in newer kernels this
was fixed and they're level triggered as they're architecturally
supposed to be.

Patch 4 fixes up the DT.
Patch 1 adds the 2.9 machine type so we can make the DT
 change only apply to new virt machine types
Patches 2 and 3 are a cleanup, so that we can have
 convenient access to the VirtMachineClass at the point
 in the code where we want to look at it. We collapse the
 VirtBoardInfo struct into the VirtMachineState, since
 the former mostly exists because at the time there was
 no VirtMachineState.

(Most of the diffstat is the result of s/vbi/vms/ on
the file to update variable names.)

Kernel behaviours as far as I know them:
 * host v4.3 and earlier: implemented timers as weird
   sort-of-edge-triggered semantics
 * host v4.4 and later: timers are level triggered
vs
 * guest pre-4.8: ignore the values in the DT, trust
   whatever the GIC's reset values are
 * guest 4.8 before rc6: write the DT values to the
   GIC config registers
 * guest newer than rc6 ignore the DT, and always write
   'level triggered' to the GIC

This combination means that (assuming that post 4.8
guest kernels work at all on pre 4.4 host kernels) I
don't expect this to break anything. Testing would probably
be a good idea, though: I plan to do some more combinations
but kernel builds on my aarch64 system are slow so I
thought I'd send out the patchset before I went home today...

Peter Maydell (4):
  hw/arm/virt: add 2.9 machine type
  hw/arm/virt: Merge VirtBoardInfo and VirtMachineState
  hw/arm/virt: Rename 'vbi' variables to 'vms'
  hw/arm/virt: Don't incorrectly claim architectural timer to be
    edge-triggered

 include/hw/compat.h |   3 +
 hw/arm/virt.c       | 616 +++++++++++++++++++++++++++-------------------------
 2 files changed, 323 insertions(+), 296 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-12-12 11:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-09 16:30 [Qemu-devel] [PATCH 0/4] hw/arm/virt: 2.9 machtype, fix timer dt info Peter Maydell
2016-12-09 16:30 ` [Qemu-devel] [PATCH 1/4] hw/arm/virt: add 2.9 machine type Peter Maydell
2016-12-12 10:13   ` Andrew Jones
2016-12-09 16:30 ` [Qemu-devel] [PATCH 2/4] hw/arm/virt: Merge VirtBoardInfo and VirtMachineState Peter Maydell
2016-12-12 11:07   ` Andrew Jones
2016-12-09 16:30 ` [Qemu-devel] [PATCH 3/4] hw/arm/virt: Rename 'vbi' variables to 'vms' Peter Maydell
2016-12-12 10:56   ` Andrew Jones
2016-12-12 11:16     ` Peter Maydell
2016-12-09 16:30 ` [Qemu-devel] [PATCH 4/4] hw/arm/virt: Don't incorrectly claim architectural timer to be edge-triggered Peter Maydell
2016-12-11 16:35   ` Christoffer Dall
2016-12-11 22:52     ` Peter Maydell
2016-12-12 10:10       ` Andrew Jones
2016-12-12 11:07   ` Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).