[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH] x86: Add a new physdev_op PHYSDEVOP_nr_irqs_gsi
>>> On 10.04.12 at 17:13, Lin Ming <mlin@xxxxxxxxxxxxx> wrote: > This new physdev_op is added for Linux guest kernel to get the correct > nr_irqs_gsi value. I'm not convinced this is really needed - the kernel can work out the right number without any hypercall afaict. Jan > 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@xxxxxxxxxxxxx> > --- > 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 > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |