All of lore.kernel.org
 help / color / mirror / Atom feed
From: <suravee.suthikulpanit@amd.com>
To: xen-devel@lists.xen.org, paul.durrant@citrix.com,
	jbeulich@suse.com, george.dunlap@citrix.com
Cc: keir@xen.org, Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: [PATCH v4 2/2] x86/hvm: Add check when register io handler
Date: Wed, 1 Jun 2016 14:53:00 -0500	[thread overview]
Message-ID: <1464810780-1640-3-git-send-email-suravee.suthikulpanit@amd.com> (raw)
In-Reply-To: <1464810780-1640-1-git-send-email-suravee.suthikulpanit@amd.com>

From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>

At the time of registering HVM I/O handler, the HVM domain might
not have been initialized, which means the hvm_domain.io_handler
would be NULL. In the hvm_next_io_handler(), this should be asserted.

Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
---
 xen/arch/x86/hvm/intercept.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/hvm/intercept.c b/xen/arch/x86/hvm/intercept.c
index fc757d0..bf141c9 100644
--- a/xen/arch/x86/hvm/intercept.c
+++ b/xen/arch/x86/hvm/intercept.c
@@ -258,6 +258,8 @@ struct hvm_io_handler *hvm_next_io_handler(struct domain *d)
 {
     unsigned int i = d->arch.hvm_domain.io_handler_count++;
 
+    ASSERT(d->arch.hvm_domain.io_handler);
+
     if ( i == NR_IO_HANDLERS )
     {
         domain_crash(d);
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      parent reply	other threads:[~2016-06-01 19:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01 19:52 [PATCH v4 0/2] Fix xen crash when starting HVM guest due to missing io handler suravee.suthikulpanit
2016-06-01 19:52 ` [PATCH v4 1/2] AMD IOMMU: Removing currently non-functioning guest iommu feature suravee.suthikulpanit
2016-06-02  8:01   ` Paul Durrant
2016-06-02  9:55   ` Jan Beulich
2016-06-02 10:26     ` Wei Liu
2016-06-02 10:43       ` Jan Beulich
2016-06-02 10:49         ` Wei Liu
2016-06-01 19:53 ` suravee.suthikulpanit [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=1464810780-1640-3-git-send-email-suravee.suthikulpanit@amd.com \
    --to=suravee.suthikulpanit@amd.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=paul.durrant@citrix.com \
    --cc=xen-devel@lists.xen.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.