From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] Re: [PATCH 1/3] kvm-unit-tests: add x86 port io accessors
Date: Sun, 27 Feb 2011 17:32:45 +0200 [thread overview]
Message-ID: <4D6A6E9D.5080500@redhat.com> (raw)
In-Reply-To: <4D6A594B.5000603@codemonkey.ws>
On 02/27/2011 04:01 PM, Anthony Liguori wrote:
> On 02/27/2011 06:44 AM, Avi Kivity wrote:
>> On 02/24/2011 11:48 PM, Anthony Liguori wrote:
>>> Signed-off-by: Anthony Liguori<aliguori@us.ibm.com>
>>>
>>> diff --git a/lib/x86/io.h b/lib/x86/io.h
>>> new file mode 100644
>>> index 0000000..bd6341c
>>> --- /dev/null
>>> +++ b/lib/x86/io.h
>>> @@ -0,0 +1,40 @@
>>> +#ifndef IO_H
>>> +#define IO_H
>>> +
>>> +static inline unsigned char inb(unsigned short port)
>>> +{
>>> + unsigned char value;
>>> + asm volatile("inb %w1, %0" : "=a" (value) : "Nd" (port));
>>> + return value;
>>> +}
>>
>> Are those %[wb] really needed? gcc should do the right thing based
>> on the argument type.
>
> It's just a little extra type safety.
Yeah, but those constraints aren't really documented. Linux does use
them in a handful of places so they're unlikely to go away though.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2011-02-27 15:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-24 21:48 [RFC PATCH 0/3] Make kvm-unit-tests more friendly to upstream QEMU Anthony Liguori
2011-02-24 21:48 ` [Qemu-devel] " Anthony Liguori
2011-02-24 21:48 ` [PATCH 1/3] kvm-unit-tests: add x86 port io accessors Anthony Liguori
2011-02-24 21:48 ` [Qemu-devel] " Anthony Liguori
2011-02-27 12:44 ` Avi Kivity
2011-02-27 12:44 ` [Qemu-devel] " Avi Kivity
2011-02-27 14:01 ` Anthony Liguori
2011-02-27 15:32 ` Avi Kivity [this message]
2011-02-24 21:48 ` [PATCH 2/3] kvm-unit-tests: do not set level sensitive irq when initializing the PIC Anthony Liguori
2011-02-24 21:48 ` [Qemu-devel] " Anthony Liguori
2011-02-27 12:46 ` Avi Kivity
2011-02-27 12:46 ` [Qemu-devel] " Avi Kivity
2011-02-24 21:48 ` [PATCH 3/3] kvm-unit-tests: make I/O more friendly to existing QEMU hardware Anthony Liguori
2011-02-24 21:48 ` [Qemu-devel] " Anthony Liguori
2011-02-27 12:49 ` Avi Kivity
2011-02-27 12:49 ` [Qemu-devel] " Avi Kivity
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=4D6A6E9D.5080500@redhat.com \
--to=avi@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.