From: dmkhn@proton.me
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: xen-devel@lists.xenproject.org, andrew.cooper3@citrix.com,
anthony.perard@vates.tech, jbeulich@suse.com, julien@xen.org,
michal.orzel@amd.com, sstabellini@kernel.org, dmukhin@ford.com
Subject: Re: [PATCH v2 1/2] xen/domain: introduce non-x86 hardware emulation flags
Date: Wed, 28 May 2025 21:17:33 +0000 [thread overview]
Message-ID: <aDd9Z3eY3RQgTTdy@kraken> (raw)
In-Reply-To: <aC3dkKyiIHRF8YO1@macbook.local>
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@proton.me wrote:
> > From: Denis Mukhin <dmukhin@ford.com>
> >
> > 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@ford.com>
> > ---
> > 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.
next prev parent reply other threads:[~2025-05-28 21:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 2:29 [PATCH v2 0/2] xen/domain: updates to hardware emulation flags dmkhn
2025-05-16 2:29 ` [PATCH v2 1/2] xen/domain: introduce non-x86 " dmkhn
2025-05-20 15:21 ` Jan Beulich
2025-05-20 21:39 ` dmkhn
2025-05-21 6:01 ` Jan Beulich
2025-05-21 14:05 ` Roger Pau Monné
2025-05-28 21:17 ` dmkhn [this message]
2025-05-16 2:29 ` [PATCH v2 2/2] xen/domain: rewrite emulation_flags_ok() dmkhn
2025-05-20 15:24 ` Jan Beulich
2025-05-20 22:38 ` dmkhn
2025-05-20 23:00 ` Stefano Stabellini
2025-05-21 6:51 ` Jan Beulich
2025-05-21 6:04 ` Jan Beulich
2025-05-21 15:07 ` Roger Pau Monné
2025-05-22 0:26 ` dmkhn
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=aDd9Z3eY3RQgTTdy@kraken \
--to=dmkhn@proton.me \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=dmukhin@ford.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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.