From: Ian Campbell <Ian.Campbell@citrix.com>
To: Mukesh Rathor <mukesh.rathor@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
"Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH V2 2/7]: PVH: use native irq, enable callback, use HVM ring ops, ...
Date: Fri, 12 Oct 2012 09:52:17 +0100 [thread overview]
Message-ID: <1350031937.14806.49.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <20121011145711.0d9c27df@mantra.us.oracle.com>
On Thu, 2012-10-11 at 22:57 +0100, Mukesh Rathor wrote:
> PVH: make gdt_frames[]/gdt_ents into a union with {gdtaddr, gdtsz}, PVH
> only needs to send down gdtaddr and gdtsz. irq.c: PVH uses
> native_irq_ops. vcpu hotplug is currently not available for PVH.
> events.c: setup callback vector for PVH. Finally, PVH ring ops uses HVM
> paths for xenbus.
>
> Signed-off-by: Mukesh R <mukesh.rathor@oracle.com>
> ---
> arch/x86/include/asm/xen/interface.h | 8 +++++++-
> arch/x86/xen/irq.c | 5 ++++-
> arch/x86/xen/p2m.c | 2 +-
> arch/x86/xen/smp.c | 4 ++--
> drivers/xen/cpu_hotplug.c | 4 +++-
> drivers/xen/events.c | 9 ++++++++-
> drivers/xen/xenbus/xenbus_client.c | 3 ++-
> 7 files changed, 27 insertions(+), 8 deletions(-)
>
> diff --git a/arch/x86/include/asm/xen/interface.h b/arch/x86/include/asm/xen/interface.h
> index 555f94d..f11edb0 100644
> --- a/arch/x86/include/asm/xen/interface.h
> +++ b/arch/x86/include/asm/xen/interface.h
> @@ -143,7 +143,13 @@ struct vcpu_guest_context {
> struct cpu_user_regs user_regs; /* User-level CPU registers */
> struct trap_info trap_ctxt[256]; /* Virtual IDT */
> unsigned long ldt_base, ldt_ents; /* LDT (linear address, # ents) */
> - unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
> + union {
> + struct {
> + /* PV: GDT (machine frames, # ents).*/
> + unsigned long gdt_frames[16], gdt_ents;
> + } s;
> + unsigned long gdtaddr, gdtsz; /* PVH: GDTR addr and size */
I've pointed out a few times that I think this is wrong -- gdtaddr and
gdtsz will overlap each other in the union. I'm not sure how it even
works, unless the hypervisor is ignoring one or the other. You need:
union {
struct {
unsigned long gdt_frames[16], gdt_ents;
} pv;
struct {
unsigned long gdtaddr, gdtsz;
} pvh;
} gdt;
(I've gone with naming the union gdt instead of u. You might want
therefore to also drop the gdt prefix from the members?)
Ian.
next prev parent reply other threads:[~2012-10-12 8:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 21:57 Mukesh Rathor
2012-10-12 8:52 ` Ian Campbell [this message]
2012-10-12 19:06 ` [Xen-devel] " Mukesh Rathor
2012-10-15 8:58 ` Ian Campbell
2012-10-16 22:11 ` Mukesh Rathor
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=1350031937.14806.49.camel@zakaz.uk.xensource.com \
--to=ian.campbell@citrix.com \
--cc=Xen-devel@lists.xensource.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mukesh.rathor@oracle.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
all inboxes | Powered by JetHome®