qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/4] s390/kvm: Handle hosts not supporting s390-


From: Heiko Carstens
Subject: Re: [Qemu-devel] [PATCH 1/4] s390/kvm: Handle hosts not supporting s390-virtio.
Date: Fri, 10 Aug 2012 10:42:48 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Aug 09, 2012 at 12:41:57PM +0200, Cornelia Huck wrote:
> On Thu, 09 Aug 2012 13:03:57 +0300
> Avi Kivity <address@hidden> wrote:
> 
> > On 08/07/2012 05:52 PM, Cornelia Huck wrote:
> > > Running under a kvm host does not necessarily imply the presence of
> > > a page mapped above the main memory with the virtio information;
> > > however, the code includes a hard coded access to that page.
> > > 
> > > Instead, check for the presence of the page and exit gracefully
> > > before we hit an addressing exception if it does not exist.
> > > 
> > >  /*
> > >   * Init function for virtio
> > >   * devices are in a single page above top of "normal" mem
> > > @@ -443,6 +458,12 @@ static int __init kvm_devices_init(void)
> > >   }
> > >  
> > >   kvm_devices = (void *) real_memory_size;
> > > + if (test_devices_support() < 0) {
> > > +         vmem_remove_mapping(real_memory_size, PAGE_SIZE);
> > > +         root_device_unregister(kvm_root);
> > > +         /* No error. */
> > > +         return 0;
> > > + }
> > >  
> > 
> > Cleaner to defer root_device_register() until after the mapping has been
> > verified.
> 
> OK, will reorder.

Please use the "lura" instruction to figure out if the guest real page
even exists _before_ creating the mapping.
That way you don't need all the code afterwards.




reply via email to

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