Re: QEMU, MCE, unpoison memory address across reboot

2010-12-28 Thread Avi Kivity
On 12/27/2010 11:27 PM, Marcelo Tosatti wrote: On Sun, Dec 26, 2010 at 02:27:26PM +0200, Avi Kivity wrote: +static void kvm_unpoison_all(void *param) +{ +HWPoisonPage *page, *next_page; +unsigned long address; +KVMState *s = param; + +

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-28 Thread Gleb Natapov
On Mon, Dec 27, 2010 at 07:27:54PM -0200, Marcelo Tosatti wrote: On Sun, Dec 26, 2010 at 02:27:26PM +0200, Avi Kivity wrote: +static void kvm_unpoison_all(void *param) +{ +HWPoisonPage *page, *next_page; +unsigned long address; +KVMState *s = param; + +

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-28 Thread Huang Ying
On Tue, 2010-12-28 at 16:27 +0800, Gleb Natapov wrote: On Mon, Dec 27, 2010 at 07:27:54PM -0200, Marcelo Tosatti wrote: On Sun, Dec 26, 2010 at 02:27:26PM +0200, Avi Kivity wrote: +static void kvm_unpoison_all(void *param) +{ +HWPoisonPage *page, *next_page; +

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-28 Thread Avi Kivity
On 12/28/2010 10:32 AM, Huang Ying wrote: On Tue, 2010-12-28 at 16:11 +0800, Avi Kivity wrote: On 12/27/2010 11:27 PM, Marcelo Tosatti wrote: On Sun, Dec 26, 2010 at 02:27:26PM +0200, Avi Kivity wrote: +static void kvm_unpoison_all(void *param) +{ +

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-28 Thread Avi Kivity
On 12/28/2010 10:35 AM, Huang Ying wrote: Don't we break huge page to 4k pages during poisoning? Yes. That has not been implemented yet. So in fact, we can not deal with hwpoison+hugetlb in kvm now. Should be a lot easier to deal with using transparent hugepages, since the break-apart

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-27 Thread Marcelo Tosatti
On Sun, Dec 26, 2010 at 02:27:26PM +0200, Avi Kivity wrote: +static void kvm_unpoison_all(void *param) +{ +HWPoisonPage *page, *next_page; +unsigned long address; +KVMState *s = param; + +QLIST_FOREACH_SAFE(page,hwpoison_page_list, list, next_page) { +

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-27 Thread Marcelo Tosatti
On Fri, Dec 24, 2010 at 11:30:37AM +0800, Huang Ying wrote: On Thu, 2010-12-23 at 22:28 +0800, Marcelo Tosatti wrote: Can't you free and reallocate all guest memory instead, on reboot, if there's a hwpoisoned page? Then you don't need this interface. Consider about this method. It seems

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-27 Thread Huang Ying
On Tue, 2010-12-28 at 05:27 +0800, Marcelo Tosatti wrote: On Sun, Dec 26, 2010 at 02:27:26PM +0200, Avi Kivity wrote: +static void kvm_unpoison_all(void *param) +{ +HWPoisonPage *page, *next_page; +unsigned long address; +KVMState *s = param; + +

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-26 Thread Avi Kivity
On 12/23/2010 04:28 PM, Marcelo Tosatti wrote: On Wed, Dec 22, 2010 at 10:52:51AM +0800, Huang Ying wrote: In Linux kernel HWPoison processing implementation, the virtual address in processes mapping the error physical memory page is marked as HWPoison. So that, the further accessing to

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-23 Thread Marcelo Tosatti
On Wed, Dec 22, 2010 at 10:52:51AM +0800, Huang Ying wrote: In Linux kernel HWPoison processing implementation, the virtual address in processes mapping the error physical memory page is marked as HWPoison. So that, the further accessing to the virtual address will kill corresponding

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-23 Thread Andi Kleen
Can't you free and reallocate all guest memory instead, on reboot, if there's a hwpoisoned page? Then you don't need this interface. I think that would be more efficient. You can potentially save a lot of memory if the new guest doesn't need as much as the old one. -Andi -- To unsubscribe

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-23 Thread Huang Ying
Hi, Andi, On Fri, 2010-12-24 at 00:57 +0800, Andi Kleen wrote: Can't you free and reallocate all guest memory instead, on reboot, if there's a hwpoisoned page? Then you don't need this interface. I think that would be more efficient. You can potentially save a lot of memory if the new

Re: QEMU, MCE, unpoison memory address across reboot

2010-12-23 Thread Huang Ying
On Thu, 2010-12-23 at 22:28 +0800, Marcelo Tosatti wrote: Can't you free and reallocate all guest memory instead, on reboot, if there's a hwpoisoned page? Then you don't need this interface. Consider about this method. It seems that some guest RAMs are not allocated in

QEMU, MCE, unpoison memory address across reboot

2010-12-21 Thread Huang Ying
In Linux kernel HWPoison processing implementation, the virtual address in processes mapping the error physical memory page is marked as HWPoison. So that, the further accessing to the virtual address will kill corresponding processes with SIGBUS. If the error physical memory page is used by a