From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: Re: [kvm-unit-tests PATCH v2] s390x: Interception tests Date: Mon, 5 Jun 2017 17:13:54 +0200 Message-ID: <926cb84f-2b56-9d3f-d40a-6dbd227b66d7@redhat.com> References: <1496407461-31163-1-git-send-email-thuth@redhat.com> <34dffa40-8b82-1b92-94c3-eeb5578659cc@redhat.com> <76c94373-51f7-96cf-acf2-4a6a2912543d@redhat.com> <0c0fd14e-cdb9-dd7a-70d3-b8421adf2a60@redhat.com> <98a7bffa-3cf2-cc7c-dacd-e2c39fa28f19@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Christian Borntraeger , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= To: Thomas Huth , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:32908 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751162AbdFEPOD (ORCPT ); Mon, 5 Jun 2017 11:14:03 -0400 In-Reply-To: <98a7bffa-3cf2-cc7c-dacd-e2c39fa28f19@redhat.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 04.06.2017 10:59, Thomas Huth wrote: > On 02.06.2017 18:22, David Hildenbrand wrote: >> >>>>> +static uint8_t pagebuf[PAGE_SIZE * 2] __attribute__((aligned(PAGE_SIZE))); >>>>> + >>>>> +/* Enable or disable low-address protection */ >>>>> +static void set_low_prot(bool enable) >>>>> +{ >>>>> + uint64_t cr0; >>>>> + >>>>> + asm volatile (" stctg 0,0,%0 " : : "Q"(cr0)); >>>> >>>> Use %c0 instead? >>> >>> It's got to be %%c0 ... not sure whether this looks really nicer here? >> >> %c0 should work, e.g. do a "git grep "%c0" in linux.git >> >> arch/s390/kernel/base.S: lctlg %c0,%c0,0(%r4) > > Well, that's a .S file ... for inline assembly in .c files, you need two > percentage characters. > Oh right, wasn't aware of that! As I said, keep it like that if you prefer. -- Thanks, David