Re: [PATCH v3 08/17] KVM: x86/xen: register shared_info page

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

 



On Mon, 2020-12-14 at 12:53 +0000, Joao Martins wrote:
> Ah OK -- I didn't notice @pv_time_enabled before suggesting this.
> 
> An helper would probably suffice without sacrificing footprint in
> data structures (because you will add 3 of these). The helpers would be, say:
> 
>         kvm_xen_shared_info_set(vcpu->kvm)
>         kvm_xen_vcpu_info_set(vcpu)
>         kvm_xen_vcpu_runstate_set(vcpu)
> 
> And maybe backed by a:
> 
>         kvm_gfn_to_hva_cache_valid(&v->kvm->arch.xen.shinfo_cache)
> 
> Which would check whether a cache is initialized or valid.
> 
> But anyhow, I don't feel strongly about it, specially if there's an existing
> one which sort of sets the precedent.

Maybe if I end up adding a fifth. But right now they aren't even taking
any space. They're just filling what would otherwise be a hole...

/* Xen HVM per vcpu emulation context */
struct kvm_vcpu_xen {
	u64 hypercall_rip;                                 // 0x00 
	u32 current_runstate;                              // 0x08
	bool vcpu_info_set;                                // 0x0c
	bool vcpu_time_info_set;                           // 0x0d
	bool runstate_set;                                 // 0x0e
        /* I can add one more before I care */             // 0x0f
	struct gfn_to_hva_cache vcpu_info_cache;           // 0x10
	struct gfn_to_hva_cache vcpu_time_info_cache;      // 0x38
	struct gfn_to_hva_cache runstate_cache;            // 0x60
	u64 last_steal;                                    // 0x88
	u64 last_state_ns;                                 // 0x90
};

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[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