From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: qemu-trivial@nongnu.org, Stefan Berger <stefanb@us.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH v2] tpm: Move memory subregion function into realize function
Date: Tue, 10 Mar 2015 16:48:20 +0100 [thread overview]
Message-ID: <54FF1244.2080906@redhat.com> (raw)
In-Reply-To: <20150310160704-mutt-send-email-mst@redhat.com>
On 10/03/2015 16:07, Michael S. Tsirkin wrote:
> On Tue, Mar 10, 2015 at 06:34:01AM -0400, Stefan Berger wrote:
>> From: Stefan Berger <stefanb@us.ibm.com>
>>
>> Move the memory subregion function into the DeviceClass realize function
>> due to isa_address_space (now) crashing if called in the instance init
>> function.
>>
>> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
>
> Paolo can you ack pls?
Yup.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
>
>> ---
>> hw/tpm/tpm_tis.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
>> index d0bb97f..9084ca4 100644
>> --- a/hw/tpm/tpm_tis.c
>> +++ b/hw/tpm/tpm_tis.c
>> @@ -959,18 +959,18 @@ static void tpm_tis_realizefn(DeviceState *dev, Error **errp)
>> tis->bh = qemu_bh_new(tpm_tis_receive_bh, s);
>>
>> isa_init_irq(&s->busdev, &tis->irq, tis->irq_num);
>> +
>> + memory_region_add_subregion(isa_address_space(ISA_DEVICE(dev)),
>> + TPM_TIS_ADDR_BASE, &s->mmio);
>> }
>>
>> static void tpm_tis_initfn(Object *obj)
>> {
>> - ISADevice *dev = ISA_DEVICE(obj);
>> TPMState *s = TPM(obj);
>>
>> memory_region_init_io(&s->mmio, OBJECT(s), &tpm_tis_memory_ops,
>> s, "tpm-tis-mmio",
>> TPM_TIS_NUM_LOCALITIES << TPM_TIS_LOCALITY_SHIFT);
>> - memory_region_add_subregion(isa_address_space(dev), TPM_TIS_ADDR_BASE,
>> - &s->mmio);
>> }
>>
>> static void tpm_tis_class_init(ObjectClass *klass, void *data)
>> --
>> 2.1.0
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: qemu-trivial@nongnu.org, Stefan Berger <stefanb@us.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] tpm: Move memory subregion function into realize function
Date: Tue, 10 Mar 2015 16:48:20 +0100 [thread overview]
Message-ID: <54FF1244.2080906@redhat.com> (raw)
In-Reply-To: <20150310160704-mutt-send-email-mst@redhat.com>
On 10/03/2015 16:07, Michael S. Tsirkin wrote:
> On Tue, Mar 10, 2015 at 06:34:01AM -0400, Stefan Berger wrote:
>> From: Stefan Berger <stefanb@us.ibm.com>
>>
>> Move the memory subregion function into the DeviceClass realize function
>> due to isa_address_space (now) crashing if called in the instance init
>> function.
>>
>> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
>
> Paolo can you ack pls?
Yup.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
>
>> ---
>> hw/tpm/tpm_tis.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
>> index d0bb97f..9084ca4 100644
>> --- a/hw/tpm/tpm_tis.c
>> +++ b/hw/tpm/tpm_tis.c
>> @@ -959,18 +959,18 @@ static void tpm_tis_realizefn(DeviceState *dev, Error **errp)
>> tis->bh = qemu_bh_new(tpm_tis_receive_bh, s);
>>
>> isa_init_irq(&s->busdev, &tis->irq, tis->irq_num);
>> +
>> + memory_region_add_subregion(isa_address_space(ISA_DEVICE(dev)),
>> + TPM_TIS_ADDR_BASE, &s->mmio);
>> }
>>
>> static void tpm_tis_initfn(Object *obj)
>> {
>> - ISADevice *dev = ISA_DEVICE(obj);
>> TPMState *s = TPM(obj);
>>
>> memory_region_init_io(&s->mmio, OBJECT(s), &tpm_tis_memory_ops,
>> s, "tpm-tis-mmio",
>> TPM_TIS_NUM_LOCALITIES << TPM_TIS_LOCALITY_SHIFT);
>> - memory_region_add_subregion(isa_address_space(dev), TPM_TIS_ADDR_BASE,
>> - &s->mmio);
>> }
>>
>> static void tpm_tis_class_init(ObjectClass *klass, void *data)
>> --
>> 2.1.0
>
>
next prev parent reply other threads:[~2015-03-10 15:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 10:34 [Qemu-trivial] [PATCH v2] tpm: Move memory subregion function into realize function Stefan Berger
2015-03-10 10:34 ` [Qemu-devel] " Stefan Berger
2015-03-10 15:07 ` [Qemu-trivial] " Michael S. Tsirkin
2015-03-10 15:07 ` [Qemu-devel] " Michael S. Tsirkin
2015-03-10 15:48 ` Paolo Bonzini [this message]
2015-03-10 15:48 ` 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=54FF1244.2080906@redhat.com \
--to=pbonzini@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanb@linux.vnet.ibm.com \
--cc=stefanb@us.ibm.com \
/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.