Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6076039yba; Tue, 14 May 2019 00:59:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2nmELswHguYuuBF9cDHnizPclsVpBhBFO+XFqePxL3+SeoPfATkTXaWwsOCgPIrkJ3Sbe X-Received: by 2002:a62:7513:: with SMTP id q19mr39150805pfc.108.1557820783474; Tue, 14 May 2019 00:59:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557820783; cv=none; d=google.com; s=arc-20160816; b=x4+CfuZO+71EAb7UKYoAWE8bHkoVxdS6LGoKnkSB7c3MFCZ20Y74oY3xX5ZiYQwipe Hvl+MfKp+RNbIZL9g3534SVxWMXz1wZoknwdgEX2eGqDeS8GJrccK1ekiGj8gt7qYsBj 12uJ6FlI06XI7qYWk8XgkxT8tvn7PsrHOVfzqWles3Xrl4w/9Apt39mHIoD/jfqdULZC NyzPGEKDg21V8kVG46JaxQA/sPqQJt0aQbw/VaDMZayVocSzWykoro53iXfFFwv7WAOj eQCxwoR2MGzc6SsQFiYtFBOqVgYimV2T7bF5MekNwE8wsZDLbcUpN+cgK6+Ny0V5kxpM yfvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=Hm9Tm5LOAz3Yewu8iIsMrN/PygszNEAXdNiSHUZXasc=; b=Z9R/6+OIL+dAkjUx7fUR4Fs7wUN7ELIeBwk10X0UzUwJ6ahwaKAuN/THzpilIE/nzu Y1H2zmi/RezMUDwhydFjy+gUMWH0CX3gAaBW6uD4qj4TqbOYfm8q+1+Lwe/CSC3SSFRs NUok4ZTkfEaHf6IkRc28+/DIvzPVhjrPok319cY/DzVc63CLMXGTHBtcIgimyv5vqOkh Ev6ATKTIGKMBqP98rVzQ/SkkBJk5uhqja6TFyeaHVU2jS++QrjpHk0AS9SN63LedP9L8 gKMxvxJCzy0Olnl97KvqgrD1Oa0h/fWrmJHvoX+HyzFYhNxJq2rP+5tAwNM2OAvTsLxq kw9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=Cxu0Rbtn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si18262718pgv.583.2019.05.14.00.59.27; Tue, 14 May 2019 00:59:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=Cxu0Rbtn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726084AbfENH6k (ORCPT + 99 others); Tue, 14 May 2019 03:58:40 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:50062 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbfENH6j (ORCPT ); Tue, 14 May 2019 03:58:39 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4E7rWLj013371; Tue, 14 May 2019 07:57:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2018-07-02; bh=Hm9Tm5LOAz3Yewu8iIsMrN/PygszNEAXdNiSHUZXasc=; b=Cxu0RbtnDfFw0XdHX1a2nnhh6Murm5HeXI3uwUQKENUOiWgCk+Uad2iC/dmeOx92QJ4c ArOiWnnJX0B4nK1vHuAdNSDrIwvsD3/DLRNjc+AfrPwlVG7eY1cpq+mQpPHLqKkSXGZM s3Zzb+PcTUXnnJoR0u5Vu0UtNpHoH2qD/++5S7CaEEHgYj+WZhVYhg7kpQ5gqvdiE6l6 XxxsU8vhbvd8ChVXIr9Z9SYgOwqyAb6FiFlf+ykIotOkitY7klVomllhLJliLaJ/O8Ws 0PBgos6GaN0Wt4URNQU2Md4SGAZ5MlFC+MM9fI6bw4HS4Mi0ylZzQx9Igug9XTnyytC3 7g== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2sdnttm1k1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 May 2019 07:57:44 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4E7vHQ8144326; Tue, 14 May 2019 07:57:43 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 2sdmeax9ua-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 May 2019 07:57:43 +0000 Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x4E7vZFf007379; Tue, 14 May 2019 07:57:37 GMT Received: from [10.0.5.57] (/213.57.127.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 14 May 2019 07:57:35 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Subject: Re: [RFC KVM 00/27] KVM Address Space Isolation From: Liran Alon In-Reply-To: <20190514072941.GG2589@hirez.programming.kicks-ass.net> Date: Tue, 14 May 2019 10:57:29 +0300 Cc: Andy Lutomirski , Alexandre Chartre , Paolo Bonzini , Radim Krcmar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Dave Hansen , kvm list , X86 ML , Linux-MM , LKML , Konrad Rzeszutek Wilk , jan.setjeeilers@oracle.com, Jonathan Adams Content-Transfer-Encoding: quoted-printable Message-Id: References: <1557758315-12667-1-git-send-email-alexandre.chartre@oracle.com> <20190514072941.GG2589@hirez.programming.kicks-ass.net> To: Peter Zijlstra X-Mailer: Apple Mail (2.3445.4.7) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9256 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905140058 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9256 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905140058 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 14 May 2019, at 10:29, Peter Zijlstra wrote: >=20 >=20 > (please, wrap our emails at 78 chars) >=20 > On Tue, May 14, 2019 at 12:08:23AM +0300, Liran Alon wrote: >=20 >> 3) =46rom (2), we should have theoretically deduced that for every >> #VMExit, there is a need to kick the sibling hyperthread also outside >> of guest until the #VMExit is completed. >=20 > That's not in fact quite true; all you have to do is send the IPI. > Having one sibling IPI the other sibling carries enough guarantees = that > the receiving sibling will not execute any further guest instructions. >=20 > That is, you don't have to wait on the VMExit to complete; you can = just > IPI and get on with things. Now, this is still expensive, But it is > heaps better than doing a full sync up between siblings. >=20 I agree. I didn=E2=80=99t say you need to do full sync. You just need to IPI the = sibling hyperthreads before switching to the full kernel address space. But you need to make sure these sibling hyperthreads don=E2=80=99t get = back into the guest until all hyperthreads are running with KVM isolated address = space. It is still very expensive if done for every #VMExit. Which as I = explained, can be avoided in case we use the KVM isolated address space technique. -Liran