[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] What should a virtual board emulate?
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] What should a virtual board emulate? |
Date: |
Sun, 19 Jan 2020 12:36:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 1/18/20 9:46 PM, Paolo Bonzini wrote:
> On 04/01/20 22:16, Philippe Mathieu-Daudé wrote:
>> 1/ the Radeon chip is soldered on the motherboard,
>>
>> 2/ the default BIOS expects the Radeon chip to be
>> unconditionally present,
>>
>> I insist this patch is incorrect for the particular case of the
>> Fuloong2e board. I plan to revert it when I post the test.
>>
>> BTW I'm not using --nodefault, I'm running default ./configure:
>>
>> qemu-system-mips64el -M fulong2e -bios pmon_2e.bin \
>> -display none -vga none -serial stdio
>
> But if you're not specifying -nodefaults, why are you specifying a
> configuration that your BIOS does not support? You should just remove
> -vga none and leave in -display none.
OK, with this information I searched what enforcing -vga none, with:
$ git grep -- -vga.*none python/
python/qemu/machine.py:232: args = ['-display', 'none', '-vga',
'none']
Context:
61 class QEMUMachine(object):
...
230
231 def _base_args(self):
232 args = ['-display', 'none', '-vga', 'none']
...
290 def launch(self):
301 try:
302 self._launch()
...
314 def _launch(self):
315 """
316 Launch the VM and establish a QMP connection
317 """
318 devnull = open(os.path.devnull, 'rb')
319 self._pre_launch()
320 self._qemu_full_args = (self._wrapper + [self._binary] +
321 self._base_args() + self._args)
Except the refactors moving this code, the original commit is:
$ git show 0fd05e8dd1e
commit 0fd05e8dd1ee7ae143fba3d6bcc6abe3fbeaeb34
Author: Paolo Bonzini <address@hidden>
Date: Wed Jun 6 16:23:27 2012 +0200
qemu-iotests: start vms in qtest mode
This way, they will not execute any VM code at all. However, right now
the cancellation test is "relying" on being slowed down by TCG executing
BIOS code. So, change the timeouts.
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index e27b40e289..e05b1d640b 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -54,7 +54,9 @@ class VM(object):
self._qemu_log_path = os.path.join(test_dir, 'qemu-log.%d' %
os.getpid())
self._args = qemu_args + ['-chardev',
'socket,id=mon,path=' + self._monitor_path,
- '-mon', 'chardev=mon,mode=control', '-nographic']
+ '-mon', 'chardev=mon,mode=control',
+ '-qtest', 'stdio', '-machine', 'accel=qtest',
+ '-display', 'none', '-vga', 'none']
self._num_drives = 0
def add_drive(self, path, opts=''):
diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
index 4ab7d62961..cc671dd7aa 100755
--- a/tests/qemu-iotests/030
+++ b/tests/qemu-iotests/030
@@ -147,7 +147,7 @@ class TestStreamStop(ImageStreamingTestCase):
result = self.vm.qmp('block-stream', device='drive0')
self.assert_qmp(result, 'return', {})
- time.sleep(1)
+ time.sleep(0.1)
events = self.vm.get_qmp_events(wait=False)
self.assertEqual(events, [], 'unexpected QMP event: %s' % events)
So IIUC we need to rework a bit the defaults of QEMUMachine::base_args.