On 4/2/10, Anthony Liguori <anth...@codemonkey.ws> wrote:
> On 04/02/2010 10:46 AM, Blue Swirl wrote:
>
> > Signed-off-by: Blue Swirl<blauwir...@gmail.com>
> > ---
> >  hw/acpi.c   |   10 +++++-----
> >  hw/pc.h     |    2 +-
> >  hw/poison.h |    3 +++
> >  3 files changed, 9 insertions(+), 6 deletions(-)
> >
> > diff --git a/hw/acpi.c b/hw/acpi.c
> > index 5c01c2e..7c2b109 100644
> > --- a/hw/acpi.c
> > +++ b/hw/acpi.c
> > @@ -51,7 +51,7 @@ typedef struct PIIX4PMState {
> >      qemu_irq irq;
> >      qemu_irq cmos_s3;
> >      qemu_irq smi_irq;
> > -    int kvm_enabled;
> > +    int kvm_is_enabled;
> >  } PIIX4PMState;
> >
> >  #define RSM_STS (1<<  15)
> > @@ -482,7 +482,7 @@ static void piix4_reset(void *opaque)
> >      pci_conf[0x5a] = 0;
> >      pci_conf[0x5b] = 0;
> >
> > -    if (s->kvm_enabled) {
> > +    if (s->kvm_is_enabled) {
> >          /* Mark SMM as already inited (until KVM supports SMM). */
> >          pci_conf[0x5B] = 0x02;
> >      }
> > @@ -502,7 +502,7 @@ static void piix4_powerdown(void *opaque, int irq,
> > int power_failing)
> >
> >  i2c_bus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
> >                         qemu_irq sci_irq, qemu_irq cmos_s3, qemu_irq
> smi_irq,
> > -                       int kvm_enabled)
> > +                       int kvm_is_enabled)
> >  {
> >      PIIX4PMState *s;
> >      uint8_t *pci_conf;
> > @@ -529,8 +529,8 @@ i2c_bus *piix4_pm_init(PCIBus *bus, int devfn,
> > uint32_t smb_io_base,
> >
> >      register_ioport_write(ACPI_DBG_IO_ADDR, 4, 4,
> acpi_dbg_writel, s);
> >
> > -    s->kvm_enabled = kvm_enabled;
> > -    if (s->kvm_enabled) {
> > +    s->kvm_is_enabled = kvm_is_enabled;
> > +    if (s->kvm_is_enabled) {
> >          /* Mark SMM as already inited to prevent SMM from running.
> > KVM does not
> >           * support SMM mode. */
> >          pci_conf[0x5B] = 0x02;
> > diff --git a/hw/pc.h b/hw/pc.h
> > index 5f86b37..08a541d 100644
> > --- a/hw/pc.h
> > +++ b/hw/pc.h
> > @@ -92,7 +92,7 @@ int acpi_table_add(const char *table_desc);
> >
> >  i2c_bus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
> >                         qemu_irq sci_irq, qemu_irq cmos_s3, qemu_irq
> smi_irq,
> > -                       int kvm_enabled);
> > +                       int kvm_is_enabled);
> >  void piix4_smbus_register_device(SMBusDevice *dev,
> uint8_t addr);
> >  void piix4_acpi_system_hot_add_init(PCIBus *bus);
> >
> > diff --git a/hw/poison.h b/hw/poison.h
> > index d7db7f4..18b9657 100644
> > --- a/hw/poison.h
> > +++ b/hw/poison.h
> > @@ -46,5 +46,8 @@
> >  #pragma GCC poison CPU_INTERRUPT_VIRQ
> >  #pragma GCC poison CPU_INTERRUPT_NMI
> >
> > +#pragma GCC poison kvm_allowed
> > +#pragma GCC poison kvm_enabled
> >
> >
> >
>
>  kvm_enabled() is a macro.  I dont' think this poison pragma is actually
> meaningful.

I'm not familiar with poison pragmas, but actually poisoning only
kvm_allowed didn't work.


Reply via email to