qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Michael S Tsirkin <mst@redhat.com>,
	qemu-devel@nongnu.org, Bernhard Beschow <shentey@gmail.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"BALATON Zoltan" <balaton@eik.bme.hu>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Eduardo Habkost" <eduardo@habkost.net>
Subject: [PATCH v6 0/4] Make the mc146818 RTC device target independent
Date: Tue, 10 Jan 2023 10:53:47 +0100	[thread overview]
Message-ID: <20230110095351.611724-1-thuth@redhat.com> (raw)

The basic idea of this patch set is to change hw/rtc/mc146818rtc.c into
target independent code so that the file only has to be compiled once
instead of multiple times (and that it can be used in a qemu-system-all
binary once we get there).

The first patch extracts some functions from the APIC code that will be
required for linking when the mc146818rtc becomes target-independent.

The second patch adds a new way for checking whether the "driftfix=slew"
policy is available or not (since the corresponding #ifdefs in the
mc146818rtc code will be removed).

The third patch then removes the "#ifdef TARGET" switches and turns
the mc146818rtc code into a target-independent file.

The fourth patch just fixes a small cosmetic nit that I discovered along
the way: On systems without mc146818, the "-rtc driftfix=slew" simply
got ignored silently. We should at least emit a warning in this case.

Changes since last iteration:
- Dropped the approach of using a new "slew-tick-policy-available"
  property that needs to be set by the machine code (and thus dropped
  the clean-up patches from Bernhard from this series since they are
  no longer required here now)
- Use a new check in hw/core/qdev-properties-system.c instead
  (see the second patch)

Thomas Huth (4):
  hw/intc: Extract the IRQ counting functions into a separate file
  hw/core/qdev-properties-system: Allow the 'slew' policy only on x86
  hw/rtc/mc146818rtc: Make the mc146818 RTC device target independent
  softmmu/rtc: Emit warning when using driftfix=slew on systems without
    mc146818

 include/hw/i386/apic.h           |  2 --
 include/hw/i386/apic_internal.h  |  1 -
 include/hw/intc/kvm_irqcount.h   | 10 +++++++
 include/hw/rtc/mc146818rtc.h     |  1 +
 hw/core/qdev-properties-system.c | 28 +++++++++++++++++-
 hw/i386/kvm/i8259.c              |  4 +--
 hw/i386/kvm/ioapic.c             |  4 +--
 hw/intc/apic.c                   |  3 +-
 hw/intc/apic_common.c            | 30 ++-----------------
 hw/intc/kvm_irqcount.c           | 49 ++++++++++++++++++++++++++++++++
 hw/rtc/mc146818rtc.c             | 20 ++-----------
 softmmu/rtc.c                    |  6 +++-
 hw/intc/meson.build              |  6 ++++
 hw/intc/trace-events             |  9 +++---
 hw/rtc/meson.build               |  3 +-
 15 files changed, 115 insertions(+), 61 deletions(-)
 create mode 100644 include/hw/intc/kvm_irqcount.h
 create mode 100644 hw/intc/kvm_irqcount.c

-- 
2.31.1



             reply	other threads:[~2023-01-10 10:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10  9:53 Thomas Huth [this message]
2023-01-10  9:53 ` [PATCH v6 1/4] hw/intc: Extract the IRQ counting functions into a separate file Thomas Huth
2023-01-11 22:48   ` Bernhard Beschow
2023-01-10  9:53 ` [PATCH v6 2/4] hw/core/qdev-properties-system: Allow the 'slew' policy only on x86 Thomas Huth
2023-01-11 22:52   ` Bernhard Beschow
2023-01-10  9:53 ` [PATCH v6 3/4] hw/rtc/mc146818rtc: Make the mc146818 RTC device target independent Thomas Huth
2023-01-10  9:53 ` [PATCH v6 4/4] softmmu/rtc: Emit warning when using driftfix=slew on systems without mc146818 Thomas Huth
2023-01-10 10:21 ` [PATCH v6 0/4] Make the mc146818 RTC device target independent Philippe Mathieu-Daudé
2023-01-10 23:16 ` Mark Cave-Ayland
2023-01-13  8:54 ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230110095351.611724-1-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=balaton@eik.bme.hu \
    --cc=eduardo@habkost.net \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=shentey@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).