Re: [Qemu-devel] KVM/QEMU: Support executing from flash device

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

 



On 03/04/2012 10:12 AM, Gleb Natapov wrote:
> On Sat, Mar 03, 2012 at 10:56:02PM -0800, Jordan Justen wrote:
> > On Tue, Oct 25, 2011 at 00:47, Avi Kivity <avi@xxxxxxxxxx> wrote:
> > > The core issue that kvm (the kernel part) supports two styles of memory:
> > > read/write RAM, and read/write MMIO.  ROM wants writes to be ignored,
> > > and rom/device wants reads serviced from memory and writes serviced by
> > > userspace (as MMIO).
> > >
> > > It should not be too hard to patch kvm to support these additional two
> > > styles.  The entry point is the KVM_SET_USER_MEMORY_REGION ioctl to
> > > define the new attributes for the region, and kvm_mmu_page_fault() to
> > > map these pages as read-only and emulate writes (for ROM/device regions).
> > 
> > Additional context for CC'd kvm-devel: I would like to support
> > executing from an emulated flash memory on kvm.  The flash memory
> > would be a CFI (Firmware Hub-like) device which is programmed via MMIO
> > at the same addresses in memory where the execution would occur.
> > 
> > What is needed is:
> > 1. The ability to set a region to allow read/exec,
> >    but trap to qemu on writes.
> > 2. qemu should then be able to set the region
> >    to trap on reads/exec/writes.
> Do you want to execute code from a flash while it traps on read/exec?
> KVM emulator can't do that.

No, he wants read/exec to go to RAM, and writes to be handled as mmio. 
This should work.

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux