All of lore.kernel.org
 help / color / mirror / Atom feed
From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: andrew.cooper3@citrix.com, paul.durrant@citrix.com,
	Tim Deegan <tim@xen.org>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH RFC] x86/emulate: implement hvmemul_cmpxchg() with an actual CMPXCHG
Date: Fri, 31 Mar 2017 09:17:07 +0300	[thread overview]
Message-ID: <36d0e322-407c-16dd-8831-ebc2f7f33021@bitdefender.com> (raw)
In-Reply-To: <58DD44AE020000780014ACF2@prv-mh.provo.novell.com>

On 03/30/2017 06:47 PM, Jan Beulich wrote:
>> Speaking of emulated MMIO, I've got this when the guest was crashing
>> immediately (pre RETRY loop):
>>
>>  MMIO emulation failed: d3v8 32bit @ 0008:82679f3c -> f0 0f ba 30 00 72
>> 07 8b cb e8 da 4b ff ff 8b 45
> 
> That's a BTR, which we should be emulating fine. More information
> would need to be collected to have a chance to understand what
> might be going one (first of all the virtual and physical memory
> address this was trying to act on).

Right, the BTR part should be fine, but I think the LOCK part is what's
causing the issue. I've done a few more test runs to see what return
RETRY (dumping the instruction with an "(r)" prefix to distinguish from
the UNHANDLEABLE dump), and a couple of instructions return RETRY (BTR
and XADD, both LOCK-prefixed, which means they now involve CMPXCHG
handler, which presumably now fails - possibly simply because it's
always LOCKed in my patch):

# grep "Mem event" /var/log/xen/console/hypervisor.log | sort | uniq
(XEN) (r) Mem event emulation failed: d3v1 32bit @ 0008:8267f1aa -> f0
0f ba 28 07 72 d5 8d 45 f4 50 33 ff 56 47 53
(XEN) (r) Mem event emulation failed: d3v5 32bit @ 0008:8267f1aa -> f0
0f ba 28 07 72 d5 8d 45 f4 50 33 ff 56 47 53
(XEN) (r) Mem event emulation failed: d3v5 32bit @ 0008:826ebc7c -> f0
0f c1 08 85 c9 74 1f f6 c1 02 75 1a 41 8d 41
(XEN) (r) Mem event emulation failed: d3v6 32bit @ 0008:8267f1aa -> f0
0f ba 28 07 72 d5 8d 45 f4 50 33 ff 56 47 53
(XEN) (r) Mem event emulation failed: d3v6 32bit @ 0008:826eb861 -> f0
0f ba 30 00 72 07 8b cb e8 da 4b ff ff 8b 45
(XEN) (r) Mem event emulation failed: d3v6 32bit @ 0008:826ebc7c -> f0
0f c1 08 85 c9 74 1f f6 c1 02 75 1a 41 8d 41
(XEN) (r) Mem event emulation failed: d3v6 32bit @ 0008:826ebce6 -> f0
0f c1 01 8b 7d fc c1 ef 09 81 e7 f8 ff 7f 00
(XEN) (r) Mem event emulation failed: d3v7 32bit @ 0008:8267f1aa -> f0
0f ba 28 07 72 d5 8d 45 f4 50 33 ff 56 47 53
(XEN) (r) Mem event emulation failed: d3v7 32bit @ 0008:826eb861 -> f0
0f ba 30 00 72 07 8b cb e8 da 4b ff ff 8b 45
(XEN) (r) Mem event emulation failed: d3v7 32bit @ 0008:826ebc7c -> f0
0f c1 08 85 c9 74 1f f6 c1 02 75 1a 41 8d 41
(XEN) (r) Mem event emulation failed: d3v7 32bit @ 0008:826ebce6 -> f0
0f c1 01 8b 7d fc c1 ef 09 81 e7 f8 ff 7f 00
(XEN) (r) Mem event emulation failed: d3v7 32bit @ 0008:826ec59a -> f0
0f ba 31 00 72 09 e8 a3 3e ff ff 8b 44 24 18
(XEN) (r) Mem event emulation failed: d3v7 32bit @ 0008:826f6276 -> f0
0f ba 28 07 72 cc 39 53 04 75 5e 8d 43 08 8b
(XEN) (r) Mem event emulation failed: d3v8 32bit @ 0008:8267f1aa -> f0
0f ba 28 07 72 d5 8d 45 f4 50 33 ff 56 47 53
(XEN) (r) Mem event emulation failed: d3v8 32bit @ 0008:826eb861 -> f0
0f ba 30 00 72 07 8b cb e8 da 4b ff ff 8b 45
(XEN) (r) Mem event emulation failed: d3v9 32bit @ 0008:8267f1aa -> f0
0f ba 28 07 72 d5 8d 45 f4 50 33 ff 56 47 53
(XEN) (r) Mem event emulation failed: d3v9 32bit @ 0008:826eb861 -> f0
0f ba 30 00 72 07 8b cb e8 da 4b ff ff 8b 45
(XEN) (r) Mem event emulation failed: d3v9 32bit @ 0008:826ebce6 -> f0
0f c1 01 8b 7d fc c1 ef 09 81 e7 f8 ff 7f 00
(XEN) (r) Mem event emulation failed: d3v9 32bit @ 0008:826ec583 -> f0
0f c1 01 64 a1 24 01 00 00 66 ff 88 86 00 00


