Re: [PATCH 4/4] kvm: Implement PEBS virtualization

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

 



Il 10/06/2014 23:06, Marcelo Tosatti ha scritto:
> BTW how about general PMU migration? As far as I can tell there
> is no code to save/restore the state for that currently, right?

Paolo wrote support for it, recently. Paolo?

Yes, on the KVM side all that is needed is to special case MSR reads and writes that have side effects, for example:

        case MSR_CORE_PERF_GLOBAL_STATUS:
                if (msr_info->host_initiated) {
                        pmu->global_status = data;
                        return 0;
                }
                break; /* RO MSR */
        case MSR_CORE_PERF_GLOBAL_OVF_CTRL:
                if (!(data & (pmu->global_ctrl_mask & ~(3ull<<62)))) {
                        if (!msr_info->host_initiated)
                                pmu->global_status &= ~data;
                        pmu->global_ovf_ctrl = data;
                        return 0;
                }
                break;

Right now this is only needed for writes.

Userspace then can read/write these MSRs, and add them to the migration stream. QEMU has code for that.

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