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

RE: [Xen-devel] write_tsc in a PV domain?



> >> arch/x86/traps.c:emulate_privileged_op(), case 0x30.  It looks like
> >> writing to 0x10 would be silently ignored.
> > 
> > Hmmm... maybe I am misreading the code but it looks like the
> > default case will end up with "goto fail" which will not
> > update IP and so will infinite loop trapping on that instruction.
> > 
> > It appears that write_tsc calls are made in linux-2.6.18 (though
> > apparently never get executed) but disappear somewhere before
> > 2.6.24 and don't exist in 2.6.30 either.  So perhaps write_tsc
> > has never been executed in a PV guest and just doesn't work.
> 
> Jeremy is correct. The TSC MSR cannot be written. Most that 
> will happen is
> that Xen will print a warning message, but the WRMSR 
> instruction will always
> be skipped over.

OK, I see, wrmsr_hypervisor_regs(0x10) and mce_wrmsr(0x10) and
rdmsr_safe(0x10) all return 0, so the code at "invalid:" is
executed and a warning is printk'd.  So in the current
implementation, write_tsc is skipped over.

But ARCHITECTURALLY does Xen consider write_tsc to be a no-op
for PV domains, or is this just a case that's never been
encountered before?  In other words, if a future PV OS had a
good reason to write_tsc, would we implement it (and make
the necessary adjustments to Xen's usages of tsc) or just say,
sorry, not allowed?

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.