Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1620407

RE: [PATCH 2/7] x86/hyper-v: fast hypercall implementation

Path csiph.com!news.redatomik.org!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From Jork Loeser <Jork.Loeser@microsoft.com>
Newsgroups linux.kernel
Subject RE: [PATCH 2/7] x86/hyper-v: fast hypercall implementation
Date Mon, 10 Apr 2017 19:20:02 +0200
Message-ID <tuL8S-3IQ-9@gated-at.bofh.it> (permalink)
References <ttAfw-6oW-11@gated-at.bofh.it> <ttAfw-6oW-9@gated-at.bofh.it> <ttI3o-3uy-17@gated-at.bofh.it> <tuDuG-788-13@gated-at.bofh.it> <tuINI-1Y2-3@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=h0DBG0HwMR9nwf+XXKbrp/U17RijrvdNgkU01MQiyQg=; b=To+Grpa75154cjZqdUuVPcVIhwK7v3Va0MqwY/uUegiGy8V6NpA5WdBZsQ7Y4yZ6XwyC9SeX8lNn+1Aj4gP2Qq7ehsx4+57LiQ35kInTwdcqrKTLTXMl29jTJ0uN7cxJJZqM58pAXs4zaGuwPE3FM3MOumMiCLhRIsuv6QEpcOM=
Thread-Topic [PATCH 2/7] x86/hyper-v: fast hypercall implementation
Thread-Index AQHSr5HoZRPhelnvPUu9nkW1D8tTuqG6TdlggAQG1hmAAF5VjYAAJBQA
Accept-Language en-US
Content-Language en-US
Authentication-Results redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=microsoft.com;
X-Originating-IP [50.125.67.66]
X-Ms-Publictraffictype Email
X-Microsoft-Exchange-Diagnostics 1;CY4PR21MB0631;7:MRvRnpGZmJn6GUXACB0x3ItM0qngHGP5Osj3/kwkoBgCvVoIIH8lP/0s73YhCOTnS75qny3N5nv7MqLHbmtWFfnkSBBbSytFCEHzSZ7Mc0Cc8e1Ttvv72vW7sFA/Rg3hgAXYFIlMsQRfvShyHj2ibxbGc+U7VAXs13nz6HJOPNV4Ts66lP2Rzi6xG3402vgXrRbkDEE0gRAohb8EoEPM8+uxs2HfXNdoqRir5TY+6y1i/6yEnV0NCx6n2eyXP5CikQp5131Z4pJCcj+PfzF5tHl/HqA4Ue6TGq61YqhdEpZM2Yky6RVBGDfnyM/huXZ0JBTnkWQfkJ1v6GccjmbjlIdGrxEsfkVzS+n6KG90A40=
X-Ms-Office365-Filtering-Correlation-ID 83bc1e1a-6c99-4c51-9795-08d48035036e
X-Ms-Office365-Filtering-Ht Tenant
X-Microsoft-Antispam UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081);SRVR:CY4PR21MB0631;
X-Microsoft-Antispam-Prvs <CY4PR21MB063109F839CCBFC1C57034EDF1010@CY4PR21MB0631.namprd21.prod.outlook.com>
X-Exchange-Antispam-Report-Test UriScan:;
X-Exchange-Antispam-Report-Cfa-Test BCL:0;PCL:0;RULEID:(61425038)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123555025)(20161123564025)(20161123562025)(6072148);SRVR:CY4PR21MB0631;BCL:0;PCL:0;RULEID:;SRVR:CY4PR21MB0631;
X-Forefront-Prvs 027367F73D
X-Forefront-Antispam-Report SFV:NSPM;SFS:(10019020)(6009001)(39400400002)(39410400002)(39860400002)(39840400002)(39850400002)(39450400003)(13464003)(6916009)(8990500004)(10290500002)(2900100001)(5005710100001)(86362001)(2950100002)(33656002)(229853002)(10090500001)(9686003)(54906002)(55016002)(99286003)(2906002)(53936002)(93886004)(122556002)(6506006)(6436002)(77096006)(8936002)(4326008)(25786009)(110136004)(38730400002)(8676002)(3846002)(6116002)(102836003)(66066001)(81166006)(3660700001)(6246003)(3280700002)(7696004)(189998001)(74316002)(50986999)(305945005)(5660300001)(54356999)(76176999)(7736002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0631;H:CY4PR21MB0631.namprd21.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en;
Spamdiagnosticoutput 1:99
Spamdiagnosticmetadata NSPM
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-Originatororg microsoft.com
X-Ms-Exchange-Crosstenant-Originalarrivaltime 10 Apr 2017 17:14:14.3762 (UTC)
X-Ms-Exchange-Crosstenant-Fromentityheader Hosted
X-Ms-Exchange-Crosstenant-ID 72f988bf-86f1-41af-91ab-2d7cd011db47
X-Ms-Exchange-Transport-Crosstenantheadersstamped CY4PR21MB0631
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 46
Organization linux.* mail to news gateway
X-Original-Cc "devel@linuxdriverproject.org" <devel@linuxdriverproject.org>, "x86@kernel.org" <x86@kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, KY Srinivasan <kys@microsoft.com>, "Haiyang Zhang" <haiyangz@microsoft.com>, Stephen Hemminger <sthemmin@microsoft.com>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, Steven Rostedt <rostedt@goodmis.org>
X-Original-Date Mon, 10 Apr 2017 17:14:14 +0000
X-Original-Message-ID <CY4PR21MB06317F537F1C08766A7E224AF1010@CY4PR21MB0631.namprd21.prod.outlook.com>
X-Original-References <20170407112701.17157-1-vkuznets@redhat.com> <20170407112701.17157-3-vkuznets@redhat.com> <MWHPR21MB0639BB443B70588B144B9F2DF10C0@MWHPR21MB0639.namprd21.prod.outlook.com> <87vaqc8wbt.fsf@vitty.brq.redhat.com> <87mvboqq2u.fsf@vitty.brq.redhat.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1620407

Show key headers only | View raw


> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]

