Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756369AbcLNRIV (ORCPT ); Wed, 14 Dec 2016 12:08:21 -0500 Received: from mail-sn1nam01on0043.outbound.protection.outlook.com ([104.47.32.43]:21738 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753439AbcLNRIL (ORCPT ); Wed, 14 Dec 2016 12:08:11 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Subject: Re: [PATCH v2 3/3] kvm: svm: Use the hardware provided GPA instead of page walk To: Paolo Bonzini References: <147992048887.27638.17559991037474542240.stgit@brijesh-build-machine> <147992052008.27638.18095073174935903705.stgit@brijesh-build-machine> <65a10dd8-5fae-350f-b597-f8f0261da766@redhat.com> <9820037d-e3ca-0131-3b04-2e51f2abc883@amd.com> <657442146.2535029.1481298111651.JavaMail.zimbra@redhat.com> <6e1fd4ba-016c-99ea-5b98-24f89479da4b@amd.com> <057d8a2e-0a3a-38d3-d9bf-9301e3eb8238@redhat.com> CC: , , thomas lendacky , , , , , , , , From: Brijesh Singh Message-ID: <43e626f1-e9a6-cf5d-4771-c6f7ca07ec8e@amd.com> Date: Wed, 14 Dec 2016 11:07:58 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <057d8a2e-0a3a-38d3-d9bf-9301e3eb8238@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BLUPR0301CA0018.namprd03.prod.outlook.com (10.162.113.156) To BY2PR12MB0663.namprd12.prod.outlook.com (10.163.113.152) X-MS-Office365-Filtering-Correlation-Id: 2e44696d-c8e6-4ff0-10e4-08d42443c50c X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BY2PR12MB0663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IMIm5PAQ8zJoKTUDXdHQm1porxYnS6ZwU0BTH2u X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0663;31:mlSBIr6KE01ngxp4kuyGrzJW7NCfmvNXMTCkawsZoczt2kUdFoQT2Jb0DGlyv7G3zWF6yFAcATrHcaZQndm6+IkK6WfGWAy3byj6ZIsc9n5dup+YIpAIotVbvghBA6yppS+HwRH8RyFcAEe2NL3dJrHE6f9LRyns+wj3J6eGZhTKwjLXVvL0KFrdw5tdXBUGoI1ELBP5RVivTlFVQ5sDE/iv5JF2sGmW5j/NQCZj+5vpfq/02K3PW2wD0sfUkuFQtChbdq0dsDla5jbn93pdMQ==;20:GRcC02cJnpXWmdX/535eDPonPgVxsfFsJlS/SzGLEirXzCNiX5x3gN/Apt4rIajXYjtUYo9XcXRSjLFkm0tS3H7BV8Qlx+daHNMNTTXHqz+2+O5WcOqtneznuN6EzdrZTZLNnhQwB+wbQq9eB0wPqGm7Y1Y4I9pgAV5mTuwwwlrSFEz7N6S5T8WRA2+1A5jXfFzqxdmm+Jfk1YsxcZcOq71sczveawtOX5rbqo2X9sk+xkqtmTZsTZbr9YEMQsNqPalfsTvxFuf5eRSQVyjpQGNG7aGa9s4rii0VCVpPGTD8id2WGld3GfKh1sbju/kKj2jbdnRfnrp4hTeWqdMu7jpGG2LmdYCAWvw8TXGuDgr4AOlQwDqr7dJyXheln1RgBON2kINXK/+GtaxmyD4eYvC0kdUKf0lXSZ53wIOijkE5htllv3nAva6amQQj1IoZjpJK0pSIlbOw/m4nQjFE4NdJ2xgZq6bQGsqpeJg/JDO38emNrlJZH5YaBEqUw7Et X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123555025)(20161123562025)(20161123560025)(20161123558021)(6072148);SRVR:BY2PR12MB0663;BCL:0;PCL:0;RULEID:;SRVR:BY2PR12MB0663; X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0663;4:cAU+9B+87sTYY8SiLy7yv9cJrtsEsOFvPddsDGU6MKUPUnCKptp2YS1/gwKFvH8SuHo4Wldh0kew59WKlcL2YvFN2WjuvipjzuB5jcdYwj5XlFkoR28QdUs9O2vdbtYe1s3STcECaRhrnYXNkTRJOHjEdADyfZViHE4y+19Br2mPAsjxcsgcQj6PdMvJphlV1Z8KOFsf7+3m9j+CxOdUJMZ3ca3HJw9DcGJ83SV73Rbf0kBTGJLJQyKedtTTOIvEhbMYIt0zIWRvWD/ZbgFRe3+ubsxpTzrlrjpFQq1jnI9uZ9oevdOqs71581ZD2sRTll0YvSYF1Jq6ASMCGzfsLPM1xiWKwGGM58dN+twExx6sMgfcnwM2wthR93Rx547znlh1LqxiztAlcnAU6utSVFS3e//pTXQOdtFOrsDY1eW+gkDsVCLQdJKbrZfm2NxS1dpGIweLoF3C92Zcfvfl/dE8yMQ5QguY6PnuFSBKJdua57rSii7JWf3+lTeK3akSSD1Qru/bEHmEcUMMehk9zJD/vjyuv3aX/vmHLubOBYYWpbemenynu/CtJfXJYbdO54KeSRfLvKvMz2rceMRSg1MNhzGXKdt+W1ZNJdE49On7jjluJIAVLYNYMKoBaW7V62m2Hbv5UaCv6zjTWXK7cGIaejp9WXDveaYixNMeJrk= X-Forefront-PRVS: 01565FED4C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(39410400002)(39450400003)(39860400002)(39850400002)(39840400002)(199003)(51444003)(24454002)(189002)(377454003)(36756003)(65956001)(66066001)(65806001)(90366009)(23676002)(93886004)(42186005)(81156014)(81166006)(83506001)(77096006)(4001350100001)(105586002)(25786008)(6486002)(230700001)(106356001)(97736004)(68736007)(65826007)(2906002)(5660300001)(31686004)(38730400001)(7736002)(305945005)(54356999)(101416001)(4326007)(189998001)(110136003)(86362001)(50986999)(31696002)(229853002)(8676002)(92566002)(47776003)(76176999)(3846002)(33646002)(64126003)(6116002)(50466002)(7416002)(6666003)(6916009)(2950100002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR12MB0663;H:[10.236.136.62];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQUjEyTUIwNjYzOzIzOkJUbXZxcU5kajJuU1k2YytTRXhWZUpaTzEy?= =?utf-8?B?Y2o2aVpOeUlLRVBENDg5WWM1bzlYY0JrdFFVemZkUmx6aHNjMXZ4WXFCSmh2?= =?utf-8?B?b05pUTkvN3JCVFRUT1I4SzUzYlVSOTJUMW9hT1pMV2hPT1NIUzBXeXBueGQy?= =?utf-8?B?Z1BQbGZCbFM0V20yb3NHNW1ObU9KZTQ1Nm1IQ3Q0SXVZZUl2dGVKNHU1dGIy?= =?utf-8?B?Wjg2ZWVUdWVsS2JHTTRqUUNXMWt2VkhNalFDZ3Y5MVg0NDFuYVlUd1o2amxS?= =?utf-8?B?SWVOWGVrZDFJcElJL3BIYUVNMy94VlRXaGZhcUE0WTVzRHNBTXFsOGIrckRP?= =?utf-8?B?OHhWNXhBVVd1dCtkbjYvSkY3N3BXbGpUV05kS1JGbFJKUkVqSlFad2hWemVB?= =?utf-8?B?YUt2aUZJbk5SK3hraGkwNWN6NlhuOHk3MVpQMC9WeG1sRnRZZ1NGbW5XdVd3?= =?utf-8?B?UHhmNUJsa3Y1bzQ0YzlsQ0tkSlp3YzFaQlE0ek8yQVBwQWRuOHlkbFdsZm5y?= =?utf-8?B?QTB5aEZkdERORlo3dEk1Sm5XTGM2Zlh2dVd3cFV1RVBQbHpiWXdoaHozUFdK?= =?utf-8?B?UjNNejc2Zk14RGpuK2JOU2lJQWhjZkF6aDY2V3dvQjFybkRwS2laMkRvM1I0?= =?utf-8?B?V3dIQXdpYTdxSHBQN09xM2tzZDZuZ0NjbC9vRDExeVhlOWI1cmhaczlVc0Fk?= =?utf-8?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gCqGd0Vr42Xhd6j59KmsurM+obWxnoha90fGW4308w18l4xNb/oO8+3inhNgGA8a53sMxQM+G73B707/kVgTZg9GRZnHgUJG38Vt5Ayg==;24:wO4Z2xLT/5tYz5fbXgTZSqbUPAa4vpadc9pIjn5+/Lktm4/1AMmnVF/DXYaBfIfJnvL0jeNWmUF4TCM1Fdn6fVdjjrp8ukGlywdULPNlTaM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0663;7:uxMc3xIGWGQaPfe1KulFhedNcHIwtknjlYWZzTcgZvC+mLtgrz5i0HkSVCa+Gk2u0oFcaghRRSfdaCohYIjUsFLJoYwKtlXJgZq049ZmXd4VEnDN+B/PvXFFE7JHKyrJY8o0lpDwTb4Xd39A11PAepALCwslo1a2re0PPtLeln5vaCjWpZ8AQ1SnxNLsLD+J1wh32K/s5FqVkVCD/w9Wp/f77VEzJpfvaMVBrXRhfSxEon0USR8G5xJEc1MSPdJeoeg+2ZzkWbWSsDBHf2IXGXDMkmZ45U5j/yL4ZRlH5ZSObg9bfCR1hW0dsQmqTg0tpsZJtlwCa7y6yYhRHM1LU1GWTLadVnZomuuqIBZJnpdyvzIuD4/rsFpMV9MJnW8++o7wCqdya0pdRfvMJaLZV4C7iAsDeQAZjtjgE68XBKrmh+9GOhNESMS3tdHG5XC2y8wxONSIQrIsdVaJmdc6Ng==;20:swqJQz0xysa2xkN3PxiWi0XEQHsydBkVF8kROzENN0XBVnyHL9Sh8a/NTeqOy625Fpn3H2Ecs45ishRfHirx6vuElzA9TmHIWbicmBEv59wMq7cenA1HkOkBphRULN81wwFIXG6z94+dqi+ICBCNKQRVQHmGl5tm0XJaRaWuHY7mQm+rNfsXH4Vtu71Se9hYV8MRfIfkPBInvJP/sbMYc0JQV+KjNcfRLONUzARlCppBrJJtIhc3DKe0tAbkl/AU X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2016 17:08:03.7921 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0663 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4387 Lines: 113 Hi Paolo, On 12/13/2016 11:09 AM, Paolo Bonzini wrote: > > > On 12/12/2016 18:51, Brijesh Singh wrote: >> As per the AMD BKDG [1] Section 2.7.1, we should not be using any of >> these instruction for MMIO access, the behavior is undefined. >> >> The question is, do we really need to add logic to detect the cross-page >> MMIO accesses and push/pop mem operations so that we pass the >> kvm-unit-test or we should update the unit test? Like you said >> cross-page MMIO access detection is going to be a bit tricky. > > Actually there is a nice trick you can do to support cross-page > MMIO access detection: > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 37cd31645d45..754d251dc611 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -4549,6 +4549,7 @@ static int emulator_read_write_onepage(unsigned long addr, void *val, > */ > if (vcpu->arch.gpa_available && > !emulator_is_string_op(ctxt) && > + (addr & ~PAGE_MASK) == (exception->address & ~PAGE_MASK) && > vcpu_is_mmio_gpa(vcpu, addr, exception->address, write)) { > gpa = exception->address; > goto mmio; > > > It fixes the testcase for push/pop with two memory ops too, > but it's not reliable, so your change for TwoMemOp is still > necessary. Feel free to include it in your patch! > > Regarding the replacement of emulator_is_string_op with > emulator_is_two_memory_op, what about REP prefixes? In that > case I think that you do need to reject string ops. So the > function would have to reject all TwoMemOps, and REP-prefixed > String operations. > Since now we are going to perform multiple conditional checks before concluding that its safe to use HW provided GPA. How about if we add two functions "emulator_is_rep_string_op" and "emulator_is_two_mem_op" into emulator.c and use these functions inside the x86.c to determine if its safe to use HW provided gpa? Please let me know if you are okay with this approach. diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index 777eea2..29e44cb 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h @@ -441,6 +441,7 @@ int emulator_task_switch(struct x86_emulate_ctxt *ctxt, int emulate_int_real(struct x86_emulate_ctxt *ctxt, int irq); void emulator_invalidate_register_cache(struct x86_emulate_ctxt *ctxt); void emulator_writeback_register_cache(struct x86_emulate_ctxt *ctxt); -bool emulator_is_string_op(struct x86_emulate_ctxt *ctxt); +bool emulator_is_rep_string_op(struct x86_emulate_ctxt *ctxt); +bool emulator_is_two_mem_op(struct x86_emulate_ctxt *ctxt); #endif /* _ASM_X86_KVM_X86_EMULATE_H */ diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 8e7d09f..16149ad 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -5485,10 +5485,12 @@ void emulator_writeback_register_cache(struct x86_emulate_ctxt *ctxt) writeback_registers(ctxt); } -bool emulator_is_string_op(struct x86_emulate_ctxt *ctxt) +bool emulator_is_rep_string_op(struct x86_emulate_ctxt *ctxt) { - if (ctxt->d & String) - return true; + return ctxt->rep_prefix && (ctxt->d & String) ? true: false; +} - return false; +bool emulator_is_two_mem_op(struct x86_emulate_ctxt *ctxt) +{ + return ctxt->d & TwoMemOp ? true : false; } diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 640527b..0bc814a 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4548,6 +4548,12 @@ static const struct read_write_emulator_ops write_emultor = { .write = true, }; +static bool emulator_can_use_gpa(struct x86_emulate_ctxt *ctxt) +{ + return emulator_is_rep_string_op(ctxt) && + emulator_is_two_mem_op(ctxt) ? true : false; +} + static int emulator_read_write_onepage(unsigned long addr, void *val, unsigned int bytes, struct x86_exception *exception, @@ -4568,7 +4574,7 @@ static int emulator_read_write_onepage(unsigned long addr, void *val, * occurred. */ if (vcpu->arch.gpa_available && - !emulator_is_string_op(ctxt) && + !emulator_can_use_gpa(ctxt) && vcpu_is_mmio_gpa(vcpu, addr, exception->address, write) && (addr & ~PAGE_MASK) == (exception->address & ~PAGE_MASK)) {