qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/1] xen-hvm.c: Add support for Xen access to vm


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH 1/1] xen-hvm.c: Add support for Xen access to vmport
Date: Mon, 29 Sep 2014 13:53:22 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.1.2


On 29.09.14 13:10, Paolo Bonzini wrote:
> Il 29/09/2014 10:12, Alexander Graf ha scritto:
>> Could you instead plug into the existing cpu_synchronize_registers()
>> framework and just implement register synchronization for the Xen side,
>> just like it's been done for KVM? :)
> 
> No, because here it's Xen that sends out the register contents.  With
> KVM, it's QEMU that requests the register contents.

So? We could still reuse the same infrastructure:


  cpu_handle_ioreq()
  {
    ...

    if (req->type == IOPORT_REGISTERS_SYNCHRONIZED) {
        cpu->xen_vcpu_dirty = true;
        synchronize_xen_to_env(xenptr, cpu);
    }

    handle_ioreq();

    if (req->type == IOPORT_REGISTERS_SYNCHRONIZED) {
        cpu->xen_vcpu_dirty = false;
        synchronize_env_to_xen(xenptr, cpu);
    }

    ...
  }

  void xen_cpu_synchronize_state(CPUState *cpu)
  {
    assert(cpu->xen_vcpu_dirty);
  }

Then no changes to the vmport code would be necessary and this problems
where some code path wants to do direct access to registers
automatically tells us that things are broken.


Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]