> Vitaly Kuznetsov <vkuznets@redhat.com> writes:
> 
> > Jork Loeser <Jork.Loeser@microsoft.com> writes:
> >
> 
> [snip]
> 
> >
> >>> +	}
> >>> +#else
> >>> +	{
> >>> +		u32 hv_status_hi, hv_status_lo;
> >>> +
> >>> +		__asm__ __volatile__ ("call *%6"
> >>> +				      : "=d"(hv_status_hi),
> >>> +					"=a"(hv_status_lo) :
> >>> +					"d" (control.as_uint32_hi),
> >>> +					"a" (control.as_uint32_lo),
> >>> +					"c" ((u32)input1),
> >>> +					"b" ((u32)(input1 >> 32)),
> >>> +					"m" (hv_hypercall_pg)
> >>> +				      : "cc");
> >>> +
> >>> +		return hv_status_lo | ((u64)hv_status_hi << 32);
> >>> +	}
> >>> +#endif
> >> Please clobber ECX, EDI and ESI for x86. Clobber memory as well?
> >
> > ECX is already in listed in inputs (lower part of input1) so it's
> > automatically clobbered. I'll add EDI and ESI to clobbers here, thanks!
> 
> Oh, I see what you mean - hypervisor is allowed to write to ecx too, we need
> to pass it with '+'. Will do, thanks!

Yes, thank you Vitaly!

As for memory clobber, we would want that if there were hypercalls that modify memory and can issued via the "fast" ABI. If there are not, we are fine. 

Regards,
Jork

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/7] x86/hyper-v: fast hypercall implementation Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-07 13:30 +0200
  RE: [PATCH 2/7] x86/hyper-v: fast hypercall implementation Jork Loeser <Jork.Loeser@microsoft.com> - 2017-04-07 21:50 +0200
    Re: [PATCH 2/7] x86/hyper-v: fast hypercall implementation Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-10 11:10 +0200
      Re: [PATCH 2/7] x86/hyper-v: fast hypercall implementation Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-10 16:50 +0200
        RE: [PATCH 2/7] x86/hyper-v: fast hypercall implementation Jork Loeser <Jork.Loeser@microsoft.com> - 2017-04-10 19:20 +0200
  RE: [PATCH 2/7] x86/hyper-v: fast hypercall implementation KY Srinivasan <kys@microsoft.com> - 2017-04-08 17:20 +0200
    Re: [PATCH 2/7] x86/hyper-v: fast hypercall implementation Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-10 10:50 +0200

csiph-web