From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Andrew Cooper <andrew.cooper3@citrix.com>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Julien Grall <julien.grall@arm.com>,
Ingo Molnar <mingo@redhat.com>,
David Vrabel <david.vrabel@citrix.com>,
Jan Beulich <JBeulich@suse.com>, "H. Peter Anvin" <hpa@zytor.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH linux v3 6/9] xen/events: use xen_vcpu_id mapping in events_base
Date: Tue, 26 Jul 2016 14:30:25 +0200 [thread overview]
Message-ID: <1469536228-29932-7-git-send-email-vkuznets__23403.6170681522$1469536315$gmane$org@redhat.com> (raw)
In-Reply-To: <1469536228-29932-1-git-send-email-vkuznets@redhat.com>
EVTCHNOP_bind_ipi and EVTCHNOP_bind_virq pass vCPU id as a parameter and
Xen's idea of vCPU id should be used. Use the newly introduced xen_vcpu_id
mapping to convert it from Linux's id.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
Changes since v1:
- Use xen_vcpu_nr() helper [David Vrabel]
---
drivers/xen/events/events_base.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index 8fb7cbf..d5dbdb9 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -895,7 +895,7 @@ static int bind_ipi_to_irq(unsigned int ipi, unsigned int cpu)
irq_set_chip_and_handler_name(irq, &xen_percpu_chip,
handle_percpu_irq, "ipi");
- bind_ipi.vcpu = cpu;
+ bind_ipi.vcpu = xen_vcpu_nr(cpu);
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_ipi,
&bind_ipi) != 0)
BUG();
@@ -991,7 +991,7 @@ int bind_virq_to_irq(unsigned int virq, unsigned int cpu, bool percpu)
handle_edge_irq, "virq");
bind_virq.virq = virq;
- bind_virq.vcpu = cpu;
+ bind_virq.vcpu = xen_vcpu_nr(cpu);
ret = HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq,
&bind_virq);
if (ret == 0)
@@ -1319,7 +1319,7 @@ static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
/* Send future instances of this interrupt to other vcpu. */
bind_vcpu.port = evtchn;
- bind_vcpu.vcpu = tcpu;
+ bind_vcpu.vcpu = xen_vcpu_nr(tcpu);
/*
* Mask the event while changing the VCPU binding to prevent
@@ -1459,7 +1459,7 @@ static void restore_cpu_virqs(unsigned int cpu)
/* Get a new binding from Xen. */
bind_virq.virq = virq;
- bind_virq.vcpu = cpu;
+ bind_virq.vcpu = xen_vcpu_nr(cpu);
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq,
&bind_virq) != 0)
BUG();
@@ -1483,7 +1483,7 @@ static void restore_cpu_ipis(unsigned int cpu)
BUG_ON(ipi_from_irq(irq) != ipi);
/* Get a new binding from Xen. */
- bind_ipi.vcpu = cpu;
+ bind_ipi.vcpu = xen_vcpu_nr(cpu);
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_ipi,
&bind_ipi) != 0)
BUG();
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-07-26 12:30 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1469536228-29932-1-git-send-email-vkuznets@redhat.com>
2016-07-26 12:30 ` [PATCH linux v3 1/9] x86/xen: update cpuid.h from Xen-4.7 Vitaly Kuznetsov
2016-07-26 12:30 ` [PATCH linux v3 2/9] x86/acpi: store ACPI ids from MADT for future usage Vitaly Kuznetsov
2016-07-26 12:30 ` [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Vitaly Kuznetsov
2016-07-26 12:30 ` [PATCH linux v3 4/9] x86/xen: use xen_vcpu_id mapping for HYPERVISOR_vcpu_op Vitaly Kuznetsov
2016-07-26 12:30 ` [PATCH linux v3 5/9] x86/xen: use xen_vcpu_id mapping when pointing vcpu_info to the shared_info page Vitaly Kuznetsov
2016-07-26 12:30 ` Vitaly Kuznetsov [this message]
2016-07-26 12:30 ` [PATCH linux v3 7/9] xen/events: fifo: use xen_vcpu_id mapping Vitaly Kuznetsov
2016-07-26 12:30 ` [PATCH linux v3 8/9] xen/evtchn: " Vitaly Kuznetsov
2016-07-26 12:30 ` [PATCH linux v3 9/9] xen/pvhvm: run xen_vcpu_setup() for the boot CPU Vitaly Kuznetsov
2016-07-26 13:02 ` [PATCH linux v3 0/9] xen: pvhvm: support bootup on secondary vCPUs David Vrabel
[not found] ` <57975F83.9090604@citrix.com>
2016-07-26 13:19 ` Vitaly Kuznetsov
[not found] ` <87lh0ov8nh.fsf@vitty.brq.redhat.com>
2016-07-26 17:36 ` Stefano Stabellini
[not found] ` <alpine.DEB.2.10.1607261035200.12319@sstabellini-ThinkPad-X260>
2016-07-27 9:11 ` Vitaly Kuznetsov
[not found] ` <1469536228-29932-4-git-send-email-vkuznets@redhat.com>
2016-09-02 15:29 ` [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Julien Grall
[not found] ` <258e8e2e-29c4-1a88-2271-581f2ea59ec2@arm.com>
2016-09-04 21:12 ` Boris Ostrovsky
2016-09-05 9:42 ` Vitaly Kuznetsov
[not found] ` <87d1kiwum9.fsf@vitty.brq.redhat.com>
2016-09-05 19:20 ` Stefano Stabellini
[not found] ` <alpine.DEB.2.10.1609051213470.4105@sstabellini-ThinkPad-X260>
2016-09-06 8:31 ` Vitaly Kuznetsov
[not found] ` <87d1khv38p.fsf@vitty.brq.redhat.com>
2016-09-06 18:09 ` Stefano Stabellini
[not found] ` <alpine.DEB.2.10.1609061104140.4105@sstabellini-ThinkPad-X260>
2016-09-07 9:07 ` Vitaly Kuznetsov
[not found] ` <87d1kgt6vs.fsf@vitty.brq.redhat.com>
2016-09-07 9:10 ` David Vrabel
2016-09-07 9:35 ` Julien Grall
[not found] ` <beb1a4d7-0737-049a-4e74-5c6a95fe8b43@arm.com>
2016-09-07 11:23 ` Vitaly Kuznetsov
[not found] ` <878tv4t0le.fsf@vitty.brq.redhat.com>
2016-09-07 12:55 ` Julien Grall
2016-09-08 6:29 ` Wei Chen
[not found] ` <1469536228-29932-3-git-send-email-vkuznets@redhat.com>
2017-03-01 19:54 ` [PATCH linux v3 2/9] x86/acpi: store ACPI ids from MADT for future usage Thomas Gleixner
2017-03-01 22:04 ` Boris Ostrovsky
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='1469536228-29932-7-git-send-email-vkuznets__23403.6170681522$1469536315$gmane$org@redhat.com' \
--to=vkuznets@redhat.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=julien.grall@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sstabellini@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.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 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).