xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xen.org>
To: Aravindh Puthiyaparambil <aravindh@virtuata.com>
Cc: Xudong Hao <xudong.hao@intel.com>,
	eddie.dong@intel.com, xen-devel@lists.xen.org, JBeulich@suse.com,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Xiantao Zhang <xiantao.zhang@intel.com>
Subject: Re: [PATCH 1/3] xen: Add instruction length parameter in function hvm_inject_exception
Date: Fri, 25 May 2012 21:42:22 +0100	[thread overview]
Message-ID: <CBE5AD3E.41412%keir@xen.org> (raw)
In-Reply-To: <CAB10MZAxnQDdB3Mm_ve4unRFKcHdzFovRz9aC4+R9dM5xHpY-A@mail.gmail.com>

On 25/05/2012 20:17, "Aravindh Puthiyaparambil" <aravindh@virtuata.com>
wrote:

>> I don't like adding yet another parameter for all callers, especially as we
>> should also be passing down the event type (sw interrupt, hw exception, ...)
>> and that would bloat the parameter list further.
>> 
>> I attach a cleanup patch which packs everything into a new struct and
>> renames hvm_inject_exception to hvm_inject_trap. I then define a couple of
>> wrappers around that function for existing callers, so that their parameter
>> lists actually *shrink*.
>> 
>> Let me know what you think. If it looks acceptable I can check it in and we
>> can build on top of this restructuring. The aim being to keep
>> hvm/vmx_inject_trap dumb, and push down the knowledge from the callers into
>> it.
> 
> So I take it that with just this patch injecting of software
> interrupts will not work and I should hold off on testing that out.
> What is the plan for injecting software interrupts? Add another libxc
> API for that?

Yes, everything represented in my 'struct hvm_trap', plus instruction
length, which my patch doesn't add, should be part of the trap injection API
through hvm_op hypercall and libxc. So the toolstack can inject an arbitrary
trap type, on an arbitrary vector, specify an error code (and cr2 for page
fault), and specify an increment for rIP when the trap is successfully
injected. All through one API function.

But as you say, my patch is just a proposed refactoring basis for Xudong's
patches. It actually almost certainly reverts some behaviour that you guys
actually want, which then gets added back in more sanely in patches that go
on top.

 -- Keir

  reply	other threads:[~2012-05-25 20:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 19:06 [PATCH 0/3] XEN: fix vmx exception mistake Xudong Hao
2012-05-24 19:06 ` [PATCH 1/3] xen: Add instruction length parameter in function hvm_inject_exception Xudong Hao
2012-05-25  8:53   ` Keir Fraser
2012-05-25 19:17     ` Aravindh Puthiyaparambil
2012-05-25 20:42       ` Keir Fraser [this message]
2012-05-28  6:37         ` Hao, Xudong
2012-05-28  6:24     ` Hao, Xudong
2012-05-28  6:49       ` Keir Fraser
2012-05-29  8:55         ` Hao, Xudong
2012-05-29 12:38           ` Keir Fraser
2012-05-30  0:58             ` Hao, Xudong
2012-05-24 19:06 ` [PATCH 2/3] VMX: Fix the mistake of exception execution Xudong Hao

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=CBE5AD3E.41412%keir@xen.org \
    --to=keir@xen.org \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=aravindh@virtuata.com \
    --cc=eddie.dong@intel.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xiantao.zhang@intel.com \
    --cc=xudong.hao@intel.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).