From: Oleksandr <olekstysh@gmail.com>
To: Julien Grall <julien@xen.org>,
paul@xen.org, 'Jan Beulich' <jbeulich@suse.com>
Cc: xen-devel@lists.xenproject.org,
'Oleksandr Tyshchenko' <oleksandr_tyshchenko@epam.com>,
'Stefano Stabellini' <sstabellini@kernel.org>,
'Julien Grall' <jgrall@amazon.com>
Subject: Re: [PATCH V1 14/16] xen/ioreq: Use guest_cmpxchg64() instead of cmpxchg()
Date: Wed, 23 Sep 2020 23:29:32 +0300 [thread overview]
Message-ID: <a6d2d349-7a9f-6091-c6b5-8fcd4bf8338d@gmail.com> (raw)
In-Reply-To: <e2ac245b-ca3c-77e1-160a-9f664b4a3339@xen.org>
On 23.09.20 21:12, Julien Grall wrote:
Hi Julien
>
>>>>>
>>>>>
>>>>> On 16/09/2020 10:04, Jan Beulich wrote:
>>>>>> On 10.09.2020 22:22, Oleksandr Tyshchenko wrote:
>>>>>>> @@ -1325,7 +1327,7 @@ static int hvm_send_buffered_ioreq(struct
>>>>>>> hvm_ioreq_server *s, ioreq_t *p)
>>>>>>>
>>>>>>> new.read_pointer = old.read_pointer - n *
>>>>>>> IOREQ_BUFFER_SLOT_NUM;
>>>>>>> new.write_pointer = old.write_pointer - n *
>>>>>>> IOREQ_BUFFER_SLOT_NUM;
>>>>>>> - cmpxchg(&pg->ptrs.full, old.full, new.full);
>>>>>>> + guest_cmpxchg64(d, &pg->ptrs.full, old.full, new.full);
>>>>>>
>>>>>> But the memory we're updating is shared with s->emulator, not
>>>>>> with d,
>>>>>> if I'm not mistaken.
>>>>>
>>>>> It is unfortunately shared with both s->emulator and d when using the
>>>>> legacy interface.
>>>>
>>>> When using magic pages they should be punched out of the P2M by the
>>>> time the code gets here, so the memory should not be guest-visible.
>>>
>>> Can you point me to the code that doing this?
>>>
>>> Cheers,
>>>
>> If we are not going to use legacy interface on Arm we will have a
>> page to be mapped in a single domain at the time.
> Right, but this is common code... You have to think what would be the
> implication if we are using the legacy interface.
>
> Thankfully the only user of the legacy interface is x86 so far and
> there is not concern regarding the atomics operations.
>
> If we are happy to consider that the legacy interface will never be
> used (I am starting to be worry that one will ask it on Arm...) then
> we should be fine.
>
> I think would be worth documenting in the commit message and the code
> (hvm_allow_set_param()) that the legacy interface *must* not be used
> without revisiting the code.
Will do.
--
Regards,
Oleksandr Tyshchenko
next prev parent reply other threads:[~2020-09-23 20:29 UTC|newest]
Thread overview: 111+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 20:21 [PATCH V1 00/16] IOREQ feature (+ virtio-mmio) on Arm Oleksandr Tyshchenko
2020-09-10 20:21 ` [PATCH V1 01/16] x86/ioreq: Prepare IOREQ feature for making it common Oleksandr Tyshchenko
2020-09-14 13:52 ` Jan Beulich
2020-09-21 12:22 ` Oleksandr
2020-09-21 12:31 ` Jan Beulich
2020-09-21 12:47 ` Oleksandr
2020-09-21 13:29 ` Jan Beulich
2020-09-21 14:43 ` Oleksandr
2020-09-21 15:28 ` Jan Beulich
2020-09-23 17:22 ` Julien Grall
2020-09-23 18:08 ` Oleksandr
2020-09-10 20:21 ` [PATCH V1 02/16] xen/ioreq: Make x86's IOREQ feature common Oleksandr Tyshchenko
2020-09-14 14:17 ` Jan Beulich
2020-09-21 19:02 ` Oleksandr
2020-09-22 6:33 ` Jan Beulich
2020-09-22 9:58 ` Oleksandr
2020-09-22 10:54 ` Jan Beulich
2020-09-22 15:05 ` Oleksandr
2020-09-22 15:52 ` Jan Beulich
2020-09-23 12:28 ` Oleksandr
2020-09-24 10:58 ` Jan Beulich
2020-09-24 15:38 ` Oleksandr
2020-09-24 15:51 ` Jan Beulich
2020-09-24 18:01 ` Julien Grall
2020-09-25 8:19 ` Paul Durrant
2020-09-30 13:39 ` Oleksandr
2020-09-30 17:47 ` Julien Grall
2020-10-01 6:59 ` Paul Durrant
2020-10-01 8:49 ` Jan Beulich
2020-10-01 8:50 ` Paul Durrant
2020-09-10 20:21 ` [PATCH V1 03/16] xen/ioreq: Make x86's hvm_ioreq_needs_completion() common Oleksandr Tyshchenko
2020-09-14 14:59 ` Jan Beulich
2020-09-22 16:16 ` Oleksandr
2020-09-23 17:27 ` Julien Grall
2020-09-10 20:21 ` [PATCH V1 04/16] xen/ioreq: Provide alias for the handle_mmio() Oleksandr Tyshchenko
2020-09-14 15:10 ` Jan Beulich
2020-09-22 16:20 ` Oleksandr
2020-09-23 17:28 ` Julien Grall
2020-09-23 18:17 ` Oleksandr
2020-09-10 20:21 ` [PATCH V1 05/16] xen/ioreq: Make x86's hvm_mmio_first(last)_byte() common Oleksandr Tyshchenko
2020-09-14 15:13 ` Jan Beulich
2020-09-22 16:24 ` Oleksandr
2020-09-10 20:22 ` [PATCH V1 06/16] xen/ioreq: Make x86's hvm_ioreq_(page/vcpu/server) structs common Oleksandr Tyshchenko
2020-09-14 15:16 ` Jan Beulich
2020-09-14 15:59 ` Julien Grall
2020-09-22 16:33 ` Oleksandr
2020-09-10 20:22 ` [PATCH V1 07/16] xen/dm: Make x86's DM feature common Oleksandr Tyshchenko
2020-09-14 15:56 ` Jan Beulich
2020-09-22 16:46 ` Oleksandr
2020-09-24 11:03 ` Jan Beulich
2020-09-24 12:47 ` Oleksandr
2020-09-23 17:35 ` Julien Grall
2020-09-23 18:28 ` Oleksandr
2020-09-10 20:22 ` [PATCH V1 08/16] xen/mm: Make x86's XENMEM_resource_ioreq_server handling common Oleksandr Tyshchenko
2020-09-10 20:22 ` [PATCH V1 09/16] arm/ioreq: Introduce arch specific bits for IOREQ/DM features Oleksandr Tyshchenko
2020-09-11 10:14 ` Oleksandr
2020-09-16 7:51 ` Jan Beulich
2020-09-22 17:12 ` Oleksandr
2020-09-23 18:03 ` Julien Grall
2020-09-23 20:16 ` Oleksandr
2020-09-24 11:08 ` Jan Beulich
2020-09-24 16:02 ` Oleksandr
2020-09-24 18:02 ` Oleksandr
2020-09-25 6:51 ` Jan Beulich
2020-09-25 9:47 ` Oleksandr
2020-09-26 13:12 ` Julien Grall
2020-09-26 13:18 ` Oleksandr
2020-09-24 16:51 ` Julien Grall
2020-09-24 17:25 ` Julien Grall
2020-09-24 18:22 ` Oleksandr
2020-09-26 13:21 ` Julien Grall
2020-09-26 14:57 ` Oleksandr
2020-09-10 20:22 ` [PATCH V1 10/16] xen/mm: Handle properly reference in set_foreign_p2m_entry() on Arm Oleksandr Tyshchenko
2020-09-16 7:17 ` Jan Beulich
2020-09-16 8:50 ` Julien Grall
2020-09-16 8:52 ` Jan Beulich
2020-09-16 8:55 ` Julien Grall
2020-09-22 17:30 ` Oleksandr
2020-09-16 8:08 ` Jan Beulich
2020-09-10 20:22 ` [PATCH V1 11/16] xen/ioreq: Introduce hvm_domain_has_ioreq_server() Oleksandr Tyshchenko
2020-09-16 8:04 ` Jan Beulich
2020-09-16 8:13 ` Paul Durrant
2020-09-16 8:39 ` Julien Grall
2020-09-16 8:43 ` Paul Durrant
2020-09-22 18:39 ` Oleksandr
2020-09-22 18:23 ` Oleksandr
2020-09-10 20:22 ` [PATCH V1 12/16] xen/dm: Introduce xendevicemodel_set_irq_level DM op Oleksandr Tyshchenko
2020-09-26 13:50 ` Julien Grall
2020-09-26 14:21 ` Oleksandr
2020-09-10 20:22 ` [PATCH V1 13/16] xen/ioreq: Make x86's invalidate qemu mapcache handling common Oleksandr Tyshchenko
2020-09-16 8:50 ` Jan Beulich
2020-09-22 19:32 ` Oleksandr
2020-09-24 11:16 ` Jan Beulich
2020-09-24 16:45 ` Oleksandr
2020-09-25 7:03 ` Jan Beulich
2020-09-25 13:05 ` Oleksandr
2020-10-02 9:55 ` Oleksandr
2020-10-07 10:38 ` Julien Grall
2020-10-07 12:01 ` Oleksandr
2020-09-10 20:22 ` [PATCH V1 14/16] xen/ioreq: Use guest_cmpxchg64() instead of cmpxchg() Oleksandr Tyshchenko
2020-09-16 9:04 ` Jan Beulich
2020-09-16 9:07 ` Julien Grall
2020-09-16 9:09 ` Paul Durrant
2020-09-16 9:12 ` Julien Grall
2020-09-22 20:05 ` Oleksandr
2020-09-23 18:12 ` Julien Grall
2020-09-23 20:29 ` Oleksandr [this message]
2020-09-16 9:07 ` Paul Durrant
2020-09-23 18:05 ` Julien Grall
2020-09-10 20:22 ` [PATCH V1 15/16] libxl: Introduce basic virtio-mmio support on Arm Oleksandr Tyshchenko
2020-09-10 20:22 ` [PATCH V1 16/16] [RFC] libxl: Add support for virtio-disk configuration Oleksandr Tyshchenko
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=a6d2d349-7a9f-6091-c6b5-8fcd4bf8338d@gmail.com \
--to=olekstysh@gmail.com \
--cc=jbeulich@suse.com \
--cc=jgrall@amazon.com \
--cc=julien@xen.org \
--cc=oleksandr_tyshchenko@epam.com \
--cc=paul@xen.org \
--cc=sstabellini@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).