From: Lin Ming <mlin@ss.pku.edu.cn>
To: xen-devel@lists.xensource.com
Cc: Xiantao Zhang <xiantao.zhang@intel.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [RFC PATCH] x86: Add a new physdev_op PHYSDEVOP_nr_irqs_gsi
Date: Tue, 10 Apr 2012 23:13:06 +0800 [thread overview]
Message-ID: <1334070786.5865.133.camel@hp6530s> (raw)
This new physdev_op is added for Linux guest kernel to get the correct
nr_irqs_gsi value.
See below Linux kernel patch for detail explanation.
[RFC PATCH] xen: get correct nr_irqs_gsi value from hypervisor
http://marc.info/?l=xen-devel&m=133407004503365&w=2
Signed-off-by: Lin Ming <mlin@ss.pku.edu.cn>
---
xen/arch/x86/physdev.c | 8 ++++++++
xen/include/public/physdev.h | 6 ++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index 05fff9e..0912db0 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -688,6 +688,14 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg)
setup_gsi.polarity);
break;
}
+ case PHYSDEVOP_nr_irqs_gsi: {
+ struct physdev_nr_irqs_gsi out;
+
+ out.nr_irqs_gsi = nr_irqs_gsi;
+ ret = copy_to_guest(arg, &out, 1) ? -EFAULT : 0;
+
+ break;
+ }
case PHYSDEVOP_get_free_pirq: {
struct physdev_get_free_pirq out;
struct domain *d;
diff --git a/xen/include/public/physdev.h b/xen/include/public/physdev.h
index b78eeba..7856fc2 100644
--- a/xen/include/public/physdev.h
+++ b/xen/include/public/physdev.h
@@ -312,6 +312,12 @@ struct physdev_pci_device {
typedef struct physdev_pci_device physdev_pci_device_t;
DEFINE_XEN_GUEST_HANDLE(physdev_pci_device_t);
+#define PHYSDEVOP_nr_irqs_gsi 29
+struct physdev_nr_irqs_gsi {
+ /* OUT */
+ uint32_t nr_irqs_gsi;
+};
+
/*
* Notify that some PIRQ-bound event channels have been unmasked.
* ** This command is obsolete since interface version 0x00030202 and is **
--
1.7.2.5
next reply other threads:[~2012-04-10 15:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 15:13 Lin Ming [this message]
2012-04-10 15:33 ` [RFC PATCH] x86: Add a new physdev_op PHYSDEVOP_nr_irqs_gsi Jan Beulich
2012-04-10 15:50 ` Lin Ming
2012-04-10 16:04 ` Jan Beulich
2012-04-10 16:21 ` Stefano Stabellini
2012-04-11 0:36 ` Zhang, Xiantao
2012-04-11 11:42 ` Stefano Stabellini
2012-04-11 11:49 ` Ian Campbell
2012-04-11 13:42 ` Konrad Rzeszutek Wilk
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=1334070786.5865.133.camel@hp6530s \
--to=mlin@ss.pku.edu.cn \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xensource.com \
--cc=xiantao.zhang@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 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.