[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




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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.