Thanks,
Razvan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-03-31  6:17 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 13:24 [PATCH RFC] x86/emulate: implement hvmemul_cmpxchg() with an actual CMPXCHG Razvan Cojocaru
2017-03-28  9:14 ` Razvan Cojocaru
2017-03-28 10:03   ` Jan Beulich
2017-03-28 10:25     ` Andrew Cooper
2017-03-28 10:44       ` Jan Beulich
2017-03-29  5:59       ` Jan Beulich
2017-03-29  8:14         ` Razvan Cojocaru
2017-03-28 10:27     ` Razvan Cojocaru
2017-03-28 10:47       ` Jan Beulich
2017-03-28 10:50         ` Razvan Cojocaru
2017-03-28 11:32           ` Jan Beulich
2017-03-29 13:55           ` Jan Beulich
2017-03-29 14:00             ` Razvan Cojocaru
2017-03-29 15:04               ` Razvan Cojocaru
2017-03-29 15:49                 ` Razvan Cojocaru
2017-03-30 12:05                   ` Jan Beulich
2017-03-30 12:25                     ` Razvan Cojocaru
2017-03-30 12:56                     ` Razvan Cojocaru
2017-03-30 14:08                       ` Razvan Cojocaru
2017-03-30 14:21                         ` Jan Beulich
2017-03-30 15:05                           ` Razvan Cojocaru
2017-03-30 15:47                             ` Jan Beulich
2017-03-31  6:17                               ` Razvan Cojocaru [this message]
2017-03-31  7:34                                 ` Jan Beulich
2017-03-31  9:56                                   ` Razvan Cojocaru
2017-03-31 14:46                                     ` Jan Beulich
2017-03-31 15:01                                       ` Razvan Cojocaru
2017-03-31 15:04                                         ` Jan Beulich
2017-04-01 16:56                                           ` Razvan Cojocaru
2017-04-03 10:23                                             ` Jan Beulich
2017-04-03 18:20                                             ` Razvan Cojocaru
2017-04-03 18:36                                               ` Razvan Cojocaru
2017-04-04  9:07                                                 ` Jan Beulich
2017-04-04 12:01                                                   ` Razvan Cojocaru
2017-04-08 22:15                                                 ` Razvan Cojocaru
2017-04-09 11:03                                                   ` Razvan Cojocaru
2017-04-10 10:18                                                   ` Jan Beulich
2017-03-29 14:12             ` Razvan Cojocaru

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=36d0e322-407c-16dd-8831-ebc2f7f33021@bitdefender.com \
    --to=rcojocaru@bitdefender.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=paul.durrant@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.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 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.