From: Kyle Huey <me@kylehuey.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
xen-devel@lists.xen.org, Jun Nakajima <jun.nakajima@intel.com>,
Jan Beulich <JBeulich@suse.com>,
Robert O'Callahan <robert@ocallahan.org>
Subject: Re: [PATCH v2 2/2] x86/Intel: virtualize support for cpuid faulting
Date: Fri, 14 Oct 2016 12:28:52 -0700 [thread overview]
Message-ID: <20161014192852.5355-1-khuey@kylehuey.com> (raw)
In-Reply-To: <e5cee78f-d473-cea0-450c-3ed35e9fd161@citrix.com>
> :) I am now curious as to which bit I missed.
I made these changes.
- Kyle
---
tests/cpuid-faulting/main.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/cpuid-faulting/main.c b/tests/cpuid-faulting/main.c
index 3e782a2..221567d 100644
--- a/tests/cpuid-faulting/main.c
+++ b/tests/cpuid-faulting/main.c
@@ -37,36 +37,39 @@ bool ex_record_fault_ebx(struct cpu_regs *regs,
}
unsigned int stub_rdmsr(uint32_t idx, uint64_t *val)
{
unsigned int fault = 0;
uint32_t lo, hi;
*val = 0;
- asm volatile("1: rdmsr; 2:"
+ asm volatile("1: rdmsr;"
+ "xor %%ebx, %%ebx; 2:"
_ASM_EXTABLE_HANDLER(1b, 2b, ex_record_fault_ebx)
: "=a" (lo), "=d" (hi), "=&b" (fault)
: "c" (idx));
if ( !fault )
*val = (((uint64_t)hi) << 32) | lo;
return fault;
}
unsigned int stub_wrmsr(uint32_t idx, uint64_t val)
{
unsigned int fault = 0;
- asm volatile("1: rdmsr; 2:"
+ asm volatile("1: wrmsr;"
+ "xor %%ebx, %%ebx; 2:"
_ASM_EXTABLE_HANDLER(1b, 2b, ex_record_fault_ebx)
: "=&b" (fault)
: "c" (idx), "a" ((uint32_t)val),
- "d" ((uint32_t)(val >> 32)));
+ "d" ((uint32_t)(val >> 32))
+ : "memory");
return fault;
}
unsigned long stub_cpuid(void)
{
unsigned int fault = 0;
base-commit: 0342fd279b05d0c2e31c8418fcffcdc9e48eb42f
--
2.10.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-10-14 19:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 21:09 [PATCH v2] x86/Intel: virtualize support for cpuid faulting Kyle Huey
2016-10-13 21:09 ` [PATCH v2 1/2] x86/Intel: Expose cpuid_faulting_enabled so it can be used elsewhere Kyle Huey
2016-10-14 11:51 ` Jan Beulich
2016-10-13 21:09 ` [PATCH v2 2/2] x86/Intel: virtualize support for cpuid faulting Kyle Huey
2016-10-14 12:04 ` Jan Beulich
2016-10-14 14:46 ` Andrew Cooper
2016-10-14 17:05 ` Kyle Huey
2016-10-14 17:18 ` Andrew Cooper
2016-10-14 19:28 ` Kyle Huey [this message]
2016-10-17 9:23 ` Andrew Cooper
2016-10-14 19:36 ` Kyle Huey
2016-10-17 12:34 ` Andrew Cooper
2016-10-17 16:28 ` Kyle Huey
2016-10-17 16:39 ` Andrew Cooper
2016-10-17 17:42 ` Kyle Huey
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=20161014192852.5355-1-khuey@kylehuey.com \
--to=me@kylehuey.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=robert@ocallahan.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 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).