[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 07/16] xen/riscv: introduce basic vtimer infrastructure for guests
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Date: Tue, 3 Feb 2026 17:55:05 +0100
- Cc: Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Romain Caritey <Romain.Caritey@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 03 Feb 2026 16:55:15 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2/3/26 4:47 PM, Jan Beulich wrote:
On 22.01.2026 17:47, Oleksii Kurochko wrote:
+void vtimer_set_timer(struct vtimer *t, const uint64_t ticks)
+{
+ struct arch_vcpu *avcpu = container_of(t, struct arch_vcpu, vtimer);
+ struct vcpu *v = container_of(avcpu, struct vcpu, arch);
Why two container_of() when one will do? (Same again further down.)
I didn't think that container_of(t, struct vcpu, arch.vtimer) would work
(as arch.vtimer is embedded inside struct vcpu. Is my assumption correct that
if it was arch->vtimer then it won't work?)
~ Oleksii
|