qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Inject Interrupt, Using VMCS during qemu live migration.
@ 2012-09-09  3:09 李 ヨンジュン
  2012-09-09  7:45 ` Gleb Natapov
  0 siblings, 1 reply; 3+ messages in thread
From: 李 ヨンジュン @ 2012-09-09  3:09 UTC (permalink / raw)
  To: qemu-devel

Hello, I am trying to inject interrupt, in final phase of Live migration.

I use vmcs_write32 function to inject interrupt. This function is called
by qemu, with ioctl.

This is Code.

(KVM)

void vmcs_write32_provider(unsigned long field, u32 value)
{
vmcs_write32(field, value);
}


long kvm_arch_vcpu_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)
{
~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
case KVM_TEST_IOCTL: {
r=0;
//printk("Test IOCTL!!!\n");
int type = 0;
int trap=58;
u32 intr_fields= (0x80000000 | (type<<8) | trap);
vmcs_write32_provider(0x00004016,intr_fields);
printk("vmcs_write Success!!!\n");

goto out;
}


This code works perfectly when called by hypercall.(When call this
function in kvm_emulate_hypercall function by guest VM.)

But, when I trying to call this function by qemu(ioctl), This error
message is occurred.

http://pds23.egloos.com/pds/201209/09/86/f0062286_504c07a4bc3c7.png

I need help. Thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [Qemu-devel] Inject Interrupt, Using VMCS during qemu live migration.
@ 2012-09-09  3:27 李 ヨンジュン
  0 siblings, 0 replies; 3+ messages in thread
From: 李 ヨンジュン @ 2012-09-09  3:27 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]

Hello, I am trying to inject interrupt, in final phase of Live migration.

I use vmcs_write32 function to inject interrupt. This function is called
by qemu, with ioctl.

This is Code.

(KVM)

void vmcs_write32_provider(unsigned long field, u32 value)
{
vmcs_write32(field, value);
}


long kvm_arch_vcpu_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)
{
~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
case KVM_TEST_IOCTL: {
r=0;
//printk("Test IOCTL!!!\n");
int type = 0;
int trap=58;
u32 intr_fields= (0x80000000 | (type<<8) | trap);
vmcs_write32_provider(0x00004016,intr_fields);
printk("vmcs_write Success!!!\n");

goto out;
}


This code works perfectly when called by hypercall.(When call this
function in kvm_emulate_hypercall function by guest VM.)

But, when I trying to call this function by qemu(ioctl), This error
message is occurred.

KVM: entry failed, hardware error 0x80000021

If you're running a guest on an Intel machine without unrestricted mode support, the failure can be most likely due to the guest entering an invalid state for Intel VT. For example, the guest maybe running in big real mode which is not supported on less recent Intel processors.


~~~~~~~~~~~~~~~~Register's Information's~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RAX=00000000000000001~~~~~~~~~~~~~~~~~~~~~~~~


  I need help. Thank you.


[-- Attachment #2: Type: text/html, Size: 1654 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-09  7:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-09  3:09 [Qemu-devel] Inject Interrupt, Using VMCS during qemu live migration 李 ヨンジュン
2012-09-09  7:45 ` Gleb Natapov
  -- strict thread matches above, loose matches on Subject: below --
2012-09-09  3:27 李 ヨンジュン

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).