qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] -device xen-platform crashes


From: Stefano Stabellini
Subject: Re: [Qemu-devel] -device xen-platform crashes
Date: Thu, 29 Jan 2015 17:42:06 +0000
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)

On Thu, 29 Jan 2015, Markus Armbruster wrote:
> Stefano Stabellini <address@hidden> writes:
> 
> > On Thu, 29 Jan 2015, Markus Armbruster wrote:
> >> Reproducer: qemu -nodefaults -S -display none -device xen-platform
> >> 
> >> Yes, xen-platform makes no sense without Xen, but it shouldn't crash.
> >
> > Is it just a matter of doing the following?
> >
> > diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
> > index 28b324a..40ae1f3 100644
> > --- a/hw/i386/xen/xen_platform.c
> > +++ b/hw/i386/xen/xen_platform.c
> > @@ -177,6 +177,10 @@ static void platform_fixed_ioport_writeb(void *opaque, 
> > uint32_t addr, uint32_t v
> >  {
> >      PCIXenPlatformState *s = opaque;
> >  
> > +    if (!xen_enabled()) {
> > +        return;
> > +    }
> > +
> >      switch (addr) {
> >      case 0: /* Platform flags */ {
> >          hvmmem_type_t mem_type = (val & PFFLAG_ROM_LOCK) ?
> 
> Fixes the crash for me.
> 
> Should Xen-only devices fail to realize when !xen_enabled()?
 
Accelerators are configured after device registration unfortunately.



reply via email to

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