qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v3 03/38] xen: Add XEN_DISABLED mode and make it default


From: David Woodhouse
Subject: Re: [RFC PATCH v3 03/38] xen: Add XEN_DISABLED mode and make it default
Date: Tue, 20 Dec 2022 22:59:33 +0000
User-agent: Evolution 3.44.4-0ubuntu1

On Tue, 2022-12-20 at 14:39 +0000, Paul Durrant wrote:
> On 16/12/2022 00:40, David Woodhouse wrote:
> > From: David Woodhouse <dwmw@amazon.co.uk>
> > 
> > Also check for XEN_ATTACH mode in xen_init()
> > 
> > Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> > Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
> > ---
> >    accel/xen/xen-all.c  | 4 ++++
> >    include/hw/xen/xen.h | 5 +++--
> >    2 files changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c
> > index 69aa7d018b..109d2e84bc 100644
> > --- a/accel/xen/xen-all.c
> > +++ b/accel/xen/xen-all.c
> > @@ -158,6 +158,10 @@ static int xen_init(MachineState *ms)
> >    {
> >        MachineClass *mc = MACHINE_GET_CLASS(ms);
> >    
> > +    if (xen_mode != XEN_ATTACH) {
> > +        xen_pv_printf(NULL, 0, "xen requires --xen-attach mode\n");
> > +        return -1;
> > +    }
> 
> This is new requirement, isn't it? Libxl only passes --xen-attach
> for PV domains so AFAICT this will break Xen HVM domains.

So HVM domains are currently running with xen_mode == XEN_EMULATE and
work because nobody ever actually looks at that variable except in
xen_init_pv().

What was the reason for ever needing it to be explicitly set on the
command line; couldn't it have been implicit?

Seems like the right thing to do is to make it implicit in xen_init()
above, and *set* it to XEN_ATTACH instead of requiring it to have been
set on the command line? 

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]