From: Blue Swirl <blauwirbel@gmail.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 2/2] Make kvm_enabled unavailable to non-target devices
Date: Fri, 2 Apr 2010 19:33:58 +0300 [thread overview]
Message-ID: <u2zf43fc5581004020933n8007dee0s1f24a0508cc41887@mail.gmail.com> (raw)
In-Reply-To: <4BB61A74.9080304@codemonkey.ws>
On 4/2/10, Anthony Liguori <anthony@codemonkey.ws> wrote:
> On 04/02/2010 10:46 AM, Blue Swirl wrote:
>
> > Signed-off-by: Blue Swirl<blauwirbel@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.
next prev parent reply other threads:[~2010-04-02 16:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-02 15:46 [Qemu-devel] [PATCH 2/2] Make kvm_enabled unavailable to non-target devices Blue Swirl
2010-04-02 16:25 ` Anthony Liguori
2010-04-02 16:33 ` Blue Swirl [this message]
2010-04-02 16:47 ` [Qemu-devel] " Paolo Bonzini
2010-04-02 16:57 ` Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2010-04-01 20:10 [Qemu-devel] " Blue Swirl
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=u2zf43fc5581004020933n8007dee0s1f24a0508cc41887@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=anthony@codemonkey.ws \
--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).