From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Lin Ming <mlin@ss.pku.edu.cn>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] xen/apic: implement io apic read with hypercall
Date: Thu, 26 Apr 2012 11:33:46 -0400 [thread overview]
Message-ID: <20120426153346.GC26830@phenom.dumpdata.com> (raw)
In-Reply-To: <CAF1ivSYFp7duSCNb+_5teM83icx1O-rY0YVFm7Laq_JLZuzerw@mail.gmail.com>
> >>
> >> unsigned int xen_io_apic_read(unsigned apic, unsigned reg)
> >> {
> >> struct physdev_apic apic_op;
> >> int ret;
> >>
> >> apic_op.apic_physbase = mpc_ioapic_addr(apic);
> >> apic_op.reg = reg;
> >> ret = HYPERVISOR_physdev_op(PHYSDEVOP_apic_read, &apic_op);
> >> if (!ret)
> >> return apic_op.value;
> >>
> >> /* emulate register */
> >> if (reg == 0x1)
> >> return 0x00170020;
> >> else if (reg == 0x0)
> >> return apic << 24;
> >> else
> >> return -1;
> >
> > return 0xfd;
>
> Where does this magic number 0xfd come from?
>
> Both native_io_apic_read and xen_io_apic_read does not return 0xfd on error.
That is correct. But that is what it should have been. Suresh
pointed that out sometime and I managed to lose that part in one of the
commits. The earlier patch of this version did that.
Thought thinking about it this some I am not sure if 0xff is a better
choice... In the end it probably does not matter the slighest.
prev parent reply other threads:[~2012-04-26 15:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 9:25 [PATCH] xen/apic: implement io apic read with hypercall Lin Ming
2012-04-20 9:58 ` [Xen-devel] " Andrew Cooper
2012-04-20 11:13 ` Lin Ming
2012-04-20 12:38 ` Ian Campbell
2012-04-20 12:52 ` Jan Beulich
2012-04-20 12:53 ` Andrew Cooper
2012-04-20 13:12 ` Ian Campbell
2012-04-20 13:20 ` Andrew Cooper
2012-04-20 14:50 ` Lin Ming
2012-04-20 14:59 ` [Xen-devel] " Jan Beulich
2012-04-20 15:06 ` Ian Campbell
2012-04-20 15:39 ` Lin Ming
2012-04-20 16:43 ` Konrad Rzeszutek Wilk
2012-04-20 16:41 ` Konrad Rzeszutek Wilk
2012-04-23 8:42 ` Lin Ming
2012-04-23 15:11 ` Konrad Rzeszutek Wilk
2012-04-24 14:43 ` Lin Ming
2012-04-24 16:23 ` Konrad Rzeszutek Wilk
2012-04-25 10:06 ` Lin Ming
2012-04-26 15:33 ` Konrad Rzeszutek Wilk [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=20120426153346.GC26830@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mlin@ss.pku.edu.cn \
--cc=xen-devel@lists.xensource.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).