On 06/29/2009 12:51 PM, Gleb Natapov wrote:
On Mon, Jun 29, 2009 at 12:42:02PM +0300, Avi Kivity wrote:
On 06/28/2009 03:15 PM, Gleb Natapov wrote:
This patch implements MSR interface to a local apic as defines by x2APIC
Intel specification.
@@ -269,7 +275,12 @@ int kvm_apic_match_physical_addr(struct kvm_lapic *apic, u16 dest)
int kvm_apic_match_logical_addr(struct kvm_lapic *apic, u8 mda)
{
int result = 0;
- u8 logical_id;
+ u32 logical_id;
+
+ if (apic_x2apic_mode(apic)) {
+ logical_id = apic_get_reg(apic, APIC_LDR);
+ return logical_id& (uint16_t)mda;
+ }
mda is u8, why cast it?
Is mda will be zero extended without any cast at all? I suppose it
should.
Yes.
--
error compiling committee.c: too many arguments to function
--
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