On 09/06/2010 12:17 AM, Marcelo Tosatti wrote:
On Sun, Sep 05, 2010 at 11:15:16AM +0300, Avi Kivity wrote:
On 09/03/2010 02:36 AM, Marcelo Tosatti wrote:
+
+int main(void)
+{
+ unsigned long long status, addr;
+ int bank;
+
+ smp_init();
+ init_idt();
+ set_idt_entry(18, do_handle_mce);
+
+ write_cr4(read_cr4() | X86_CR4_MCE);
+
+ wrmsr(MSR_IA32_MCG_CTL, ~0ULL);
+ wrmsr(MSR_IA32_MC0_CTL, ~0ULL);
+
+ status = MCI_STATUS_VAL|MCI_STATUS_UC;
+ addr = 0x7ffffff;
+ bank = 0;
+ ex_done = 0;
+ /* mce cpu bank status mcgstatus addr misc */
+ monitor_printf("mce %d %d 0x%llx 1 0x%llx 1\n", 0, bank, status, addr);
Wow, this is really evil.
I guess it could be done more nicely via the api unit tests we
talked about during kf2010?
I don't remember the details.
Map gpa:hva 1:1; map gva:gpa 1:1; do direct calls between host userspace
and guest kernel.
Hope to post a patch soon.
What do you consider evil?
Not really evil. It's a nice roundabout loop guest -> testdev ->
chardev -> host -> chardev -> monitor -> kvm -> guest.
Works well, but only for features that are directly controlled via the
monitor. To test save/restore (for vcpu events or fpu) we need
something more direct (guest -> host userspace -> guest).
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html