From: Don Slutz <dslutz@verizon.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: xen-devel@lists.xensource.com,
"Marcel Apfelbaum" <marcel.a@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, "Don Slutz" <dslutz@verizon.com>,
"Alexander Graf" <agraf@suse.de>,
"Anthony Liguori" <aliguori@amazon.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v2 1/1] xen-hvm.c: Add support for Xen access to vmport
Date: Fri, 03 Oct 2014 14:17:11 -0400 [thread overview]
Message-ID: <542EE827.2040506@terremark.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1410031722200.17038@kaball.uk.xensource.com>
On 10/03/14 12:23, Stefano Stabellini wrote:
> On Fri, 3 Oct 2014, Don Slutz wrote:
>> On 10/03/14 05:52, Stefano Stabellini wrote:
>>> On Thu, 2 Oct 2014, Don Slutz wrote:
>>>> This adds synchronisation of the 6 vcpu registers (only 32bits of
>>>> them) that vmport.c needs between Xen and QEMU.
>>>>
...
>>>> }
>>>> -static void handle_ioreq(ioreq_t *req)
>>>> +static void regs_to_cpu(XenIOState *state, vmware_ioreq_t *vmport_req)
>>>> +{
>>>> + X86CPU *cpu;
>>>> + CPUX86State *env;
>>>> +
>>>> + if (!state->cpu_by_ioreq_id[0]) {
>>>> + CPUState *cpu_state;
>>>> +
>>>> + CPU_FOREACH(cpu_state) {
>>>> + state->cpu_by_ioreq_id[cpu_state->cpu_index] = cpu_state;
>>>> + }
>>>> + }
>>> This is just the initialization, isn't it?
>>> It would be best to move it to an initialization function then.
>>>
>> A new initialization function would need to be added. A new call to it would
>> need
>> to be added (not sure where the best place is). Since the overhead here is
>> small I went with the less intrusive change.
> I'd prefer the initialization function if it is possible.
>
>
>
Ok, how does:
@@ -1023,6 +1028,11 @@ static void xen_main_loop_prepare(XenIOState *state)
state);
if (evtchn_fd != -1) {
+ CPUState *cpu_state;
+
+ CPU_FOREACH(cpu_state) {
+ state->cpu_by_ioreq_id[cpu_state->cpu_index] = cpu_state;
+ }
qemu_set_fd_handler(evtchn_fd, cpu_handle_ioreq, NULL, state);
}
}
Look?
-Don Slutz
WARNING: multiple messages have this Message-ID (diff)
From: Don Slutz <dslutz@verizon.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: xen-devel@lists.xensource.com,
"Marcel Apfelbaum" <marcel.a@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, "Don Slutz" <dslutz@verizon.com>,
"Alexander Graf" <agraf@suse.de>,
"Anthony Liguori" <aliguori@amazon.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [PATCH v2 1/1] xen-hvm.c: Add support for Xen access to vmport
Date: Fri, 03 Oct 2014 14:17:11 -0400 [thread overview]
Message-ID: <542EE827.2040506@terremark.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1410031722200.17038@kaball.uk.xensource.com>
On 10/03/14 12:23, Stefano Stabellini wrote:
> On Fri, 3 Oct 2014, Don Slutz wrote:
>> On 10/03/14 05:52, Stefano Stabellini wrote:
>>> On Thu, 2 Oct 2014, Don Slutz wrote:
>>>> This adds synchronisation of the 6 vcpu registers (only 32bits of
>>>> them) that vmport.c needs between Xen and QEMU.
>>>>
...
>>>> }
>>>> -static void handle_ioreq(ioreq_t *req)
>>>> +static void regs_to_cpu(XenIOState *state, vmware_ioreq_t *vmport_req)
>>>> +{
>>>> + X86CPU *cpu;
>>>> + CPUX86State *env;
>>>> +
>>>> + if (!state->cpu_by_ioreq_id[0]) {
>>>> + CPUState *cpu_state;
>>>> +
>>>> + CPU_FOREACH(cpu_state) {
>>>> + state->cpu_by_ioreq_id[cpu_state->cpu_index] = cpu_state;
>>>> + }
>>>> + }
>>> This is just the initialization, isn't it?
>>> It would be best to move it to an initialization function then.
>>>
>> A new initialization function would need to be added. A new call to it would
>> need
>> to be added (not sure where the best place is). Since the overhead here is
>> small I went with the less intrusive change.
> I'd prefer the initialization function if it is possible.
>
>
>
Ok, how does:
@@ -1023,6 +1028,11 @@ static void xen_main_loop_prepare(XenIOState *state)
state);
if (evtchn_fd != -1) {
+ CPUState *cpu_state;
+
+ CPU_FOREACH(cpu_state) {
+ state->cpu_by_ioreq_id[cpu_state->cpu_index] = cpu_state;
+ }
qemu_set_fd_handler(evtchn_fd, cpu_handle_ioreq, NULL, state);
}
}
Look?
-Don Slutz
next prev parent reply other threads:[~2014-10-03 18:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-02 18:51 [Qemu-devel] [PATCH v2 0/1] Add support for Xen access to vmport Don Slutz
2014-10-02 18:51 ` Don Slutz
2014-10-02 18:51 ` [Qemu-devel] [PATCH v2 1/1] xen-hvm.c: " Don Slutz
2014-10-02 18:51 ` Don Slutz
2014-10-03 9:52 ` [Qemu-devel] " Stefano Stabellini
2014-10-03 9:52 ` Stefano Stabellini
2014-10-03 13:32 ` [Qemu-devel] " Don Slutz
2014-10-03 13:32 ` Don Slutz
2014-10-03 16:23 ` [Qemu-devel] " Stefano Stabellini
2014-10-03 16:23 ` Stefano Stabellini
2014-10-03 18:17 ` Don Slutz [this message]
2014-10-03 18:17 ` Don Slutz
2014-10-06 9:14 ` [Qemu-devel] " Stefano Stabellini
2014-10-06 9:14 ` Stefano Stabellini
2014-10-09 13:53 ` [Qemu-devel] [RFC][PATCH v2x prototype " Don Slutz
2014-10-09 13:53 ` Don Slutz
2014-10-10 13:44 ` [Qemu-devel] " Stefano Stabellini
2014-10-10 13:44 ` Stefano Stabellini
2014-10-10 14:08 ` [Qemu-devel] " Don Slutz
2014-10-10 14:08 ` Don Slutz
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=542EE827.2040506@terremark.com \
--to=dslutz@verizon.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=marcel.a@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.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.