[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/5] x86/pv: Fix the determiniation of whether to inject #DB


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 14 Sep 2023 17:13:49 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gXrE9kB5G0kp1YfqkLG9M5csYIjyLKALWahcxAfjhbY=; b=LYQz/xnooGsPTo4+jjWjMcnyeLbtu/3VKZiX7gQT0sJr/KJ+g6pXRTauBpBWoLYO0SBsCKIhrzcVW5JYylg9muj2uvBpFIt09Gu9o/W2jtAxj6KgUpz+9FV+Zg5ACirmrgD02BRWSxs8p89/jbqfqvHbiAVAeKabq4DQW8xxCpCucsO8H3QmJTpoJHiT4/HLusfn8vvIbaIGhEXiJ/lDSdOKDFexJ94OTJzlv7JLAgqoNAgnphlztCBUgGGIKxLyJ6a8Y3gWmTOWXguG0KTRu6VKB3U/DIA3+qoBaxUyGTyb6wWHaLcikCVnUjTlAMmAbpN6aJK38JldIwito+Y1xA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b55F8e85XOJOszqLcYIeAusFQfzR04dGXRZknzWSzsaeC17/cMrwtgrTUkJsFahEfM0Wu9p7VJ9F6KxeRilsczxmBRqDHfo5irsmA9lTqlvGDTSpqi/Hw5qQMAVTwIQuXoV7+bV88ICmknuGKNOuY0fiH3SwJHX3Fpt1f57pBS6gPJyBlG8Ge3bQPni4pwu3NbhK4hzRvj9Tfxw7HFUcVRrwNh/cOEmUt2ba3hnGnGqX2Ly4MtjwyN5ThJmklrJ1HAcr6O+uDXNMyc51aCPf7uJQhEoJ40KfvH+46+lP4X7VfOCS4gyQnYB28fzZsDiskW7x0aAFgT7CwQ9MBDp3kA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jinoh Kang <jinoh.kang.kr@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 14 Sep 2023 15:13:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.09.2023 16:49, Andrew Cooper wrote:
> On 14/09/2023 3:40 pm, Jan Beulich wrote:
>> On 13.09.2023 01:21, Andrew Cooper wrote:
>>> We long ago fixed the emulator to not inject exceptions behind our back.
>>> Therefore, assert that that a PV event (including interrupts, because that
>>> would be buggy too) isn't pending, rather than skipping the #DB injection if
>>> one is.
>>>
>>> On the other hand, the io_emul() stubs which use X86EMUL_DONE rather than
>>> X86EMUL_OKAY may have pending breakpoints to inject after the IO access is
>>> complete, not to mention a pending singlestep.
>> If you look at the uses of X86EMUL_DONE you'll see that this error code is
>> not intended to ever come back from the emulator. It's solely used to
>> communicate between hooks and the core emulator. Therefore I think this
>> part of the description and the added case label are wrong here. With them
>> dropped again ...
> 
> Oh.  I see that now you've pointed it out, but it's far from clear.
> 
> I'd suggest that we extend the the debug wrapper for x86_emulate() with
> an assertion to this effect.  It also has a knock-on effect in later
> patches.
> 
> With the DONE part dropped, this probably wants merging into patch 4. 
> Thoughts?

Not sure. Even then the patch here looks to still make sense on its own.
I don't mind the folding, I guess, but for the moment the two R-b are
only on the individual patches.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.