[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] pc: Fix disabling of vapic for compat PC mo
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] pc: Fix disabling of vapic for compat PC models |
Date: |
Wed, 30 Jul 2014 13:19:36 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Paolo Bonzini <address@hidden> writes:
> Il 30/07/2014 10:57, Michael S. Tsirkin ha scritto:
>> On Wed, Jul 30, 2014 at 09:01:59AM +0200, Jan Kiszka wrote:
>>> We used to be able to address both the QEMU and the KVM APIC via "apic".
>>> This doesn't work anymore. So we need to use their parent class to turn
>>> off the vapic on machines that should not expose them.
>>>
>>> Signed-off-by: Jan Kiszka <address@hidden>
>>
>>
>>
>> OK so this is intended for 2.2?
If yes, we should cc: qemu-stable.
>> In that case, how about creating a macro with type name,
>> and using that? This way things don't break if we rename
>> something again.
>
> Don't we have warnings for that now?
Warnings don't help much in cases like this: "apic" still exists and has
the property, it's just not the device we want. Macros aren't
foolproof, either.
>>> ---
>>> hw/i386/pc_piix.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
>>> index 9694f88..73ba77d 100644
>>> --- a/hw/i386/pc_piix.c
>>> +++ b/hw/i386/pc_piix.c
>>> @@ -645,7 +645,7 @@ static QEMUMachine pc_machine_v1_1 = {
>>> .property = "class",\
>>> .value = stringify(PCI_CLASS_MEMORY_RAM),\
>>> },{\
>>> - .driver = "apic",\
>>> + .driver = "apic-common",\
>>> .property = "vapic",\
>>> .value = "off",\
>>> },{\
>>> --
>>> 1.8.1.1.298.ge7eed54
You could use TYPE_APIC_COMMON here. Including
"hw/i386/apic_internal.h" for it would be not so nice, though.