From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: [PATCH 0/2] Fix failures caused by fork() interaction with internal slots Date: Mon, 21 Jun 2010 11:18:11 +0300 Message-ID: <1277108293-9918-1-git-send-email-avi@redhat.com> To: kvm@vger.kernel.org, Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:54972 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756749Ab0FUISQ (ORCPT ); Mon, 21 Jun 2010 04:18:16 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5L8IFKl022496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 Jun 2010 04:18:16 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5L8IEsW003247 for ; Mon, 21 Jun 2010 04:18:15 -0400 Sender: kvm-owner@vger.kernel.org List-ID: fork() has a WONTFIX bug where a page with an elevated reference count will be COWed such that the page address changes even in the process which has taken the reference. This interacts badly with internal memory slots that install pages in vmcs registers, such as the APIC access page. This patchset disables fork() for these slots. Avi Kivity (2): KVM: Keep slot ID in memory slot structure KVM: Prevent internal slots from being COWed arch/x86/kvm/x86.c | 5 +++++ include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 1 + 3 files changed, 7 insertions(+), 0 deletions(-)