From: Paolo Bonzini <pbonzini@redhat.com>
To: Nadav Amit <nadav.amit@gmail.com>
Cc: Wanpeng Li <wanpeng.li@linux.intel.com>,
Nadav Amit <namit@cs.technion.ac.il>,
kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: Keep masked bits unmodified on kvm_set_shared_msr
Date: Thu, 21 Aug 2014 14:31:53 +0200 [thread overview]
Message-ID: <53F5E6B9.2090307@redhat.com> (raw)
In-Reply-To: <C2E4BFF4-1A94-4D20-8B1B-146D21FD023D@gmail.com>
Il 21/08/2014 14:19, Nadav Amit ha scritto:
>> >
>> > He meant they are passed as zero in the WRMSR but actually they're not
>> > zeroed. They're set to the value that is passed to kvm_set_shared_msr,
>> > and this value is massaged elsewhere to do mix guest and host bugs. See
>> > update_transition_efer.
>> >
>> > So I'm removing this patch, it's wrong.
> I stand corrected - they are massaged in update_transition_efer.
>
> The question is whether this massaging is specific to EFER, or a general one.
> Currently update_transition_efer does:
>
> guest_efer &= ~ignore_bits;
> guest_efer |= host_efer & ignore_bits;
> vmx->guest_msrs[efer_offset].data = guest_efer;
>
> I think this is a general behaviour - taking the masked bits from the
> host, and the rest from the guest. Therefore, it makes sense to put
> this logic into kvm_set_shared_msr. I understand the EFER is
> currently the only MSR which is only partially masked. Nonetheless,
> kvm_set_shared_msr can be useful for other purposes.
Yes, I agree. But right now it's not particularly interesting to do it:
you're not using the functionality in e.g. the MISC_ENABLE patch, so
it's just a matter of defining the semantics of the .data field, basically.
Paolo
next prev parent reply other threads:[~2014-08-21 12:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 12:11 [PATCH] KVM: x86: Keep masked bits unmodified on kvm_set_shared_msr Nadav Amit
2014-08-21 8:05 ` Wanpeng Li
2014-08-21 11:56 ` Paolo Bonzini
2014-08-21 12:19 ` Nadav Amit
2014-08-21 12:31 ` Paolo Bonzini [this message]
2014-08-21 12:41 ` Nadav Amit
2014-08-22 4:13 ` Wanpeng Li
2014-08-22 6:55 ` Nadav Amit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53F5E6B9.2090307@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=nadav.amit@gmail.com \
--cc=namit@cs.technion.ac.il \
--cc=wanpeng.li@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox