qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Michael S . Tsirkin" <mst@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	peterx@redhat.com, Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH 0/4] q35: change defaults for kernel irqchip and IR
Date: Wed, 19 Dec 2018 16:50:34 +0800	[thread overview]
Message-ID: <20181219085038.7729-1-peterx@redhat.com> (raw)

This only changes q35.  Nothing else.

Before this series, we have these default parameters:

  - machine kernel-irqchip: on
  - intel-iommu IR: off

This series wants to change these default variables into:

  - machine kernel-irqchip: split
  - intel-iommu IR: on

and at the meantime we should keep compatibility with old kernels and
old versions of QEMU.

For old versions of QEMU: we used machine compat properties.

For old kernels (<4.4): if user didn't specify split kernel irqchip,
we'll take it only as the first priority if it's supported by the
kernel; otherwise, we will continue with complete kernel irqchip.

Both of these parameters should be good to have (split irqchip gains
more security, while IR gets it too but even more, like x2apic).  So
let's try to make them as default if capable.

Tests ("split" stands for whether kernel split irqchip enabled, "IR"
stands for whether IR is turned on):

   |--------------------------------------------------------+-------+----|
   | params                                                 | split | IR |
   |--------------------------------------------------------+-------+----|
   | -M q35                                                 |     0 | /  |
   | -M q35,accel=kvm                                       |     1 | /  |
   | -M pc-q35-3.1,accel=kvm                                |     0 | /  |
   | -M q35,accel=kvm,kernel-irqchip=off                    |     0 | /  |
   | -M q35,accel=kvm,kernel-irqchip=on                     |     0 | /  |
   | -M q35 -device intel-iommu                             |     0 | 1  |
   | -M q35,accel=kvm -device intel-iommu                   |     1 | 1  |
   | -M q35,accel=kvm,kernel-irqchip=on -device intel-iommu |     0 | 0  |
   |--------------------------------------------------------+-------+----|

I didn't try old kernels, though.

Any comment would be welcomed, thanks.

Peter Xu (4):
  kvm: let split be optional for kvm_arch_irqchip_create
  q35: set split kernel irqchip as default
  x86-iommu: switch intr_supported to OnOffAuto type
  x86-iommu: turn on IR by default if proper

 accel/kvm/kvm-all.c         |  3 ++-
 hw/core/machine.c           |  2 ++
 hw/i386/acpi-build.c        |  6 +++---
 hw/i386/amd_iommu.c         |  2 +-
 hw/i386/intel_iommu.c       |  6 +++---
 hw/i386/pc.c                |  2 +-
 hw/i386/pc_q35.c            |  2 ++
 hw/i386/x86-iommu.c         | 18 +++++++++++++++---
 include/hw/boards.h         |  1 +
 include/hw/i386/x86-iommu.h |  4 +++-
 target/i386/kvm.c           |  6 +++---
 11 files changed, 36 insertions(+), 16 deletions(-)

-- 
2.17.1

             reply	other threads:[~2018-12-19  8:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-19  8:50 Peter Xu [this message]
2018-12-19  8:50 ` [Qemu-devel] [PATCH 1/4] kvm: let split be optional for kvm_arch_irqchip_create Peter Xu
2018-12-19 15:53   ` Michael S. Tsirkin
2018-12-19 20:15     ` Paolo Bonzini
2018-12-19  8:50 ` [Qemu-devel] [PATCH 2/4] q35: set split kernel irqchip as default Peter Xu
2018-12-19 15:52   ` Michael S. Tsirkin
2018-12-19 20:16     ` Paolo Bonzini
2018-12-19 20:12   ` Paolo Bonzini
2018-12-19 21:24     ` Eduardo Habkost
2018-12-19 21:45       ` Paolo Bonzini
2018-12-20  5:31         ` Peter Xu
2018-12-19  8:50 ` [Qemu-devel] [PATCH 3/4] x86-iommu: switch intr_supported to OnOffAuto type Peter Xu
2018-12-19  8:50 ` [Qemu-devel] [PATCH 4/4] x86-iommu: turn on IR by default if proper Peter Xu

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=20181219085038.7729-1-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).