qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 11/13] pc_piix: rename kvm_enabled to smm_enabled
Date: Mon,  6 Jul 2015 16:22:19 +0200	[thread overview]
Message-ID: <1436192541-65335-12-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1436192541-65335-1-git-send-email-pbonzini@redhat.com>

We will enable SMM even if KVM is in use.  Rename the field and
arguments.

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/acpi/piix4.c      | 10 +++++-----
 hw/i386/pc_piix.c    |  2 +-
 include/hw/i386/pc.h |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 3af0fa7..2cd2fee 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -72,7 +72,7 @@ typedef struct PIIX4PMState {
 
     qemu_irq irq;
     qemu_irq smi_irq;
-    int kvm_enabled;
+    int smm_enabled;
     Notifier machine_ready;
     Notifier powerdown_notifier;
 
@@ -322,7 +322,7 @@ static void piix4_reset(void *opaque)
     pci_conf[0x40] = 0x01; /* PM io base read only bit */
     pci_conf[0x80] = 0;
 
-    if (s->kvm_enabled) {
+    if (!s->smm_enabled) {
         /* Mark SMM as already inited (until KVM supports SMM). */
         pci_conf[0x5B] = 0x02;
     }
@@ -453,7 +453,7 @@ static void piix4_pm_realize(PCIDevice *dev, Error **errp)
     /* APM */
     apm_init(dev, &s->apm, apm_ctrl_changed, s);
 
-    if (s->kvm_enabled) {
+    if (!s->smm_enabled) {
         /* Mark SMM as already inited to prevent SMM from running.  KVM does not
          * support SMM mode. */
         pci_conf[0x5B] = 0x02;
@@ -504,7 +504,7 @@ Object *piix4_pm_find(void)
 
 I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
                       qemu_irq sci_irq, qemu_irq smi_irq,
-                      int kvm_enabled, DeviceState **piix4_pm)
+                      int smm_enabled, DeviceState **piix4_pm)
 {
     DeviceState *dev;
     PIIX4PMState *s;
@@ -518,7 +518,7 @@ I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
     s = PIIX4_PM(dev);
     s->irq = sci_irq;
     s->smi_irq = smi_irq;
-    s->kvm_enabled = kvm_enabled;
+    s->smm_enabled = smm_enabled;
     if (xen_enabled()) {
         s->use_acpi_pci_hotplug = false;
     }
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index e142f75..8d0313e 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -287,7 +287,7 @@ static void pc_init1(MachineState *machine)
         /* TODO: Populate SPD eeprom data.  */
         smbus = piix4_pm_init(pci_bus, piix3_devfn + 3, 0xb100,
                               gsi[9], smi_irq,
-                              kvm_enabled(), &piix4_pm);
+                              !kvm_enabled(), &piix4_pm);
         smbus_eeprom_init(smbus, 8, NULL, 0);
 
         object_property_add_link(OBJECT(machine), PC_MACHINE_ACPI_DEVICE_PROP,
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 328c8f7..10783b2 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -214,7 +214,7 @@ void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name);
 
 I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
                       qemu_irq sci_irq, qemu_irq smi_irq,
-                      int kvm_enabled, DeviceState **piix4_pm);
+                      int smm_enabled, DeviceState **piix4_pm);
 void piix4_smbus_register_device(SMBusDevice *dev, uint8_t addr);
 
 /* hpet.c */
-- 
1.8.3.1

  parent reply	other threads:[~2015-07-06 14:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 14:22 [Qemu-devel] [PULL 00/13] KVM patches (SMM implementation) for 2015-07-06 Paolo Bonzini
2015-07-06 14:22 ` [Qemu-devel] [PULL 01/13] linux-headers: Update to 4.2-rc1 Paolo Bonzini
2015-07-06 14:22 ` [Qemu-devel] [PULL 02/13] piix4/ich9: do not raise SMI on ACPI enable/disable commands Paolo Bonzini
2015-07-06 14:22 ` [Qemu-devel] [PULL 03/13] target-i386: add support for SMBASE MSR and SMIs Paolo Bonzini
2015-07-06 14:22 ` [Qemu-devel] [PULL 04/13] kvm-all: put kvm_mem_flags to more work Paolo Bonzini
2015-07-06 14:22 ` [Qemu-devel] [PULL 05/13] kvm-all: remove useless typedef Paolo Bonzini
2015-07-06 14:22 ` [Qemu-devel] [PULL 06/13] kvm-all: move internal types to kvm_int.h Paolo Bonzini
2015-07-06 14:22 ` [Qemu-devel] [PULL 07/13] kvm-all: make KVM's memory listener more generic Paolo Bonzini
2015-07-06 14:22 ` [Qemu-devel] [PULL 08/13] kvm-all: add support for multiple address spaces Paolo Bonzini
2015-07-06 14:22 ` [Qemu-devel] [PULL 09/13] kvm-all: kvm_irqchip_create is not expected to fail Paolo Bonzini
2015-07-06 14:22 ` [Qemu-devel] [PULL 10/13] target-i386: register a separate KVM address space including SMRAM regions Paolo Bonzini
2015-07-06 14:22 ` Paolo Bonzini [this message]
2015-07-06 14:22 ` [Qemu-devel] [PULL 12/13] ich9: add smm_enabled field and arguments Paolo Bonzini
2015-07-06 14:22 ` [Qemu-devel] [PULL 13/13] pc: add SMM property Paolo Bonzini

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=1436192541-65335-12-git-send-email-pbonzini@redhat.com \
    --to=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).