kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Thomas Huth <thuth@redhat.com>, kvm@vger.kernel.org
Cc: "Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [kvm-unit-tests PATCH v2] s390x: Interception tests
Date: Mon, 5 Jun 2017 17:13:54 +0200	[thread overview]
Message-ID: <926cb84f-2b56-9d3f-d40a-6dbd227b66d7@redhat.com> (raw)
In-Reply-To: <98a7bffa-3cf2-cc7c-dacd-e2c39fa28f19@redhat.com>

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

      reply	other threads:[~2017-06-05 15:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02 12:44 [kvm-unit-tests PATCH v2] s390x: Interception tests Thomas Huth
2017-06-02 13:49 ` David Hildenbrand
2017-06-02 16:06   ` Thomas Huth
2017-06-02 16:22     ` David Hildenbrand
2017-06-04  8:59       ` Thomas Huth
2017-06-05 15:13         ` David Hildenbrand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=926cb84f-2b56-9d3f-d40a-6dbd227b66d7@redhat.com \
    --to=david@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).