[Android-virt] [PATCH v8 14/15] ARM: KVM: Handle I/O aborts

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

 



On Mon, Jun 18, 2012 at 9:48 AM, Avi Kivity <avi at redhat.com> wrote:
> On 06/15/2012 10:09 PM, Christoffer Dall wrote:
>> When the guest accesses I/O memory this will create data abort
>> exceptions and they are handled by decoding the HSR information
>> (physical address, read/write, length, register) and forwarding reads
>> and writes to QEMU which performs the device emulation.
>>
>> Certain classes of load/store operations do not support the syndrome
>> information provided in the HSR and we therefore must be able to fetch
>> the offending instruction from guest memory and decode it manually.
>>
>> This requires changing the general flow somewhat since new calls to run
>> the VCPU must check if there's a pending MMIO load and perform the write
>> after userspace has made the data available.
>>
>>
>> ? ? ? memslot = gfn_to_memslot(vcpu->kvm, gfn);
>> diff --git a/arch/arm/kvm/trace.h b/arch/arm/kvm/trace.h
>> index e474a0a..bd3a6cc 100644
>> --- a/arch/arm/kvm/trace.h
>> +++ b/arch/arm/kvm/trace.h
>> @@ -39,6 +39,27 @@ TRACE_EVENT(kvm_exit,
>> ? ? ? TP_printk("PC: 0x%08lx", __entry->vcpu_pc)
>> ?);
>>
>> +TRACE_EVENT(kvm_mmio_emulate,
>> + ? ? TP_PROTO(unsigned long vcpu_pc, unsigned long instr,
>> + ? ? ? ? ? ? ?unsigned long cpsr),
>> + ? ? TP_ARGS(vcpu_pc, instr, cpsr),
>> +
>> + ? ? TP_STRUCT__entry(
>> + ? ? ? ? ? ? __field( ? ? ? ?unsigned long, ?vcpu_pc ? ? ? ? )
>> + ? ? ? ? ? ? __field( ? ? ? ?unsigned long, ?instr ? ? ? ? ? )
>> + ? ? ? ? ? ? __field( ? ? ? ?unsigned long, ?cpsr ? ? ? ? ? ?)
>> + ? ? ),
>> +
>> + ? ? TP_fast_assign(
>> + ? ? ? ? ? ? __entry->vcpu_pc ? ? ? ? ? ? ? ?= vcpu_pc;
>> + ? ? ? ? ? ? __entry->vcpu_pc ? ? ? ? ? ? ? ?= instr;
>> + ? ? ? ? ? ? __entry->vcpu_pc ? ? ? ? ? ? ? ?= cpsr;
>
> -ECUTANDPASTE
>
hehe, nice, thanks.

-Christoffer



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux