WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: hvm save restore support

To: Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: hvm save restore support
From: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Date: Fri, 15 Dec 2006 16:25:52 +0800
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Delivery-date: Fri, 15 Dec 2006 00:27:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C1A6B5AB.5D3E%keir@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20061214024615.GM14562@xxxxxxxxxxxxxxxxxxxxxx> <C1A6B5AB.5D3E%keir@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
On Thu, Dec 14, 2006 at 08:02:51AM +0000, Keir Fraser wrote:
> On 14/12/06 2:46 am, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx> wrote:
> 
> >> How did you deal with PCI device init getting moved to hvmloader? Looks 
> >> like
> >> this patch reverts some of that, which doesn't seem the right answer.
> > yes, it's just work around.
> > but bios code never be called when restore. i think it's why qemu doesn't 
> > move
> > it to bios.
> > 
> > do you have any good idea?
> 
> It doesn't matter that BIOS code is not executed on restore. What qemu
> should be doing is saving the PCI configuration spaces -- at least the
> important bits (BARs, command register) but probably it may as well save the
> whole 256 bytes per device.
no doubt that 256 bytes PCI configuration space should be saved(qemu already 
support it). but after that, we need some init for the device such as register 
mmio according to the saved configuration space. this is what 
pci_bios_init_device doing.
it seems that we still need it for both create and restore, right?

this code has been moved to hvmloader, so we have to copy and execute it after 
all PCI devices are restored.

maybe relocation of this code is more decent? e.g. put it on the 
generic_pci_load handler?

> 
> If it's not doing this already then that's rather scary. What if the OS
> decides to shuffle PCI resources around, which is its right to do?
> 
>  -- Keir
> 

-- 
best rgds,
edwin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel