Re: [v3 23/26] KVM: Update Posted-Interrupts Descriptor when vCPU is preempted

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

 




On 18/12/2014 04:15, Wu, Feng wrote:
> Thanks for your comments, Paolo!
> 
> If we use u64 new_control, we cannot use new.sn any more.
> Maybe we can change the struct pi_desc {} like this:
> 
> typedef struct pid_control{
>         u64     on      : 1,
>         sn      : 1,
>         rsvd_1  : 13,
>         ndm     : 1,
>         nv      : 8,
>         rsvd_2  : 8,
>         ndst    : 32;
> }pid_control_t;
> 
> struct pi_desc {
>         u32 pir[8];     /* Posted interrupt requested */
> 		pid_control_t control;

Probably something like this to keep the union:

typedef union pid_control {
	u64 full;
	struct {
		u64 on : 1,
		...
	} fields;
};

>         u32 rsvd[6];
> } __aligned(64);
> 
> 
> Then we can define pid_control_t new_control, old_control. And use new_control.sn = 0.
> 
> What is your opinon?

Sure.  Alternatively, keep using struct pi_desc new; just
do not zero it, nor access any field outide the control word.

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