Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp3883845ima; Mon, 4 Feb 2019 06:48:46 -0800 (PST) X-Google-Smtp-Source: AHgI3IabtHCEDlkcWtw6XE8UCxX7R2/ClOOX4nSorkrEbt7iNIu0eQuCg08+190SnCOpT5NW2fcW X-Received: by 2002:a63:fd07:: with SMTP id d7mr8439086pgh.163.1549291726696; Mon, 04 Feb 2019 06:48:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549291726; cv=none; d=google.com; s=arc-20160816; b=WOHcIqF7nljjffQ7/bvC6pETj9vUEfICedqBE7kBNGjV+6iVpEI/Q1iOeN5un4v5la x/BPqjWSvJkpXCURPwWlyHaSBRac6CLocV6/0x7YIcVv1L9/HgNq6nmxmSixPBdufDR2 fmEMWhP9Ij5lhXAx82EYq4Ec68YxDFmk55XlxX28Sh4fT3oMOtLCFKStwE0gJGB8nDBc 9EUmkDJacIVl7eGAO5sbcQ+xYI/zydoTFCZ6a3ngO1+yjW6i110Usm+qHOXybY53RF+b OGX95GrCryx5/J7ArYNnOJJOWTCCKgHqyInCeq0K2zW3Q0kcukRf00AGlqW45e9rNLLO QfqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=l/mEMkIMUzSuAncXeOsajO6PHRRXHlsGy9/0QH0Rpzc=; b=DBo+1IqJyNrTZWHPpwdPnZUhztyr9mVtxF4P7NhoSAKAqudb6rqxRnl3aqMkeEN2vg rgVvo59U/4dwrv2NzuGYMqcUDUc4fSq60NrOo63w00GUnSCD/K4RsdN1rM8F+XAZEn7T rj6CL26eJhZJi7UVWxq+5YQ4Hft5hvwis1HbUXK8oqOan1PFxTKTuon2kX30SZysZFx4 5ZZgDNZ00WJL0xT5zgFbBdsiCaNUWUxFXnecjtuJUMM/pN98nBUQ9+V9W7NJVpUmFqpl DkY9V6wOXc57GNEG5lW00H57pSMpZxThZZnppsl27O0stb9FCc7in/4dO49RqrtoE30s lLMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=CJN5DXbr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x128si221007pfb.128.2019.02.04.06.48.29; Mon, 04 Feb 2019 06:48:46 -0800 (PST) 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=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=CJN5DXbr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730578AbfBDOmW (ORCPT + 99 others); Mon, 4 Feb 2019 09:42:22 -0500 Received: from mail-eopbgr730048.outbound.protection.outlook.com ([40.107.73.48]:44640 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730351AbfBDOmU (ORCPT ); Mon, 4 Feb 2019 09:42:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l/mEMkIMUzSuAncXeOsajO6PHRRXHlsGy9/0QH0Rpzc=; b=CJN5DXbrB8LzSGKXHqrDqJNfnLxAPbXkaM3y89TPcwzo41Gfl2mIRWXEiymGU3dane2smRTCh6a7zTpbbrFFrSxofLslk5h5HrF07L7eqJ0qyvP8T3UFqc5wJA6cwg9uZL7SWWX35vRtowH4YPMnuKkSOpmKm/qgiZCE3/6SFso= Received: from DM6PR12MB2844.namprd12.prod.outlook.com (20.176.117.96) by DM6PR12MB3274.namprd12.prod.outlook.com (20.179.106.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1580.16; Mon, 4 Feb 2019 14:42:18 +0000 Received: from DM6PR12MB2844.namprd12.prod.outlook.com ([fe80::c40:929a:abab:308d]) by DM6PR12MB2844.namprd12.prod.outlook.com ([fe80::c40:929a:abab:308d%3]) with mapi id 15.20.1558.026; Mon, 4 Feb 2019 14:42:18 +0000 From: "Suthikulpanit, Suravee" To: "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "x86@kernel.org" CC: "joro@8bytes.org" , "rkrcmar@redhat.com" , "pbonzini@redhat.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "hpa@zytor.com" , "jsteckli@amazon.de" , "sironi@amazon.de" , "wawei@amazon.de" , "Suthikulpanit, Suravee" Subject: [RFC PATCH 5/8] svm: Add support for APIC_ACCESS_PAGE_PRIVATE_MEMSLOT setup/destroy Thread-Topic: [RFC PATCH 5/8] svm: Add support for APIC_ACCESS_PAGE_PRIVATE_MEMSLOT setup/destroy Thread-Index: AQHUvJfTbslfMQjezUease4SwgfLDQ== Date: Mon, 4 Feb 2019 14:42:17 +0000 Message-ID: <20190204144128.9489-6-suravee.suthikulpanit@amd.com> References: <20190204144128.9489-1-suravee.suthikulpanit@amd.com> In-Reply-To: <20190204144128.9489-1-suravee.suthikulpanit@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [61.90.26.242] x-clientproxiedby: SG2PR04CA0190.apcprd04.prod.outlook.com (2603:1096:4:14::28) To DM6PR12MB2844.namprd12.prod.outlook.com (2603:10b6:5:45::32) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Suravee.Suthikulpanit@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM6PR12MB3274;20:YOzzGf7seV8LYEqUr3NQ+3MGk670VV1cBs/tBhAzK1MW0r3EegGBYMhkEKL94PgwmROM4lpdr5i5hv1vBBXaGOnpIeW+CNRaDHZW75FG0fnlF7H6ZbWtKPCO7b/L+9jOIxaMkzxI1JZVpMspHHkU66krpB0Ui/pxvMcFwm64lQrKgmqSJ++hG/7XU2ImsFV6Dexl1CpCkx+lagJnux5xMFb69tEWSeNFVBw3NxhG4svTaptpb9JA9KnK92vt8TFy x-ms-office365-filtering-correlation-id: 3777f836-3b33-4280-d25e-08d68aaef611 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4618075)(2017052603328)(7153060)(7193020);SRVR:DM6PR12MB3274; x-ms-traffictypediagnostic: DM6PR12MB3274: x-microsoft-antispam-prvs: x-forefront-prvs: 0938781D02 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(376002)(366004)(39860400002)(396003)(136003)(189003)(199004)(6116002)(3846002)(105586002)(81166006)(81156014)(6436002)(52116002)(186003)(256004)(14444005)(217873002)(106356001)(2501003)(8936002)(8676002)(316002)(110136005)(4326008)(99286004)(2201001)(86362001)(72206003)(14454004)(386003)(25786009)(7736002)(305945005)(478600001)(6486002)(54906003)(53936002)(6512007)(50226002)(71190400001)(486006)(66574012)(1076003)(6506007)(97736004)(102836004)(476003)(68736007)(2616005)(11346002)(2906002)(446003)(7416002)(26005)(76176011)(71200400001)(66066001)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB3274;H:DM6PR12MB2844.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: VDhNuyANdAMZdwEASnXswLuF8/u9DQ/sPhumsaK9dC7y0kCGPZYgGiuFdx9G12s9YUEHN+imcnznxb7wpdcvVpHnmffgkWQC9t2Vs2e/FLDVuxz2W7853Bfq4rvqIJKPWrdM+5DOtBwYdFGo7VigKUECQhXquxgAJGqiC/OkBIh6rOCmmWZQdmkLl3GyQudF2orssyXyrn4/jtLypsA5N0PX1E0J6Tt0P0m5ui2cVZyGa4EL6LTdME7v3H8Jib9iF579yEh3TdJALMShlg3qCYnAuquEjrxxi+4rPx+l7BJuoo0+k9Rp7v8OJFZ5l/bEGn4nIhu2I9/ckc+eHne1enh2fLAMFcAueGMyh8ShYamsYO2NPe6l4Qd3cf4znPZ05ptm/d2ozGgtEq556MIC5k43aCN8+3ag+TZMQH8kEtA= Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3777f836-3b33-4280-d25e-08d68aaef611 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2019 14:42:13.5690 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3274 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QWN0aXZhdGUvZGVhY3RpdmF0ZSBBVklDIHJlcXVpcmVzIHNldHRpbmcvdW5zZXR0aW5nIHRoZSBt ZW1vcnkgcmVnaW9uIHVzZWQNCmZvciBBUElDX0FDQ0VTU19QQUdFX1BSSVZBVEVfTUVNU0xPVC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