From: Zhao Liu <zhao1.liu@intel.comg>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Zhao Liu <zhao1.liu@intel.com>,
qemu-devel@nongnu.org, qemu-rust@nongnu.org,
Dapeng Mi <dapeng1.mi@intel.com>
Subject: Re: [PATCH 2/5] hw/timer/hpet: Adjust num_timers in hpet_init()
Date: Wed, 21 May 2025 15:34:54 +0800 [thread overview]
Message-ID: <aC2CHrteHfhQDzOh@intel.com> (raw)
In-Reply-To: <20486914-1752-4710-b000-52ee04d4106d@redhat.com>
On Tue, May 20, 2025 at 05:16:22PM +0200, Paolo Bonzini wrote:
> Date: Tue, 20 May 2025 17:16:22 +0200
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: Re: [PATCH 2/5] hw/timer/hpet: Adjust num_timers in hpet_init()
>
> On 5/20/25 17:27, Zhao Liu wrote:
> > Currently, HPET adjusts num_timers in hpet_realize(), and doesn't change
> > it in any other place. And this field is initialized as a property.
>
> Properties are initialized *after* hpet_init. For hw/timer/hpet you can
> check s->num_timers and return an error if it's out of bounds, but for the
> Rust version we don't have Error** support yet. :(
Oops, yes.
(Note for myself,) the default property value is set before hpet_init(),
but the subsequent adjustments to property (via object_property_set_uint8())
need to take boundaries into account, which is why the num_timers adjustment
is placed in realize().
> Queued 1-4-5 for now.
Thanks!
Zhao
next prev parent reply other threads:[~2025-05-22 12:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 15:27 [PATCH 0/5] hpet, rust: miscellaneous cleanup Zhao Liu
2025-05-20 15:27 ` [PATCH 1/5] hw/timer/hpet: Reorganize register decoding Zhao Liu
2025-05-20 15:27 ` [PATCH 2/5] hw/timer/hpet: Adjust num_timers in hpet_init() Zhao Liu
2025-05-20 15:16 ` Paolo Bonzini
2025-05-21 7:34 ` Zhao Liu [this message]
2025-05-20 15:27 ` [PATCH 3/5] rust/hpet: Drop BalCell wrapper for num_timers Zhao Liu
2025-05-20 15:27 ` [PATCH 4/5] rust: Fix Zhao's email address Zhao Liu
2025-05-20 15:57 ` Peter Maydell
2025-05-20 15:27 ` [PATCH 5/5] rust: Fix the typos in doc Zhao Liu
2025-05-20 15:43 ` 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=aC2CHrteHfhQDzOh@intel.com \
--to=zhao1.liu@intel.comg \
--cc=dapeng1.mi@intel.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
--cc=zhao1.liu@intel.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 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).