[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/2] xen/domain: introduce non-x86 hardware emulation flags



On Wed, May 21, 2025 at 04:05:04PM +0200, Roger Pau Monné wrote:
> On Fri, May 16, 2025 at 02:29:09AM +0000, dmkhn@xxxxxxxxx wrote:
> > From: Denis Mukhin <dmukhin@xxxxxxxx>
> >
> > Define per-architecture emulation_flags for configuring domain emulation
> > features.
> >
> > Print d->arch.emulation_flags from 'q' keyhandler for better traceability
> > while debugging.
> >
> > Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>
> > ---
> > Changes since v1:
> > - dropped comments
> > ---
> >  xen/arch/arm/include/asm/domain.h   | 1 +
> >  xen/arch/ppc/include/asm/domain.h   | 1 +
> >  xen/arch/riscv/include/asm/domain.h | 1 +
> >  xen/common/keyhandler.c             | 1 +
> >  4 files changed, 4 insertions(+)
> >
> > diff --git a/xen/arch/arm/include/asm/domain.h 
> > b/xen/arch/arm/include/asm/domain.h
> > index a3487ca713..70e6e7d49b 100644
> > --- a/xen/arch/arm/include/asm/domain.h
> > +++ b/xen/arch/arm/include/asm/domain.h
> > @@ -121,6 +121,7 @@ struct arch_domain
> >      void *tee;
> >  #endif
> >
> > +    uint32_t emulation_flags;
> >  }  __cacheline_aligned;
> >
> >  struct arch_vcpu
> > diff --git a/xen/arch/ppc/include/asm/domain.h 
> > b/xen/arch/ppc/include/asm/domain.h
> > index 3a447272c6..001116a0ab 100644
> > --- a/xen/arch/ppc/include/asm/domain.h
> > +++ b/xen/arch/ppc/include/asm/domain.h
> > @@ -21,6 +21,7 @@ struct arch_vcpu {
> >
> >  struct arch_domain {
> >      struct hvm_domain hvm;
> > +    uint32_t emulation_flags;
> >  };
> >
> >  #include <xen/sched.h>
> > diff --git a/xen/arch/riscv/include/asm/domain.h 
> > b/xen/arch/riscv/include/asm/domain.h
> > index c3d965a559..7bc242da55 100644
> > --- a/xen/arch/riscv/include/asm/domain.h
> > +++ b/xen/arch/riscv/include/asm/domain.h
> > @@ -18,6 +18,7 @@ struct arch_vcpu {
> >
> >  struct arch_domain {
> >      struct hvm_domain hvm;
> > +    uint32_t emulation_flags;
> >  };
> >
> >  #include <xen/sched.h>
> > diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
> > index 0bb842ec00..73f5134b68 100644
> > --- a/xen/common/keyhandler.c
> > +++ b/xen/common/keyhandler.c
> > @@ -306,6 +306,7 @@ static void cf_check dump_domains(unsigned char key)
> >              if ( test_bit(i, &d->watchdog_inuse_map) )
> >                  printk("    watchdog %d expires in %d seconds\n",
> >                         i, (u32)((d->watchdog_timer[i].expires - NOW()) >> 
> > 30));
> > +        printk("    emulation_flags %#x\n", d->arch.emulation_flags);
> >
> >          arch_dump_domain_info(d);
> 
> Hello,
> 
> I think it might be easier to print emulation_flags in
> arch_dump_domain_info(), ideally it would be helpful if this could be
> printed in a user friendly way apart from the raw dump:
> 
> printk("    emulation_flags:%s%s... (%#x)\n",
>        !d->arch.emulation_flags ? " none" : "",
>        has_vlapic(d) ? " lapic" : "", ...
>        d->arch.emulation_flags);

I moved emulation_flags to the common domain struct in v3 and I kept the
emulation_flags flags printout here in common dump_domains().

I will plumb the human-readable printout for x86 flags in the follow on patch.

> 
> Regards, Roger.




 


Rackspace

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