Re: [PATCH 3/7] KVM: x86 emulator: introduce NoWrite flag

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

 



On Sat, Dec 22, 2012 at 05:28:00PM +0200, Avi Kivity wrote:
> On Sat, Dec 22, 2012 at 5:11 PM, Gleb Natapov <gleb@xxxxxxxxxx> wrote:
> >>  #define X2(x...) x, x
> >>  #define X3(x...) X2(x), x
> >> @@ -1584,6 +1585,9 @@ static int writeback(struct x86_emulate_ctxt *ctxt)
> >>  {
> >>       int rc;
> >>
> >> +     if (ctxt->d & NoWrite)
> >> +             return X86EMUL_CONTINUE;
> >> +
> > Why not make it Dst flag and set dst.type to OP_NONE during decoding
> > instead of this special case?
> 
> My thinking was to eventually convert everything to NoWrite, then it's
> not a special case.  But your approach works too, I can change it if
> you like.  We'll have an if () either way though.
But meanwhile we will have two different ways to disable writeback. When
all instructions will be marked with NoWrite we can switch it easily if
we want. Also some instruction can disable writeback conditionally. cmov is one
(and may be only) of them.

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