All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	Ben Warren <ben@skyportsystems.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PULL 4/4] hw/acpi/vmgenid: prevent more than one vmgenid device
Date: Wed, 22 Mar 2017 18:31:17 +0200	[thread overview]
Message-ID: <20170322183050-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <a5f0cf7d-b0e0-10c8-3518-4c25360b724f@redhat.com>

On Wed, Mar 22, 2017 at 05:21:32PM +0100, Laszlo Ersek wrote:
> On 03/22/17 17:01, Michael S. Tsirkin wrote:
> > From: Laszlo Ersek <lersek@redhat.com>
> > 
> > A system with multiple VMGENID devices is undefined in the VMGENID spec by
> > omission.
> > 
> > Cc: "Michael S. Tsirkin" <mst@redhat.com>
> > Cc: Ben Warren <ben@skyportsystems.com>
> > Cc: Igor Mammedov <imammedo@redhat.com>
> > Cc: Paolo Bonzini <pbonzini@redhat.com>
> > Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> > Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> Can you please add the feedback tags from Igor and Ben?
> 
> http://mid.mail-archive.com/23205322-903E-42E2-99D7-ED8351E62694@skyportsystems.com
> http://mid.mail-archive.com/20170321131414.08cc6bfa@nial.brq.redhat.com
> 
> > Binary file /tmp/tmp.IaAwzHwwsQ matches
> 
> I'm not sure what this means.
> 
> Thanks,
> Laszlo

Fixed, thanks for paying attention.

> > ---
> >  include/hw/acpi/vmgenid.h | 1 +
> >  hw/acpi/vmgenid.c         | 8 ++++++++
> >  2 files changed, 9 insertions(+)
> > 
> > diff --git a/include/hw/acpi/vmgenid.h b/include/hw/acpi/vmgenid.h
> > index 8578476..7beb959 100644
> > --- a/include/hw/acpi/vmgenid.h
> > +++ b/include/hw/acpi/vmgenid.h
> > @@ -24,6 +24,7 @@ typedef struct VmGenIdState {
> >      bool write_pointer_available;
> >  } VmGenIdState;
> >  
> > +/* returns NULL unless there is exactly one device */
> >  static inline Object *find_vmgenid_dev(void)
> >  {
> >      return object_resolve_path_type("", VMGENID_DEVICE, NULL);
> > diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c
> > index c3ddcc8..a32b847 100644
> > --- a/hw/acpi/vmgenid.c
> > +++ b/hw/acpi/vmgenid.c
> > @@ -221,6 +221,14 @@ static void vmgenid_realize(DeviceState *dev, Error **errp)
> >          return;
> >      }
> >  
> > +    /* Given that this function is executing, there is at least one VMGENID
> > +     * device. Check if there are several.
> > +     */
> > +    if (!find_vmgenid_dev()) {
> > +        error_setg(errp, "at most one %s device is permitted", VMGENID_DEVICE);
> > +        return;
> > +    }
> > +
> >      qemu_register_reset(vmgenid_handle_reset, vms);
> >  }
> >  
> > 

  reply	other threads:[~2017-03-22 16:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 16:01 [Qemu-devel] [PULL 0/4] virtio, pc: fixes Michael S. Tsirkin
2017-03-22 16:01 ` [Qemu-devel] [PULL 1/4] virtio: Fix error handling in virtio_bus_device_plugged Michael S. Tsirkin
2017-03-22 16:01 ` [Qemu-devel] [PULL 2/4] virtio: always use handle_aio_output if registered Michael S. Tsirkin
2017-03-22 16:01 ` [Qemu-devel] [PULL 3/4] hw/acpi/vmgenid: prevent device realization on pre-2.5 machine types Michael S. Tsirkin
2017-03-22 16:19   ` Laszlo Ersek
2017-03-22 16:01 ` [Qemu-devel] [PULL 4/4] hw/acpi/vmgenid: prevent more than one vmgenid device Michael S. Tsirkin
2017-03-22 16:21   ` Laszlo Ersek
2017-03-22 16:31     ` Michael S. Tsirkin [this message]
2017-03-22 16:28 ` [Qemu-devel] [PULL 0/4] virtio, pc: fixes Michael S. Tsirkin
2017-03-22 16:30   ` Michael S. Tsirkin
2017-03-23 11:39 ` Peter Maydell

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=20170322183050-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=ben@skyportsystems.com \
    --cc=imammedo@redhat.com \
    --cc=lersek@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.